| author | wenzelm | 
| Thu, 22 Jul 2010 18:08:39 +0200 | |
| changeset 37936 | 1e4c5015a72e | 
| parent 37811 | 4c25d41b9982 | 
| child 41774 | 13b97824aec6 | 
| permissions | -rw-r--r-- | 
| 37936 | 1  | 
(* Title: HOL/Auth/KerberosIV.thy  | 
| 6452 | 2  | 
Author: Giampaolo Bella, Cambridge University Computer Laboratory  | 
3  | 
Copyright 1998 University of Cambridge  | 
|
4  | 
*)  | 
|
5  | 
||
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
6  | 
header{*The Kerberos Protocol, Version IV*}
 | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
7  | 
|
| 16417 | 8  | 
theory KerberosIV imports Public begin  | 
| 6452 | 9  | 
|
| 18886 | 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.*}
 | 
11  | 
||
| 20768 | 12  | 
abbreviation  | 
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
13  | 
Kas :: agent where "Kas == Server"  | 
| 6452 | 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"  | 
| 6452 | 17  | 
|
18  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
19  | 
axioms  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
20  | 
Tgs_not_bad [iff]: "Tgs \<notin> bad"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
21  | 
   --{*Tgs is secure --- we already know that Kas is secure*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
22  | 
|
| 36866 | 23  | 
definition  | 
| 18886 | 24  | 
(* authKeys are those contained in an authTicket *)  | 
| 36866 | 25  | 
authKeys :: "event list => key set" where  | 
26  | 
    "authKeys evs = {authK. \<exists>A Peer Ta. Says Kas A
 | 
|
| 18886 | 27  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Peer, Number Ta,  | 
28  | 
(Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key authK, Number Ta\<rbrace>)  | 
|
29  | 
\<rbrace>) \<in> set evs}"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
30  | 
|
| 36866 | 31  | 
definition  | 
| 6452 | 32  | 
(* A is the true creator of X if she has sent X and X never appeared on  | 
33  | 
the trace before this event. Recall that traces grow from head. *)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
34  | 
Issues :: "[agent, agent, msg, event list] => bool"  | 
| 37811 | 35  | 
             ("_ Issues _ with _ on _" [50, 0, 0, 50] 50) where
 | 
36  | 
"(A Issues B with X on evs) =  | 
|
| 36866 | 37  | 
      (\<exists>Y. Says A B Y \<in> set evs & X \<in> parts {Y} &
 | 
38  | 
X \<notin> parts (spies (takeWhile (% z. z \<noteq> Says A B Y) (rev evs))))"  | 
|
| 6452 | 39  | 
|
| 36866 | 40  | 
definition  | 
| 18886 | 41  | 
(* Yields the subtrace of a given trace from its beginning to a given event *)  | 
| 37811 | 42  | 
  before :: "[event, event list] => event list" ("before _ on _" [0, 50] 50)
 | 
43  | 
where "(before ev on evs) = takeWhile (% z. z ~= ev) (rev evs)"  | 
|
| 18886 | 44  | 
|
| 36866 | 45  | 
definition  | 
| 18886 | 46  | 
(* States than an event really appears only once on a trace *)  | 
| 37811 | 47  | 
  Unique :: "[event, event list] => bool" ("Unique _ on _" [0, 50] 50)
 | 
48  | 
where "(Unique ev on evs) = (ev \<notin> set (tl (dropWhile (% z. z \<noteq> ev) evs)))"  | 
|
| 18886 | 49  | 
|
| 6452 | 50  | 
|
51  | 
consts  | 
|
52  | 
(*Duration of the authentication key*)  | 
|
| 18886 | 53  | 
authKlife :: nat  | 
| 6452 | 54  | 
|
55  | 
(*Duration of the service key*)  | 
|
| 18886 | 56  | 
servKlife :: nat  | 
| 6452 | 57  | 
|
58  | 
(*Duration of an authenticator*)  | 
|
| 18886 | 59  | 
authlife :: nat  | 
| 6452 | 60  | 
|
61  | 
(*Upper bound on the time of reaction of a server*)  | 
|
| 18886 | 62  | 
replylife :: nat  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
63  | 
|
| 18886 | 64  | 
specification (authKlife)  | 
65  | 
authKlife_LB [iff]: "2 \<le> authKlife"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
66  | 
by blast  | 
| 6452 | 67  | 
|
| 18886 | 68  | 
specification (servKlife)  | 
69  | 
servKlife_LB [iff]: "2 + authKlife \<le> servKlife"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
70  | 
by blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
71  | 
|
| 18886 | 72  | 
specification (authlife)  | 
73  | 
authlife_LB [iff]: "Suc 0 \<le> authlife"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
74  | 
by blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
75  | 
|
| 18886 | 76  | 
specification (replylife)  | 
77  | 
replylife_LB [iff]: "Suc 0 \<le> replylife"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
78  | 
by blast  | 
| 6452 | 79  | 
|
| 20768 | 80  | 
abbreviation  | 
81  | 
(*The current time is the length of the trace*)  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
82  | 
CT :: "event list=>nat" where  | 
| 20768 | 83  | 
"CT == length"  | 
| 6452 | 84  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
85  | 
abbreviation  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
86  | 
expiredAK :: "[nat, event list] => bool" where  | 
| 20768 | 87  | 
"expiredAK Ta evs == authKlife + Ta < CT evs"  | 
| 6452 | 88  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
89  | 
abbreviation  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
90  | 
expiredSK :: "[nat, event list] => bool" where  | 
| 20768 | 91  | 
"expiredSK Ts evs == servKlife + Ts < CT evs"  | 
| 6452 | 92  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
93  | 
abbreviation  | 
| 
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
94  | 
expiredA :: "[nat, event list] => bool" where  | 
| 20768 | 95  | 
"expiredA T evs == authlife + T < CT evs"  | 
| 6452 | 96  | 
|
| 
21404
 
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
 
wenzelm 
parents: 
20768 
diff
changeset
 | 
97  | 
abbreviation  | 
| 37811 | 98  | 
  valid :: "[nat, nat] => bool" ("valid _ wrt _" [0, 50] 50) where
 | 
| 20768 | 99  | 
"valid T1 wrt T2 == T1 <= replylife + T2"  | 
| 6452 | 100  | 
|
101  | 
(*---------------------------------------------------------------------*)  | 
|
102  | 
||
103  | 
||
| 18886 | 104  | 
(* 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: 
33304 
diff
changeset
 | 
105  | 
definition AKcryptSK :: "[key, key, event list] => bool" where  | 
| 18886 | 106  | 
"AKcryptSK authK servK evs ==  | 
107  | 
\<exists>A B Ts.  | 
|
108  | 
Says Tgs A (Crypt authK  | 
|
109  | 
\<lbrace>Key servK, Agent B, Number Ts,  | 
|
110  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
111  | 
\<in> set evs"  | 
| 6452 | 112  | 
|
| 23746 | 113  | 
inductive_set kerbIV :: "event list set"  | 
114  | 
where  | 
|
| 6452 | 115  | 
|
| 18886 | 116  | 
Nil: "[] \<in> kerbIV"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
117  | 
|
| 23746 | 118  | 
| Fake: "\<lbrakk> evsf \<in> kerbIV; X \<in> synth (analz (spies evsf)) \<rbrakk>  | 
| 18886 | 119  | 
\<Longrightarrow> Says Spy B X # evsf \<in> kerbIV"  | 
| 6452 | 120  | 
|
121  | 
(* FROM the initiator *)  | 
|
| 23746 | 122  | 
| K1: "\<lbrakk> evs1 \<in> kerbIV \<rbrakk>  | 
| 18886 | 123  | 
\<Longrightarrow> Says A Kas \<lbrace>Agent A, Agent Tgs, Number (CT evs1)\<rbrace> # evs1  | 
124  | 
\<in> kerbIV"  | 
|
| 6452 | 125  | 
|
126  | 
(* Adding the timestamp serves to A in K3 to check that  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
127  | 
she doesn't get a reply too late. This kind of timeouts are ordinary.  | 
| 6452 | 128  | 
If a server's reply is late, then it is likely to be fake. *)  | 
129  | 
||
130  | 
(*---------------------------------------------------------------------*)  | 
|
131  | 
||
132  | 
(*FROM Kas *)  | 
|
| 23746 | 133  | 
| K2: "\<lbrakk> evs2 \<in> kerbIV; Key authK \<notin> used evs2; authK \<in> symKeys;  | 
| 18886 | 134  | 
Says A' Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs2 \<rbrakk>  | 
135  | 
\<Longrightarrow> Says Kas A  | 
|
136  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number (CT evs2),  | 
|
137  | 
(Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK,  | 
|
138  | 
Number (CT evs2)\<rbrace>)\<rbrace>) # evs2 \<in> kerbIV"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
139  | 
(*  | 
| 18886 | 140  | 
The internal encryption builds the authTicket.  | 
| 6452 | 141  | 
The timestamp doesn't change inside the two encryptions: the external copy  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
142  | 
will be used by the initiator in K3; the one inside the  | 
| 18886 | 143  | 
authTicket by Tgs in K4.  | 
| 6452 | 144  | 
*)  | 
145  | 
||
146  | 
(*---------------------------------------------------------------------*)  | 
|
147  | 
||
148  | 
(* FROM the initiator *)  | 
|
| 23746 | 149  | 
| K3: "\<lbrakk> evs3 \<in> kerbIV;  | 
| 18886 | 150  | 
Says A Kas \<lbrace>Agent A, Agent Tgs, Number T1\<rbrace> \<in> set evs3;  | 
151  | 
Says Kas' A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
152  | 
authTicket\<rbrace>) \<in> set evs3;  | 
|
153  | 
valid Ta wrt T1  | 
|
154  | 
\<rbrakk>  | 
|
155  | 
\<Longrightarrow> Says A Tgs \<lbrace>authTicket,  | 
|
156  | 
(Crypt authK \<lbrace>Agent A, Number (CT evs3)\<rbrace>),  | 
|
157  | 
Agent B\<rbrace> # evs3 \<in> kerbIV"  | 
|
158  | 
(*The two events amongst the premises allow A to accept only those authKeys  | 
|
| 6452 | 159  | 
that are not issued late. *)  | 
160  | 
||
161  | 
(*---------------------------------------------------------------------*)  | 
|
162  | 
||
163  | 
(* FROM Tgs *)  | 
|
164  | 
(* Note that the last temporal check is not mentioned in the original MIT  | 
|
| 18886 | 165  | 
specification. Adding it makes many goals "available" to the peers.  | 
166  | 
Theorems that exploit it have the suffix `_u', which stands for updated  | 
|
167  | 
protocol.  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
168  | 
*)  | 
| 23746 | 169  | 
| K4: "\<lbrakk> evs4 \<in> kerbIV; Key servK \<notin> used evs4; servK \<in> symKeys;  | 
| 18886 | 170  | 
B \<noteq> Tgs; authK \<in> symKeys;  | 
171  | 
Says A' Tgs \<lbrace>  | 
|
172  | 
(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: 
32431 
diff
changeset
 | 
173  | 
Number Ta\<rbrace>),  | 
| 18886 | 174  | 
(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: 
32431 
diff
changeset
 | 
175  | 
\<in> set evs4;  | 
| 18886 | 176  | 
\<not> expiredAK Ta evs4;  | 
177  | 
\<not> expiredA T2 evs4;  | 
|
178  | 
servKlife + (CT evs4) <= authKlife + Ta  | 
|
179  | 
\<rbrakk>  | 
|
180  | 
\<Longrightarrow> Says Tgs A  | 
|
181  | 
(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: 
32431 
diff
changeset
 | 
182  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK,  | 
| 
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
183  | 
Number (CT evs4)\<rbrace> \<rbrace>)  | 
| 
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
184  | 
# evs4 \<in> kerbIV"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
185  | 
(* Tgs creates a new session key per each request for a service, without  | 
| 6452 | 186  | 
checking if there is still a fresh one for that service.  | 
| 18886 | 187  | 
The cipher under Tgs' key is the authTicket, the cipher under B's key  | 
188  | 
is the servTicket, which is built now.  | 
|
| 6452 | 189  | 
NOTE that the last temporal check is not present in the MIT specification.  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
190  | 
|
| 6452 | 191  | 
*)  | 
192  | 
||
193  | 
(*---------------------------------------------------------------------*)  | 
|
194  | 
||
195  | 
(* FROM the initiator *)  | 
|
| 23746 | 196  | 
| K5: "\<lbrakk> evs5 \<in> kerbIV; authK \<in> symKeys; servK \<in> symKeys;  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
197  | 
Says A Tgs  | 
| 18886 | 198  | 
\<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: 
32431 
diff
changeset
 | 
199  | 
Agent B\<rbrace>  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
200  | 
\<in> set evs5;  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
201  | 
Says Tgs' A  | 
| 18886 | 202  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
203  | 
\<in> set evs5;  | 
| 18886 | 204  | 
valid Ts wrt T2 \<rbrakk>  | 
205  | 
\<Longrightarrow> Says A B \<lbrace>servTicket,  | 
|
| 
32960
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
206  | 
Crypt servK \<lbrace>Agent A, Number (CT evs5)\<rbrace> \<rbrace>  | 
| 18886 | 207  | 
# evs5 \<in> kerbIV"  | 
| 6452 | 208  | 
(* Checks similar to those in K3. *)  | 
209  | 
||
210  | 
(*---------------------------------------------------------------------*)  | 
|
211  | 
||
212  | 
(* FROM the responder*)  | 
|
| 23746 | 213  | 
| K6: "\<lbrakk> evs6 \<in> kerbIV;  | 
| 18886 | 214  | 
Says A' B \<lbrace>  | 
215  | 
(Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>),  | 
|
216  | 
(Crypt servK \<lbrace>Agent A, Number T3\<rbrace>)\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
217  | 
\<in> set evs6;  | 
| 18886 | 218  | 
\<not> expiredSK Ts evs6;  | 
219  | 
\<not> expiredA T3 evs6  | 
|
220  | 
\<rbrakk>  | 
|
221  | 
\<Longrightarrow> Says B A (Crypt servK (Number T3))  | 
|
222  | 
# evs6 \<in> kerbIV"  | 
|
| 6452 | 223  | 
(* Checks similar to those in K4. *)  | 
224  | 
||
225  | 
(*---------------------------------------------------------------------*)  | 
|
226  | 
||
| 18886 | 227  | 
(* Leaking an authK... *)  | 
| 23746 | 228  | 
| Oops1: "\<lbrakk> evsO1 \<in> kerbIV; A \<noteq> Spy;  | 
| 6452 | 229  | 
Says Kas A  | 
| 18886 | 230  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
231  | 
authTicket\<rbrace>) \<in> set evsO1;  | 
|
232  | 
expiredAK Ta evsO1 \<rbrakk>  | 
|
233  | 
\<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent Tgs, Number Ta, Key authK\<rbrace>  | 
|
234  | 
# evsO1 \<in> kerbIV"  | 
|
| 6452 | 235  | 
|
236  | 
(*---------------------------------------------------------------------*)  | 
|
237  | 
||
| 18886 | 238  | 
(*Leaking a servK... *)  | 
| 23746 | 239  | 
| Oops2: "\<lbrakk> evsO2 \<in> kerbIV; A \<noteq> Spy;  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
240  | 
Says Tgs A  | 
| 18886 | 241  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
242  | 
\<in> set evsO2;  | 
| 18886 | 243  | 
expiredSK Ts evsO2 \<rbrakk>  | 
244  | 
\<Longrightarrow> Says A Spy \<lbrace>Agent A, Agent B, Number Ts, Key servK\<rbrace>  | 
|
245  | 
# evsO2 \<in> kerbIV"  | 
|
| 6452 | 246  | 
|
247  | 
(*---------------------------------------------------------------------*)  | 
|
248  | 
||
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
249  | 
declare Says_imp_knows_Spy [THEN parts.Inj, dest]  | 
| 
14200
 
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
 
paulson 
parents: 
14182 
diff
changeset
 | 
250  | 
declare parts.Body [dest]  | 
| 
 
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
 
paulson 
parents: 
14182 
diff
changeset
 | 
251  | 
declare analz_into_parts [dest]  | 
| 
 
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
 
paulson 
parents: 
14182 
diff
changeset
 | 
252  | 
declare Fake_parts_insert_in_Un [dest]  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
253  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
254  | 
|
| 18886 | 255  | 
subsection{*Lemmas about lists, for reasoning about  Issues*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
256  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
257  | 
lemma spies_Says_rev: "spies (evs @ [Says A B X]) = insert X (spies evs)"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
258  | 
apply (induct_tac "evs")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
259  | 
apply (induct_tac [2] "a", auto)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
260  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
261  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
262  | 
lemma spies_Gets_rev: "spies (evs @ [Gets A X]) = spies evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
263  | 
apply (induct_tac "evs")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
264  | 
apply (induct_tac [2] "a", auto)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
265  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
266  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
267  | 
lemma spies_Notes_rev: "spies (evs @ [Notes A X]) =  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
268  | 
(if A:bad then insert X (spies evs) else spies evs)"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
269  | 
apply (induct_tac "evs")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
270  | 
apply (induct_tac [2] "a", auto)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
271  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
272  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
273  | 
lemma spies_evs_rev: "spies evs = spies (rev evs)"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
274  | 
apply (induct_tac "evs")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
275  | 
apply (induct_tac [2] "a")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
276  | 
apply (simp_all (no_asm_simp) add: spies_Says_rev spies_Gets_rev spies_Notes_rev)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
277  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
278  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
279  | 
lemmas parts_spies_evs_revD2 = spies_evs_rev [THEN equalityD2, THEN parts_mono]  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
280  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
281  | 
lemma spies_takeWhile: "spies (takeWhile P evs) <= spies evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
282  | 
apply (induct_tac "evs")  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
283  | 
apply (induct_tac [2] "a", auto)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
284  | 
txt{* Resembles @{text"used_subset_append"} in theory Event.*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
285  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
286  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
287  | 
lemmas parts_spies_takeWhile_mono = spies_takeWhile [THEN parts_mono]  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
288  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
289  | 
|
| 18886 | 290  | 
subsection{*Lemmas about @{term authKeys}*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
291  | 
|
| 18886 | 292  | 
lemma authKeys_empty: "authKeys [] = {}"
 | 
293  | 
apply (unfold authKeys_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
294  | 
apply (simp (no_asm))  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
295  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
296  | 
|
| 18886 | 297  | 
lemma authKeys_not_insert:  | 
298  | 
"(\<forall>A Ta akey Peer.  | 
|
299  | 
ev \<noteq> Says Kas A (Crypt (shrK A) \<lbrace>akey, Agent Peer, Ta,  | 
|
300  | 
(Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, akey, Ta\<rbrace>)\<rbrace>))  | 
|
301  | 
\<Longrightarrow> authKeys (ev # evs) = authKeys evs"  | 
|
302  | 
by (unfold authKeys_def, auto)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
303  | 
|
| 18886 | 304  | 
lemma authKeys_insert:  | 
305  | 
"authKeys  | 
|
306  | 
(Says Kas A (Crypt (shrK A) \<lbrace>Key K, Agent Peer, Number Ta,  | 
|
307  | 
(Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K, Number Ta\<rbrace>)\<rbrace>) # evs)  | 
|
308  | 
= insert K (authKeys evs)"  | 
|
309  | 
by (unfold authKeys_def, auto)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
310  | 
|
| 18886 | 311  | 
lemma authKeys_simp:  | 
312  | 
"K \<in> authKeys  | 
|
313  | 
(Says Kas A (Crypt (shrK A) \<lbrace>Key K', Agent Peer, Number Ta,  | 
|
314  | 
(Crypt (shrK Peer) \<lbrace>Agent A, Agent Peer, Key K', Number Ta\<rbrace>)\<rbrace>) # evs)  | 
|
315  | 
\<Longrightarrow> K = K' | K \<in> authKeys evs"  | 
|
316  | 
by (unfold authKeys_def, auto)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
317  | 
|
| 18886 | 318  | 
lemma authKeysI:  | 
319  | 
"Says Kas A (Crypt (shrK A) \<lbrace>Key K, Agent Tgs, Number Ta,  | 
|
320  | 
(Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key K, Number Ta\<rbrace>)\<rbrace>) \<in> set evs  | 
|
321  | 
\<Longrightarrow> K \<in> authKeys evs"  | 
|
322  | 
by (unfold authKeys_def, auto)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
323  | 
|
| 18886 | 324  | 
lemma authKeys_used: "K \<in> authKeys evs \<Longrightarrow> Key K \<in> used evs"  | 
325  | 
by (simp add: authKeys_def, blast)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
326  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
327  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
328  | 
subsection{*Forwarding Lemmas*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
329  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
330  | 
text{*--For reasoning about the encrypted portion of message K3--*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
331  | 
lemma K3_msg_in_parts_spies:  | 
| 18886 | 332  | 
"Says Kas' A (Crypt KeyA \<lbrace>authK, Peer, Ta, authTicket\<rbrace>)  | 
333  | 
\<in> set evs \<Longrightarrow> authTicket \<in> parts (spies evs)"  | 
|
| 37811 | 334  | 
by blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
335  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
336  | 
lemma Oops_range_spies1:  | 
| 18886 | 337  | 
"\<lbrakk> Says Kas A (Crypt KeyA \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
338  | 
\<in> set evs ;  | 
| 18886 | 339  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
340  | 
apply (erule rev_mp)  | 
| 18886 | 341  | 
apply (erule kerbIV.induct, auto)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
342  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
343  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
344  | 
text{*--For reasoning about the encrypted portion of message K5--*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
345  | 
lemma K5_msg_in_parts_spies:  | 
| 18886 | 346  | 
"Says Tgs' A (Crypt authK \<lbrace>servK, Agent B, Ts, servTicket\<rbrace>)  | 
347  | 
\<in> set evs \<Longrightarrow> servTicket \<in> parts (spies evs)"  | 
|
| 37811 | 348  | 
by blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
349  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
350  | 
lemma Oops_range_spies2:  | 
| 18886 | 351  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
352  | 
\<in> set evs ;  | 
| 18886 | 353  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow> servK \<notin> range shrK & servK \<in> symKeys"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
354  | 
apply (erule rev_mp)  | 
| 18886 | 355  | 
apply (erule kerbIV.induct, auto)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
356  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
357  | 
|
| 18886 | 358  | 
lemma Says_ticket_parts:  | 
359  | 
"Says S A (Crypt K \<lbrace>SesKey, B, TimeStamp, Ticket\<rbrace>) \<in> set evs  | 
|
360  | 
\<Longrightarrow> Ticket \<in> parts (spies evs)"  | 
|
| 37811 | 361  | 
by blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
362  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
363  | 
(*Spy never sees another agent's shared key! (unless it's lost at start)*)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
364  | 
lemma Spy_see_shrK [simp]:  | 
| 18886 | 365  | 
"evs \<in> kerbIV \<Longrightarrow> (Key (shrK A) \<in> parts (spies evs)) = (A \<in> bad)"  | 
366  | 
apply (erule kerbIV.induct)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
367  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
368  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
369  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
370  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
371  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
372  | 
lemma Spy_analz_shrK [simp]:  | 
| 18886 | 373  | 
"evs \<in> kerbIV \<Longrightarrow> (Key (shrK A) \<in> analz (spies evs)) = (A \<in> bad)"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
374  | 
by auto  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
375  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
376  | 
lemma Spy_see_shrK_D [dest!]:  | 
| 18886 | 377  | 
"\<lbrakk> Key (shrK A) \<in> parts (spies evs); evs \<in> kerbIV \<rbrakk> \<Longrightarrow> A:bad"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
378  | 
by (blast dest: Spy_see_shrK)  | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
379  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
380  | 
lemmas Spy_analz_shrK_D = analz_subset_parts [THEN subsetD, THEN Spy_see_shrK_D, dest!]  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
381  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
382  | 
text{*Nobody can have used non-existent keys!*}
 | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
383  | 
lemma new_keys_not_used [simp]:  | 
| 18886 | 384  | 
"\<lbrakk>Key K \<notin> used evs; K \<in> symKeys; evs \<in> kerbIV\<rbrakk>  | 
385  | 
\<Longrightarrow> K \<notin> keysFor (parts (spies evs))"  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
386  | 
apply (erule rev_mp)  | 
| 18886 | 387  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
388  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
389  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
390  | 
txt{*Fake*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
391  | 
apply (force dest!: keysFor_parts_insert)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
392  | 
txt{*Others*}
 | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
393  | 
apply (force dest!: analz_shrK_Decrypt)+  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
394  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
395  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
396  | 
(*Earlier, all protocol proofs declared this theorem.  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
397  | 
But few of them actually need it! (Another is Yahalom) *)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
398  | 
lemma new_keys_not_analzd:  | 
| 18886 | 399  | 
"\<lbrakk>evs \<in> kerbIV; K \<in> symKeys; Key K \<notin> used evs\<rbrakk>  | 
400  | 
\<Longrightarrow> K \<notin> keysFor (analz (spies evs))"  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
401  | 
by (blast dest: new_keys_not_used intro: keysFor_mono [THEN subsetD])  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
402  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
403  | 
|
| 18886 | 404  | 
|
405  | 
subsection{*Lemmas for reasoning about predicate "before"*}
 | 
|
406  | 
||
| 37811 | 407  | 
lemma used_Says_rev: "used (evs @ [Says A B X]) = parts {X} \<union> (used evs)"
 | 
| 18886 | 408  | 
apply (induct_tac "evs")  | 
409  | 
apply simp  | 
|
410  | 
apply (induct_tac "a")  | 
|
411  | 
apply auto  | 
|
412  | 
done  | 
|
413  | 
||
| 37811 | 414  | 
lemma used_Notes_rev: "used (evs @ [Notes A X]) = parts {X} \<union> (used evs)"
 | 
| 18886 | 415  | 
apply (induct_tac "evs")  | 
416  | 
apply simp  | 
|
417  | 
apply (induct_tac "a")  | 
|
418  | 
apply auto  | 
|
419  | 
done  | 
|
420  | 
||
| 37811 | 421  | 
lemma used_Gets_rev: "used (evs @ [Gets B X]) = used evs"  | 
| 18886 | 422  | 
apply (induct_tac "evs")  | 
423  | 
apply simp  | 
|
424  | 
apply (induct_tac "a")  | 
|
425  | 
apply auto  | 
|
426  | 
done  | 
|
427  | 
||
428  | 
lemma used_evs_rev: "used evs = used (rev evs)"  | 
|
429  | 
apply (induct_tac "evs")  | 
|
430  | 
apply simp  | 
|
431  | 
apply (induct_tac "a")  | 
|
432  | 
apply (simp add: used_Says_rev)  | 
|
433  | 
apply (simp add: used_Gets_rev)  | 
|
434  | 
apply (simp add: used_Notes_rev)  | 
|
435  | 
done  | 
|
436  | 
||
437  | 
lemma used_takeWhile_used [rule_format]:  | 
|
438  | 
"x : used (takeWhile P X) --> x : used X"  | 
|
439  | 
apply (induct_tac "X")  | 
|
440  | 
apply simp  | 
|
441  | 
apply (induct_tac "a")  | 
|
442  | 
apply (simp_all add: used_Nil)  | 
|
443  | 
apply (blast dest!: initState_into_used)+  | 
|
444  | 
done  | 
|
445  | 
||
446  | 
lemma set_evs_rev: "set evs = set (rev evs)"  | 
|
| 37811 | 447  | 
by auto  | 
| 18886 | 448  | 
|
449  | 
lemma takeWhile_void [rule_format]:  | 
|
450  | 
"x \<notin> set evs \<longrightarrow> takeWhile (\<lambda>z. z \<noteq> x) evs = evs"  | 
|
| 37811 | 451  | 
by auto  | 
| 18886 | 452  | 
|
453  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
454  | 
subsection{*Regularity Lemmas*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
455  | 
text{*These concern the form of items passed in messages*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
456  | 
|
| 18886 | 457  | 
text{*Describes the form of all components sent by Kas*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
458  | 
lemma Says_Kas_message_form:  | 
| 18886 | 459  | 
"\<lbrakk> Says Kas A (Crypt K \<lbrace>Key authK, Agent Peer, Number Ta, authTicket\<rbrace>)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
460  | 
\<in> set evs;  | 
| 18886 | 461  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow>  | 
462  | 
K = shrK A & Peer = Tgs &  | 
|
463  | 
authK \<notin> range shrK & authK \<in> authKeys evs & authK \<in> symKeys &  | 
|
464  | 
authTicket = (Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>) &  | 
|
465  | 
Key authK \<notin> used(before  | 
|
466  | 
Says Kas A (Crypt K \<lbrace>Key authK, Agent Peer, Number Ta, authTicket\<rbrace>)  | 
|
467  | 
on evs) &  | 
|
468  | 
Ta = CT (before  | 
|
469  | 
Says Kas A (Crypt K \<lbrace>Key authK, Agent Peer, Number Ta, authTicket\<rbrace>)  | 
|
470  | 
on evs)"  | 
|
471  | 
apply (unfold before_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
472  | 
apply (erule rev_mp)  | 
| 18886 | 473  | 
apply (erule kerbIV.induct)  | 
474  | 
apply (simp_all (no_asm) add: authKeys_def authKeys_insert, blast, blast)  | 
|
475  | 
txt{*K2*}
 | 
|
476  | 
apply (simp (no_asm) add: takeWhile_tail)  | 
|
477  | 
apply (rule conjI)  | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
478  | 
apply (metis Key_not_used authKeys_used length_rev set_rev takeWhile_void used_evs_rev)  | 
| 18886 | 479  | 
apply blast+  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
480  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
481  | 
|
| 18886 | 482  | 
|
483  | 
||
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
484  | 
(*This lemma is essential for proving Says_Tgs_message_form:  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
485  | 
|
| 18886 | 486  | 
the session key authK  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
487  | 
supplied by Kas in the authentication ticket  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
488  | 
cannot be a long-term key!  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
489  | 
|
| 18886 | 490  | 
Generalised to any session keys (both authK and servK).  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
491  | 
*)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
492  | 
lemma SesKey_is_session_key:  | 
| 18886 | 493  | 
"\<lbrakk> Crypt (shrK Tgs_B) \<lbrace>Agent A, Agent Tgs_B, Key SesKey, Number T\<rbrace>  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
494  | 
\<in> parts (spies evs); Tgs_B \<notin> bad;  | 
| 18886 | 495  | 
evs \<in> kerbIV \<rbrakk>  | 
496  | 
\<Longrightarrow> SesKey \<notin> range shrK"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
497  | 
apply (erule rev_mp)  | 
| 18886 | 498  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
499  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
500  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
501  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
502  | 
|
| 18886 | 503  | 
lemma authTicket_authentic:  | 
504  | 
"\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
505  | 
\<in> parts (spies evs);  | 
| 18886 | 506  | 
evs \<in> kerbIV \<rbrakk>  | 
507  | 
\<Longrightarrow> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
508  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
509  | 
\<in> set evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
510  | 
apply (erule rev_mp)  | 
| 18886 | 511  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
512  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
513  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
514  | 
txt{*Fake, K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
515  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
516  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
517  | 
|
| 18886 | 518  | 
lemma authTicket_crypt_authK:  | 
519  | 
"\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
520  | 
\<in> parts (spies evs);  | 
| 18886 | 521  | 
evs \<in> kerbIV \<rbrakk>  | 
522  | 
\<Longrightarrow> authK \<in> authKeys evs"  | 
|
523  | 
apply (frule authTicket_authentic, assumption)  | 
|
524  | 
apply (simp (no_asm) add: authKeys_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
525  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
526  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
527  | 
|
| 18886 | 528  | 
text{*Describes the form of servK, servTicket and authK sent by Tgs*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
529  | 
lemma Says_Tgs_message_form:  | 
| 18886 | 530  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
531  | 
\<in> set evs;  | 
| 18886 | 532  | 
evs \<in> kerbIV \<rbrakk>  | 
533  | 
\<Longrightarrow> B \<noteq> Tgs &  | 
|
534  | 
authK \<notin> range shrK & authK \<in> authKeys evs & authK \<in> symKeys &  | 
|
535  | 
servK \<notin> range shrK & servK \<notin> authKeys evs & servK \<in> symKeys &  | 
|
536  | 
servTicket = (Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>) &  | 
|
537  | 
Key servK \<notin> used (before  | 
|
538  | 
Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
539  | 
on evs) &  | 
|
540  | 
Ts = CT(before  | 
|
541  | 
Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
542  | 
on evs) "  | 
|
543  | 
apply (unfold before_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
544  | 
apply (erule rev_mp)  | 
| 18886 | 545  | 
apply (erule kerbIV.induct)  | 
546  | 
apply (simp_all add: authKeys_insert authKeys_not_insert authKeys_empty authKeys_simp, blast)  | 
|
547  | 
txt{*We need this simplification only for Message 4*}
 | 
|
548  | 
apply (simp (no_asm) add: takeWhile_tail)  | 
|
549  | 
apply auto  | 
|
550  | 
txt{*Five subcases of Message 4*}
 | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
551  | 
apply (blast dest!: SesKey_is_session_key)  | 
| 18886 | 552  | 
apply (blast dest: authTicket_crypt_authK)  | 
553  | 
apply (blast dest!: authKeys_used Says_Kas_message_form)  | 
|
554  | 
txt{*subcase: used before*}
 | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
555  | 
apply (metis used_evs_rev used_takeWhile_used)  | 
| 18886 | 556  | 
txt{*subcase: CT before*}
 | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
557  | 
apply (metis length_rev set_evs_rev takeWhile_void)  | 
| 18886 | 558  | 
done  | 
559  | 
||
560  | 
lemma authTicket_form:  | 
|
561  | 
"\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>  | 
|
562  | 
\<in> parts (spies evs);  | 
|
563  | 
A \<notin> bad;  | 
|
564  | 
evs \<in> kerbIV \<rbrakk>  | 
|
565  | 
\<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys &  | 
|
566  | 
authTicket = Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>"  | 
|
567  | 
apply (erule rev_mp)  | 
|
568  | 
apply (erule kerbIV.induct)  | 
|
569  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
570  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
|
571  | 
apply (blast+)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
572  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
573  | 
|
| 18886 | 574  | 
text{* This form holds also over an authTicket, but is not needed below.*}
 | 
575  | 
lemma servTicket_form:  | 
|
576  | 
"\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>  | 
|
577  | 
\<in> parts (spies evs);  | 
|
578  | 
Key authK \<notin> analz (spies evs);  | 
|
579  | 
evs \<in> kerbIV \<rbrakk>  | 
|
580  | 
\<Longrightarrow> servK \<notin> range shrK & servK \<in> symKeys &  | 
|
581  | 
(\<exists>A. servTicket = Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>)"  | 
|
582  | 
apply (erule rev_mp)  | 
|
583  | 
apply (erule rev_mp)  | 
|
584  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
585  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
586  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
|
587  | 
done  | 
|
588  | 
||
589  | 
text{* Essentially the same as @{text authTicket_form} *}
 | 
|
590  | 
lemma Says_kas_message_form:  | 
|
591  | 
"\<lbrakk> Says Kas' A (Crypt (shrK A)  | 
|
592  | 
\<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>) \<in> set evs;  | 
|
593  | 
evs \<in> kerbIV \<rbrakk>  | 
|
594  | 
\<Longrightarrow> authK \<notin> range shrK & authK \<in> symKeys &  | 
|
595  | 
authTicket =  | 
|
596  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Ta\<rbrace>  | 
|
597  | 
| authTicket \<in> analz (spies evs)"  | 
|
598  | 
by (blast dest: analz_shrK_Decrypt authTicket_form  | 
|
599  | 
Says_imp_spies [THEN analz.Inj])  | 
|
600  | 
||
601  | 
lemma Says_tgs_message_form:  | 
|
602  | 
"\<lbrakk> Says Tgs' A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>)  | 
|
603  | 
\<in> set evs; authK \<in> symKeys;  | 
|
604  | 
evs \<in> kerbIV \<rbrakk>  | 
|
605  | 
\<Longrightarrow> servK \<notin> range shrK &  | 
|
606  | 
(\<exists>A. servTicket =  | 
|
| 
32960
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
607  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>)  | 
| 18886 | 608  | 
| servTicket \<in> analz (spies evs)"  | 
| 37811 | 609  | 
by (metis Says_imp_analz_Spy Says_imp_parts_knows_Spy analz.Decrypt analz.Snd invKey_K servTicket_form)  | 
| 18886 | 610  | 
|
611  | 
||
612  | 
subsection{*Authenticity theorems: confirm origin of sensitive messages*}
 | 
|
613  | 
||
614  | 
lemma authK_authentic:  | 
|
615  | 
"\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
616  | 
\<in> parts (spies evs);  | 
| 18886 | 617  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
618  | 
\<Longrightarrow> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
619  | 
\<in> set evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
620  | 
apply (erule rev_mp)  | 
| 18886 | 621  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
622  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
623  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
624  | 
txt{*Fake*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
625  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
626  | 
txt{*K4*}
 | 
| 18886 | 627  | 
apply (blast dest!: authTicket_authentic [THEN Says_Kas_message_form])  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
628  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
629  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
630  | 
text{*If a certain encrypted message appears then it originated with Tgs*}
 | 
| 18886 | 631  | 
lemma servK_authentic:  | 
632  | 
"\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
633  | 
\<in> parts (spies evs);  | 
| 18886 | 634  | 
Key authK \<notin> analz (spies evs);  | 
635  | 
authK \<notin> range shrK;  | 
|
636  | 
evs \<in> kerbIV \<rbrakk>  | 
|
637  | 
\<Longrightarrow> \<exists>A. Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
638  | 
\<in> set evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
639  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
640  | 
apply (erule rev_mp)  | 
| 18886 | 641  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
642  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
643  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
644  | 
txt{*Fake*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
645  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
646  | 
txt{*K2*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
647  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
648  | 
txt{*K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
649  | 
apply auto  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
650  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
651  | 
|
| 18886 | 652  | 
lemma servK_authentic_bis:  | 
653  | 
"\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
654  | 
\<in> parts (spies evs);  | 
| 18886 | 655  | 
Key authK \<notin> analz (spies evs);  | 
656  | 
B \<noteq> Tgs;  | 
|
657  | 
evs \<in> kerbIV \<rbrakk>  | 
|
658  | 
\<Longrightarrow> \<exists>A. Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
659  | 
\<in> set evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
660  | 
apply (erule rev_mp)  | 
| 18886 | 661  | 
apply (erule rev_mp)  | 
662  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
663  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
664  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 18886 | 665  | 
txt{*Fake*}
 | 
666  | 
apply blast  | 
|
667  | 
txt{*K4*}
 | 
|
668  | 
apply blast  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
669  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
670  | 
|
| 18886 | 671  | 
text{*Authenticity of servK for B*}
 | 
672  | 
lemma servTicket_authentic_Tgs:  | 
|
673  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
674  | 
\<in> parts (spies evs); B \<noteq> Tgs; B \<notin> bad;  | 
|
675  | 
evs \<in> kerbIV \<rbrakk>  | 
|
676  | 
\<Longrightarrow> \<exists>authK.  | 
|
677  | 
Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,  | 
|
678  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)  | 
|
679  | 
\<in> set evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
680  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
681  | 
apply (erule rev_mp)  | 
| 18886 | 682  | 
apply (erule kerbIV.induct)  | 
683  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
684  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
|
685  | 
apply blast+  | 
|
686  | 
done  | 
|
687  | 
||
688  | 
text{*Anticipated here from next subsection*}
 | 
|
689  | 
lemma K4_imp_K2:  | 
|
690  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
691  | 
\<in> set evs; evs \<in> kerbIV\<rbrakk>  | 
|
692  | 
\<Longrightarrow> \<exists>Ta. Says Kas A  | 
|
693  | 
(Crypt (shrK A)  | 
|
694  | 
\<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
695  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
696  | 
\<in> set evs"  | 
|
697  | 
apply (erule rev_mp)  | 
|
698  | 
apply (erule kerbIV.induct)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
699  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 18886 | 700  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, auto)  | 
701  | 
apply (blast dest!: Says_imp_spies [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])  | 
|
702  | 
done  | 
|
703  | 
||
704  | 
text{*Anticipated here from next subsection*}
 | 
|
705  | 
lemma u_K4_imp_K2:  | 
|
706  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
707  | 
\<in> set evs; evs \<in> kerbIV\<rbrakk>  | 
|
708  | 
\<Longrightarrow> \<exists>Ta. (Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
709  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
710  | 
\<in> set evs  | 
|
711  | 
& servKlife + Ts <= authKlife + Ta)"  | 
|
712  | 
apply (erule rev_mp)  | 
|
713  | 
apply (erule kerbIV.induct)  | 
|
714  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
715  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, auto)  | 
|
716  | 
apply (blast dest!: Says_imp_spies [THEN parts.Inj, THEN parts.Fst, THEN authTicket_authentic])  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
717  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
718  | 
|
| 18886 | 719  | 
lemma servTicket_authentic_Kas:  | 
720  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
721  | 
\<in> parts (spies evs); B \<noteq> Tgs; B \<notin> bad;  | 
|
722  | 
evs \<in> kerbIV \<rbrakk>  | 
|
723  | 
\<Longrightarrow> \<exists>authK Ta.  | 
|
724  | 
Says Kas A  | 
|
725  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
726  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
727  | 
\<in> set evs"  | 
|
| 37811 | 728  | 
by (blast dest!: servTicket_authentic_Tgs K4_imp_K2)  | 
| 18886 | 729  | 
|
730  | 
lemma u_servTicket_authentic_Kas:  | 
|
731  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
732  | 
\<in> parts (spies evs); B \<noteq> Tgs; B \<notin> bad;  | 
|
733  | 
evs \<in> kerbIV \<rbrakk>  | 
|
734  | 
\<Longrightarrow> \<exists>authK Ta. Says Kas A (Crypt(shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
735  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
736  | 
\<in> set evs  | 
|
737  | 
& servKlife + Ts <= authKlife + Ta"  | 
|
| 37811 | 738  | 
by (blast dest!: servTicket_authentic_Tgs u_K4_imp_K2)  | 
| 18886 | 739  | 
|
740  | 
lemma servTicket_authentic:  | 
|
741  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
742  | 
\<in> parts (spies evs); B \<noteq> Tgs; B \<notin> bad;  | 
|
743  | 
evs \<in> kerbIV \<rbrakk>  | 
|
744  | 
\<Longrightarrow> \<exists>Ta authK.  | 
|
745  | 
Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
746  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
747  | 
\<in> set evs  | 
|
748  | 
& Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,  | 
|
749  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)  | 
|
750  | 
\<in> set evs"  | 
|
| 37811 | 751  | 
by (blast dest: servTicket_authentic_Tgs K4_imp_K2)  | 
| 18886 | 752  | 
|
753  | 
lemma u_servTicket_authentic:  | 
|
754  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
755  | 
\<in> parts (spies evs); B \<noteq> Tgs; B \<notin> bad;  | 
|
756  | 
evs \<in> kerbIV \<rbrakk>  | 
|
757  | 
\<Longrightarrow> \<exists>Ta authK.  | 
|
758  | 
(Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta,  | 
|
759  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
760  | 
\<in> set evs  | 
|
761  | 
& Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,  | 
|
762  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>\<rbrace>)  | 
|
763  | 
\<in> set evs  | 
|
764  | 
& servKlife + Ts <= authKlife + Ta)"  | 
|
| 37811 | 765  | 
by (blast dest: servTicket_authentic_Tgs u_K4_imp_K2)  | 
| 18886 | 766  | 
|
767  | 
lemma u_NotexpiredSK_NotexpiredAK:  | 
|
768  | 
"\<lbrakk> \<not> expiredSK Ts evs; servKlife + Ts <= authKlife + Ta \<rbrakk>  | 
|
769  | 
\<Longrightarrow> \<not> expiredAK Ta evs"  | 
|
| 33304 | 770  | 
by (metis le_less_trans)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
771  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
772  | 
|
| 18886 | 773  | 
subsection{* Reliability: friendly agents send something if something else happened*}
 | 
774  | 
||
775  | 
lemma K3_imp_K2:  | 
|
776  | 
"\<lbrakk> Says A Tgs  | 
|
777  | 
\<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>  | 
|
778  | 
\<in> set evs;  | 
|
779  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
780  | 
\<Longrightarrow> \<exists>Ta. Says Kas A (Crypt (shrK A)  | 
|
781  | 
\<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)  | 
|
782  | 
\<in> set evs"  | 
|
783  | 
apply (erule rev_mp)  | 
|
784  | 
apply (erule kerbIV.induct)  | 
|
785  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
786  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast, blast)  | 
|
787  | 
apply (blast dest: Says_imp_spies [THEN parts.Inj, THEN authK_authentic])  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
788  | 
done  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
789  | 
|
| 18886 | 790  | 
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.*}
 | 
791  | 
lemma Key_unique_SesKey:  | 
|
792  | 
"\<lbrakk> Crypt K \<lbrace>Key SesKey, Agent B, T, Ticket\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
793  | 
\<in> parts (spies evs);  | 
| 18886 | 794  | 
Crypt K' \<lbrace>Key SesKey, Agent B', T', Ticket'\<rbrace>  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
795  | 
\<in> parts (spies evs); Key SesKey \<notin> analz (spies evs);  | 
| 18886 | 796  | 
evs \<in> kerbIV \<rbrakk>  | 
797  | 
\<Longrightarrow> K=K' & B=B' & T=T' & Ticket=Ticket'"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
798  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
799  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
800  | 
apply (erule rev_mp)  | 
| 18886 | 801  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
802  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
803  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
804  | 
txt{*Fake, K2, K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
805  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
806  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
807  | 
|
| 18886 | 808  | 
lemma Tgs_authenticates_A:  | 
809  | 
"\<lbrakk> Crypt authK \<lbrace>Agent A, Number T2\<rbrace> \<in> parts (spies evs);  | 
|
810  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
811  | 
\<in> parts (spies evs);  | 
| 18886 | 812  | 
Key authK \<notin> analz (spies evs); A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
813  | 
\<Longrightarrow> \<exists> B. Says A Tgs \<lbrace>  | 
|
814  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>,  | 
|
815  | 
Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B \<rbrace> \<in> set evs"  | 
|
816  | 
apply (drule authTicket_authentic, assumption, rotate_tac 4)  | 
|
817  | 
apply (erule rev_mp, erule rev_mp, erule rev_mp)  | 
|
818  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
819  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
820  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
821  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
|
822  | 
txt{*Fake*}
 | 
|
823  | 
apply blast  | 
|
824  | 
txt{*K2*}
 | 
|
825  | 
apply (force dest!: Crypt_imp_keysFor)  | 
|
826  | 
txt{*K3*}
 | 
|
827  | 
apply (blast dest: Key_unique_SesKey)  | 
|
828  | 
txt{*K5*}
 | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
829  | 
apply (metis K3_imp_K2 Key_unique_SesKey Spy_see_shrK parts.Body parts.Fst  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
830  | 
Says_imp_knows_Spy [THEN parts.Inj])  | 
| 18886 | 831  | 
done  | 
832  | 
||
833  | 
lemma Says_K5:  | 
|
834  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
835  | 
Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,  | 
|
836  | 
servTicket\<rbrace>) \<in> set evs;  | 
|
837  | 
Key servK \<notin> analz (spies evs);  | 
|
838  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
839  | 
\<Longrightarrow> Says A B \<lbrace>servTicket, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
840  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
841  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
842  | 
apply (erule rev_mp)  | 
| 18886 | 843  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
844  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
845  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
846  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
|
847  | 
apply blast  | 
|
848  | 
txt{*K3*}
 | 
|
849  | 
apply (blast dest: authK_authentic Says_Kas_message_form Says_Tgs_message_form)  | 
|
850  | 
txt{*K4*}
 | 
|
851  | 
apply (force dest!: Crypt_imp_keysFor)  | 
|
852  | 
txt{*K5*}
 | 
|
853  | 
apply (blast dest: Key_unique_SesKey)  | 
|
854  | 
done  | 
|
855  | 
||
856  | 
text{*Anticipated here from next subsection*}
 | 
|
857  | 
lemma unique_CryptKey:  | 
|
858  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key SesKey, T\<rbrace>  | 
|
859  | 
\<in> parts (spies evs);  | 
|
860  | 
Crypt (shrK B') \<lbrace>Agent A', Agent B', Key SesKey, T'\<rbrace>  | 
|
861  | 
\<in> parts (spies evs); Key SesKey \<notin> analz (spies evs);  | 
|
862  | 
evs \<in> kerbIV \<rbrakk>  | 
|
863  | 
\<Longrightarrow> A=A' & B=B' & T=T'"  | 
|
864  | 
apply (erule rev_mp)  | 
|
865  | 
apply (erule rev_mp)  | 
|
866  | 
apply (erule rev_mp)  | 
|
867  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
868  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
869  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
870  | 
txt{*Fake, K2, K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
871  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
872  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
873  | 
|
| 18886 | 874  | 
lemma Says_K6:  | 
875  | 
"\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);  | 
|
876  | 
Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts,  | 
|
877  | 
servTicket\<rbrace>) \<in> set evs;  | 
|
878  | 
Key servK \<notin> analz (spies evs);  | 
|
879  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
880  | 
\<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"  | 
|
881  | 
apply (erule rev_mp)  | 
|
882  | 
apply (erule rev_mp)  | 
|
883  | 
apply (erule rev_mp)  | 
|
884  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
885  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
886  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
887  | 
apply (simp_all (no_asm_simp))  | 
|
888  | 
apply blast  | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
889  | 
apply (metis Crypt_imp_invKey_keysFor invKey_K new_keys_not_used)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
890  | 
apply (clarify)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
891  | 
apply (frule Says_Tgs_message_form, assumption)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
892  | 
apply (metis K3_msg_in_parts_spies parts.Fst Says_imp_knows_Spy [THEN parts.Inj]  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
893  | 
unique_CryptKey)  | 
| 18886 | 894  | 
done  | 
895  | 
||
896  | 
text{*Needs a unicity theorem, hence moved here*}
 | 
|
897  | 
lemma servK_authentic_ter:  | 
|
898  | 
"\<lbrakk> Says Kas A  | 
|
899  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>) \<in> set evs;  | 
|
900  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
901  | 
\<in> parts (spies evs);  | 
|
902  | 
Key authK \<notin> analz (spies evs);  | 
|
903  | 
evs \<in> kerbIV \<rbrakk>  | 
|
904  | 
\<Longrightarrow> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
905  | 
\<in> set evs"  | 
|
906  | 
apply (frule Says_Kas_message_form, assumption)  | 
|
907  | 
apply (erule rev_mp)  | 
|
908  | 
apply (erule rev_mp)  | 
|
909  | 
apply (erule rev_mp)  | 
|
910  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
911  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
|
912  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
|
| 37811 | 913  | 
txt{*K2*}
 | 
| 18886 | 914  | 
apply (blast dest!: servK_authentic Says_Tgs_message_form authKeys_used)  | 
| 37811 | 915  | 
txt{*K4 remain*}
 | 
916  | 
apply (blast dest!: unique_CryptKey)  | 
|
| 18886 | 917  | 
done  | 
918  | 
||
919  | 
||
920  | 
subsection{*Unicity Theorems*}
 | 
|
921  | 
||
922  | 
text{* The session key, if secure, uniquely identifies the Ticket
 | 
|
923  | 
whether authTicket or servTicket. As a matter of fact, one can read  | 
|
924  | 
also Tgs in the place of B. *}  | 
|
925  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
926  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
927  | 
(*  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
928  | 
At reception of any message mentioning A, Kas associates shrK A with  | 
| 18886 | 929  | 
a new authK. Realistic, as the user gets a new authK at each login.  | 
930  | 
Similarly, at reception of any message mentioning an authK  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
931  | 
(a legitimate user could make several requests to Tgs - by K3), Tgs  | 
| 18886 | 932  | 
associates it with a new servK.  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
933  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
934  | 
Therefore, a goal like  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
935  | 
|
| 18886 | 936  | 
"evs \<in> kerbIV  | 
937  | 
\<Longrightarrow> Key Kc \<notin> analz (spies evs) \<longrightarrow>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
938  | 
(\<exists>K' B' T' Ticket'. \<forall>K B T Ticket.  | 
| 18886 | 939  | 
Crypt Kc \<lbrace>Key K, Agent B, T, Ticket\<rbrace>  | 
940  | 
\<in> parts (spies evs) \<longrightarrow> K=K' & B=B' & T=T' & Ticket=Ticket')"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
941  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
942  | 
would fail on the K2 and K4 cases.  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
943  | 
*)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
944  | 
|
| 18886 | 945  | 
lemma unique_authKeys:  | 
946  | 
"\<lbrakk> Says Kas A  | 
|
947  | 
(Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, X\<rbrace>) \<in> set evs;  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
948  | 
Says Kas A'  | 
| 18886 | 949  | 
(Crypt Ka' \<lbrace>Key authK, Agent Tgs, Ta', X'\<rbrace>) \<in> set evs;  | 
950  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow> A=A' & Ka=Ka' & Ta=Ta' & X=X'"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
951  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
952  | 
apply (erule rev_mp)  | 
| 18886 | 953  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
954  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
955  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
956  | 
txt{*K2*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
957  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
958  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
959  | 
|
| 18886 | 960  | 
text{* servK uniquely identifies the message from Tgs *}
 | 
961  | 
lemma unique_servKeys:  | 
|
962  | 
"\<lbrakk> Says Tgs A  | 
|
963  | 
(Crypt K \<lbrace>Key servK, Agent B, Ts, X\<rbrace>) \<in> set evs;  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
964  | 
Says Tgs A'  | 
| 18886 | 965  | 
(Crypt K' \<lbrace>Key servK, Agent B', Ts', X'\<rbrace>) \<in> set evs;  | 
966  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow> A=A' & B=B' & K=K' & Ts=Ts' & X=X'"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
967  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
968  | 
apply (erule rev_mp)  | 
| 18886 | 969  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
970  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
971  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
972  | 
txt{*K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
973  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
974  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
975  | 
|
| 18886 | 976  | 
text{* Revised unicity theorems *}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
977  | 
|
| 18886 | 978  | 
lemma Kas_Unique:  | 
979  | 
"\<lbrakk> Says Kas A  | 
|
980  | 
(Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>) \<in> set evs;  | 
|
981  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow>  | 
|
982  | 
Unique (Says Kas A (Crypt Ka \<lbrace>Key authK, Agent Tgs, Ta, authTicket\<rbrace>))  | 
|
983  | 
on evs"  | 
|
984  | 
apply (erule rev_mp, erule kerbIV.induct, simp_all add: Unique_def)  | 
|
985  | 
apply blast  | 
|
986  | 
done  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
987  | 
|
| 18886 | 988  | 
lemma Tgs_Unique:  | 
989  | 
"\<lbrakk> Says Tgs A  | 
|
990  | 
(Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>) \<in> set evs;  | 
|
991  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow>  | 
|
992  | 
Unique (Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Ts, servTicket\<rbrace>))  | 
|
993  | 
on evs"  | 
|
994  | 
apply (erule rev_mp, erule kerbIV.induct, simp_all add: Unique_def)  | 
|
995  | 
apply blast  | 
|
996  | 
done  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
997  | 
|
| 18886 | 998  | 
|
999  | 
subsection{*Lemmas About the Predicate @{term AKcryptSK}*}
 | 
|
1000  | 
||
1001  | 
lemma not_AKcryptSK_Nil [iff]: "\<not> AKcryptSK authK servK []"  | 
|
1002  | 
by (simp add: AKcryptSK_def)  | 
|
1003  | 
||
1004  | 
lemma AKcryptSKI:  | 
|
1005  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, X \<rbrace>) \<in> set evs;  | 
|
1006  | 
evs \<in> kerbIV \<rbrakk> \<Longrightarrow> AKcryptSK authK servK evs"  | 
|
1007  | 
apply (unfold AKcryptSK_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1008  | 
apply (blast dest: Says_Tgs_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1009  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1010  | 
|
| 18886 | 1011  | 
lemma AKcryptSK_Says [simp]:  | 
1012  | 
"AKcryptSK authK servK (Says S A X # evs) =  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1013  | 
(Tgs = S &  | 
| 18886 | 1014  | 
(\<exists>B Ts. X = Crypt authK  | 
1015  | 
\<lbrace>Key servK, Agent B, Number Ts,  | 
|
1016  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace> \<rbrace>)  | 
|
1017  | 
| AKcryptSK authK servK evs)"  | 
|
| 37811 | 1018  | 
by (auto simp add: AKcryptSK_def)  | 
1019  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1020  | 
|
| 18886 | 1021  | 
(*A fresh authK cannot be associated with any other  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1022  | 
(with respect to a given trace). *)  | 
| 18886 | 1023  | 
lemma Auth_fresh_not_AKcryptSK:  | 
1024  | 
"\<lbrakk> Key authK \<notin> used evs; evs \<in> kerbIV \<rbrakk>  | 
|
1025  | 
\<Longrightarrow> \<not> AKcryptSK authK servK evs"  | 
|
1026  | 
apply (unfold AKcryptSK_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1027  | 
apply (erule rev_mp)  | 
| 18886 | 1028  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1029  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1030  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1031  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1032  | 
|
| 18886 | 1033  | 
(*A fresh servK cannot be associated with any other  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1034  | 
(with respect to a given trace). *)  | 
| 18886 | 1035  | 
lemma Serv_fresh_not_AKcryptSK:  | 
1036  | 
"Key servK \<notin> used evs \<Longrightarrow> \<not> AKcryptSK authK servK evs"  | 
|
| 37811 | 1037  | 
by (unfold AKcryptSK_def, blast)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1038  | 
|
| 18886 | 1039  | 
lemma authK_not_AKcryptSK:  | 
1040  | 
"\<lbrakk> Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, tk\<rbrace>  | 
|
1041  | 
\<in> parts (spies evs); evs \<in> kerbIV \<rbrakk>  | 
|
1042  | 
\<Longrightarrow> \<not> AKcryptSK K authK evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1043  | 
apply (erule rev_mp)  | 
| 18886 | 1044  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1045  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1046  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1047  | 
txt{*Fake*}
 | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1048  | 
apply blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1049  | 
txt{*K2: by freshness*}
 | 
| 18886 | 1050  | 
apply (simp add: AKcryptSK_def)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1051  | 
txt{*K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1052  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1053  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1054  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1055  | 
text{*A secure serverkey cannot have been used to encrypt others*}
 | 
| 18886 | 1056  | 
lemma servK_not_AKcryptSK:  | 
1057  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key SK, Number Ts\<rbrace> \<in> parts (spies evs);  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1058  | 
Key SK \<notin> analz (spies evs); SK \<in> symKeys;  | 
| 18886 | 1059  | 
B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
1060  | 
\<Longrightarrow> \<not> AKcryptSK SK K evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1061  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1062  | 
apply (erule rev_mp)  | 
| 18886 | 1063  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1064  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1065  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1066  | 
txt{*K4*}
 | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1067  | 
apply (metis Auth_fresh_not_AKcryptSK Crypt_imp_keysFor new_keys_not_used parts.Fst parts.Snd Says_imp_knows_Spy [THEN parts.Inj] unique_CryptKey)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1068  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1069  | 
|
| 18886 | 1070  | 
text{*Long term keys are not issued as servKeys*}
 | 
1071  | 
lemma shrK_not_AKcryptSK:  | 
|
1072  | 
"evs \<in> kerbIV \<Longrightarrow> \<not> AKcryptSK K (shrK A) evs"  | 
|
1073  | 
apply (unfold AKcryptSK_def)  | 
|
1074  | 
apply (erule kerbIV.induct)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1075  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1076  | 
apply (frule_tac [5] K3_msg_in_parts_spies, auto)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1077  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1078  | 
|
| 18886 | 1079  | 
text{*The Tgs message associates servK with authK and therefore not with any
 | 
1080  | 
other key authK.*}  | 
|
1081  | 
lemma Says_Tgs_AKcryptSK:  | 
|
1082  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, X \<rbrace>)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1083  | 
\<in> set evs;  | 
| 18886 | 1084  | 
authK' \<noteq> authK; evs \<in> kerbIV \<rbrakk>  | 
1085  | 
\<Longrightarrow> \<not> AKcryptSK authK' servK evs"  | 
|
1086  | 
apply (unfold AKcryptSK_def)  | 
|
1087  | 
apply (blast dest: unique_servKeys)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1088  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1089  | 
|
| 18886 | 1090  | 
text{*Equivalently*}
 | 
1091  | 
lemma not_different_AKcryptSK:  | 
|
1092  | 
"\<lbrakk> AKcryptSK authK servK evs;  | 
|
1093  | 
authK' \<noteq> authK; evs \<in> kerbIV \<rbrakk>  | 
|
1094  | 
\<Longrightarrow> \<not> AKcryptSK authK' servK evs \<and> servK \<in> symKeys"  | 
|
1095  | 
apply (simp add: AKcryptSK_def)  | 
|
1096  | 
apply (blast dest: unique_servKeys Says_Tgs_message_form)  | 
|
1097  | 
done  | 
|
1098  | 
||
1099  | 
lemma AKcryptSK_not_AKcryptSK:  | 
|
1100  | 
"\<lbrakk> AKcryptSK authK servK evs; evs \<in> kerbIV \<rbrakk>  | 
|
1101  | 
\<Longrightarrow> \<not> AKcryptSK servK K evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1102  | 
apply (erule rev_mp)  | 
| 18886 | 1103  | 
apply (erule kerbIV.induct)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1104  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1105  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1106  | 
apply (metis Auth_fresh_not_AKcryptSK Says_imp_spies authK_not_AKcryptSK  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1107  | 
authKeys_used authTicket_crypt_authK parts.Fst parts.Inj)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1108  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1109  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1110  | 
text{*The only session keys that can be found with the help of session keys are
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1111  | 
those sent by Tgs in step K4. *}  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1112  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1113  | 
text{*We take some pains to express the property
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1114  | 
as a logical equivalence so that the simplifier can apply it.*}  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1115  | 
lemma Key_analz_image_Key_lemma:  | 
| 18886 | 1116  | 
"P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) \<longrightarrow> (K:KK | Key K \<in> analz H)  | 
1117  | 
\<Longrightarrow>  | 
|
1118  | 
P \<longrightarrow> (Key K \<in> analz (Key`KK Un H)) = (K:KK | Key K \<in> analz H)"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1119  | 
by (blast intro: analz_mono [THEN subsetD])  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1120  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1121  | 
|
| 18886 | 1122  | 
lemma AKcryptSK_analz_insert:  | 
1123  | 
"\<lbrakk> AKcryptSK K K' evs; K \<in> symKeys; evs \<in> kerbIV \<rbrakk>  | 
|
1124  | 
\<Longrightarrow> Key K' \<in> analz (insert (Key K) (spies evs))"  | 
|
1125  | 
apply (simp add: AKcryptSK_def, clarify)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1126  | 
apply (drule Says_imp_spies [THEN analz.Inj, THEN analz_insertI], auto)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1127  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1128  | 
|
| 18886 | 1129  | 
lemma authKeys_are_not_AKcryptSK:  | 
1130  | 
"\<lbrakk> K \<in> authKeys evs Un range shrK; evs \<in> kerbIV \<rbrakk>  | 
|
1131  | 
\<Longrightarrow> \<forall>SK. \<not> AKcryptSK SK K evs \<and> K \<in> symKeys"  | 
|
1132  | 
apply (simp add: authKeys_def AKcryptSK_def)  | 
|
1133  | 
apply (blast dest: Says_Kas_message_form Says_Tgs_message_form)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1134  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1135  | 
|
| 18886 | 1136  | 
lemma not_authKeys_not_AKcryptSK:  | 
1137  | 
"\<lbrakk> K \<notin> authKeys evs;  | 
|
1138  | 
K \<notin> range shrK; evs \<in> kerbIV \<rbrakk>  | 
|
1139  | 
\<Longrightarrow> \<forall>SK. \<not> AKcryptSK K SK evs"  | 
|
1140  | 
apply (simp add: AKcryptSK_def)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1141  | 
apply (blast dest: Says_Tgs_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1142  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1143  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1144  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1145  | 
subsection{*Secrecy Theorems*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1146  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1147  | 
text{*For the Oops2 case of the next theorem*}
 | 
| 18886 | 1148  | 
lemma Oops2_not_AKcryptSK:  | 
1149  | 
"\<lbrakk> evs \<in> kerbIV;  | 
|
1150  | 
Says Tgs A (Crypt authK  | 
|
1151  | 
\<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
1152  | 
\<in> set evs \<rbrakk>  | 
|
1153  | 
\<Longrightarrow> \<not> AKcryptSK servK SK evs"  | 
|
| 37811 | 1154  | 
by (blast dest: AKcryptSKI AKcryptSK_not_AKcryptSK)  | 
| 18886 | 1155  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1156  | 
text{* Big simplification law for keys SK that are not crypted by keys in KK
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1157  | 
It helps prove three, otherwise hard, facts about keys. These facts are  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1158  | 
exploited as simplification laws for analz, and also "limit the damage"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1159  | 
in case of loss of a key to the spy. See ESORICS98.  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1160  | 
[simplified by LCP] *}  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1161  | 
lemma Key_analz_image_Key [rule_format (no_asm)]:  | 
| 18886 | 1162  | 
"evs \<in> kerbIV \<Longrightarrow>  | 
1163  | 
(\<forall>SK KK. SK \<in> symKeys & KK <= -(range shrK) \<longrightarrow>  | 
|
1164  | 
(\<forall>K \<in> KK. \<not> AKcryptSK K SK evs) \<longrightarrow>  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1165  | 
(Key SK \<in> analz (Key`KK Un (spies evs))) =  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1166  | 
(SK \<in> KK | Key SK \<in> analz (spies evs)))"  | 
| 18886 | 1167  | 
apply (erule kerbIV.induct)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1168  | 
apply (frule_tac [10] Oops_range_spies2)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1169  | 
apply (frule_tac [9] Oops_range_spies1)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1170  | 
apply (frule_tac [7] Says_tgs_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1171  | 
apply (frule_tac [5] Says_kas_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1172  | 
apply (safe del: impI intro!: Key_analz_image_Key_lemma [THEN impI])  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1173  | 
txt{*Case-splits for Oops1 and message 5: the negated case simplifies using
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1174  | 
the induction hypothesis*}  | 
| 18886 | 1175  | 
apply (case_tac [11] "AKcryptSK authK SK evsO1")  | 
1176  | 
apply (case_tac [8] "AKcryptSK servK SK evs5")  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1177  | 
apply (simp_all del: image_insert  | 
| 18886 | 1178  | 
add: analz_image_freshK_simps AKcryptSK_Says shrK_not_AKcryptSK  | 
1179  | 
Oops2_not_AKcryptSK Auth_fresh_not_AKcryptSK  | 
|
1180  | 
Serv_fresh_not_AKcryptSK Says_Tgs_AKcryptSK Spy_analz_shrK)  | 
|
| 14945 | 1181  | 
txt{*Fake*} 
 | 
1182  | 
apply spy_analz  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1183  | 
txt{*K2*}
 | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1184  | 
apply blast  | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1185  | 
txt{*K3*}
 | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1186  | 
apply blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1187  | 
txt{*K4*}
 | 
| 18886 | 1188  | 
apply (blast dest!: authK_not_AKcryptSK)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1189  | 
txt{*K5*}
 | 
| 18886 | 1190  | 
apply (case_tac "Key servK \<in> analz (spies evs5) ")  | 
1191  | 
txt{*If servK is compromised then the result follows directly...*}
 | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1192  | 
apply (simp (no_asm_simp) add: analz_insert_eq Un_upper2 [THEN analz_mono, THEN subsetD])  | 
| 18886 | 1193  | 
txt{*...therefore servK is uncompromised.*}
 | 
1194  | 
txt{*The AKcryptSK servK SK evs5 case leads to a contradiction.*}
 | 
|
1195  | 
apply (blast elim!: servK_not_AKcryptSK [THEN [2] rev_notE] del: allE ballE)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1196  | 
txt{*Another K5 case*}
 | 
| 
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1197  | 
apply blast  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1198  | 
txt{*Oops1*}
 | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1199  | 
apply simp  | 
| 18886 | 1200  | 
apply (blast dest!: AKcryptSK_analz_insert)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1201  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1202  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1203  | 
text{* First simplification law for analz: no session keys encrypt
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1204  | 
authentication keys or shared keys. *}  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1205  | 
lemma analz_insert_freshK1:  | 
| 18886 | 1206  | 
"\<lbrakk> evs \<in> kerbIV; K \<in> authKeys evs Un range shrK;  | 
1207  | 
SesKey \<notin> range shrK \<rbrakk>  | 
|
1208  | 
\<Longrightarrow> (Key K \<in> analz (insert (Key SesKey) (spies evs))) =  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1209  | 
(K = SesKey | Key K \<in> analz (spies evs))"  | 
| 18886 | 1210  | 
apply (frule authKeys_are_not_AKcryptSK, assumption)  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1211  | 
apply (simp del: image_insert  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1212  | 
add: analz_image_freshK_simps add: Key_analz_image_Key)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1213  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1214  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1215  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1216  | 
text{* Second simplification law for analz: no service keys encrypt any other keys.*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1217  | 
lemma analz_insert_freshK2:  | 
| 18886 | 1218  | 
"\<lbrakk> evs \<in> kerbIV; servK \<notin> (authKeys evs); servK \<notin> range shrK;  | 
1219  | 
K \<in> symKeys \<rbrakk>  | 
|
1220  | 
\<Longrightarrow> (Key K \<in> analz (insert (Key servK) (spies evs))) =  | 
|
1221  | 
(K = servK | Key K \<in> analz (spies evs))"  | 
|
1222  | 
apply (frule not_authKeys_not_AKcryptSK, assumption, assumption)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1223  | 
apply (simp del: image_insert  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1224  | 
add: analz_image_freshK_simps add: Key_analz_image_Key)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1225  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1226  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1227  | 
|
| 18886 | 1228  | 
text{* Third simplification law for analz: only one authentication key encrypts a certain service key.*}
 | 
1229  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1230  | 
lemma analz_insert_freshK3:  | 
| 18886 | 1231  | 
"\<lbrakk> AKcryptSK authK servK evs;  | 
1232  | 
authK' \<noteq> authK; authK' \<notin> range shrK; evs \<in> kerbIV \<rbrakk>  | 
|
1233  | 
\<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =  | 
|
1234  | 
(servK = authK' | Key servK \<in> analz (spies evs))"  | 
|
1235  | 
apply (drule_tac authK' = authK' in not_different_AKcryptSK, blast, assumption)  | 
|
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1236  | 
apply (simp del: image_insert  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1237  | 
add: analz_image_freshK_simps add: Key_analz_image_Key)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1238  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1239  | 
|
| 18886 | 1240  | 
lemma analz_insert_freshK3_bis:  | 
1241  | 
"\<lbrakk> Says Tgs A  | 
|
1242  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
1243  | 
\<in> set evs;  | 
|
1244  | 
authK \<noteq> authK'; authK' \<notin> range shrK; evs \<in> kerbIV \<rbrakk>  | 
|
1245  | 
\<Longrightarrow> (Key servK \<in> analz (insert (Key authK') (spies evs))) =  | 
|
1246  | 
(servK = authK' | Key servK \<in> analz (spies evs))"  | 
|
1247  | 
apply (frule AKcryptSKI, assumption)  | 
|
1248  | 
apply (simp add: analz_insert_freshK3)  | 
|
1249  | 
done  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1250  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1251  | 
text{*a weakness of the protocol*}
 | 
| 18886 | 1252  | 
lemma authK_compromises_servK:  | 
1253  | 
"\<lbrakk> Says Tgs A  | 
|
1254  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
1255  | 
\<in> set evs; authK \<in> symKeys;  | 
|
1256  | 
Key authK \<in> analz (spies evs); evs \<in> kerbIV \<rbrakk>  | 
|
1257  | 
\<Longrightarrow> Key servK \<in> analz (spies evs)"  | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1258  | 
by (metis Says_imp_analz_Spy analz.Fst analz_Decrypt')  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1259  | 
|
| 18886 | 1260  | 
lemma servK_notin_authKeysD:  | 
1261  | 
"\<lbrakk> Crypt authK \<lbrace>Key servK, Agent B, Ts,  | 
|
1262  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Ts\<rbrace>\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1263  | 
\<in> parts (spies evs);  | 
| 18886 | 1264  | 
Key servK \<notin> analz (spies evs);  | 
1265  | 
B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1266  | 
\<Longrightarrow> servK \<notin> authKeys evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1267  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1268  | 
apply (erule rev_mp)  | 
| 18886 | 1269  | 
apply (simp add: authKeys_def)  | 
1270  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1271  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1272  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1273  | 
apply (blast+)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1274  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1275  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1276  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1277  | 
text{*If Spy sees the Authentication Key sent in msg K2, then
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1278  | 
the Key has expired.*}  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1279  | 
lemma Confidentiality_Kas_lemma [rule_format]:  | 
| 18886 | 1280  | 
"\<lbrakk> authK \<in> symKeys; A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
1281  | 
\<Longrightarrow> Says Kas A  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1282  | 
(Crypt (shrK A)  | 
| 18886 | 1283  | 
\<lbrace>Key authK, Agent Tgs, Number Ta,  | 
1284  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>\<rbrace>)  | 
|
1285  | 
\<in> set evs \<longrightarrow>  | 
|
1286  | 
Key authK \<in> analz (spies evs) \<longrightarrow>  | 
|
1287  | 
expiredAK Ta evs"  | 
|
1288  | 
apply (erule kerbIV.induct)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1289  | 
apply (frule_tac [10] Oops_range_spies2)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1290  | 
apply (frule_tac [9] Oops_range_spies1)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1291  | 
apply (frule_tac [7] Says_tgs_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1292  | 
apply (frule_tac [5] Says_kas_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1293  | 
apply (safe del: impI conjI impCE)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1294  | 
apply (simp_all (no_asm_simp) add: Says_Kas_message_form less_SucI analz_insert_eq not_parts_not_analz analz_insert_freshK1 pushes)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1295  | 
txt{*Fake*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1296  | 
apply spy_analz  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1297  | 
txt{*K2*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1298  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1299  | 
txt{*K4*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1300  | 
apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1301  | 
txt{*Level 8: K5*}
 | 
| 18886 | 1302  | 
apply (blast dest: servK_notin_authKeysD Says_Kas_message_form intro: less_SucI)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1303  | 
txt{*Oops1*}
 | 
| 18886 | 1304  | 
apply (blast dest!: unique_authKeys intro: less_SucI)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1305  | 
txt{*Oops2*}
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1306  | 
apply (blast dest: Says_Tgs_message_form Says_Kas_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1307  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1308  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1309  | 
lemma Confidentiality_Kas:  | 
| 18886 | 1310  | 
"\<lbrakk> Says Kas A  | 
1311  | 
(Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1312  | 
\<in> set evs;  | 
| 18886 | 1313  | 
\<not> expiredAK Ta evs;  | 
1314  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1315  | 
\<Longrightarrow> Key authK \<notin> analz (spies evs)"  | 
|
| 
14200
 
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
 
paulson 
parents: 
14182 
diff
changeset
 | 
1316  | 
by (blast dest: Says_Kas_message_form Confidentiality_Kas_lemma)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1317  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1318  | 
text{*If Spy sees the Service Key sent in msg K4, then
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1319  | 
the Key has expired.*}  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1320  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1321  | 
lemma Confidentiality_lemma [rule_format]:  | 
| 18886 | 1322  | 
"\<lbrakk> Says Tgs A  | 
| 
32960
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1323  | 
(Crypt authK  | 
| 
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1324  | 
\<lbrace>Key servK, Agent B, Number Ts,  | 
| 
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1325  | 
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: 
32431 
diff
changeset
 | 
1326  | 
\<in> set evs;  | 
| 
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1327  | 
Key authK \<notin> analz (spies evs);  | 
| 18886 | 1328  | 
servK \<in> symKeys;  | 
| 
32960
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1329  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
| 18886 | 1330  | 
\<Longrightarrow> Key servK \<in> analz (spies evs) \<longrightarrow>  | 
| 
32960
 
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
 
wenzelm 
parents: 
32431 
diff
changeset
 | 
1331  | 
expiredSK Ts evs"  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1332  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1333  | 
apply (erule rev_mp)  | 
| 18886 | 1334  | 
apply (erule kerbIV.induct)  | 
| 37811 | 1335  | 
apply (rule_tac [9] impI)+  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1336  | 
  --{*The Oops1 case is unusual: must simplify
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1337  | 
    @{term "Authkey \<notin> analz (spies (ev#evs))"}, not letting
 | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1338  | 
   @{text analz_mono_contra} weaken it to
 | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1339  | 
   @{term "Authkey \<notin> analz (spies evs)"},
 | 
| 18886 | 1340  | 
  for we then conclude @{term "authK \<noteq> authKa"}.*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1341  | 
apply analz_mono_contra  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1342  | 
apply (frule_tac [10] Oops_range_spies2)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1343  | 
apply (frule_tac [9] Oops_range_spies1)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1344  | 
apply (frule_tac [7] Says_tgs_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1345  | 
apply (frule_tac [5] Says_kas_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1346  | 
apply (safe del: impI conjI impCE)  | 
| 18886 | 1347  | 
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)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1348  | 
txt{*Fake*}
 | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1349  | 
apply spy_analz  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1350  | 
txt{*K2*}
 | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1351  | 
apply (blast intro: parts_insertI less_SucI)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1352  | 
txt{*K4*}
 | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1353  | 
apply (blast dest: authTicket_authentic Confidentiality_Kas)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1354  | 
txt{*K5*}
 | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1355  | 
apply (metis Says_imp_spies Says_ticket_parts Tgs_not_bad analz_insert_freshK2  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1356  | 
less_SucI parts.Inj servK_notin_authKeysD unique_CryptKey)  | 
| 18886 | 1357  | 
txt{*Oops1*} 
 | 
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1358  | 
apply (blast dest: Says_Kas_message_form Says_Tgs_message_form intro: less_SucI)  | 
| 
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1359  | 
txt{*Oops2*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1360  | 
apply (blast dest: Says_imp_spies [THEN parts.Inj] Key_unique_SesKey intro: less_SucI)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1361  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1362  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1363  | 
|
| 18886 | 1364  | 
text{* In the real world Tgs can't check wheter authK is secure! *}
 | 
1365  | 
lemma Confidentiality_Tgs:  | 
|
1366  | 
"\<lbrakk> Says Tgs A  | 
|
1367  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1368  | 
\<in> set evs;  | 
| 18886 | 1369  | 
Key authK \<notin> analz (spies evs);  | 
1370  | 
\<not> expiredSK Ts evs;  | 
|
1371  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1372  | 
\<Longrightarrow> Key servK \<notin> analz (spies evs)"  | 
|
| 37811 | 1373  | 
by (blast dest: Says_Tgs_message_form Confidentiality_lemma)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1374  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1375  | 
text{* In the real world Tgs CAN check what Kas sends! *}
 | 
| 18886 | 1376  | 
lemma Confidentiality_Tgs_bis:  | 
1377  | 
"\<lbrakk> Says Kas A  | 
|
1378  | 
(Crypt Ka \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1379  | 
\<in> set evs;  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1380  | 
Says Tgs A  | 
| 18886 | 1381  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1382  | 
\<in> set evs;  | 
| 18886 | 1383  | 
\<not> expiredAK Ta evs; \<not> expiredSK Ts evs;  | 
1384  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1385  | 
\<Longrightarrow> Key servK \<notin> analz (spies evs)"  | 
|
| 37811 | 1386  | 
by (blast dest!: Confidentiality_Kas Confidentiality_Tgs)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1387  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1388  | 
text{*Most general form*}
 | 
| 18886 | 1389  | 
lemmas Confidentiality_Tgs_ter = authTicket_authentic [THEN Confidentiality_Tgs_bis]  | 
1390  | 
||
1391  | 
lemmas Confidentiality_Auth_A = authK_authentic [THEN Confidentiality_Kas]  | 
|
1392  | 
||
1393  | 
text{*Needs a confidentiality guarantee, hence moved here.
 | 
|
1394  | 
Authenticity of servK for A*}  | 
|
1395  | 
lemma servK_authentic_bis_r:  | 
|
1396  | 
"\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1397  | 
\<in> parts (spies evs);  | 
|
1398  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1399  | 
\<in> parts (spies evs);  | 
|
1400  | 
\<not> expiredAK Ta evs; A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1401  | 
\<Longrightarrow>Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
1402  | 
\<in> set evs"  | 
|
| 37811 | 1403  | 
by (blast dest: authK_authentic Confidentiality_Auth_A servK_authentic_ter)  | 
| 18886 | 1404  | 
|
1405  | 
lemma Confidentiality_Serv_A:  | 
|
1406  | 
"\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1407  | 
\<in> parts (spies evs);  | 
|
1408  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1409  | 
\<in> parts (spies evs);  | 
|
1410  | 
\<not> expiredAK Ta evs; \<not> expiredSK Ts evs;  | 
|
1411  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1412  | 
\<Longrightarrow> Key servK \<notin> analz (spies evs)"  | 
|
1413  | 
apply (drule authK_authentic, assumption, assumption)  | 
|
1414  | 
apply (blast dest: Confidentiality_Kas Says_Kas_message_form servK_authentic_ter Confidentiality_Tgs_bis)  | 
|
1415  | 
done  | 
|
1416  | 
||
1417  | 
lemma Confidentiality_B:  | 
|
1418  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1419  | 
\<in> parts (spies evs);  | 
|
1420  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1421  | 
\<in> parts (spies evs);  | 
|
1422  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1423  | 
\<in> parts (spies evs);  | 
|
1424  | 
\<not> expiredSK Ts evs; \<not> expiredAK Ta evs;  | 
|
1425  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1426  | 
\<Longrightarrow> Key servK \<notin> analz (spies evs)"  | 
|
1427  | 
apply (frule authK_authentic)  | 
|
1428  | 
apply (frule_tac [3] Confidentiality_Kas)  | 
|
1429  | 
apply (frule_tac [6] servTicket_authentic, auto)  | 
|
1430  | 
apply (blast dest!: Confidentiality_Tgs_bis dest: Says_Kas_message_form servK_authentic unique_servKeys unique_authKeys)  | 
|
1431  | 
done  | 
|
1432  | 
(*  | 
|
1433  | 
The proof above is fast. It can be done in one command in 17 secs:  | 
|
1434  | 
apply (blast dest: authK_authentic servK_authentic  | 
|
1435  | 
Says_Kas_message_form servTicket_authentic  | 
|
1436  | 
unique_servKeys unique_authKeys  | 
|
1437  | 
Confidentiality_Kas  | 
|
1438  | 
Confidentiality_Tgs_bis)  | 
|
1439  | 
It is very brittle: we can't use this command partway  | 
|
1440  | 
through the script above.  | 
|
1441  | 
*)  | 
|
1442  | 
||
1443  | 
lemma u_Confidentiality_B:  | 
|
1444  | 
"\<lbrakk> Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1445  | 
\<in> parts (spies evs);  | 
|
1446  | 
\<not> expiredSK Ts evs;  | 
|
1447  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1448  | 
\<Longrightarrow> Key servK \<notin> analz (spies evs)"  | 
|
| 37811 | 1449  | 
by (blast dest: u_servTicket_authentic u_NotexpiredSK_NotexpiredAK Confidentiality_Tgs_bis)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1450  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1451  | 
|
| 18886 | 1452  | 
|
1453  | 
subsection{*Parties authentication: each party verifies "the identity of
 | 
|
1454  | 
another party who generated some data" (quoted from Neuman and Ts'o).*}  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1455  | 
|
| 18886 | 1456  | 
text{*These guarantees don't assess whether two parties agree on
 | 
1457  | 
the same session key: sending a message containing a key  | 
|
1458  | 
doesn't a priori state knowledge of the key.*}  | 
|
1459  | 
||
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1460  | 
|
| 18886 | 1461  | 
text{*@{text Tgs_authenticates_A} can be found above*}
 | 
1462  | 
||
1463  | 
lemma A_authenticates_Tgs:  | 
|
1464  | 
"\<lbrakk> Says Kas A  | 
|
1465  | 
(Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>) \<in> set evs;  | 
|
1466  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1467  | 
\<in> parts (spies evs);  | 
| 18886 | 1468  | 
Key authK \<notin> analz (spies evs);  | 
1469  | 
evs \<in> kerbIV \<rbrakk>  | 
|
1470  | 
\<Longrightarrow> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1471  | 
\<in> set evs"  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1472  | 
apply (frule Says_Kas_message_form, assumption)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1473  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1474  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1475  | 
apply (erule rev_mp)  | 
| 18886 | 1476  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1477  | 
apply (frule_tac [7] K5_msg_in_parts_spies)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1478  | 
apply (frule_tac [5] K3_msg_in_parts_spies, simp_all, blast)  | 
| 37811 | 1479  | 
txt{*K2*}
 | 
| 18886 | 1480  | 
apply (blast dest!: servK_authentic Says_Tgs_message_form authKeys_used)  | 
| 37811 | 1481  | 
txt{*K4*}
 | 
1482  | 
apply (blast dest!: unique_CryptKey)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1483  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1484  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1485  | 
|
| 18886 | 1486  | 
lemma B_authenticates_A:  | 
1487  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1488  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1489  | 
\<in> parts (spies evs);  | 
|
1490  | 
Key servK \<notin> analz (spies evs);  | 
|
1491  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1492  | 
\<Longrightarrow> Says A B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,  | 
|
1493  | 
Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace> \<in> set evs"  | 
|
| 37811 | 1494  | 
by (blast dest: servTicket_authentic_Tgs intro: Says_K5)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1495  | 
|
| 18886 | 1496  | 
text{*The second assumption tells B what kind of key servK is.*}
 | 
1497  | 
lemma B_authenticates_A_r:  | 
|
1498  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1499  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1500  | 
\<in> parts (spies evs);  | 
|
1501  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1502  | 
\<in> parts (spies evs);  | 
|
1503  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1504  | 
\<in> parts (spies evs);  | 
|
1505  | 
\<not> expiredSK Ts evs; \<not> expiredAK Ta evs;  | 
|
1506  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1507  | 
\<Longrightarrow> Says A B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,  | 
|
1508  | 
Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<rbrace> \<in> set evs"  | 
|
| 37811 | 1509  | 
by (blast intro: Says_K5 dest: Confidentiality_B servTicket_authentic_Tgs)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1510  | 
|
| 18886 | 1511  | 
text{* @{text u_B_authenticates_A} would be the same as @{text B_authenticates_A} because the servK confidentiality assumption is yet unrelaxed*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1512  | 
|
| 18886 | 1513  | 
lemma u_B_authenticates_A_r:  | 
1514  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1515  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1516  | 
\<in> parts (spies evs);  | 
| 18886 | 1517  | 
\<not> expiredSK Ts evs;  | 
1518  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1519  | 
\<Longrightarrow> Says A B \<lbrace>Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>,  | 
|
1520  | 
Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<rbrace> \<in> set evs"  | 
|
| 37811 | 1521  | 
by (blast intro: Says_K5 dest: u_Confidentiality_B servTicket_authentic_Tgs)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1522  | 
|
| 18886 | 1523  | 
lemma A_authenticates_B:  | 
1524  | 
"\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);  | 
|
1525  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1526  | 
\<in> parts (spies evs);  | 
| 18886 | 1527  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1528  | 
\<in> parts (spies evs);  | 
| 18886 | 1529  | 
Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);  | 
1530  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1531  | 
\<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"  | 
|
| 37811 | 1532  | 
by (blast dest: authK_authentic servK_authentic Says_Kas_message_form Key_unique_SesKey K4_imp_K2 intro: Says_K6)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1533  | 
|
| 18886 | 1534  | 
lemma A_authenticates_B_r:  | 
1535  | 
"\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);  | 
|
1536  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1537  | 
\<in> parts (spies evs);  | 
| 18886 | 1538  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1539  | 
\<in> parts (spies evs);  | 
| 18886 | 1540  | 
\<not> expiredAK Ta evs; \<not> expiredSK Ts evs;  | 
1541  | 
A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1542  | 
\<Longrightarrow> Says B A (Crypt servK (Number T3)) \<in> set evs"  | 
|
1543  | 
apply (frule authK_authentic)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1544  | 
apply (frule_tac [3] Says_Kas_message_form)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1545  | 
apply (frule_tac [4] Confidentiality_Kas)  | 
| 18886 | 1546  | 
apply (frule_tac [7] servK_authentic)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1547  | 
prefer 8 apply blast  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1548  | 
apply (erule_tac [9] exE)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1549  | 
apply (frule_tac [9] K4_imp_K2)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1550  | 
apply assumption+  | 
| 18886 | 1551  | 
apply (blast dest: Key_unique_SesKey intro!: Says_K6 dest: Confidentiality_Tgs  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1552  | 
)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1553  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1554  | 
|
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1555  | 
|
| 18886 | 1556  | 
subsection{* Key distribution guarantees
 | 
1557  | 
An agent knows a session key if he used it to issue a cipher.  | 
|
1558  | 
These guarantees also convey a stronger form of  | 
|
1559  | 
authentication - non-injective agreement on the session key*}  | 
|
1560  | 
||
1561  | 
||
1562  | 
lemma Kas_Issues_A:  | 
|
1563  | 
"\<lbrakk> Says Kas A (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>) \<in> set evs;  | 
|
1564  | 
evs \<in> kerbIV \<rbrakk>  | 
|
1565  | 
\<Longrightarrow> Kas Issues A with (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)  | 
|
1566  | 
on evs"  | 
|
1567  | 
apply (simp (no_asm) add: Issues_def)  | 
|
1568  | 
apply (rule exI)  | 
|
1569  | 
apply (rule conjI, assumption)  | 
|
1570  | 
apply (simp (no_asm))  | 
|
1571  | 
apply (erule rev_mp)  | 
|
1572  | 
apply (erule kerbIV.induct)  | 
|
1573  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1574  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
1575  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
|
1576  | 
txt{*K2*}
 | 
|
1577  | 
apply (simp add: takeWhile_tail)  | 
|
1578  | 
apply (blast dest: authK_authentic parts_spies_takeWhile_mono [THEN subsetD] parts_spies_evs_revD2 [THEN subsetD])  | 
|
1579  | 
done  | 
|
1580  | 
||
1581  | 
lemma A_authenticates_and_keydist_to_Kas:  | 
|
1582  | 
"\<lbrakk> Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace> \<in> parts (spies evs);  | 
|
1583  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1584  | 
\<Longrightarrow> Kas Issues A with (Crypt (shrK A) \<lbrace>Key authK, Peer, Ta, authTicket\<rbrace>)  | 
|
1585  | 
on evs"  | 
|
| 37811 | 1586  | 
by (blast dest: authK_authentic Kas_Issues_A)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1587  | 
|
| 18886 | 1588  | 
lemma honest_never_says_newer_timestamp_in_auth:  | 
1589  | 
     "\<lbrakk> (CT evs) \<le> T; A \<notin> bad; Number T \<in> parts {X}; evs \<in> kerbIV \<rbrakk> 
 | 
|
1590  | 
\<Longrightarrow> \<forall> B Y. Says A B \<lbrace>Y, X\<rbrace> \<notin> set evs"  | 
|
1591  | 
apply (erule rev_mp)  | 
|
1592  | 
apply (erule kerbIV.induct)  | 
|
1593  | 
apply force+  | 
|
1594  | 
done  | 
|
1595  | 
||
1596  | 
lemma honest_never_says_current_timestamp_in_auth:  | 
|
1597  | 
     "\<lbrakk> (CT evs) = T; Number T \<in> parts {X}; evs \<in> kerbIV \<rbrakk> 
 | 
|
1598  | 
\<Longrightarrow> \<forall> A B Y. A \<notin> bad \<longrightarrow> Says A B \<lbrace>Y, X\<rbrace> \<notin> set evs"  | 
|
| 
32366
 
b269b56b6a14
Demonstrations of sledgehammer in protocol proofs.
 
paulson 
parents: 
23746 
diff
changeset
 | 
1599  | 
by (metis eq_imp_le honest_never_says_newer_timestamp_in_auth)  | 
| 18886 | 1600  | 
|
1601  | 
lemma A_trusts_secure_authenticator:  | 
|
1602  | 
"\<lbrakk> Crypt K \<lbrace>Agent A, Number T\<rbrace> \<in> parts (spies evs);  | 
|
1603  | 
Key K \<notin> analz (spies evs); evs \<in> kerbIV \<rbrakk>  | 
|
1604  | 
\<Longrightarrow> \<exists> B X. Says A Tgs \<lbrace>X, Crypt K \<lbrace>Agent A, Number T\<rbrace>, Agent B\<rbrace> \<in> set evs \<or>  | 
|
| 37811 | 1605  | 
Says A B \<lbrace>X, Crypt K \<lbrace>Agent A, Number T\<rbrace>\<rbrace> \<in> set evs"  | 
| 18886 | 1606  | 
apply (erule rev_mp)  | 
1607  | 
apply (erule rev_mp)  | 
|
1608  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
1609  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1610  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
1611  | 
apply (simp_all add: all_conj_distrib)  | 
|
1612  | 
apply blast+  | 
|
1613  | 
done  | 
|
1614  | 
||
1615  | 
lemma A_Issues_Tgs:  | 
|
1616  | 
"\<lbrakk> Says A Tgs \<lbrace>authTicket, Crypt authK \<lbrace>Agent A, Number T2\<rbrace>, Agent B\<rbrace>  | 
|
1617  | 
\<in> set evs;  | 
|
1618  | 
Key authK \<notin> analz (spies evs);  | 
|
1619  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1620  | 
\<Longrightarrow> A Issues Tgs with (Crypt authK \<lbrace>Agent A, Number T2\<rbrace>) on evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1621  | 
apply (simp (no_asm) add: Issues_def)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1622  | 
apply (rule exI)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1623  | 
apply (rule conjI, assumption)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1624  | 
apply (simp (no_asm))  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1625  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1626  | 
apply (erule rev_mp)  | 
| 18886 | 1627  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
1628  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1629  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1630  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
| 18886 | 1631  | 
txt{*fake*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1632  | 
apply blast  | 
| 18886 | 1633  | 
txt{*K3*}
 | 
1634  | 
(*  | 
|
1635  | 
apply clarify  | 
|
1636  | 
apply (drule Says_imp_knows_Spy [THEN parts.Inj, THEN authK_authentic, THEN Says_Kas_message_form], assumption, assumption, assumption)  | 
|
1637  | 
*)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1638  | 
apply (simp add: takeWhile_tail)  | 
| 18886 | 1639  | 
apply auto  | 
1640  | 
apply (force dest!: authK_authentic Says_Kas_message_form)  | 
|
1641  | 
apply (drule parts_spies_takeWhile_mono [THEN subsetD, THEN parts_spies_evs_revD2 [THEN subsetD]])  | 
|
1642  | 
apply (drule A_trusts_secure_authenticator, assumption, assumption)  | 
|
1643  | 
apply (simp add: honest_never_says_current_timestamp_in_auth)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1644  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1645  | 
|
| 18886 | 1646  | 
lemma Tgs_authenticates_and_keydist_to_A:  | 
1647  | 
"\<lbrakk> Crypt authK \<lbrace>Agent A, Number T2\<rbrace> \<in> parts (spies evs);  | 
|
1648  | 
Crypt (shrK Tgs) \<lbrace>Agent A, Agent Tgs, Key authK, Number Ta\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1649  | 
\<in> parts (spies evs);  | 
| 18886 | 1650  | 
Key authK \<notin> analz (spies evs);  | 
1651  | 
A \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1652  | 
\<Longrightarrow> A Issues Tgs with (Crypt authK \<lbrace>Agent A, Number T2\<rbrace>) on evs"  | 
|
| 37811 | 1653  | 
by (blast dest: A_Issues_Tgs Tgs_authenticates_A)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1654  | 
|
| 18886 | 1655  | 
lemma Tgs_Issues_A:  | 
1656  | 
"\<lbrakk> Says Tgs A (Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket \<rbrace>)  | 
|
1657  | 
\<in> set evs;  | 
|
1658  | 
Key authK \<notin> analz (spies evs); evs \<in> kerbIV \<rbrakk>  | 
|
1659  | 
\<Longrightarrow> Tgs Issues A with  | 
|
1660  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket \<rbrace>) on evs"  | 
|
1661  | 
apply (simp (no_asm) add: Issues_def)  | 
|
1662  | 
apply (rule exI)  | 
|
1663  | 
apply (rule conjI, assumption)  | 
|
1664  | 
apply (simp (no_asm))  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1665  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1666  | 
apply (erule rev_mp)  | 
| 18886 | 1667  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
1668  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1669  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
1670  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
|
1671  | 
txt{*K4*}
 | 
|
1672  | 
apply (simp add: takeWhile_tail)  | 
|
1673  | 
(*Last two thms installed only to derive authK \<notin> range shrK*)  | 
|
| 37811 | 1674  | 
apply (metis knows_Spy_partsEs(2) parts.Fst usedI used_evs_rev used_takeWhile_used)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1675  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1676  | 
|
| 18886 | 1677  | 
lemma A_authenticates_and_keydist_to_Tgs:  | 
1678  | 
"\<lbrakk>Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace> \<in> parts (spies evs);  | 
|
1679  | 
Key authK \<notin> analz (spies evs); B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1680  | 
\<Longrightarrow> \<exists>A. Tgs Issues A with  | 
|
1681  | 
(Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket \<rbrace>) on evs"  | 
|
| 37811 | 1682  | 
by (blast dest: Tgs_Issues_A servK_authentic_bis)  | 
| 18886 | 1683  | 
|
1684  | 
||
1685  | 
||
1686  | 
lemma B_Issues_A:  | 
|
1687  | 
"\<lbrakk> Says B A (Crypt servK (Number T3)) \<in> set evs;  | 
|
1688  | 
Key servK \<notin> analz (spies evs);  | 
|
1689  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1690  | 
\<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1691  | 
apply (simp (no_asm) add: Issues_def)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1692  | 
apply (rule exI)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1693  | 
apply (rule conjI, assumption)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1694  | 
apply (simp (no_asm))  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1695  | 
apply (erule rev_mp)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1696  | 
apply (erule rev_mp)  | 
| 18886 | 1697  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
1698  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1699  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
1700  | 
apply (simp_all (no_asm_simp) add: all_conj_distrib)  | 
|
1701  | 
apply blast  | 
|
1702  | 
txt{*K6 requires numerous lemmas*}
 | 
|
1703  | 
apply (simp add: takeWhile_tail)  | 
|
1704  | 
apply (blast dest: servTicket_authentic parts_spies_takeWhile_mono [THEN subsetD] parts_spies_evs_revD2 [THEN subsetD] intro: Says_K6)  | 
|
1705  | 
done  | 
|
1706  | 
||
1707  | 
lemma B_Issues_A_r:  | 
|
1708  | 
"\<lbrakk> Says B A (Crypt servK (Number T3)) \<in> set evs;  | 
|
1709  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1710  | 
\<in> parts (spies evs);  | 
|
1711  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1712  | 
\<in> parts (spies evs);  | 
|
1713  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1714  | 
\<in> parts (spies evs);  | 
|
1715  | 
\<not> expiredSK Ts evs; \<not> expiredAK Ta evs;  | 
|
1716  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1717  | 
\<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"  | 
|
| 37811 | 1718  | 
by (blast dest!: Confidentiality_B B_Issues_A)  | 
| 18886 | 1719  | 
|
1720  | 
lemma u_B_Issues_A_r:  | 
|
1721  | 
"\<lbrakk> Says B A (Crypt servK (Number T3)) \<in> set evs;  | 
|
1722  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
1723  | 
\<in> parts (spies evs);  | 
|
1724  | 
\<not> expiredSK Ts evs;  | 
|
1725  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1726  | 
\<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"  | 
|
| 37811 | 1727  | 
by (blast dest!: u_Confidentiality_B B_Issues_A)  | 
| 18886 | 1728  | 
|
1729  | 
lemma A_authenticates_and_keydist_to_B:  | 
|
1730  | 
"\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);  | 
|
1731  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1732  | 
\<in> parts (spies evs);  | 
|
1733  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1734  | 
\<in> parts (spies evs);  | 
|
1735  | 
Key authK \<notin> analz (spies evs); Key servK \<notin> analz (spies evs);  | 
|
1736  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1737  | 
\<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"  | 
|
| 37811 | 1738  | 
by (blast dest!: A_authenticates_B B_Issues_A)  | 
| 18886 | 1739  | 
|
1740  | 
lemma A_authenticates_and_keydist_to_B_r:  | 
|
1741  | 
"\<lbrakk> Crypt servK (Number T3) \<in> parts (spies evs);  | 
|
1742  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
1743  | 
\<in> parts (spies evs);  | 
|
1744  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
1745  | 
\<in> parts (spies evs);  | 
|
1746  | 
\<not> expiredAK Ta evs; \<not> expiredSK Ts evs;  | 
|
1747  | 
A \<notin> bad; B \<notin> bad; B \<noteq> Tgs; evs \<in> kerbIV \<rbrakk>  | 
|
1748  | 
\<Longrightarrow> B Issues A with (Crypt servK (Number T3)) on evs"  | 
|
| 37811 | 1749  | 
by (blast dest!: A_authenticates_B_r Confidentiality_Serv_A B_Issues_A)  | 
| 18886 | 1750  | 
|
1751  | 
||
1752  | 
lemma A_Issues_B:  | 
|
1753  | 
"\<lbrakk> Says A B \<lbrace>servTicket, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace>  | 
|
1754  | 
\<in> set evs;  | 
|
1755  | 
Key servK \<notin> analz (spies evs);  | 
|
1756  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1757  | 
\<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"  | 
|
1758  | 
apply (simp (no_asm) add: Issues_def)  | 
|
1759  | 
apply (rule exI)  | 
|
1760  | 
apply (rule conjI, assumption)  | 
|
1761  | 
apply (simp (no_asm))  | 
|
1762  | 
apply (erule rev_mp)  | 
|
1763  | 
apply (erule rev_mp)  | 
|
1764  | 
apply (erule kerbIV.induct, analz_mono_contra)  | 
|
1765  | 
apply (frule_tac [5] Says_ticket_parts)  | 
|
1766  | 
apply (frule_tac [7] Says_ticket_parts)  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1767  | 
apply (simp_all (no_asm_simp))  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1768  | 
apply clarify  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1769  | 
txt{*K5*}
 | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1770  | 
apply auto  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1771  | 
apply (simp add: takeWhile_tail)  | 
| 37811 | 1772  | 
txt{*Level 15: case analysis necessary because the assumption doesn't state
 | 
| 18886 | 1773  | 
the form of servTicket. The guarantee becomes stronger.*}  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1774  | 
apply (blast dest: Says_imp_spies [THEN analz.Inj, THEN analz_Decrypt']  | 
| 18886 | 1775  | 
K3_imp_K2 servK_authentic_ter  | 
| 
14207
 
f20fbb141673
Conversion of all main protocols from "Shared" to "Public".
 
paulson 
parents: 
14200 
diff
changeset
 | 
1776  | 
parts_spies_takeWhile_mono [THEN subsetD]  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1777  | 
parts_spies_evs_revD2 [THEN subsetD]  | 
| 18886 | 1778  | 
intro: Says_K5)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1779  | 
apply (simp add: takeWhile_tail)  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1780  | 
done  | 
| 
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1781  | 
|
| 18886 | 1782  | 
lemma A_Issues_B_r:  | 
1783  | 
"\<lbrakk> Says A B \<lbrace>servTicket, Crypt servK \<lbrace>Agent A, Number T3\<rbrace>\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1784  | 
\<in> set evs;  | 
| 18886 | 1785  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
1786  | 
\<in> parts (spies evs);  | 
|
1787  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1788  | 
\<in> parts (spies evs);  | 
| 18886 | 1789  | 
\<not> expiredAK Ta evs; \<not> expiredSK Ts evs;  | 
1790  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1791  | 
\<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"  | 
|
| 37811 | 1792  | 
by (blast dest!: Confidentiality_Serv_A A_Issues_B)  | 
| 18886 | 1793  | 
|
1794  | 
lemma B_authenticates_and_keydist_to_A:  | 
|
1795  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1796  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1797  | 
\<in> parts (spies evs);  | 
| 18886 | 1798  | 
Key servK \<notin> analz (spies evs);  | 
1799  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1800  | 
\<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"  | 
|
| 37811 | 1801  | 
by (blast dest: B_authenticates_A A_Issues_B)  | 
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1802  | 
|
| 18886 | 1803  | 
lemma B_authenticates_and_keydist_to_A_r:  | 
1804  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1805  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1806  | 
\<in> parts (spies evs);  | 
| 18886 | 1807  | 
Crypt authK \<lbrace>Key servK, Agent B, Number Ts, servTicket\<rbrace>  | 
1808  | 
\<in> parts (spies evs);  | 
|
1809  | 
Crypt (shrK A) \<lbrace>Key authK, Agent Tgs, Number Ta, authTicket\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1810  | 
\<in> parts (spies evs);  | 
| 18886 | 1811  | 
\<not> expiredSK Ts evs; \<not> expiredAK Ta evs;  | 
1812  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1813  | 
\<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"  | 
|
| 37811 | 1814  | 
by (blast dest: B_authenticates_A Confidentiality_B A_Issues_B)  | 
| 18886 | 1815  | 
|
1816  | 
text{* @{text u_B_authenticates_and_keydist_to_A} would be the same as @{text B_authenticates_and_keydist_to_A} because the
 | 
|
1817  | 
servK confidentiality assumption is yet unrelaxed*}  | 
|
1818  | 
||
1819  | 
lemma u_B_authenticates_and_keydist_to_A_r:  | 
|
1820  | 
"\<lbrakk> Crypt servK \<lbrace>Agent A, Number T3\<rbrace> \<in> parts (spies evs);  | 
|
1821  | 
Crypt (shrK B) \<lbrace>Agent A, Agent B, Key servK, Number Ts\<rbrace>  | 
|
| 
14182
 
5f49f00fe084
conversion of HOL/Auth/KerberosIV to new-style theory
 
paulson 
parents: 
13507 
diff
changeset
 | 
1822  | 
\<in> parts (spies evs);  | 
| 18886 | 1823  | 
\<not> expiredSK Ts evs;  | 
1824  | 
B \<noteq> Tgs; A \<notin> bad; B \<notin> bad; evs \<in> kerbIV \<rbrakk>  | 
|
1825  | 
\<Longrightarrow> A Issues B with (Crypt servK \<lbrace>Agent A, Number T3\<rbrace>) on evs"  | 
|
| 37811 | 1826  | 
by (blast dest: u_B_authenticates_A_r u_Confidentiality_B A_Issues_B)  | 
| 6452 | 1827  | 
|
1828  | 
end  |