src/HOL/Auth/KerberosIV_Gets.thy
author wenzelm
Sun, 02 Nov 2014 18:21:45 +0100
changeset 58889 5b7a9633cfa8
parent 41774 13b97824aec6
child 59807 22bc39064290
permissions -rw-r--r--
modernized header uniformly as section;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37936
1e4c5015a72e updated some headers;
wenzelm
parents: 37809
diff changeset
     1
(*  Title:      HOL/Auth/KerberosIV_Gets.thy
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     2
    Author:     Giampaolo Bella, Cambridge University Computer Laboratory
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     3
    Copyright   1998  University of Cambridge
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     4
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     5
58889
5b7a9633cfa8 modernized header uniformly as section;
wenzelm
parents: 41774
diff changeset
     6
section{*The Kerberos Protocol, Version IV*}
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     7
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     8
theory KerberosIV_Gets imports Public begin
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
     9
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    10
text{*The "u" prefix indicates theorems referring to an updated version of the protocol. The "r" suffix indicates theorems where the confidentiality assumptions are relaxed by the corresponding arguments.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    11
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    12
abbreviation
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    13
  Kas :: agent where "Kas == Server"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    14
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    15
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    16
  Tgs :: agent where "Tgs == Friend 0"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    17
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    18
41774
13b97824aec6 modernized specifications;
wenzelm
parents: 37936
diff changeset
    19
axiomatization where
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    20
  Tgs_not_bad [iff]: "Tgs \<notin> bad"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    21
   --{*Tgs is secure --- we already know that Kas is secure*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    22
36866
426d5781bb25 modernized specifications;
wenzelm
parents: 35416
diff changeset
    23
definition
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    24
 (* authKeys are those contained in an authTicket *)
36866
426d5781bb25 modernized specifications;
wenzelm
parents: 35416
diff changeset
    25
    authKeys :: "event list => key set" where
426d5781bb25 modernized specifications;
wenzelm
parents: 35416
diff changeset
    26
    "authKeys evs = {authK. \<exists>A Peer Ta. Says Kas A
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    27
                        (Crypt (shrK A) \<lbrace>Key authK, Agent Peer, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    28
               (Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key authK, Number Ta\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    29
                  \<rbrace>) \<in> set evs}"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    30
36866
426d5781bb25 modernized specifications;
wenzelm
parents: 35416
diff changeset
    31
definition
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    32
 (* States than an event really appears only once on a trace *)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
    33
  Unique :: "[event, event list] => bool" ("Unique _ on _" [0, 50] 50)
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
    34
  where "(Unique ev on evs) = (ev \<notin> set (tl (dropWhile (% z. z \<noteq> ev) evs)))"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    35
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    36
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    37
consts
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    38
    (*Duration of the authentication key*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    39
    authKlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    40
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    41
    (*Duration of the service key*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    42
    servKlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    43
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    44
    (*Duration of an authenticator*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    45
    authlife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    46
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    47
    (*Upper bound on the time of reaction of a server*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    48
    replylife   :: nat
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    49
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    50
specification (authKlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    51
  authKlife_LB [iff]: "2 \<le> authKlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    52
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    53
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    54
specification (servKlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    55
  servKlife_LB [iff]: "2 + authKlife \<le> servKlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    56
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    57
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    58
specification (authlife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    59
  authlife_LB [iff]: "Suc 0 \<le> authlife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    60
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    61
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    62
specification (replylife)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    63
  replylife_LB [iff]: "Suc 0 \<le> replylife"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    64
    by blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    65
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    66
abbreviation
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    67
  (*The current time is just the length of the trace!*)
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    68
  CT :: "event list=>nat" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    69
  "CT == length"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    70
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    71
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    72
  expiredAK :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    73
  "expiredAK Ta evs == authKlife + Ta < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    74
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    75
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    76
  expiredSK :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    77
  "expiredSK Ts evs == servKlife + Ts < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    78
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    79
abbreviation
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    80
  expiredA :: "[nat, event list] => bool" where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    81
  "expiredA T evs == authlife + T < CT evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    82
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20768
diff changeset
    83
abbreviation
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
    84
  valid :: "[nat, nat] => bool" ("valid _ wrt _" [0, 50] 50) where
20768
1d478c2d621f replaced syntax/translations by abbreviation;
wenzelm
parents: 18886
diff changeset
    85
  "valid T1 wrt T2 == T1 <= replylife + T2"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    86
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    87
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    88
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    89
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    90
(* Predicate formalising the association between authKeys and servKeys *)
35416
d8d7d1b785af replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents: 32960
diff changeset
    91
definition AKcryptSK :: "[key, key, event list] => bool" where
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    92
  "AKcryptSK authK servK evs ==
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    93
     \<exists>A B Ts.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    94
       Says Tgs A (Crypt authK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    95
                     \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    96
                       Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    97
         \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
    98
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
    99
inductive_set "kerbIV_gets" :: "event list set"
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   100
  where
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   101
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   102
   Nil:  "[] \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   103
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   104
 | Fake: "\<lbrakk> evsf \<in> kerbIV_gets;  X \<in> synth (analz (spies evsf)) \<rbrakk>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   105
          \<Longrightarrow> Says Spy B X  # evsf \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   106
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   107
 | Reception: "\<lbrakk> evsr \<in> kerbIV_gets;  Says A B X \<in> set evsr \<rbrakk>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   108
                \<Longrightarrow> Gets B X # evsr \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   109
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   110
(* FROM the initiator *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   111
 | K1:   "\<lbrakk> evs1 \<in> kerbIV_gets \<rbrakk>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   112
          \<Longrightarrow> Says A Kas \<lbrace>Agent A, Agent Tgs, Number (CT evs1)\<rbrace> # evs1
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   113
          \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   114
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   115
(* Adding the timestamp serves to A in K3 to check that
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   116
   she doesn't get a reply too late. This kind of timeouts are ordinary.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   117
   If a server's reply is late, then it is likely to be fake. *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   118
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   119
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   120
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   121
(*FROM Kas *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   122
 | K2:  "\<lbrakk> evs2 \<in> kerbIV_gets; Key authK \<notin> used evs2; authK \<in> symKeys;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   123
            Gets Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   124
          \<Longrightarrow> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   125
                (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number (CT evs2),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   126
                      (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   127
                          Number (CT evs2)\<rbrace>)\<rbrace>) # evs2 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   128
(*
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   129
  The internal encryption builds the authTicket.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   130
  The timestamp doesn't change inside the two encryptions: the external copy
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   131
  will be used by the initiator in K3; the one inside the
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   132
  authTicket by Tgs in K4.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   133
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   134
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   135
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   136
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   137
(* FROM the initiator *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   138
 | K3:  "\<lbrakk> evs3 \<in> kerbIV_gets;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   139
            Says A Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs3;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   140
            Gets A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   141
              authTicket\<rbrace>) \<in> set evs3;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   142
            valid Ta wrt T1
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   143
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   144
          \<Longrightarrow> Says A Tgs \<lbrace>authTicket,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   145
                           (Crypt authK \<lbrace>Agent A, Number (CT evs3)\<rbrace>),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   146
                           Agent B\<rbrace> # evs3 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   147
(*The two events amongst the premises allow A to accept only those authKeys
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   148
  that are not issued late. *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   149
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   150
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   151
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   152
(* FROM Tgs *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   153
(* Note that the last temporal check is not mentioned in the original MIT
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   154
   specification. Adding it makes many goals "available" to the peers. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   155
   Theorems that exploit it have the suffix `_u', which stands for updated 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   156
   protocol.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   157
*)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   158
 | K4:  "\<lbrakk> evs4 \<in> kerbIV_gets; Key servK \<notin> used evs4; servK \<in> symKeys;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   159
            B \<noteq> Tgs;  authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   160
            Gets Tgs \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   161
             (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   162
                                 Number Ta\<rbrace>),
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   163
             (Crypt authK \<lbrace>Agent A, Number T2\<rbrace>), Agent B\<rbrace>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   164
                \<in> set evs4;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   165
            \<not> expiredAK Ta evs4;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   166
            \<not> expiredA T2 evs4;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   167
            servKlife + (CT evs4) <= authKlife + Ta
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   168
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   169
          \<Longrightarrow> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   170
                (Crypt authK \<lbrace>Key servK, Agent B, Number (CT evs4),
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   171
                               Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK,
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   172
                                                Number (CT evs4)\<rbrace> \<rbrace>)
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   173
                # evs4 \<in> kerbIV_gets"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   174
(* Tgs creates a new session key per each request for a service, without
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   175
   checking if there is still a fresh one for that service.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   176
   The cipher under Tgs' key is the authTicket, the cipher under B's key
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   177
   is the servTicket, which is built now.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   178
   NOTE that the last temporal check is not present in the MIT specification.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   179
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   180
*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   181
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   182
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   183
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   184
(* FROM the initiator *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   185
 | K5:  "\<lbrakk> evs5 \<in> kerbIV_gets; authK \<in> symKeys; servK \<in> symKeys;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   186
            Says A Tgs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   187
                \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>,
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   188
                  Agent B\<rbrace>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   189
              \<in> set evs5;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   190
            Gets A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   191
             (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   192
                \<in> set evs5;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   193
            valid Ts wrt T2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   194
          \<Longrightarrow> Says A B \<lbrace>servTicket,
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   195
                         Crypt servK \<lbrace>Agent A, Number (CT evs5)\<rbrace> \<rbrace>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   196
               # evs5 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   197
(* Checks similar to those in K3. *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   198
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   199
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   200
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   201
(* FROM the responder*)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   202
  | K6:  "\<lbrakk> evs6 \<in> kerbIV_gets;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   203
            Gets B \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   204
              (Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>),
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   205
              (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>)\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   206
            \<in> set evs6;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   207
            \<not> expiredSK Ts evs6;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   208
            \<not> expiredA T3 evs6
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   209
         \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   210
          \<Longrightarrow> Says B A (Crypt servK (Number T3))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   211
               # evs6 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   212
(* Checks similar to those in K4. *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   213
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   214
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   215
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   216
(* Leaking an authK... *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   217
 | Oops1: "\<lbrakk> evsO1 \<in> kerbIV_gets;  A \<noteq> Spy;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   218
              Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   219
                (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   220
                                  authTicket\<rbrace>)  \<in> set evsO1;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   221
              expiredAK Ta evsO1 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   222
          \<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent Tgs, Number Ta, Key authK\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   223
               # evsO1 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   224
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   225
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   226
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   227
(*Leaking a servK... *)
23746
a455e69c31cc Adapted to new inductive definition package.
berghofe
parents: 21404
diff changeset
   228
 | Oops2: "\<lbrakk> evsO2 \<in> kerbIV_gets;  A \<noteq> Spy;
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   229
              Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   230
                (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   231
                   \<in> set evsO2;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   232
              expiredSK Ts evsO2 \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   233
          \<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent B, Number Ts, Key servK\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   234
               # evsO2 \<in> kerbIV_gets"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   235
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   236
(*---------------------------------------------------------------------*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   237
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   238
declare Says_imp_knows_Spy [THEN parts.Inj, dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   239
declare parts.Body [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   240
declare analz_into_parts [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   241
declare Fake_parts_insert_in_Un [dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   242
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   243
subsection{*Lemmas about reception event*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   244
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   245
lemma Gets_imp_Says :
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   246
     "\<lbrakk> Gets B X \<in> set evs; evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> \<exists>A. Says A B X \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   247
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   248
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   249
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   250
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   251
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   252
lemma Gets_imp_knows_Spy: 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   253
     "\<lbrakk> Gets B X \<in> set evs; evs \<in> kerbIV_gets \<rbrakk>  \<Longrightarrow> X \<in> knows Spy evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   254
by (blast dest!: Gets_imp_Says Says_imp_knows_Spy)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   255
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   256
(*Needed for force to work for example in new_keys_not_used*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   257
declare Gets_imp_knows_Spy [THEN parts.Inj, dest]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   258
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   259
lemma Gets_imp_knows:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   260
     "\<lbrakk> Gets B X \<in> set evs; evs \<in> kerbIV_gets \<rbrakk>  \<Longrightarrow> X \<in> knows B evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   261
by (metis Gets_imp_knows_Spy Gets_imp_knows_agents)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   262
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   263
subsection{*Lemmas about @{term authKeys}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   264
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   265
lemma authKeys_empty: "authKeys [] = {}"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   266
by (simp add: authKeys_def)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   267
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   268
lemma authKeys_not_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   269
 "(\<forall>A Ta akey Peer.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   270
   ev \<noteq> Says Kas A (Crypt (shrK A) \<lbrace>akey, Agent Peer, Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   271
              (Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, akey, Ta\<rbrace>)\<rbrace>))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   272
       \<Longrightarrow> authKeys (ev # evs) = authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   273
by (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   274
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   275
lemma authKeys_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   276
  "authKeys
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   277
     (Says Kas A (Crypt (shrK A) \<lbrace>Key K, Agent Peer, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   278
      (Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K, Number Ta\<rbrace>)\<rbrace>) # evs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   279
       = insert K (authKeys evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   280
by (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   281
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   282
lemma authKeys_simp:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   283
   "K \<in> authKeys
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   284
    (Says Kas A (Crypt (shrK A) \<lbrace>Key K', Agent Peer, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   285
     (Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K', Number Ta\<rbrace>)\<rbrace>) # evs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   286
        \<Longrightarrow> K = K' | K \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   287
by (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   288
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   289
lemma authKeysI:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   290
   "Says Kas A (Crypt (shrK A) \<lbrace>Key K, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   291
     (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key K, Number Ta\<rbrace>)\<rbrace>) \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   292
        \<Longrightarrow> K \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   293
by (unfold authKeys_def, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   294
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   295
lemma authKeys_used: "K \<in> authKeys evs \<Longrightarrow> Key K \<in> used evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   296
by (simp add: authKeys_def, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   297
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   298
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   299
subsection{*Forwarding Lemmas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   300
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   301
lemma Says_ticket_parts:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   302
     "Says S A (Crypt K \<lbrace>SesKey, B, TimeStamp, Ticket\<rbrace>) \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   303
      \<Longrightarrow> Ticket \<in> parts (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   304
by blast
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   305
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   306
lemma Gets_ticket_parts:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   307
     "\<lbrakk>Gets A (Crypt K \<lbrace>SesKey, Peer, Ta, Ticket\<rbrace>) \<in> set evs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   308
      \<Longrightarrow> Ticket \<in> parts (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   309
by (blast dest: Gets_imp_knows_Spy [THEN parts.Inj])
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   310
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   311
lemma Oops_range_spies1:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   312
     "\<lbrakk> Says Kas A (Crypt KeyA \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   313
           \<in> set evs ;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   314
         evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   315
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   316
apply (erule kerbIV_gets.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   317
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   318
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   319
lemma Oops_range_spies2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   320
     "\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   321
           \<in> set evs ;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   322
         evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> servK \<notin> range shrK & servK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   323
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   324
apply (erule kerbIV_gets.induct, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   325
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   326
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   327
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   328
(*Spy never sees another agent's shared key! (unless it's lost at start)*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   329
lemma Spy_see_shrK [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   330
     "evs \<in> kerbIV_gets \<Longrightarrow> (Key (shrK A) \<in> parts (spies evs)) = (A \<in> bad)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   331
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   332
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   333
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   334
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   335
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   336
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   337
lemma Spy_analz_shrK [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   338
     "evs \<in> kerbIV_gets \<Longrightarrow> (Key (shrK A) \<in> analz (spies evs)) = (A \<in> bad)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   339
by auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   340
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   341
lemma Spy_see_shrK_D [dest!]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   342
     "\<lbrakk> Key (shrK A) \<in> parts (spies evs);  evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> A:bad"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   343
by (blast dest: Spy_see_shrK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   344
lemmas Spy_analz_shrK_D = analz_subset_parts [THEN subsetD, THEN Spy_see_shrK_D, dest!]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   345
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   346
text{*Nobody can have used non-existent keys!*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   347
lemma new_keys_not_used [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   348
    "\<lbrakk>Key K \<notin> used evs; K \<in> symKeys; evs \<in> kerbIV_gets\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   349
     \<Longrightarrow> K \<notin> keysFor (parts (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   350
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   351
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   352
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   353
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   354
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   355
apply (force dest!: keysFor_parts_insert)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   356
txt{*Others*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   357
apply (force dest!: analz_shrK_Decrypt)+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   358
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   359
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   360
(*Earlier, all protocol proofs declared this theorem.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   361
  But few of them actually need it! (Another is Yahalom) *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   362
lemma new_keys_not_analzd:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   363
 "\<lbrakk>evs \<in> kerbIV_gets; K \<in> symKeys; Key K \<notin> used evs\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   364
  \<Longrightarrow> K \<notin> keysFor (analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   365
by (blast dest: new_keys_not_used intro: keysFor_mono [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   366
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   367
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   368
subsection{*Regularity Lemmas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   369
text{*These concern the form of items passed in messages*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   370
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   371
text{*Describes the form of all components sent by Kas*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   372
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   373
lemma Says_Kas_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   374
     "\<lbrakk> Says Kas A (Crypt K \<lbrace>Key authK, Agent Peer, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   375
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   376
         evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow>  
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   377
  K = shrK A  & Peer = Tgs &
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   378
  authK \<notin> range shrK & authK \<in> authKeys evs & authK \<in> symKeys & 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   379
  authTicket = (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   380
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   381
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   382
apply (simp_all (no_asm) add: authKeys_def authKeys_insert)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   383
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   384
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   385
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   386
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   387
lemma SesKey_is_session_key:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   388
     "\<lbrakk> Crypt (shrK Tgs_B) \<lbrace>Agent A, Agent Tgs_B, Key SesKey, Number T\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   389
            \<in> parts (spies evs); Tgs_B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   390
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   391
      \<Longrightarrow> SesKey \<notin> range shrK"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   392
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   393
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   394
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   395
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   396
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   397
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   398
lemma authTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   399
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   400
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   401
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   402
      \<Longrightarrow> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   403
                 Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   404
            \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   405
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   406
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   407
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   408
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   409
txt{*Fake, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   410
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   411
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   412
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   413
lemma authTicket_crypt_authK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   414
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   415
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   416
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   417
      \<Longrightarrow> authK \<in> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   418
apply (frule authTicket_authentic, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   419
apply (simp (no_asm) add: authKeys_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   420
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   421
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   422
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   423
lemma Says_Tgs_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   424
     "\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   425
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   426
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   427
  \<Longrightarrow> B \<noteq> Tgs & 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   428
      authK \<notin> range shrK & authK \<in> authKeys evs & authK \<in> symKeys &
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   429
      servK \<notin> range shrK & servK \<notin> authKeys evs & servK \<in> symKeys &
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   430
      servTicket = (Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   431
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   432
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   433
apply (simp_all add: authKeys_insert authKeys_not_insert authKeys_empty authKeys_simp, blast, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   434
txt{*Three subcases of Message 4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   435
apply (blast dest!: SesKey_is_session_key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   436
apply (blast dest: authTicket_crypt_authK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   437
apply (blast dest!: authKeys_used Says_Kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   438
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   439
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   440
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   441
lemma authTicket_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   442
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   443
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   444
         A \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   445
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   446
    \<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys & 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   447
        authTicket = Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   448
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   449
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   450
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   451
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   452
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   453
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   454
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   455
text{* This form holds also over an authTicket, but is not needed below.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   456
lemma servTicket_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   457
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   458
              \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   459
            Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   460
            evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   461
         \<Longrightarrow> servK \<notin> range shrK & servK \<in> symKeys & 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   462
    (\<exists>A. servTicket = Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   463
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   464
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   465
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   466
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   467
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   468
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   469
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   470
text{* Essentially the same as @{text authTicket_form} *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   471
lemma Says_kas_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   472
     "\<lbrakk> Gets A (Crypt (shrK A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   473
              \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   474
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   475
      \<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys & 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   476
          authTicket =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   477
                  Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   478
          | authTicket \<in> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   479
by (blast dest: analz_shrK_Decrypt authTicket_form
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   480
                Gets_imp_knows_Spy [THEN analz.Inj])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   481
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   482
lemma Says_tgs_message_form:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   483
 "\<lbrakk> Gets A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   484
       \<in> set evs;  authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   485
     evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   486
  \<Longrightarrow> servK \<notin> range shrK &
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   487
      (\<exists>A. servTicket =
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
   488
              Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   489
       | servTicket \<in> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   490
apply (frule Gets_imp_knows_Spy [THEN analz.Inj], auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   491
 apply (force dest!: servTicket_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   492
apply (frule analz_into_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   493
apply (frule servTicket_form, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   494
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   495
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   496
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   497
subsection{*Authenticity theorems: confirm origin of sensitive messages*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   498
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   499
lemma authK_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   500
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   501
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   502
         A \<notin> bad;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   503
      \<Longrightarrow> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   504
            \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   505
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   506
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   507
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   508
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   509
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   510
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   511
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   512
apply (blast dest!: authTicket_authentic [THEN Says_Kas_message_form])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   513
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   514
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   515
text{*If a certain encrypted message appears then it originated with Tgs*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   516
lemma servK_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   517
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   518
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   519
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   520
         authK \<notin> range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   521
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   522
 \<Longrightarrow> \<exists>A. Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   523
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   524
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   525
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   526
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   527
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   528
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   529
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   530
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   531
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   532
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   533
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   534
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   535
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   536
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   537
lemma servK_authentic_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   538
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   539
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   540
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   541
         B \<noteq> Tgs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   542
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   543
 \<Longrightarrow> \<exists>A. Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   544
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   545
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   546
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   547
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   548
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   549
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   550
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   551
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   552
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   553
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   554
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   555
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   556
text{*Authenticity of servK for B*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   557
lemma servTicket_authentic_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   558
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   559
           \<in> parts (spies evs); B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   560
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   561
 \<Longrightarrow> \<exists>authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   562
       Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   563
                   Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   564
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   565
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   566
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   567
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   568
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   569
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   570
apply blast+
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   571
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   572
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   573
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   574
lemma K4_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   575
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   576
      \<in> set evs;  evs \<in> kerbIV_gets\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   577
   \<Longrightarrow> \<exists>Ta. Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   578
        (Crypt (shrK A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   579
         \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   580
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   581
        \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   582
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   583
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   584
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   585
apply (frule_tac [6] Gets_ticket_parts, simp_all, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   586
apply (blast dest!: Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   587
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   588
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   589
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   590
lemma u_K4_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   591
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   592
      \<in> set evs; evs \<in> kerbIV_gets\<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   593
   \<Longrightarrow> \<exists>Ta. (Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   594
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   595
             \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   596
          & servKlife + Ts <= authKlife + Ta)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   597
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   598
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   599
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   600
apply (frule_tac [6] Gets_ticket_parts, simp_all, auto)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   601
apply (blast dest!: Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   602
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   603
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   604
lemma servTicket_authentic_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   605
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   606
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   607
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   608
  \<Longrightarrow> \<exists>authK Ta.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   609
       Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   610
         (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   611
            Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   612
        \<in> set evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   613
by (blast dest!: servTicket_authentic_Tgs K4_imp_K2)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   614
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   615
lemma u_servTicket_authentic_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   616
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   617
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   618
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   619
  \<Longrightarrow> \<exists>authK Ta. Says Kas A (Crypt(shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   620
           Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   621
             \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   622
           & servKlife + Ts <= authKlife + Ta"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   623
by (blast dest!: servTicket_authentic_Tgs u_K4_imp_K2)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   624
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   625
lemma servTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   626
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   627
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   628
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   629
 \<Longrightarrow> \<exists>Ta authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   630
     Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   631
                   Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   632
       \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   633
     & Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   634
                   Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   635
       \<in> set evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   636
by (blast dest: servTicket_authentic_Tgs K4_imp_K2)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   637
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   638
lemma u_servTicket_authentic:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   639
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   640
           \<in> parts (spies evs);  B \<noteq> Tgs;  B \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   641
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   642
 \<Longrightarrow> \<exists>Ta authK.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   643
     (Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   644
                   Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   645
       \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   646
     & Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   647
                   Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   648
       \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   649
     & servKlife + Ts <= authKlife + Ta)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   650
by (blast dest: servTicket_authentic_Tgs u_K4_imp_K2)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   651
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   652
lemma u_NotexpiredSK_NotexpiredAK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   653
     "\<lbrakk> \<not> expiredSK Ts evs; servKlife + Ts <= authKlife + Ta \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   654
      \<Longrightarrow> \<not> expiredAK Ta evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   655
by (blast dest: leI le_trans dest: leD)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   656
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   657
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   658
subsection{* Reliability: friendly agents send something if something else happened*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   659
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   660
lemma K3_imp_K2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   661
     "\<lbrakk> Says A Tgs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   662
             \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   663
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   664
         A \<notin> bad;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   665
      \<Longrightarrow> \<exists>Ta. Says Kas A (Crypt (shrK A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   666
                      \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   667
                   \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   668
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   669
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   670
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   671
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   672
apply (blast dest: Gets_imp_knows_Spy [THEN parts.Inj, THEN authK_authentic])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   673
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   674
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   675
text{*Anticipated here from next subsection. An authK is encrypted by one and only one Shared key. A servK is encrypted by one and only one authK.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   676
lemma Key_unique_SesKey:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   677
     "\<lbrakk> Crypt K  \<lbrace>Key SesKey,  Agent B, T, Ticket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   678
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   679
         Crypt K' \<lbrace>Key SesKey,  Agent B', T', Ticket'\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   680
           \<in> parts (spies evs);  Key SesKey \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   681
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   682
      \<Longrightarrow> K=K' & B=B' & T=T' & Ticket=Ticket'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   683
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   684
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   685
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   686
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   687
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   688
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   689
txt{*Fake, K2, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   690
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   691
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   692
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   693
lemma Tgs_authenticates_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   694
  "\<lbrakk>  Crypt authK \<lbrace>Agent A, Number T2\<rbrace> \<in> parts (spies evs); 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   695
      Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   696
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   697
      Key authK \<notin> analz (spies evs); A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   698
 \<Longrightarrow> \<exists> B. Says A Tgs \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   699
          Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   700
          Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B \<rbrace> \<in> set evs"  
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   701
apply (drule authTicket_authentic, assumption, rotate_tac 4)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   702
apply (erule rev_mp, erule rev_mp, erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   703
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   704
apply (frule_tac [6] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   705
apply (frule_tac [9] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   706
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   707
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   708
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   709
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   710
apply (force dest!: Crypt_imp_keysFor)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   711
txt{*K3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   712
apply (blast dest: Key_unique_SesKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   713
txt{*K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   714
txt{*If authKa were compromised, so would be authK*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   715
apply (case_tac "Key authKa \<in> analz (spies evs5)")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   716
apply (force dest!: Gets_imp_knows_Spy [THEN analz.Inj, THEN analz.Decrypt, THEN analz.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   717
txt{*Besides, since authKa originated with Kas anyway...*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   718
apply (clarify, drule K3_imp_K2, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   719
apply (clarify, drule Says_Kas_message_form, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   720
txt{*...it cannot be a shared key*. Therefore @{term servK_authentic} applies. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   721
     Contradition: Tgs used authK as a servkey, 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   722
     while Kas used it as an authkey*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   723
apply (blast dest: servK_authentic Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   724
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   725
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   726
lemma Says_K5:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   727
     "\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   728
         Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   729
                                     servTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   730
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   731
         A \<notin> bad; B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   732
 \<Longrightarrow> Says A B \<lbrace>servTicket, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   733
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   734
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   735
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   736
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   737
apply (frule_tac [6] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   738
apply (frule_tac [9] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   739
apply (simp_all (no_asm_simp) add: all_conj_distrib)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   740
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   741
txt{*K3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   742
apply (blast dest: authK_authentic Says_Kas_message_form Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   743
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   744
apply (force dest!: Crypt_imp_keysFor)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   745
txt{*K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   746
apply (blast dest: Key_unique_SesKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   747
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   748
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   749
text{*Anticipated here from next subsection*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   750
lemma unique_CryptKey:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   751
     "\<lbrakk> Crypt (shrK B)  \<lbrace>Agent A,  Agent B,  Key SesKey, T\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   752
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   753
         Crypt (shrK B') \<lbrace>Agent A', Agent B', Key SesKey, T'\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   754
           \<in> parts (spies evs);  Key SesKey \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   755
         evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   756
      \<Longrightarrow> A=A' & B=B' & T=T'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   757
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   758
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   759
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   760
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   761
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   762
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   763
txt{*Fake, K2, K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   764
apply (blast+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   765
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   766
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   767
lemma Says_K6:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   768
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   769
         Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   770
                                     servTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   771
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   772
         A \<notin> bad; B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   773
      \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   774
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   775
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   776
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   777
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   778
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   779
apply (frule_tac [6] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   780
apply (simp_all (no_asm_simp))
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   781
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   782
apply (force dest!: Crypt_imp_keysFor, clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   783
apply (frule Says_Tgs_message_form, assumption, clarify) (*PROOF FAILED if omitted*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   784
apply (blast dest: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   785
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   786
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   787
text{*Needs a unicity theorem, hence moved here*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   788
lemma servK_authentic_ter:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   789
 "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   790
    (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   791
     Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   792
       \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   793
     Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   794
     evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   795
 \<Longrightarrow> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   796
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   797
apply (frule Says_Kas_message_form, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   798
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   799
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   800
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   801
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   802
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   803
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   804
txt{*K2 and K4 remain*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   805
prefer 2 apply (blast dest!: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   806
apply (blast dest!: servK_authentic Says_Tgs_message_form authKeys_used)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   807
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   808
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   809
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   810
subsection{*Unicity Theorems*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   811
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   812
text{* The session key, if secure, uniquely identifies the Ticket
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   813
   whether authTicket or servTicket. As a matter of fact, one can read
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   814
   also Tgs in the place of B.                                     *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   815
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   816
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   817
lemma unique_authKeys:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   818
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   819
              (Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, X\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   820
         Says Kas A'
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   821
              (Crypt Ka' \<lbrace>Key authK, Agent Tgs, Ta', X'\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   822
         evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> A=A' & Ka=Ka' & Ta=Ta' & X=X'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   823
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   824
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   825
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   826
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   827
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   828
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   829
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   830
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   831
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   832
text{* servK uniquely identifies the message from Tgs *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   833
lemma unique_servKeys:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   834
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   835
              (Crypt K \<lbrace>Key servK, Agent B, Ts, X\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   836
         Says Tgs A'
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   837
              (Crypt K' \<lbrace>Key servK, Agent B', Ts', X'\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   838
         evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> A=A' & B=B' & K=K' & Ts=Ts' & X=X'"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   839
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   840
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   841
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   842
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   843
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   844
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   845
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   846
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   847
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   848
text{* Revised unicity theorems *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   849
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   850
lemma Kas_Unique:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   851
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   852
              (Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   853
        evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   854
   Unique (Says Kas A (Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>)) 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   855
   on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   856
apply (erule rev_mp, erule kerbIV_gets.induct, simp_all add: Unique_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   857
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   858
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   859
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   860
lemma Tgs_Unique:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   861
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   862
              (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   863
        evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   864
  Unique (Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>)) 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   865
  on evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   866
apply (erule rev_mp, erule kerbIV_gets.induct, simp_all add: Unique_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   867
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   868
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   869
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   870
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   871
subsection{*Lemmas About the Predicate @{term AKcryptSK}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   872
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   873
lemma not_AKcryptSK_Nil [iff]: "\<not> AKcryptSK authK servK []"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   874
by (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   875
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   876
lemma AKcryptSKI:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   877
 "\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, X \<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   878
     evs \<in> kerbIV_gets \<rbrakk> \<Longrightarrow> AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   879
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   880
apply (blast dest: Says_Tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   881
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   882
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   883
lemma AKcryptSK_Says [simp]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   884
   "AKcryptSK authK servK (Says S A X # evs) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   885
     (Tgs = S &
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   886
      (\<exists>B Ts. X = Crypt authK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   887
                \<lbrace>Key servK, Agent B, Number Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   888
                  Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   889
     | AKcryptSK authK servK evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   890
by (auto simp add: AKcryptSK_def)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   891
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   892
(*A fresh authK cannot be associated with any other
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   893
  (with respect to a given trace). *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   894
lemma Auth_fresh_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   895
     "\<lbrakk> Key authK \<notin> used evs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   896
      \<Longrightarrow> \<not> AKcryptSK authK servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   897
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   898
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   899
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   900
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   901
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   902
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   903
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   904
(*A fresh servK cannot be associated with any other
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   905
  (with respect to a given trace). *)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   906
lemma Serv_fresh_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   907
 "Key servK \<notin> used evs \<Longrightarrow> \<not> AKcryptSK authK servK evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   908
by (unfold AKcryptSK_def, blast)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   909
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   910
lemma authK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   911
     "\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, tk\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   912
           \<in> parts (spies evs);  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   913
      \<Longrightarrow> \<not> AKcryptSK K authK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   914
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   915
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   916
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   917
apply (frule_tac [6] Gets_ticket_parts, simp_all)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   918
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   919
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   920
txt{*Reception*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   921
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   922
txt{*K2: by freshness*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   923
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   924
txt{*K4*}
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   925
by (blast+)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   926
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   927
text{*A secure serverkey cannot have been used to encrypt others*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   928
lemma servK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   929
 "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key SK, Number Ts\<rbrace> \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   930
     Key SK \<notin> analz (spies evs);  SK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   931
     B \<noteq> Tgs;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   932
  \<Longrightarrow> \<not> AKcryptSK SK K evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   933
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   934
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   935
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   936
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   937
apply (frule_tac [6] Gets_ticket_parts, simp_all, blast)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   938
txt{*Reception*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   939
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   940
txt{*K4 splits into distinct subcases*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   941
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   942
txt{*servK can't have been enclosed in two certificates*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   943
 prefer 2 apply (blast dest: unique_CryptKey)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   944
txt{*servK is fresh and so could not have been used, by
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   945
   @{text new_keys_not_used}*}
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   946
by (force dest!: Crypt_imp_invKey_keysFor simp add: AKcryptSK_def)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   947
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   948
text{*Long term keys are not issued as servKeys*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   949
lemma shrK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   950
     "evs \<in> kerbIV_gets \<Longrightarrow> \<not> AKcryptSK K (shrK A) evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   951
apply (unfold AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   952
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   953
apply (frule_tac [8] Gets_ticket_parts)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   954
by (frule_tac [6] Gets_ticket_parts, auto)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   955
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   956
text{*The Tgs message associates servK with authK and therefore not with any
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   957
  other key authK.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   958
lemma Says_Tgs_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   959
     "\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, X \<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   960
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   961
         authK' \<noteq> authK;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   962
      \<Longrightarrow> \<not> AKcryptSK authK' servK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   963
apply (unfold AKcryptSK_def)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   964
by (blast dest: unique_servKeys)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   965
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   966
text{*Equivalently*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   967
lemma not_different_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   968
     "\<lbrakk> AKcryptSK authK servK evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   969
        authK' \<noteq> authK;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   970
      \<Longrightarrow> \<not> AKcryptSK authK' servK evs  \<and> servK \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   971
apply (simp add: AKcryptSK_def)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   972
by (blast dest: unique_servKeys Says_Tgs_message_form)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   973
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   974
lemma AKcryptSK_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   975
     "\<lbrakk> AKcryptSK authK servK evs;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   976
      \<Longrightarrow> \<not> AKcryptSK servK K evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   977
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   978
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   979
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   980
apply (frule_tac [6] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   981
txt{*Reception*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   982
prefer 3 apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   983
apply (simp_all, safe)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   984
txt{*K4 splits into subcases*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   985
prefer 4 apply (blast dest!: authK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   986
txt{*servK is fresh and so could not have been used, by
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   987
   @{text new_keys_not_used}*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   988
 prefer 2 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   989
 apply (force dest!: Crypt_imp_invKey_keysFor simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   990
txt{*Others by freshness*}
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
   991
by (blast+)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   992
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   993
text{*The only session keys that can be found with the help of session keys are
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   994
  those sent by Tgs in step K4.  *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   995
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   996
text{*We take some pains to express the property
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   997
  as a logical equivalence so that the simplifier can apply it.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   998
lemma Key_analz_image_Key_lemma:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
   999
     "P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) \<longrightarrow> (K:KK | Key K \<in> analz H)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1000
      \<Longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1001
      P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) = (K:KK | Key K \<in> analz H)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1002
by (blast intro: analz_mono [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1003
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1004
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1005
lemma AKcryptSK_analz_insert:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1006
     "\<lbrakk> AKcryptSK K K' evs; K \<in> symKeys; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1007
      \<Longrightarrow> Key K' \<in> analz (insert (Key K) (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1008
apply (simp add: AKcryptSK_def, clarify)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1009
by (drule Says_imp_spies [THEN analz.Inj, THEN analz_insertI], auto)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1010
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1011
lemma authKeys_are_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1012
     "\<lbrakk> K \<in> authKeys evs Un range shrK;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1013
      \<Longrightarrow> \<forall>SK. \<not> AKcryptSK SK K evs \<and> K \<in> symKeys"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1014
apply (simp add: authKeys_def AKcryptSK_def)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1015
by (blast dest: Says_Kas_message_form Says_Tgs_message_form)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1016
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1017
lemma not_authKeys_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1018
     "\<lbrakk> K \<notin> authKeys evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1019
         K \<notin> range shrK; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1020
      \<Longrightarrow> \<forall>SK. \<not> AKcryptSK K SK evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1021
apply (simp add: AKcryptSK_def)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1022
by (blast dest: Says_Tgs_message_form)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1023
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1024
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1025
subsection{*Secrecy Theorems*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1026
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1027
text{*For the Oops2 case of the next theorem*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1028
lemma Oops2_not_AKcryptSK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1029
     "\<lbrakk> evs \<in> kerbIV_gets;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1030
         Says Tgs A (Crypt authK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1031
                     \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1032
           \<in> set evs \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1033
      \<Longrightarrow> \<not> AKcryptSK servK SK evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1034
by (blast dest: AKcryptSKI AKcryptSK_not_AKcryptSK)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1035
   
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1036
text{* Big simplification law for keys SK that are not crypted by keys in KK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1037
 It helps prove three, otherwise hard, facts about keys. These facts are
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1038
 exploited as simplification laws for analz, and also "limit the damage"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1039
 in case of loss of a key to the spy. See ESORICS98. *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1040
lemma Key_analz_image_Key [rule_format (no_asm)]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1041
     "evs \<in> kerbIV_gets \<Longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1042
      (\<forall>SK KK. SK \<in> symKeys & KK <= -(range shrK) \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1043
       (\<forall>K \<in> KK. \<not> AKcryptSK K SK evs)   \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1044
       (Key SK \<in> analz (Key`KK Un (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1045
       (SK \<in> KK | Key SK \<in> analz (spies evs)))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1046
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1047
apply (frule_tac [11] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1048
apply (frule_tac [10] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1049
apply (frule_tac [8] Says_tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1050
apply (frule_tac [6] Says_kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1051
apply (safe del: impI intro!: Key_analz_image_Key_lemma [THEN impI])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1052
txt{*Case-splits for Oops1 and message 5: the negated case simplifies using
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1053
 the induction hypothesis*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1054
apply (case_tac [12] "AKcryptSK authK SK evsO1")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1055
apply (case_tac [9] "AKcryptSK servK SK evs5")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1056
apply (simp_all del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1057
        add: analz_image_freshK_simps AKcryptSK_Says shrK_not_AKcryptSK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1058
             Oops2_not_AKcryptSK Auth_fresh_not_AKcryptSK
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1059
       Serv_fresh_not_AKcryptSK Says_Tgs_AKcryptSK Spy_analz_shrK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1060
  --{*18 seconds on a 1.8GHz machine??*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1061
txt{*Fake*} 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1062
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1063
txt{*Reception*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1064
apply (simp add: AKcryptSK_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1065
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1066
apply blast 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1067
txt{*K3*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1068
apply blast 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1069
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1070
apply (blast dest!: authK_not_AKcryptSK)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1071
txt{*K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1072
apply (case_tac "Key servK \<in> analz (spies evs5) ")
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1073
txt{*If servK is compromised then the result follows directly...*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1074
apply (simp (no_asm_simp) add: analz_insert_eq Un_upper2 [THEN analz_mono, THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1075
txt{*...therefore servK is uncompromised.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1076
txt{*The AKcryptSK servK SK evs5 case leads to a contradiction.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1077
apply (blast elim!: servK_not_AKcryptSK [THEN [2] rev_notE] del: allE ballE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1078
txt{*Another K5 case*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1079
apply blast 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1080
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1081
apply simp 
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1082
by (blast dest!: AKcryptSK_analz_insert)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1083
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1084
text{* First simplification law for analz: no session keys encrypt
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1085
authentication keys or shared keys. *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1086
lemma analz_insert_freshK1:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1087
     "\<lbrakk> evs \<in> kerbIV_gets;  K \<in> authKeys evs Un range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1088
        SesKey \<notin> range shrK \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1089
      \<Longrightarrow> (Key K \<in> analz (insert (Key SesKey) (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1090
          (K = SesKey | Key K \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1091
apply (frule authKeys_are_not_AKcryptSK, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1092
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1093
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1094
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1095
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1096
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1097
text{* Second simplification law for analz: no service keys encrypt any other keys.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1098
lemma analz_insert_freshK2:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1099
     "\<lbrakk> evs \<in> kerbIV_gets;  servK \<notin> (authKeys evs); servK \<notin> range shrK;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1100
        K \<in> symKeys \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1101
      \<Longrightarrow> (Key K \<in> analz (insert (Key servK) (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1102
          (K = servK | Key K \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1103
apply (frule not_authKeys_not_AKcryptSK, assumption, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1104
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1105
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1106
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1107
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1108
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1109
text{* Third simplification law for analz: only one authentication key encrypts a certain service key.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1110
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1111
lemma analz_insert_freshK3:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1112
 "\<lbrakk> AKcryptSK authK servK evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1113
    authK' \<noteq> authK; authK' \<notin> range shrK; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1114
        \<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1115
                (servK = authK' | Key servK \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1116
apply (drule_tac authK' = authK' in not_different_AKcryptSK, blast, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1117
apply (simp del: image_insert
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1118
            add: analz_image_freshK_simps add: Key_analz_image_Key)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1119
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1120
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1121
lemma analz_insert_freshK3_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1122
 "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1123
            (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1124
        \<in> set evs; 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1125
     authK \<noteq> authK'; authK' \<notin> range shrK; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1126
        \<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1127
                (servK = authK' | Key servK \<in> analz (spies evs))"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1128
apply (frule AKcryptSKI, assumption)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1129
by (simp add: analz_insert_freshK3)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1130
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1131
text{*a weakness of the protocol*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1132
lemma authK_compromises_servK:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1133
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1134
              (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1135
           \<in> set evs;  authK \<in> symKeys;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1136
         Key authK \<in> analz (spies evs); evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1137
      \<Longrightarrow> Key servK \<in> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1138
by (force dest: Says_imp_spies [THEN analz.Inj, THEN analz.Decrypt, THEN analz.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1139
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1140
lemma servK_notin_authKeysD:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1141
     "\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1142
                      Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1143
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1144
         Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1145
         B \<noteq> Tgs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1146
      \<Longrightarrow> servK \<notin> authKeys evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1147
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1148
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1149
apply (simp add: authKeys_def)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1150
apply (erule kerbIV_gets.induct, analz_mono_contra)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1151
apply (frule_tac [8] Gets_ticket_parts)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1152
apply (frule_tac [6] Gets_ticket_parts, simp_all)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1153
by (blast+)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1154
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1155
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1156
text{*If Spy sees the Authentication Key sent in msg K2, then
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1157
    the Key has expired.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1158
lemma Confidentiality_Kas_lemma [rule_format]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1159
     "\<lbrakk> authK \<in> symKeys; A \<notin> bad;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1160
      \<Longrightarrow> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1161
               (Crypt (shrK A)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1162
                  \<lbrace>Key authK, Agent Tgs, Number Ta,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1163
          Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1164
            \<in> set evs \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1165
          Key authK \<in> analz (spies evs) \<longrightarrow>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1166
          expiredAK Ta evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1167
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1168
apply (frule_tac [11] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1169
apply (frule_tac [10] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1170
apply (frule_tac [8] Says_tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1171
apply (frule_tac [6] Says_kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1172
apply (safe del: impI conjI impCE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1173
apply (simp_all (no_asm_simp) add: Says_Kas_message_form less_SucI analz_insert_eq not_parts_not_analz analz_insert_freshK1 pushes)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1174
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1175
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1176
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1177
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1178
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1179
apply blast
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1180
txt{*Level 8: K5*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1181
apply (blast dest: servK_notin_authKeysD Says_Kas_message_form intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1182
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1183
apply (blast dest!: unique_authKeys intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1184
txt{*Oops2*}
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1185
by (blast dest: Says_Tgs_message_form Says_Kas_message_form)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1186
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1187
lemma Confidentiality_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1188
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1189
              (Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1190
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1191
         \<not> expiredAK Ta evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1192
         A \<notin> bad;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1193
      \<Longrightarrow> Key authK \<notin> analz (spies evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1194
by (blast dest: Says_Kas_message_form Confidentiality_Kas_lemma)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1195
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1196
text{*If Spy sees the Service Key sent in msg K4, then
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1197
    the Key has expired.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1198
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1199
lemma Confidentiality_lemma [rule_format]:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1200
     "\<lbrakk> Says Tgs A
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1201
            (Crypt authK
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1202
               \<lbrace>Key servK, Agent B, Number Ts,
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1203
                 Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1204
           \<in> set evs;
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1205
        Key authK \<notin> analz (spies evs);
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1206
        servK \<in> symKeys;
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1207
        A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1208
      \<Longrightarrow> Key servK \<in> analz (spies evs) \<longrightarrow>
32960
69916a850301 eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents: 26301
diff changeset
  1209
          expiredSK Ts evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1210
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1211
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1212
apply (erule kerbIV_gets.induct)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1213
apply (rule_tac [10] impI)+
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1214
  --{*The Oops1 case is unusual: must simplify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1215
    @{term "Authkey \<notin> analz (spies (ev#evs))"}, not letting
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1216
   @{text analz_mono_contra} weaken it to
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1217
   @{term "Authkey \<notin> analz (spies evs)"},
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1218
  for we then conclude @{term "authK \<noteq> authKa"}.*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1219
apply analz_mono_contra
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1220
apply (frule_tac [11] Oops_range_spies2)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1221
apply (frule_tac [10] Oops_range_spies1)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1222
apply (frule_tac [8] Says_tgs_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1223
apply (frule_tac [6] Says_kas_message_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1224
apply (safe del: impI conjI impCE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1225
apply (simp_all add: less_SucI new_keys_not_analzd Says_Kas_message_form Says_Tgs_message_form analz_insert_eq not_parts_not_analz analz_insert_freshK1 analz_insert_freshK2 analz_insert_freshK3_bis pushes)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1226
txt{*Fake*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1227
apply spy_analz
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1228
txt{*K2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1229
apply (blast intro: parts_insertI less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1230
txt{*K4*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1231
apply (blast dest: authTicket_authentic Confidentiality_Kas)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1232
txt{*Oops2*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1233
  prefer 3
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1234
  apply (blast dest: Says_imp_spies [THEN parts.Inj] Key_unique_SesKey intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1235
txt{*Oops1*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1236
 prefer 2
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1237
apply (blast dest: Says_Kas_message_form Says_Tgs_message_form intro: less_SucI)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1238
txt{*K5. Not clear how this step could be integrated with the main
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1239
       simplification step. Done in KerberosV.thy*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1240
apply clarify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1241
apply (erule_tac V = "Says Aa Tgs ?X \<in> set ?evs" in thin_rl)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1242
apply (frule Gets_imp_knows_Spy [THEN parts.Inj, THEN servK_notin_authKeysD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1243
apply (assumption, assumption, blast, assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1244
apply (simp add: analz_insert_freshK2)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1245
by (blast dest: Says_imp_spies [THEN parts.Inj] Key_unique_SesKey intro: less_SucI)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1246
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1247
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1248
text{* In the real world Tgs can't check wheter authK is secure! *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1249
lemma Confidentiality_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1250
     "\<lbrakk> Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1251
              (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1252
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1253
         Key authK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1254
         \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1255
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1256
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1257
by (blast dest: Says_Tgs_message_form Confidentiality_lemma)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1258
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1259
text{* In the real world Tgs CAN check what Kas sends! *}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1260
lemma Confidentiality_Tgs_bis:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1261
     "\<lbrakk> Says Kas A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1262
               (Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1263
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1264
         Says Tgs A
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1265
              (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1266
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1267
         \<not> expiredAK Ta evs; \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1268
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1269
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1270
by (blast dest!: Confidentiality_Kas Confidentiality_Tgs)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1271
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1272
text{*Most general form*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1273
lemmas Confidentiality_Tgs_ter = authTicket_authentic [THEN Confidentiality_Tgs_bis]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1274
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1275
lemmas Confidentiality_Auth_A = authK_authentic [THEN Confidentiality_Kas]
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1276
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1277
text{*Needs a confidentiality guarantee, hence moved here.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1278
      Authenticity of servK for A*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1279
lemma servK_authentic_bis_r:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1280
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1281
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1282
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1283
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1284
         \<not> expiredAK Ta evs; A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1285
 \<Longrightarrow>Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1286
       \<in> set evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1287
by (blast dest: authK_authentic Confidentiality_Auth_A servK_authentic_ter)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1288
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1289
lemma Confidentiality_Serv_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1290
     "\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1291
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1292
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1293
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1294
         \<not> expiredAK Ta evs; \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1295
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1296
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1297
by (metis Confidentiality_Auth_A Confidentiality_Tgs K4_imp_K2 authK_authentic authTicket_form servK_authentic unique_authKeys)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1298
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1299
(*deleted Confidentiality_B, which was identical to Confidentiality_Serv_A*)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1300
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1301
lemma u_Confidentiality_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1302
     "\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1303
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1304
         \<not> expiredSK Ts evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1305
         A \<notin> bad;  B \<notin> bad;  B \<noteq> Tgs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1306
      \<Longrightarrow> Key servK \<notin> analz (spies evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1307
by (blast dest: u_servTicket_authentic u_NotexpiredSK_NotexpiredAK Confidentiality_Tgs_bis)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1308
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1309
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1310
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1311
subsection{*2. Parties' strong authentication: 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1312
       non-injective agreement on the session key. The same guarantees also
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1313
       express key distribution, hence their names*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1314
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1315
text{*Authentication here still is weak agreement - of B with A*}
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1316
lemma A_authenticates_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1317
     "\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1318
         Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1319
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1320
         Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1321
           \<in> parts (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1322
         Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1323
         A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1324
      \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1325
by (blast dest: authK_authentic servK_authentic Says_Kas_message_form Key_unique_SesKey K4_imp_K2 intro: Says_K6)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1326
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1327
(*These two have never been proved, because never were they needed before!*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1328
lemma shrK_in_initState_Server[iff]:  "Key (shrK A) \<in> initState Kas"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1329
by (induct_tac "A", auto)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1330
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1331
lemma shrK_in_knows_Server [iff]: "Key (shrK A) \<in> knows Kas evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1332
by (simp add: initState_subset_knows [THEN subsetD])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1333
(*Because of our simple model of Tgs, the equivalent for it required an axiom*)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1334
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1335
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1336
lemma A_authenticates_and_keydist_to_Kas:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1337
   "\<lbrakk> Gets A (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1338
      A \<notin> bad;  evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1339
  \<Longrightarrow> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>) \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1340
  \<and> Key authK \<in> analz(knows Kas evs)"
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1341
by (force dest!: authK_authentic Says_imp_knows [THEN analz.Inj, THEN analz.Decrypt, THEN analz.Fst])
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1342
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1343
26301
28193aedc718 renamed K3_imp_Gets variant to K3_imp_Gets_evs;
wenzelm
parents: 23746
diff changeset
  1344
lemma K3_imp_Gets_evs:
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1345
  "\<lbrakk> Says A Tgs \<lbrace>Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1346
                 Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace> 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1347
      \<in> set evs;  A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1348
 \<Longrightarrow>  Gets A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1349
                 Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1350
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1351
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1352
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1353
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1354
apply (blast dest: authTicket_form)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1355
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1356
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1357
lemma Tgs_authenticates_and_keydist_to_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1358
  "\<lbrakk>  Gets Tgs \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1359
          Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1360
          Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B \<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1361
      Key authK \<notin> analz (spies evs); A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1362
 \<Longrightarrow> \<exists> B. Says A Tgs \<lbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1363
          Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1364
          Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B \<rbrace> \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1365
 \<and>  Key authK \<in> analz (knows A evs)"  
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1366
apply (frule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1367
apply (drule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Snd, THEN parts.Fst], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1368
apply (drule Tgs_authenticates_A, assumption+, simp)
26301
28193aedc718 renamed K3_imp_Gets variant to K3_imp_Gets_evs;
wenzelm
parents: 23746
diff changeset
  1369
apply (force dest!: K3_imp_Gets_evs Gets_imp_knows [THEN analz.Inj, THEN analz.Decrypt, THEN analz.Fst])
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1370
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1371
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1372
lemma K4_imp_Gets:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1373
  "\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1374
       \<in> set evs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1375
 \<Longrightarrow> \<exists> Ta X. 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1376
     Gets Tgs \<lbrace>Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>, X\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1377
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1378
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1379
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1380
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1381
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1382
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1383
lemma A_authenticates_and_keydist_to_Tgs:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1384
 "\<lbrakk>  Gets A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1385
       \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1386
     Gets A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1387
       \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1388
     Key authK \<notin> analz (spies evs); A \<notin> bad;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1389
     evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1390
 \<Longrightarrow> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1391
       \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1392
  \<and> Key authK \<in> analz (knows Tgs evs)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1393
  \<and> Key servK \<in> analz (knows Tgs evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1394
apply (drule Gets_imp_knows_Spy [THEN parts.Inj], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1395
apply (drule Gets_imp_knows_Spy [THEN parts.Inj], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1396
apply (frule authK_authentic, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1397
apply (drule servK_authentic_ter, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1398
apply (frule K4_imp_Gets, assumption, erule exE, erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1399
apply (drule Gets_imp_knows [THEN analz.Inj, THEN analz.Fst, THEN analz.Decrypt, THEN analz.Snd, THEN analz.Snd, THEN analz.Fst], assumption, force)
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1400
apply (metis Says_imp_knows analz.Fst analz.Inj analz_symKeys_Decrypt authTicket_form)
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1401
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1402
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1403
lemma K5_imp_Gets:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1404
  "\<lbrakk> Says A B \<lbrace>servTicket, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1405
    A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1406
 \<Longrightarrow> \<exists> authK Ts authTicket T2.
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1407
    Gets A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>) \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1408
 \<and> Says A Tgs \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>  \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1409
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1410
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1411
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1412
done 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1413
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1414
lemma K3_imp_Gets:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1415
  "\<lbrakk> Says A Tgs \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1416
       \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1417
    A \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
37809
6c87cdad912d Fixed syntax and tidied some proofs
paulson
parents: 36866
diff changeset
  1418
 \<Longrightarrow> \<exists> Ta. Gets A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>) \<in> set evs"
18886
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1419
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1420
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1421
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1422
done 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1423
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1424
lemma B_authenticates_and_keydist_to_A:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1425
     "\<lbrakk> Gets B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1426
                Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1427
        Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1428
        A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1429
 \<Longrightarrow> Says A B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1430
               Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1431
  \<and> Key servK \<in> analz (knows A evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1432
apply (frule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst, THEN servTicket_authentic_Tgs], assumption+)  
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1433
apply (drule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Snd], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1434
apply (erule exE, drule Says_K5, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1435
apply (frule K5_imp_Gets, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1436
apply clarify
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1437
apply (drule K3_imp_Gets, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1438
apply (erule exE)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1439
apply (frule Gets_imp_knows_Spy [THEN parts.Inj, THEN authK_authentic, THEN Says_Kas_message_form], assumption+, clarify)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1440
apply (force dest!: Gets_imp_knows [THEN analz.Inj, THEN analz.Decrypt, THEN analz.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1441
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1442
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1443
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1444
lemma K6_imp_Gets:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1445
  "\<lbrakk> Says B A (Crypt servK (Number T3)) \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1446
     B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1447
\<Longrightarrow> \<exists> Ts X. Gets B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,X\<rbrace>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1448
       \<in> set evs"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1449
apply (erule rev_mp)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1450
apply (erule kerbIV_gets.induct)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1451
apply auto
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1452
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1453
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1454
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1455
lemma A_authenticates_and_keydist_to_B:
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1456
  "\<lbrakk> Gets A \<lbrace>Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>,
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1457
             Crypt servK (Number T3)\<rbrace> \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1458
     Gets A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1459
           \<in> set evs;
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1460
     Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1461
     A \<notin> bad;  B \<notin> bad; evs \<in> kerbIV_gets \<rbrakk>
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1462
 \<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs 
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1463
   \<and> Key servK \<in> analz (knows B evs)"
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1464
apply (frule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Fst], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1465
apply (drule Gets_imp_knows_Spy [THEN parts.Inj, THEN parts.Snd], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1466
apply (drule Gets_imp_knows_Spy [THEN parts.Inj], assumption)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1467
apply (drule A_authenticates_B, assumption+)
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1468
apply (force dest!: K6_imp_Gets Gets_imp_knows [THEN analz.Inj, THEN analz.Fst, THEN analz.Decrypt, THEN analz.Snd, THEN analz.Snd, THEN analz.Fst])
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1469
done
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1470
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1471
end
9f27383426db new and updated protocol proofs by Giamp Bella
paulson
parents:
diff changeset
  1472