author | paulson |
Fri, 23 Mar 2001 12:10:05 +0100 | |
changeset 11222 | 72c5997e1145 |
parent 11204 | bb01189f0565 |
child 11288 | 7fe6593133d4 |
permissions | -rw-r--r-- |
6452 | 1 |
(* Title: HOL/Auth/KerberosIV |
2 |
ID: $Id$ |
|
3 |
Author: Giampaolo Bella, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
11222 | 6 |
The Kerberos protocol, version IV. Proofs streamlined by lcp. |
6452 | 7 |
*) |
8 |
||
11222 | 9 |
|
10 |
AddDs [Says_imp_knows_Spy RS parts.Inj, parts.Body]; |
|
11 |
AddDs [impOfSubs analz_subset_parts, impOfSubs Fake_parts_insert]; |
|
12 |
||
6452 | 13 |
Pretty.setdepth 20; |
9000 | 14 |
set timing; |
6452 | 15 |
|
16 |
AddIffs [AuthLife_LB, ServLife_LB, AutcLife_LB, RespLife_LB, Tgs_not_bad]; |
|
17 |
||
18 |
||
19 |
(** Reversed traces **) |
|
20 |
||
21 |
Goal "spies (evs @ [Says A B X]) = insert X (spies evs)"; |
|
22 |
by (induct_tac "evs" 1); |
|
23 |
by (induct_tac "a" 2); |
|
24 |
by Auto_tac; |
|
25 |
qed "spies_Says_rev"; |
|
26 |
||
27 |
Goal "spies (evs @ [Gets A X]) = spies evs"; |
|
28 |
by (induct_tac "evs" 1); |
|
29 |
by (induct_tac "a" 2); |
|
30 |
by Auto_tac; |
|
31 |
qed "spies_Gets_rev"; |
|
32 |
||
33 |
Goal "spies (evs @ [Notes A X]) = \ |
|
34 |
\ (if A:bad then insert X (spies evs) else spies evs)"; |
|
35 |
by (induct_tac "evs" 1); |
|
36 |
by (induct_tac "a" 2); |
|
37 |
by Auto_tac; |
|
38 |
qed "spies_Notes_rev"; |
|
39 |
||
40 |
Goal "spies evs = spies (rev evs)"; |
|
41 |
by (induct_tac "evs" 1); |
|
42 |
by (induct_tac "a" 2); |
|
43 |
by (ALLGOALS |
|
44 |
(asm_simp_tac (simpset() addsimps [spies_Says_rev, spies_Gets_rev, |
|
45 |
spies_Notes_rev]))); |
|
46 |
qed "spies_evs_rev"; |
|
47 |
bind_thm ("parts_spies_evs_revD2", spies_evs_rev RS equalityD2 RS parts_mono); |
|
48 |
||
49 |
Goal "spies (takeWhile P evs) <= spies evs"; |
|
50 |
by (induct_tac "evs" 1); |
|
51 |
by (induct_tac "a" 2); |
|
52 |
by Auto_tac; |
|
53 |
(* Resembles "used_subset_append" in Event.ML*) |
|
54 |
qed "spies_takeWhile"; |
|
55 |
bind_thm ("parts_spies_takeWhile_mono", spies_takeWhile RS parts_mono); |
|
56 |
||
57 |
Goal "~P(x) --> takeWhile P (xs @ [x]) = takeWhile P xs"; |
|
58 |
by (induct_tac "xs" 1); |
|
59 |
by Auto_tac; |
|
60 |
qed "takeWhile_tail"; |
|
61 |
||
62 |
||
63 |
(*****************LEMMAS ABOUT AuthKeys****************) |
|
64 |
||
65 |
Goalw [AuthKeys_def] "AuthKeys [] = {}"; |
|
66 |
by (Simp_tac 1); |
|
67 |
qed "AuthKeys_empty"; |
|
68 |
||
69 |
Goalw [AuthKeys_def] |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
70 |
"(\\<forall>A Tk akey Peer. \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
71 |
\ ev \\<noteq> Says Kas A (Crypt (shrK A) {|akey, Agent Peer, Tk, \ |
6452 | 72 |
\ (Crypt (shrK Peer) {|Agent A, Agent Peer, akey, Tk|})|}))\ |
73 |
\ ==> AuthKeys (ev # evs) = AuthKeys evs"; |
|
74 |
by Auto_tac; |
|
75 |
qed "AuthKeys_not_insert"; |
|
76 |
||
77 |
Goalw [AuthKeys_def] |
|
78 |
"AuthKeys \ |
|
79 |
\ (Says Kas A (Crypt (shrK A) {|Key K, Agent Peer, Number Tk, \ |
|
80 |
\ (Crypt (shrK Peer) {|Agent A, Agent Peer, Key K, Number Tk|})|}) # evs) \ |
|
81 |
\ = insert K (AuthKeys evs)"; |
|
82 |
by Auto_tac; |
|
83 |
qed "AuthKeys_insert"; |
|
84 |
||
85 |
Goalw [AuthKeys_def] |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
86 |
"K \\<in> AuthKeys \ |
6452 | 87 |
\ (Says Kas A (Crypt (shrK A) {|Key K', Agent Peer, Number Tk, \ |
88 |
\ (Crypt (shrK Peer) {|Agent A, Agent Peer, Key K', Number Tk|})|}) # evs) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
89 |
\ ==> K = K' | K \\<in> AuthKeys evs"; |
6452 | 90 |
by Auto_tac; |
91 |
qed "AuthKeys_simp"; |
|
92 |
||
93 |
Goalw [AuthKeys_def] |
|
94 |
"Says Kas A (Crypt (shrK A) {|Key K, Agent Tgs, Number Tk, \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
95 |
\ (Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key K, Number Tk|})|}) \\<in> set evs \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
96 |
\ ==> K \\<in> AuthKeys evs"; |
6452 | 97 |
by Auto_tac; |
98 |
qed "AuthKeysI"; |
|
99 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
100 |
Goalw [AuthKeys_def] "K \\<in> AuthKeys evs ==> Key K \\<in> used evs"; |
6452 | 101 |
by (Simp_tac 1); |
11222 | 102 |
by (Blast_tac 1); |
6452 | 103 |
qed "AuthKeys_used"; |
104 |
||
105 |
||
106 |
(**** FORWARDING LEMMAS ****) |
|
107 |
||
108 |
(*--For reasoning about the encrypted portion of message K3--*) |
|
109 |
Goal "Says Kas' A (Crypt KeyA {|AuthKey, Peer, Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
110 |
\ \\<in> set evs ==> AuthTicket \\<in> parts (spies evs)"; |
11222 | 111 |
by (Blast_tac 1); |
6452 | 112 |
qed "K3_msg_in_parts_spies"; |
113 |
||
114 |
Goal "Says Kas A (Crypt KeyA {|AuthKey, Peer, Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
115 |
\ \\<in> set evs ==> AuthKey \\<in> parts (spies evs)"; |
11222 | 116 |
by (Blast_tac 1); |
6452 | 117 |
qed "Oops_parts_spies1"; |
118 |
||
119 |
Goal "[| Says Kas A (Crypt KeyA {|Key AuthKey, Peer, Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
120 |
\ \\<in> set evs ;\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
121 |
\ evs \\<in> kerberos |] ==> AuthKey \\<notin> range shrK"; |
6452 | 122 |
by (etac rev_mp 1); |
123 |
by (etac kerberos.induct 1); |
|
124 |
by Auto_tac; |
|
125 |
qed "Oops_range_spies1"; |
|
126 |
||
127 |
(*--For reasoning about the encrypted portion of message K5--*) |
|
128 |
Goal "Says Tgs' A (Crypt AuthKey {|ServKey, Agent B, Tt, ServTicket|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
129 |
\ \\<in> set evs ==> ServTicket \\<in> parts (spies evs)"; |
11222 | 130 |
by (Blast_tac 1); |
6452 | 131 |
qed "K5_msg_in_parts_spies"; |
132 |
||
133 |
Goal "Says Tgs A (Crypt AuthKey {|ServKey, Agent B, Tt, ServTicket|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
134 |
\ \\<in> set evs ==> ServKey \\<in> parts (spies evs)"; |
11222 | 135 |
by (Blast_tac 1); |
6452 | 136 |
qed "Oops_parts_spies2"; |
137 |
||
138 |
Goal "[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
139 |
\ \\<in> set evs ;\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
140 |
\ evs \\<in> kerberos |] ==> ServKey \\<notin> range shrK"; |
6452 | 141 |
by (etac rev_mp 1); |
142 |
by (etac kerberos.induct 1); |
|
143 |
by Auto_tac; |
|
144 |
qed "Oops_range_spies2"; |
|
145 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
146 |
Goal "Says S A (Crypt K {|SesKey, B, TimeStamp, Ticket|}) \\<in> set evs \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
147 |
\ ==> Ticket \\<in> parts (spies evs)"; |
11222 | 148 |
by (Blast_tac 1); |
6452 | 149 |
qed "Says_ticket_in_parts_spies"; |
150 |
(*Replaces both K3_msg_in_parts_spies and K5_msg_in_parts_spies*) |
|
151 |
||
152 |
fun parts_induct_tac i = |
|
153 |
etac kerberos.induct i THEN |
|
154 |
REPEAT (FIRSTGOAL analz_mono_contra_tac) THEN |
|
7499 | 155 |
ftac K3_msg_in_parts_spies (i+4) THEN |
156 |
ftac K5_msg_in_parts_spies (i+6) THEN |
|
157 |
ftac Oops_parts_spies1 (i+8) THEN |
|
158 |
ftac Oops_parts_spies2 (i+9) THEN |
|
6452 | 159 |
prove_simple_subgoals_tac 1; |
160 |
||
161 |
||
162 |
(*Spy never sees another agent's shared key! (unless it's lost at start)*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
163 |
Goal "evs \\<in> kerberos ==> (Key (shrK A) \\<in> parts (spies evs)) = (A \\<in> bad)"; |
6452 | 164 |
by (parts_induct_tac 1); |
165 |
by (ALLGOALS Blast_tac); |
|
166 |
qed "Spy_see_shrK"; |
|
167 |
Addsimps [Spy_see_shrK]; |
|
168 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
169 |
Goal "evs \\<in> kerberos ==> (Key (shrK A) \\<in> analz (spies evs)) = (A \\<in> bad)"; |
11222 | 170 |
by Auto_tac; |
6452 | 171 |
qed "Spy_analz_shrK"; |
172 |
Addsimps [Spy_analz_shrK]; |
|
173 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
174 |
Goal "[| Key (shrK A) \\<in> parts (spies evs); evs \\<in> kerberos |] ==> A:bad"; |
6452 | 175 |
by (blast_tac (claset() addDs [Spy_see_shrK]) 1); |
176 |
qed "Spy_see_shrK_D"; |
|
177 |
bind_thm ("Spy_analz_shrK_D", analz_subset_parts RS subsetD RS Spy_see_shrK_D); |
|
178 |
AddSDs [Spy_see_shrK_D, Spy_analz_shrK_D]; |
|
179 |
||
180 |
(*Nobody can have used non-existent keys!*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
181 |
Goal "evs \\<in> kerberos ==> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
182 |
\ Key K \\<notin> used evs --> K \\<notin> keysFor (parts (spies evs))"; |
6452 | 183 |
by (parts_induct_tac 1); |
184 |
(*Fake*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
185 |
by (blast_tac (claset() addSDs [keysFor_parts_insert]) 1); |
6452 | 186 |
(*Others*) |
11222 | 187 |
by (ALLGOALS Blast_tac); |
6452 | 188 |
qed_spec_mp "new_keys_not_used"; |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
189 |
Addsimps [new_keys_not_used]; |
6452 | 190 |
|
11204 | 191 |
(*Earlier, all protocol proofs declared this theorem. |
192 |
But few of them actually need it! (Another is Yahalom) *) |
|
6452 | 193 |
bind_thm ("new_keys_not_analzd", |
194 |
[analz_subset_parts RS keysFor_mono, |
|
195 |
new_keys_not_used] MRS contra_subsetD); |
|
196 |
||
197 |
||
198 |
(*********************** REGULARITY LEMMAS ***********************) |
|
199 |
(* concerning the form of items passed in messages *) |
|
200 |
(*****************************************************************) |
|
201 |
||
202 |
(*Describes the form of AuthKey, AuthTicket, and K sent by Kas*) |
|
203 |
Goal "[| Says Kas A (Crypt K {|Key AuthKey, Agent Peer, Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
204 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
205 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
206 |
\ ==> AuthKey \\<notin> range shrK & AuthKey \\<in> AuthKeys evs & \ |
6452 | 207 |
\ AuthTicket = (Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Tk|} ) &\ |
208 |
\ K = shrK A & Peer = Tgs"; |
|
209 |
by (etac rev_mp 1); |
|
210 |
by (etac kerberos.induct 1); |
|
211 |
by (ALLGOALS (simp_tac (simpset() addsimps [AuthKeys_def, AuthKeys_insert]))); |
|
212 |
by (ALLGOALS Blast_tac); |
|
213 |
qed "Says_Kas_message_form"; |
|
214 |
||
215 |
(*This lemma is essential for proving Says_Tgs_message_form: |
|
216 |
||
217 |
the session key AuthKey |
|
218 |
supplied by Kas in the authentication ticket |
|
219 |
cannot be a long-term key! |
|
220 |
||
221 |
Generalised to any session keys (both AuthKey and ServKey). |
|
222 |
*) |
|
223 |
Goal "[| Crypt (shrK Tgs_B) {|Agent A, Agent Tgs_B, Key SesKey, Number T|}\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
224 |
\ \\<in> parts (spies evs); Tgs_B \\<notin> bad;\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
225 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
226 |
\ ==> SesKey \\<notin> range shrK"; |
6452 | 227 |
by (etac rev_mp 1); |
228 |
by (parts_induct_tac 1); |
|
11222 | 229 |
by (Blast_tac 1); |
6452 | 230 |
qed "SesKey_is_session_key"; |
231 |
||
232 |
Goal "[| Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Tk|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
233 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
234 |
\ evs \\<in> kerberos |] \ |
6452 | 235 |
\ ==> Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Tk, \ |
236 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Tk|}|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
237 |
\ \\<in> set evs"; |
6452 | 238 |
by (etac rev_mp 1); |
239 |
by (parts_induct_tac 1); |
|
11222 | 240 |
(*Fake, K4*) |
241 |
by (ALLGOALS Blast_tac); |
|
6452 | 242 |
qed "A_trusts_AuthTicket"; |
243 |
||
244 |
Goal "[| Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
245 |
\ \\<in> parts (spies evs);\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
246 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
247 |
\ ==> AuthKey \\<in> AuthKeys evs"; |
7499 | 248 |
by (ftac A_trusts_AuthTicket 1); |
6452 | 249 |
by (assume_tac 1); |
250 |
by (simp_tac (simpset() addsimps [AuthKeys_def]) 1); |
|
251 |
by (Blast_tac 1); |
|
252 |
qed "AuthTicket_crypt_AuthKey"; |
|
253 |
||
254 |
(*Describes the form of ServKey, ServTicket and AuthKey sent by Tgs*) |
|
255 |
Goal "[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
256 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
257 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
258 |
\ ==> B \\<noteq> Tgs & ServKey \\<notin> range shrK & ServKey \\<notin> AuthKeys evs &\ |
6452 | 259 |
\ ServTicket = (Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|} ) & \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
260 |
\ AuthKey \\<notin> range shrK & AuthKey \\<in> AuthKeys evs"; |
6452 | 261 |
by (etac rev_mp 1); |
262 |
by (etac kerberos.induct 1); |
|
263 |
by (ALLGOALS |
|
264 |
(asm_full_simp_tac |
|
265 |
(simpset() addsimps [AuthKeys_insert, AuthKeys_not_insert, |
|
266 |
AuthKeys_empty, AuthKeys_simp]))); |
|
11222 | 267 |
by (blast_tac (claset()) 1); |
6452 | 268 |
by Auto_tac; |
269 |
by (blast_tac (claset() addSDs [AuthKeys_used, Says_Kas_message_form]) 1); |
|
11222 | 270 |
by (blast_tac (claset() addSDs [SesKey_is_session_key]) 1); |
271 |
by (blast_tac (claset() addDs [AuthTicket_crypt_AuthKey]) 1); |
|
6452 | 272 |
qed "Says_Tgs_message_form"; |
273 |
||
274 |
(*If a certain encrypted message appears then it originated with Kas*) |
|
275 |
Goal "[| Crypt (shrK A) {|Key AuthKey, Peer, Tk, AuthTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
276 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
277 |
\ A \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 278 |
\ ==> Says Kas A (Crypt (shrK A) {|Key AuthKey, Peer, Tk, AuthTicket|}) \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
279 |
\ \\<in> set evs"; |
6452 | 280 |
by (etac rev_mp 1); |
281 |
by (parts_induct_tac 1); |
|
282 |
(*Fake*) |
|
11222 | 283 |
by (Blast_tac 1); |
6452 | 284 |
(*K4*) |
11222 | 285 |
by (blast_tac (claset() addSDs [A_trusts_AuthTicket RS Says_Kas_message_form]) |
6452 | 286 |
1); |
287 |
qed "A_trusts_AuthKey"; |
|
288 |
||
289 |
||
290 |
(*If a certain encrypted message appears then it originated with Tgs*) |
|
291 |
Goal "[| Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
292 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
293 |
\ Key AuthKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
294 |
\ AuthKey \\<notin> range shrK; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
295 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
296 |
\==> \\<exists>A. Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|})\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
297 |
\ \\<in> set evs"; |
6452 | 298 |
by (etac rev_mp 1); |
299 |
by (etac rev_mp 1); |
|
300 |
by (parts_induct_tac 1); |
|
301 |
(*Fake*) |
|
11222 | 302 |
by (Blast_tac 1); |
6452 | 303 |
(*K2*) |
304 |
by (Blast_tac 1); |
|
305 |
(*K4*) |
|
306 |
by Auto_tac; |
|
307 |
qed "A_trusts_K4"; |
|
308 |
||
309 |
Goal "[| Crypt (shrK A) {|Key AuthKey, Agent Tgs, Tk, AuthTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
310 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
311 |
\ A \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
312 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
313 |
\ ==> AuthKey \\<notin> range shrK & \ |
6452 | 314 |
\ AuthTicket = Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Tk|}"; |
315 |
by (etac rev_mp 1); |
|
316 |
by (parts_induct_tac 1); |
|
11222 | 317 |
by (ALLGOALS Blast_tac); |
6452 | 318 |
qed "AuthTicket_form"; |
319 |
||
320 |
(* This form holds also over an AuthTicket, but is not needed below. *) |
|
321 |
Goal "[| Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
322 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
323 |
\ Key AuthKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
324 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
325 |
\ ==> ServKey \\<notin> range shrK & \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
326 |
\ (\\<exists>A. ServTicket = Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|})"; |
6452 | 327 |
by (etac rev_mp 1); |
328 |
by (etac rev_mp 1); |
|
329 |
by (parts_induct_tac 1); |
|
11222 | 330 |
by (Blast_tac 1); |
6452 | 331 |
qed "ServTicket_form"; |
332 |
||
333 |
Goal "[| Says Kas' A (Crypt (shrK A) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
334 |
\ {|Key AuthKey, Agent Tgs, Tk, AuthTicket|} ) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
335 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
336 |
\ ==> AuthKey \\<notin> range shrK & \ |
6452 | 337 |
\ AuthTicket = \ |
338 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Tk|}\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
339 |
\ | AuthTicket \\<in> analz (spies evs)"; |
11222 | 340 |
by (blast_tac (claset() addDs [Says_imp_spies RS analz.Inj, |
341 |
AuthTicket_form]) 1); |
|
6452 | 342 |
qed "Says_kas_message_form"; |
343 |
(* Essentially the same as AuthTicket_form *) |
|
344 |
||
345 |
Goal "[| Says Tgs' A (Crypt AuthKey \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
346 |
\ {|Key ServKey, Agent B, Tt, ServTicket|} ) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
347 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
348 |
\ ==> ServKey \\<notin> range shrK & \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
349 |
\ (\\<exists>A. ServTicket = \ |
6452 | 350 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|}) \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
351 |
\ | ServTicket \\<in> analz (spies evs)"; |
11222 | 352 |
by (blast_tac (claset() addDs [Says_imp_spies RS analz.Inj, |
353 |
ServTicket_form]) 1); |
|
6452 | 354 |
qed "Says_tgs_message_form"; |
355 |
(* This form MUST be used in analz_sees_tac below *) |
|
356 |
||
357 |
||
358 |
(*****************UNICITY THEOREMS****************) |
|
359 |
||
360 |
(* The session key, if secure, uniquely identifies the Ticket |
|
361 |
whether AuthTicket or ServTicket. As a matter of fact, one can read |
|
362 |
also Tgs in the place of B. *) |
|
363 |
||
364 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key SesKey, T|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
365 |
\ \\<in> parts (spies evs); \ |
6452 | 366 |
\ Crypt (shrK B') {|Agent A', Agent B', Key SesKey, T'|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
367 |
\ \\<in> parts (spies evs); Key SesKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
368 |
\ evs \\<in> kerberos |] \ |
6452 | 369 |
\ ==> A=A' & B=B' & T=T'"; |
11104 | 370 |
by (etac rev_mp 1); |
371 |
by (etac rev_mp 1); |
|
372 |
by (etac rev_mp 1); |
|
373 |
by (parts_induct_tac 1); |
|
374 |
(*Fake, K2, K4*) |
|
11222 | 375 |
by (ALLGOALS Blast_tac); |
6452 | 376 |
qed "unique_CryptKey"; |
377 |
||
378 |
(*An AuthKey is encrypted by one and only one Shared key. |
|
379 |
A ServKey is encrypted by one and only one AuthKey. |
|
380 |
*) |
|
381 |
Goal "[| Crypt K {|Key SesKey, Agent B, T, Ticket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
382 |
\ \\<in> parts (spies evs); \ |
6452 | 383 |
\ Crypt K' {|Key SesKey, Agent B', T', Ticket'|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
384 |
\ \\<in> parts (spies evs); Key SesKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
385 |
\ evs \\<in> kerberos |] \ |
6452 | 386 |
\ ==> K=K' & B=B' & T=T' & Ticket=Ticket'"; |
11104 | 387 |
by (etac rev_mp 1); |
388 |
by (etac rev_mp 1); |
|
389 |
by (etac rev_mp 1); |
|
390 |
by (parts_induct_tac 1); |
|
391 |
(*Fake, K2, K4*) |
|
11222 | 392 |
by (ALLGOALS Blast_tac); |
6452 | 393 |
qed "Key_unique_SesKey"; |
394 |
||
395 |
||
396 |
(* |
|
397 |
At reception of any message mentioning A, Kas associates shrK A with |
|
398 |
a new AuthKey. Realistic, as the user gets a new AuthKey at each login. |
|
399 |
Similarly, at reception of any message mentioning an AuthKey |
|
400 |
(a legitimate user could make several requests to Tgs - by K3), Tgs |
|
401 |
associates it with a new ServKey. |
|
402 |
||
403 |
Therefore, a goal like |
|
404 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
405 |
"evs \\<in> kerberos \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
406 |
\ ==> Key Kc \\<notin> analz (spies evs) --> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
407 |
\ (\\<exists>K' B' T' Ticket'. \\<forall>K B T Ticket. \ |
6452 | 408 |
\ Crypt Kc {|Key K, Agent B, T, Ticket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
409 |
\ \\<in> parts (spies evs) --> K=K' & B=B' & T=T' & Ticket=Ticket')"; |
6452 | 410 |
|
411 |
would fail on the K2 and K4 cases. |
|
412 |
*) |
|
413 |
||
414 |
Goal "[| Says Kas A \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
415 |
\ (Crypt Ka {|Key AuthKey, Agent Tgs, Tk, X|}) \\<in> set evs; \ |
6452 | 416 |
\ Says Kas A' \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
417 |
\ (Crypt Ka' {|Key AuthKey, Agent Tgs, Tk', X'|}) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
418 |
\ evs \\<in> kerberos |] ==> A=A' & Ka=Ka' & Tk=Tk' & X=X'"; |
11104 | 419 |
by (etac rev_mp 1); |
420 |
by (etac rev_mp 1); |
|
421 |
by (parts_induct_tac 1); |
|
422 |
(*K2*) |
|
11222 | 423 |
by (Blast_tac 1); |
6452 | 424 |
qed "unique_AuthKeys"; |
425 |
||
426 |
(* ServKey uniquely identifies the message from Tgs *) |
|
427 |
Goal "[| Says Tgs A \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
428 |
\ (Crypt K {|Key ServKey, Agent B, Tt, X|}) \\<in> set evs; \ |
6452 | 429 |
\ Says Tgs A' \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
430 |
\ (Crypt K' {|Key ServKey, Agent B', Tt', X'|}) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
431 |
\ evs \\<in> kerberos |] ==> A=A' & B=B' & K=K' & Tt=Tt' & X=X'"; |
11104 | 432 |
by (etac rev_mp 1); |
433 |
by (etac rev_mp 1); |
|
434 |
by (parts_induct_tac 1); |
|
435 |
(*K4*) |
|
11222 | 436 |
by (Blast_tac 1); |
6452 | 437 |
qed "unique_ServKeys"; |
438 |
||
439 |
||
440 |
(*****************LEMMAS ABOUT the predicate KeyCryptKey****************) |
|
441 |
||
442 |
Goalw [KeyCryptKey_def] "~ KeyCryptKey AuthKey ServKey []"; |
|
443 |
by (Simp_tac 1); |
|
444 |
qed "not_KeyCryptKey_Nil"; |
|
445 |
AddIffs [not_KeyCryptKey_Nil]; |
|
446 |
||
447 |
Goalw [KeyCryptKey_def] |
|
448 |
"[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, tt, X |}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
449 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
450 |
\ evs \\<in> kerberos |] ==> KeyCryptKey AuthKey ServKey evs"; |
11222 | 451 |
by (blast_tac (claset() addDs [Says_Tgs_message_form]) 1); |
6452 | 452 |
qed "KeyCryptKeyI"; |
453 |
||
454 |
Goalw [KeyCryptKey_def] |
|
455 |
"KeyCryptKey AuthKey ServKey (Says S A X # evs) = \ |
|
456 |
\ (Tgs = S & \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
457 |
\ (\\<exists>B tt. X = Crypt AuthKey \ |
6452 | 458 |
\ {|Key ServKey, Agent B, tt, \ |
459 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, tt|} |}) \ |
|
460 |
\ | KeyCryptKey AuthKey ServKey evs)"; |
|
461 |
by (Simp_tac 1); |
|
462 |
by (Blast_tac 1); |
|
463 |
qed "KeyCryptKey_Says"; |
|
464 |
Addsimps [KeyCryptKey_Says]; |
|
465 |
||
466 |
(*A fresh AuthKey cannot be associated with any other |
|
467 |
(with respect to a given trace). *) |
|
468 |
Goalw [KeyCryptKey_def] |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
469 |
"[| Key AuthKey \\<notin> used evs; evs \\<in> kerberos |] \ |
6452 | 470 |
\ ==> ~ KeyCryptKey AuthKey ServKey evs"; |
471 |
by (etac rev_mp 1); |
|
472 |
by (parts_induct_tac 1); |
|
473 |
by (Asm_full_simp_tac 1); |
|
11222 | 474 |
by (Blast_tac 1); |
6452 | 475 |
qed "Auth_fresh_not_KeyCryptKey"; |
476 |
||
477 |
(*A fresh ServKey cannot be associated with any other |
|
478 |
(with respect to a given trace). *) |
|
479 |
Goalw [KeyCryptKey_def] |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
480 |
"Key ServKey \\<notin> used evs ==> ~ KeyCryptKey AuthKey ServKey evs"; |
11222 | 481 |
by (Blast_tac 1); |
6452 | 482 |
qed "Serv_fresh_not_KeyCryptKey"; |
483 |
||
11204 | 484 |
Goal |
6452 | 485 |
"[| Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, tk|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
486 |
\ \\<in> parts (spies evs); evs \\<in> kerberos |] \ |
6452 | 487 |
\ ==> ~ KeyCryptKey K AuthKey evs"; |
488 |
by (etac rev_mp 1); |
|
489 |
by (parts_induct_tac 1); |
|
490 |
(*K4*) |
|
11222 | 491 |
by (Blast_tac 3); |
6452 | 492 |
(*K2: by freshness*) |
11204 | 493 |
by (asm_full_simp_tac (simpset() addsimps [KeyCryptKey_def]) 2); |
11222 | 494 |
by (ALLGOALS Blast_tac); |
6452 | 495 |
qed "AuthKey_not_KeyCryptKey"; |
496 |
||
497 |
(*A secure serverkey cannot have been used to encrypt others*) |
|
11204 | 498 |
Goal |
499 |
"[| Crypt (shrK B) {|Agent A, Agent B, Key SK, tt|} \\<in> parts (spies evs); \ |
|
500 |
\ Key SK \\<notin> analz (spies evs); \ |
|
501 |
\ B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
|
502 |
\ ==> ~ KeyCryptKey SK K evs"; |
|
6452 | 503 |
by (etac rev_mp 1); |
504 |
by (etac rev_mp 1); |
|
505 |
by (parts_induct_tac 1); |
|
11222 | 506 |
by (Blast_tac 1); |
6452 | 507 |
(*K4 splits into distinct subcases*) |
11204 | 508 |
by Auto_tac; |
6452 | 509 |
(*ServKey can't have been enclosed in two certificates*) |
11222 | 510 |
by (blast_tac (claset() addDs [unique_CryptKey]) 2); |
6452 | 511 |
(*ServKey is fresh and so could not have been used, by new_keys_not_used*) |
11222 | 512 |
by (force_tac (claset() addSDs [Crypt_imp_invKey_keysFor], |
513 |
simpset() addsimps [KeyCryptKey_def]) 1); |
|
6452 | 514 |
qed "ServKey_not_KeyCryptKey"; |
515 |
||
516 |
(*Long term keys are not issued as ServKeys*) |
|
517 |
Goalw [KeyCryptKey_def] |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
518 |
"evs \\<in> kerberos ==> ~ KeyCryptKey K (shrK A) evs"; |
6452 | 519 |
by (parts_induct_tac 1); |
520 |
qed "shrK_not_KeyCryptKey"; |
|
521 |
||
522 |
(*The Tgs message associates ServKey with AuthKey and therefore not with any |
|
523 |
other key AuthKey.*) |
|
524 |
Goalw [KeyCryptKey_def] |
|
525 |
"[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, tt, X |}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
526 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
527 |
\ AuthKey' \\<noteq> AuthKey; evs \\<in> kerberos |] \ |
6452 | 528 |
\ ==> ~ KeyCryptKey AuthKey' ServKey evs"; |
529 |
by (blast_tac (claset() addDs [unique_ServKeys]) 1); |
|
530 |
qed "Says_Tgs_KeyCryptKey"; |
|
531 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
532 |
Goal "[| KeyCryptKey AuthKey ServKey evs; evs \\<in> kerberos |] \ |
6452 | 533 |
\ ==> ~ KeyCryptKey ServKey K evs"; |
534 |
by (etac rev_mp 1); |
|
535 |
by (parts_induct_tac 1); |
|
536 |
by (Step_tac 1); |
|
537 |
by (ALLGOALS Asm_full_simp_tac); |
|
538 |
(*K4 splits into subcases*) |
|
11222 | 539 |
by (blast_tac (claset() addSDs [AuthKey_not_KeyCryptKey]) 4); |
6452 | 540 |
(*ServKey is fresh and so could not have been used, by new_keys_not_used*) |
541 |
by (force_tac (claset() addSDs [Says_imp_spies RS parts.Inj, |
|
542 |
Crypt_imp_invKey_keysFor], |
|
11222 | 543 |
simpset() addsimps [KeyCryptKey_def]) 2); |
6452 | 544 |
(*Others by freshness*) |
11222 | 545 |
by (ALLGOALS Blast_tac); |
6452 | 546 |
qed "KeyCryptKey_not_KeyCryptKey"; |
547 |
||
548 |
(*The only session keys that can be found with the help of session keys are |
|
549 |
those sent by Tgs in step K4. *) |
|
550 |
||
551 |
(*We take some pains to express the property |
|
552 |
as a logical equivalence so that the simplifier can apply it.*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
553 |
Goal "P --> (Key K \\<in> analz (Key`KK Un H)) --> (K:KK | Key K \\<in> analz H) \ |
6452 | 554 |
\ ==> \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
555 |
\ P --> (Key K \\<in> analz (Key`KK Un H)) = (K:KK | Key K \\<in> analz H)"; |
6452 | 556 |
by (blast_tac (claset() addIs [impOfSubs analz_mono]) 1); |
557 |
qed "Key_analz_image_Key_lemma"; |
|
558 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
559 |
Goal "[| KeyCryptKey K K' evs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
560 |
\ ==> Key K' \\<in> analz (insert (Key K) (spies evs))"; |
6452 | 561 |
by (full_simp_tac (simpset() addsimps [KeyCryptKey_def]) 1); |
562 |
by (Clarify_tac 1); |
|
563 |
by (dresolve_tac [Says_imp_spies RS analz.Inj RS analz_insertI] 1); |
|
564 |
by Auto_tac; |
|
565 |
qed "KeyCryptKey_analz_insert"; |
|
566 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
567 |
Goal "[| K \\<in> AuthKeys evs Un range shrK; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
568 |
\ ==> \\<forall>SK. ~ KeyCryptKey SK K evs"; |
6452 | 569 |
by (asm_full_simp_tac (simpset() addsimps [KeyCryptKey_def]) 1); |
570 |
by (blast_tac (claset() addDs [Says_Tgs_message_form]) 1); |
|
571 |
qed "AuthKeys_are_not_KeyCryptKey"; |
|
572 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
573 |
Goal "[| K \\<notin> AuthKeys evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
574 |
\ K \\<notin> range shrK; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
575 |
\ ==> \\<forall>SK. ~ KeyCryptKey K SK evs"; |
6452 | 576 |
by (asm_full_simp_tac (simpset() addsimps [KeyCryptKey_def]) 1); |
577 |
by (blast_tac (claset() addDs [Says_Tgs_message_form]) 1); |
|
578 |
qed "not_AuthKeys_not_KeyCryptKey"; |
|
579 |
||
580 |
||
581 |
(*****************SECRECY THEOREMS****************) |
|
582 |
||
583 |
(*For proofs involving analz.*) |
|
584 |
val analz_sees_tac = |
|
585 |
EVERY |
|
586 |
[REPEAT (FIRSTGOAL analz_mono_contra_tac), |
|
7499 | 587 |
ftac Oops_range_spies2 10, |
588 |
ftac Oops_range_spies1 9, |
|
589 |
ftac Says_tgs_message_form 7, |
|
590 |
ftac Says_kas_message_form 5, |
|
6452 | 591 |
REPEAT_FIRST (eresolve_tac [asm_rl, conjE, disjE, exE] |
592 |
ORELSE' hyp_subst_tac)]; |
|
593 |
||
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
594 |
(*For the Oops2 case of the next theorem*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
595 |
Goal "[| evs \\<in> kerberos; \ |
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
596 |
\ Says Tgs A (Crypt AuthKey \ |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
597 |
\ {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
598 |
\ \\<in> set evs |] \ |
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
599 |
\ ==> ~ KeyCryptKey ServKey SK evs"; |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
600 |
by (blast_tac (claset() addDs [KeyCryptKeyI, KeyCryptKey_not_KeyCryptKey]) 1); |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
601 |
qed "Oops2_not_KeyCryptKey"; |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
602 |
|
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
603 |
|
6452 | 604 |
(* Big simplification law for keys SK that are not crypted by keys in KK *) |
605 |
(* It helps prove three, otherwise hard, facts about keys. These facts are *) |
|
606 |
(* exploited as simplification laws for analz, and also "limit the damage" *) |
|
607 |
(* in case of loss of a key to the spy. See ESORICS98. *) |
|
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
608 |
(* [simplified by LCP] *) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
609 |
Goal "evs \\<in> kerberos ==> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
610 |
\ (\\<forall>SK KK. KK <= -(range shrK) --> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
611 |
\ (\\<forall>K \\<in> KK. ~ KeyCryptKey K SK evs) --> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
612 |
\ (Key SK \\<in> analz (Key`KK Un (spies evs))) = \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
613 |
\ (SK \\<in> KK | Key SK \\<in> analz (spies evs)))"; |
6452 | 614 |
by (etac kerberos.induct 1); |
615 |
by analz_sees_tac; |
|
616 |
by (REPEAT_FIRST (rtac allI)); |
|
617 |
by (REPEAT_FIRST (rtac (Key_analz_image_Key_lemma RS impI))); |
|
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
618 |
(*Case-splits for Oops1 & 5: the negated case simplifies using the ind hyp*) |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
619 |
by (case_tac "KeyCryptKey AuthKey SK evsO1" 11); |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
620 |
by (case_tac "KeyCryptKey ServKey SK evs5" 8); |
6452 | 621 |
by (ALLGOALS |
622 |
(asm_simp_tac |
|
623 |
(analz_image_freshK_ss addsimps |
|
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
624 |
[KeyCryptKey_Says, shrK_not_KeyCryptKey, Oops2_not_KeyCryptKey, |
6452 | 625 |
Auth_fresh_not_KeyCryptKey, Serv_fresh_not_KeyCryptKey, |
626 |
Says_Tgs_KeyCryptKey, Spy_analz_shrK]))); |
|
627 |
(*Fake*) |
|
628 |
by (spy_analz_tac 1); |
|
629 |
(* Base + K2 done by the simplifier! *) |
|
630 |
(*K3*) |
|
631 |
by (Blast_tac 1); |
|
632 |
(*K4*) |
|
11222 | 633 |
by (blast_tac (claset() addSDs [AuthKey_not_KeyCryptKey]) 1); |
6452 | 634 |
(*K5*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
635 |
by (case_tac "Key ServKey \\<in> analz (spies evs5)" 1); |
6452 | 636 |
(*If ServKey is compromised then the result follows directly...*) |
637 |
by (asm_simp_tac |
|
638 |
(simpset() addsimps [analz_insert_eq, |
|
639 |
impOfSubs (Un_upper2 RS analz_mono)]) 1); |
|
640 |
(*...therefore ServKey is uncompromised.*) |
|
641 |
(*The KeyCryptKey ServKey SK evs5 case leads to a contradiction.*) |
|
642 |
by (blast_tac (claset() addSEs [ServKey_not_KeyCryptKey RSN(2, rev_notE)] |
|
11222 | 643 |
delrules [allE, ballE]) 1); |
8954
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
644 |
(** Level 13: Oops1 **) |
4fbdda40bb5f
rewrote a very long proof (Key_analz_image_Key) because it had stopped working
paulson
parents:
8741
diff
changeset
|
645 |
by (Asm_full_simp_tac 1); |
6452 | 646 |
by (blast_tac (claset() addSDs [KeyCryptKey_analz_insert]) 1); |
647 |
qed_spec_mp "Key_analz_image_Key"; |
|
648 |
||
649 |
||
650 |
(* First simplification law for analz: no session keys encrypt *) |
|
651 |
(* authentication keys or shared keys. *) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
652 |
Goal "[| evs \\<in> kerberos; K \\<in> (AuthKeys evs) Un range shrK; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
653 |
\ SesKey \\<notin> range shrK |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
654 |
\ ==> Key K \\<in> analz (insert (Key SesKey) (spies evs)) = \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
655 |
\ (K = SesKey | Key K \\<in> analz (spies evs))"; |
7499 | 656 |
by (ftac AuthKeys_are_not_KeyCryptKey 1 THEN assume_tac 1); |
6452 | 657 |
by (asm_full_simp_tac (analz_image_freshK_ss addsimps [Key_analz_image_Key]) 1); |
658 |
qed "analz_insert_freshK1"; |
|
659 |
||
660 |
||
661 |
(* Second simplification law for analz: no service keys encrypt *) |
|
662 |
(* any other keys. *) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
663 |
Goal "[| evs \\<in> kerberos; ServKey \\<notin> (AuthKeys evs); ServKey \\<notin> range shrK|]\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
664 |
\ ==> Key K \\<in> analz (insert (Key ServKey) (spies evs)) = \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
665 |
\ (K = ServKey | Key K \\<in> analz (spies evs))"; |
7499 | 666 |
by (ftac not_AuthKeys_not_KeyCryptKey 1 |
6452 | 667 |
THEN assume_tac 1 |
668 |
THEN assume_tac 1); |
|
669 |
by (asm_full_simp_tac (analz_image_freshK_ss addsimps [Key_analz_image_Key]) 1); |
|
670 |
qed "analz_insert_freshK2"; |
|
671 |
||
672 |
||
673 |
(* Third simplification law for analz: only one authentication key *) |
|
674 |
(* encrypts a certain service key. *) |
|
675 |
Goal |
|
676 |
"[| Says Tgs A \ |
|
677 |
\ (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
678 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
679 |
\ AuthKey \\<noteq> AuthKey'; AuthKey' \\<notin> range shrK; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
680 |
\ ==> Key ServKey \\<in> analz (insert (Key AuthKey') (spies evs)) = \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
681 |
\ (ServKey = AuthKey' | Key ServKey \\<in> analz (spies evs))"; |
6452 | 682 |
by (dres_inst_tac [("AuthKey'","AuthKey'")] Says_Tgs_KeyCryptKey 1); |
683 |
by (Blast_tac 1); |
|
684 |
by (assume_tac 1); |
|
685 |
by (asm_full_simp_tac (analz_image_freshK_ss addsimps [Key_analz_image_Key]) 1); |
|
686 |
qed "analz_insert_freshK3"; |
|
687 |
||
688 |
||
689 |
(*a weakness of the protocol*) |
|
690 |
Goal "[| Says Tgs A \ |
|
691 |
\ (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
692 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
693 |
\ Key AuthKey \\<in> analz (spies evs); evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
694 |
\ ==> Key ServKey \\<in> analz (spies evs)"; |
6452 | 695 |
by (force_tac (claset() addDs [Says_imp_spies RS analz.Inj RS |
696 |
analz.Decrypt RS analz.Fst], |
|
697 |
simpset()) 1); |
|
698 |
qed "AuthKey_compromises_ServKey"; |
|
699 |
||
700 |
||
701 |
(********************** Guarantees for Kas *****************************) |
|
702 |
Goal "[| Crypt AuthKey {|Key ServKey, Agent B, Tt, \ |
|
703 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|}|}\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
704 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
705 |
\ Key ServKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
706 |
\ B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
707 |
\ ==> ServKey \\<notin> AuthKeys evs"; |
6452 | 708 |
by (etac rev_mp 1); |
709 |
by (etac rev_mp 1); |
|
710 |
by (asm_full_simp_tac (simpset() addsimps [AuthKeys_def]) 1); |
|
711 |
by (parts_induct_tac 1); |
|
11222 | 712 |
by (ALLGOALS Blast_tac); |
6452 | 713 |
bind_thm ("ServKey_notin_AuthKeys", result() RSN (2, rev_notE)); |
714 |
bind_thm ("ServKey_notin_AuthKeysD", result()); |
|
715 |
||
716 |
||
717 |
(** If Spy sees the Authentication Key sent in msg K2, then |
|
718 |
the Key has expired **) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
719 |
Goal "[| A \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 720 |
\ ==> Says Kas A \ |
721 |
\ (Crypt (shrK A) \ |
|
722 |
\ {|Key AuthKey, Agent Tgs, Number Tk, \ |
|
723 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
724 |
\ \\<in> set evs --> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
725 |
\ Key AuthKey \\<in> analz (spies evs) --> \ |
6452 | 726 |
\ ExpirAuth Tk evs"; |
727 |
by (etac kerberos.induct 1); |
|
728 |
by analz_sees_tac; |
|
729 |
by (ALLGOALS |
|
730 |
(asm_simp_tac |
|
8741
61bc5ed22b62
removal of less_SucI, le_SucI from default simpset
paulson
parents:
7499
diff
changeset
|
731 |
(simpset() addsimps ([Says_Kas_message_form, less_SucI, |
6452 | 732 |
analz_insert_eq, not_parts_not_analz, |
733 |
analz_insert_freshK1] @ pushes)))); |
|
734 |
(*Fake*) |
|
735 |
by (spy_analz_tac 1); |
|
736 |
(*K2*) |
|
11222 | 737 |
by (Blast_tac 1); |
6452 | 738 |
(*K4*) |
11222 | 739 |
by (Blast_tac 1); |
6452 | 740 |
(*Level 8: K5*) |
741 |
by (blast_tac (claset() addEs [ServKey_notin_AuthKeys] |
|
11222 | 742 |
addDs [Says_Kas_message_form] |
6452 | 743 |
addIs [less_SucI]) 1); |
744 |
(*Oops1*) |
|
11222 | 745 |
by (blast_tac (claset() addSDs [unique_AuthKeys] addIs [less_SucI]) 1); |
6452 | 746 |
(*Oops2*) |
747 |
by (blast_tac (claset() addDs [Says_Tgs_message_form, |
|
748 |
Says_Kas_message_form]) 1); |
|
749 |
val lemma = result() RS mp RS mp RSN(1,rev_notE); |
|
750 |
||
751 |
||
752 |
Goal "[| Says Kas A \ |
|
753 |
\ (Crypt Ka {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
754 |
\ \\<in> set evs; \ |
6452 | 755 |
\ ~ ExpirAuth Tk evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
756 |
\ A \\<notin> bad; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
757 |
\ ==> Key AuthKey \\<notin> analz (spies evs)"; |
11222 | 758 |
by (blast_tac (claset() addDs [Says_Kas_message_form, lemma]) 1); |
6452 | 759 |
qed "Confidentiality_Kas"; |
760 |
||
761 |
||
762 |
(********************** Guarantees for Tgs *****************************) |
|
763 |
||
764 |
(** If Spy sees the Service Key sent in msg K4, then |
|
765 |
the Key has expired **) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
766 |
Goal "[| A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
767 |
\ ==> Key AuthKey \\<notin> analz (spies evs) --> \ |
6452 | 768 |
\ Says Tgs A \ |
769 |
\ (Crypt AuthKey \ |
|
770 |
\ {|Key ServKey, Agent B, Number Tt, \ |
|
771 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|}|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
772 |
\ \\<in> set evs --> \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
773 |
\ Key ServKey \\<in> analz (spies evs) --> \ |
6452 | 774 |
\ ExpirServ Tt evs"; |
775 |
by (etac kerberos.induct 1); |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
776 |
(*The Oops1 case is unusual: must simplify Authkey \\<notin> analz (spies (ev#evs)) |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
777 |
rather than weakening it to Authkey \\<notin> analz (spies evs), for we then |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
778 |
conclude AuthKey \\<noteq> AuthKeya.*) |
6452 | 779 |
by (Clarify_tac 9); |
780 |
by analz_sees_tac; |
|
781 |
by (rotate_tac ~1 11); |
|
782 |
by (ALLGOALS |
|
783 |
(asm_full_simp_tac |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
784 |
(simpset() addsimps [less_SucI, new_keys_not_analzd, |
8741
61bc5ed22b62
removal of less_SucI, le_SucI from default simpset
paulson
parents:
7499
diff
changeset
|
785 |
Says_Kas_message_form, Says_Tgs_message_form, |
61bc5ed22b62
removal of less_SucI, le_SucI from default simpset
paulson
parents:
7499
diff
changeset
|
786 |
analz_insert_eq, not_parts_not_analz, |
61bc5ed22b62
removal of less_SucI, le_SucI from default simpset
paulson
parents:
7499
diff
changeset
|
787 |
analz_insert_freshK1, analz_insert_freshK2] |
61bc5ed22b62
removal of less_SucI, le_SucI from default simpset
paulson
parents:
7499
diff
changeset
|
788 |
@ pushes))); |
6452 | 789 |
(*Fake*) |
790 |
by (spy_analz_tac 1); |
|
791 |
(*K2*) |
|
11222 | 792 |
by (blast_tac (claset() |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
793 |
addIs [parts_insertI, less_SucI]) 1); |
6452 | 794 |
(*K4*) |
11222 | 795 |
by (blast_tac (claset() addDs [A_trusts_AuthTicket, Confidentiality_Kas]) 1); |
6452 | 796 |
by (ALLGOALS Clarify_tac); |
797 |
(*Oops2*) |
|
798 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj, |
|
799 |
Key_unique_SesKey] addIs [less_SucI]) 3); |
|
11222 | 800 |
(** Level 10 **) |
6452 | 801 |
(*Oops1*) |
802 |
by (blast_tac (claset() addDs [analz_insert_freshK3, |
|
803 |
Says_Kas_message_form, Says_Tgs_message_form] |
|
804 |
addIs [less_SucI]) 2); |
|
11222 | 805 |
(*K5*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
806 |
by (thin_tac "Says Aa Tgs ?X \\<in> set ?evs" 1); |
6452 | 807 |
by (forward_tac [Says_imp_spies RS parts.Inj RS ServKey_notin_AuthKeysD] 1); |
808 |
by (assume_tac 1 THEN Blast_tac 1 THEN assume_tac 1); |
|
809 |
by (rotate_tac ~1 1); |
|
810 |
by (asm_full_simp_tac (simpset() addsimps [analz_insert_freshK2]) 1); |
|
11222 | 811 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj, Key_unique_SesKey] |
812 |
addIs [less_SucI]) 1); |
|
6452 | 813 |
val lemma = result() RS mp RS mp RS mp RSN(1,rev_notE); |
814 |
||
815 |
||
816 |
(* In the real world Tgs can't check wheter AuthKey is secure! *) |
|
817 |
Goal |
|
818 |
"[| Says Tgs A \ |
|
819 |
\ (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
820 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
821 |
\ Key AuthKey \\<notin> analz (spies evs); \ |
6452 | 822 |
\ ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
823 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
824 |
\ ==> Key ServKey \\<notin> analz (spies evs)"; |
11222 | 825 |
by (blast_tac (claset() addDs [Says_Tgs_message_form, lemma]) 1); |
6452 | 826 |
qed "Confidentiality_Tgs1"; |
827 |
||
828 |
(* In the real world Tgs CAN check what Kas sends! *) |
|
829 |
Goal |
|
830 |
"[| Says Kas A \ |
|
831 |
\ (Crypt Ka {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
832 |
\ \\<in> set evs; \ |
6452 | 833 |
\ Says Tgs A \ |
834 |
\ (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
835 |
\ \\<in> set evs; \ |
6452 | 836 |
\ ~ ExpirAuth Tk evs; ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
837 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
838 |
\ ==> Key ServKey \\<notin> analz (spies evs)"; |
6452 | 839 |
by (blast_tac (claset() addSDs [Confidentiality_Kas, |
840 |
Confidentiality_Tgs1]) 1); |
|
841 |
qed "Confidentiality_Tgs2"; |
|
842 |
||
843 |
(*Most general form*) |
|
844 |
val Confidentiality_Tgs3 = A_trusts_AuthTicket RS Confidentiality_Tgs2; |
|
845 |
||
846 |
||
847 |
(********************** Guarantees for Alice *****************************) |
|
848 |
||
849 |
val Confidentiality_Auth_A = A_trusts_AuthKey RS Confidentiality_Kas; |
|
850 |
||
851 |
Goal |
|
852 |
"[| Says Kas A \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
853 |
\ (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Tk, AuthTicket|}) \\<in> set evs;\ |
6452 | 854 |
\ Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
855 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
856 |
\ Key AuthKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
857 |
\ evs \\<in> kerberos |] \ |
6452 | 858 |
\==> Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Tt, ServTicket|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
859 |
\ \\<in> set evs"; |
7499 | 860 |
by (ftac Says_Kas_message_form 1 THEN assume_tac 1); |
6452 | 861 |
by (etac rev_mp 1); |
862 |
by (etac rev_mp 1); |
|
863 |
by (etac rev_mp 1); |
|
864 |
by (parts_induct_tac 1); |
|
11222 | 865 |
by (Blast_tac 1); |
6452 | 866 |
(*K2 and K4 remain*) |
11222 | 867 |
by (blast_tac (claset() addSDs [unique_CryptKey]) 2); |
6452 | 868 |
by (blast_tac (claset() addSDs [A_trusts_K4, Says_Tgs_message_form, |
869 |
AuthKeys_used]) 1); |
|
870 |
qed "A_trusts_K4_bis"; |
|
871 |
||
872 |
||
873 |
Goal "[| Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
874 |
\ \\<in> parts (spies evs); \ |
6452 | 875 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
876 |
\ \\<in> parts (spies evs); \ |
6452 | 877 |
\ ~ ExpirAuth Tk evs; ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
878 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
879 |
\ ==> Key ServKey \\<notin> analz (spies evs)"; |
6452 | 880 |
by (dtac A_trusts_AuthKey 1); |
881 |
by (assume_tac 1); |
|
882 |
by (assume_tac 1); |
|
883 |
by (blast_tac (claset() addDs [Confidentiality_Kas, |
|
884 |
Says_Kas_message_form, |
|
885 |
A_trusts_K4_bis, Confidentiality_Tgs2]) 1); |
|
886 |
qed "Confidentiality_Serv_A"; |
|
887 |
||
888 |
||
889 |
(********************** Guarantees for Bob *****************************) |
|
890 |
(* Theorems for the refined model have suffix "refined" *) |
|
891 |
||
892 |
Goal |
|
893 |
"[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
894 |
\ \\<in> set evs; evs \\<in> kerberos|] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
895 |
\ ==> \\<exists>Tk. Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk,\ |
6452 | 896 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
897 |
\ \\<in> set evs"; |
6452 | 898 |
by (etac rev_mp 1); |
899 |
by (parts_induct_tac 1); |
|
900 |
by Auto_tac; |
|
901 |
by (blast_tac (claset() addSDs [Says_imp_spies RS parts.Inj RS parts.Fst RS |
|
902 |
A_trusts_AuthTicket]) 1); |
|
903 |
qed "K4_imp_K2"; |
|
904 |
||
905 |
Goal |
|
906 |
"[| Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
907 |
\ \\<in> set evs; evs \\<in> kerberos|] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
908 |
\ ==> \\<exists>Tk. (Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk,\ |
6452 | 909 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
910 |
\ \\<in> set evs \ |
6452 | 911 |
\ & ServLife + Tt <= AuthLife + Tk)"; |
912 |
by (etac rev_mp 1); |
|
913 |
by (parts_induct_tac 1); |
|
914 |
by Auto_tac; |
|
915 |
by (blast_tac (claset() addSDs [Says_imp_spies RS parts.Inj RS parts.Fst RS |
|
916 |
A_trusts_AuthTicket]) 1); |
|
917 |
qed "K4_imp_K2_refined"; |
|
918 |
||
919 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
920 |
\ \\<in> parts (spies evs); B \\<noteq> Tgs; B \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
921 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
922 |
\==> \\<exists>AuthKey. \ |
6452 | 923 |
\ Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Tt, \ |
924 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Tt|}|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
925 |
\ \\<in> set evs"; |
6452 | 926 |
by (etac rev_mp 1); |
927 |
by (parts_induct_tac 1); |
|
11222 | 928 |
by (ALLGOALS Blast_tac); |
6452 | 929 |
qed "B_trusts_ServKey"; |
930 |
||
931 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
932 |
\ \\<in> parts (spies evs); B \\<noteq> Tgs; B \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
933 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
934 |
\ ==> \\<exists>AuthKey Tk. Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk,\ |
6452 | 935 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
936 |
\ \\<in> set evs"; |
6452 | 937 |
by (blast_tac (claset() addSDs [B_trusts_ServKey, K4_imp_K2]) 1); |
938 |
qed "B_trusts_ServTicket_Kas"; |
|
939 |
||
940 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
941 |
\ \\<in> parts (spies evs); B \\<noteq> Tgs; B \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
942 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
943 |
\ ==> \\<exists>AuthKey Tk. (Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk,\ |
6452 | 944 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
945 |
\ \\<in> set evs \ |
6452 | 946 |
\ & ServLife + Tt <= AuthLife + Tk)"; |
947 |
by (blast_tac (claset() addSDs [B_trusts_ServKey,K4_imp_K2_refined]) 1); |
|
948 |
qed "B_trusts_ServTicket_Kas_refined"; |
|
949 |
||
950 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
951 |
\ \\<in> parts (spies evs); B \\<noteq> Tgs; B \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
952 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
953 |
\==> \\<exists>Tk AuthKey. \ |
6452 | 954 |
\ Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, \ |
955 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
956 |
\ \\<in> set evs \ |
6452 | 957 |
\ & Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, \ |
958 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|}|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
959 |
\ \\<in> set evs"; |
11222 | 960 |
by (blast_tac (claset() addDs [B_trusts_ServKey, K4_imp_K2]) 1); |
6452 | 961 |
qed "B_trusts_ServTicket"; |
962 |
||
963 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
964 |
\ \\<in> parts (spies evs); B \\<noteq> Tgs; B \\<notin> bad; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
965 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
966 |
\==> \\<exists>Tk AuthKey. \ |
6452 | 967 |
\ (Says Kas A (Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, \ |
968 |
\ Crypt (shrK Tgs) {|Agent A, Agent Tgs, Key AuthKey, Number Tk|}|})\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
969 |
\ \\<in> set evs \ |
6452 | 970 |
\ & Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, \ |
971 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|}|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
972 |
\ \\<in> set evs \ |
6452 | 973 |
\ & ServLife + Tt <= AuthLife + Tk)"; |
11222 | 974 |
by (blast_tac (claset() addDs [B_trusts_ServKey, K4_imp_K2_refined]) 1); |
6452 | 975 |
qed "B_trusts_ServTicket_refined"; |
976 |
||
977 |
||
978 |
Goal "[| ~ ExpirServ Tt evs; ServLife + Tt <= AuthLife + Tk |] \ |
|
979 |
\ ==> ~ ExpirAuth Tk evs"; |
|
980 |
by (blast_tac (claset() addDs [leI,le_trans] addEs [leE]) 1); |
|
981 |
qed "NotExpirServ_NotExpirAuth_refined"; |
|
982 |
||
983 |
||
984 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
985 |
\ \\<in> parts (spies evs); \ |
6452 | 986 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
987 |
\ \\<in> parts (spies evs); \ |
6452 | 988 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
989 |
\ \\<in> parts (spies evs); \ |
6452 | 990 |
\ ~ ExpirServ Tt evs; ~ ExpirAuth Tk evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
991 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
992 |
\ ==> Key ServKey \\<notin> analz (spies evs)"; |
7499 | 993 |
by (ftac A_trusts_AuthKey 1); |
994 |
by (ftac Confidentiality_Kas 3); |
|
995 |
by (ftac B_trusts_ServTicket 6); |
|
11222 | 996 |
by (blast_tac (claset() addSDs [Confidentiality_Tgs2] |
997 |
addDs [Says_Kas_message_form, A_trusts_K4, |
|
998 |
unique_ServKeys, unique_AuthKeys]) 9); |
|
6452 | 999 |
by (ALLGOALS assume_tac); |
1000 |
(* |
|
11222 | 1001 |
The proof above is fast. It can be done in one command in 50 secs: |
6452 | 1002 |
by (blast_tac (claset() addDs [A_trusts_AuthKey, A_trusts_K4, |
1003 |
Says_Kas_message_form, B_trusts_ServTicket, |
|
1004 |
unique_ServKeys, unique_AuthKeys, |
|
1005 |
Confidentiality_Kas, |
|
1006 |
Confidentiality_Tgs2]) 1); |
|
1007 |
*) |
|
1008 |
qed "Confidentiality_B"; |
|
1009 |
||
1010 |
||
1011 |
(*Most general form -- only for refined model! *) |
|
1012 |
Goal "[| Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1013 |
\ \\<in> parts (spies evs); \ |
6452 | 1014 |
\ ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1015 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1016 |
\ ==> Key ServKey \\<notin> analz (spies evs)"; |
6452 | 1017 |
by (blast_tac (claset() addDs [B_trusts_ServTicket_refined, |
1018 |
NotExpirServ_NotExpirAuth_refined, |
|
1019 |
Confidentiality_Tgs2]) 1); |
|
1020 |
qed "Confidentiality_B_refined"; |
|
1021 |
||
1022 |
||
1023 |
(********************** Authenticity theorems *****************************) |
|
1024 |
||
1025 |
(***1. Session Keys authenticity: they originated with servers.***) |
|
1026 |
||
1027 |
(*Authenticity of AuthKey for A: "A_trusts_AuthKey"*) |
|
1028 |
||
1029 |
(*Authenticity of ServKey for A: "A_trusts_ServKey"*) |
|
1030 |
Goal "[| Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1031 |
\ \\<in> parts (spies evs); \ |
6452 | 1032 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1033 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1034 |
\ ~ ExpirAuth Tk evs; A \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1035 |
\==>Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|})\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1036 |
\ \\<in> set evs"; |
11222 | 1037 |
by (blast_tac (claset() addDs [A_trusts_AuthKey, Confidentiality_Auth_A, |
1038 |
A_trusts_K4_bis]) 1); |
|
6452 | 1039 |
qed "A_trusts_ServKey"; |
1040 |
(*Note: requires a temporal check*) |
|
1041 |
||
1042 |
||
1043 |
(*Authenticity of ServKey for B: "B_trusts_ServKey"*) |
|
1044 |
||
1045 |
(***2. Parties authenticity: each party verifies "the identity of |
|
1046 |
another party who generated some data" (quoted from Neuman & Ts'o).***) |
|
1047 |
||
1048 |
(*These guarantees don't assess whether two parties agree on |
|
1049 |
the same session key: sending a message containing a key |
|
1050 |
doesn't a priori state knowledge of the key.***) |
|
1051 |
||
1052 |
(*B checks authenticity of A: theorems "A_Authenticity", |
|
1053 |
"A_authenticity_refined" *) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1054 |
Goal "[| Crypt ServKey {|Agent A, Number Ta|} \\<in> parts (spies evs); \ |
6452 | 1055 |
\ Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1056 |
\ ServTicket|}) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1057 |
\ Key ServKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1058 |
\ A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1059 |
\==> Says A B {|ServTicket, Crypt ServKey {|Agent A, Number Ta|}|} \\<in> set evs"; |
6452 | 1060 |
by (etac rev_mp 1); |
1061 |
by (etac rev_mp 1); |
|
1062 |
by (etac rev_mp 1); |
|
1063 |
by (etac kerberos.induct 1); |
|
7499 | 1064 |
by (ftac Says_ticket_in_parts_spies 5); |
1065 |
by (ftac Says_ticket_in_parts_spies 7); |
|
6452 | 1066 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
1067 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
|
11222 | 1068 |
by (Blast_tac 1); |
6452 | 1069 |
(*K3*) |
11222 | 1070 |
by (blast_tac (claset() addDs [A_trusts_AuthKey, |
6452 | 1071 |
Says_Kas_message_form, |
1072 |
Says_Tgs_message_form]) 1); |
|
1073 |
(*K4*) |
|
1074 |
by (force_tac (claset() addSDs [Crypt_imp_keysFor], simpset()) 1); |
|
1075 |
(*K5*) |
|
11222 | 1076 |
by (blast_tac (claset() addDs [Key_unique_SesKey]) 1); |
6452 | 1077 |
qed "Says_Auth"; |
1078 |
||
1079 |
(*The second assumption tells B what kind of key ServKey is.*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1080 |
Goal "[| Crypt ServKey {|Agent A, Number Ta|} \\<in> parts (spies evs); \ |
6452 | 1081 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1082 |
\ \\<in> parts (spies evs); \ |
6452 | 1083 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1084 |
\ \\<in> parts (spies evs); \ |
6452 | 1085 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1086 |
\ \\<in> parts (spies evs); \ |
6452 | 1087 |
\ ~ ExpirServ Tt evs; ~ ExpirAuth Tk evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1088 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1089 |
\ ==> Says A B {|Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|},\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1090 |
\ Crypt ServKey {|Agent A, Number Ta|} |} \\<in> set evs"; |
11222 | 1091 |
by (blast_tac (claset() addIs [Says_Auth] |
1092 |
addDs [Confidentiality_B, Key_unique_SesKey, |
|
1093 |
B_trusts_ServKey]) 1); |
|
6452 | 1094 |
qed "A_Authenticity"; |
1095 |
||
1096 |
(*Stronger form in the refined model*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1097 |
Goal "[| Crypt ServKey {|Agent A, Number Ta2|} \\<in> parts (spies evs); \ |
6452 | 1098 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1099 |
\ \\<in> parts (spies evs); \ |
6452 | 1100 |
\ ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1101 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1102 |
\ ==> Says A B {|Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|},\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1103 |
\ Crypt ServKey {|Agent A, Number Ta2|} |} \\<in> set evs"; |
11222 | 1104 |
by (blast_tac (claset() addDs [Confidentiality_B_refined, B_trusts_ServKey, |
1105 |
Key_unique_SesKey] |
|
1106 |
addIs [Says_Auth]) 1); |
|
6452 | 1107 |
qed "A_Authenticity_refined"; |
1108 |
||
1109 |
||
1110 |
(*A checks authenticity of B: theorem "B_authenticity"*) |
|
1111 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1112 |
Goal "[| Crypt ServKey (Number Ta) \\<in> parts (spies evs); \ |
6452 | 1113 |
\ Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, Number Tt, \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1114 |
\ ServTicket|}) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1115 |
\ Key ServKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1116 |
\ A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1117 |
\ ==> Says B A (Crypt ServKey (Number Ta)) \\<in> set evs"; |
6452 | 1118 |
by (etac rev_mp 1); |
1119 |
by (etac rev_mp 1); |
|
1120 |
by (etac rev_mp 1); |
|
1121 |
by (etac kerberos.induct 1); |
|
7499 | 1122 |
by (ftac Says_ticket_in_parts_spies 5); |
1123 |
by (ftac Says_ticket_in_parts_spies 7); |
|
6452 | 1124 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
1125 |
by (ALLGOALS Asm_simp_tac); |
|
11222 | 1126 |
by (Blast_tac 1); |
6452 | 1127 |
by (force_tac (claset() addSDs [Crypt_imp_keysFor], simpset()) 1); |
1128 |
by (Clarify_tac 1); |
|
7499 | 1129 |
by (ftac Says_Tgs_message_form 1 THEN assume_tac 1); |
6452 | 1130 |
by (Clarify_tac 1); (*PROOF FAILED if omitted*) |
11222 | 1131 |
by (blast_tac (claset() addDs [unique_CryptKey]) 1); |
6452 | 1132 |
qed "Says_K6"; |
1133 |
||
1134 |
Goal "[| Crypt AuthKey {|Key ServKey, Agent B, T, ServTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1135 |
\ \\<in> parts (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1136 |
\ Key AuthKey \\<notin> analz (spies evs); AuthKey \\<notin> range shrK; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1137 |
\ evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1138 |
\ ==> \\<exists>A. Says Tgs A (Crypt AuthKey {|Key ServKey, Agent B, T, ServTicket|})\ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1139 |
\ \\<in> set evs"; |
6452 | 1140 |
by (etac rev_mp 1); |
1141 |
by (etac rev_mp 1); |
|
1142 |
by (parts_induct_tac 1); |
|
11222 | 1143 |
by (Blast_tac 1); |
6452 | 1144 |
by (Blast_tac 1); |
1145 |
by (Blast_tac 1); |
|
1146 |
qed "K4_trustworthy"; |
|
1147 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1148 |
Goal "[| Crypt ServKey (Number Ta) \\<in> parts (spies evs); \ |
6452 | 1149 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1150 |
\ \\<in> parts (spies evs); \ |
6452 | 1151 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1152 |
\ \\<in> parts (spies evs); \ |
6452 | 1153 |
\ ~ ExpirAuth Tk evs; ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1154 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1155 |
\ ==> Says B A (Crypt ServKey (Number Ta)) \\<in> set evs"; |
7499 | 1156 |
by (ftac A_trusts_AuthKey 1); |
1157 |
by (ftac Says_Kas_message_form 3); |
|
1158 |
by (ftac Confidentiality_Kas 4); |
|
1159 |
by (ftac K4_trustworthy 7); |
|
6452 | 1160 |
by (Blast_tac 8); |
1161 |
by (etac exE 9); |
|
7499 | 1162 |
by (ftac K4_imp_K2 9); |
11222 | 1163 |
(*Yes the proof's a mess, but I don't know how to improve it.*) |
1164 |
by (blast_tac (claset() addDs [Key_unique_SesKey] |
|
6452 | 1165 |
addSIs [Says_K6] |
11222 | 1166 |
addDs [Confidentiality_Tgs1]) 10); |
6452 | 1167 |
by (ALLGOALS assume_tac); |
1168 |
qed "B_Authenticity"; |
|
1169 |
||
1170 |
||
1171 |
(***3. Parties' knowledge of session keys. A knows a session key if she |
|
1172 |
used it to build a cipher.***) |
|
1173 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1174 |
Goal "[| Says B A (Crypt ServKey (Number Ta)) \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1175 |
\ Key ServKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1176 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
6452 | 1177 |
\ ==> B Issues A with (Crypt ServKey (Number Ta)) on evs"; |
1178 |
by (simp_tac (simpset() addsimps [Issues_def]) 1); |
|
1179 |
by (rtac exI 1); |
|
1180 |
by (rtac conjI 1); |
|
1181 |
by (assume_tac 1); |
|
1182 |
by (Simp_tac 1); |
|
1183 |
by (etac rev_mp 1); |
|
1184 |
by (etac rev_mp 1); |
|
1185 |
by (etac kerberos.induct 1); |
|
7499 | 1186 |
by (ftac Says_ticket_in_parts_spies 5); |
1187 |
by (ftac Says_ticket_in_parts_spies 7); |
|
6452 | 1188 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
1189 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
|
11222 | 1190 |
by (Blast_tac 1); |
6452 | 1191 |
(*K6 requires numerous lemmas*) |
1192 |
by (asm_full_simp_tac (simpset() addsimps [takeWhile_tail]) 1); |
|
1193 |
by (blast_tac (claset() addDs [B_trusts_ServTicket, |
|
1194 |
impOfSubs parts_spies_takeWhile_mono, |
|
1195 |
impOfSubs parts_spies_evs_revD2] |
|
11222 | 1196 |
addIs [Says_K6]) 1); |
6452 | 1197 |
qed "B_Knows_B_Knows_ServKey_lemma"; |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1198 |
(*Key ServKey \\<notin> analz (spies evs) could be relaxed by Confidentiality_B |
6452 | 1199 |
but this is irrelevant because B knows what he knows! *) |
1200 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1201 |
Goal "[| Says B A (Crypt ServKey (Number Ta)) \\<in> set evs; \ |
6452 | 1202 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1203 |
\ \\<in> parts (spies evs);\ |
6452 | 1204 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1205 |
\ \\<in> parts (spies evs);\ |
6452 | 1206 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1207 |
\ \\<in> parts (spies evs); \ |
6452 | 1208 |
\ ~ ExpirServ Tt evs; ~ ExpirAuth Tk evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1209 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
6452 | 1210 |
\ ==> B Issues A with (Crypt ServKey (Number Ta)) on evs"; |
1211 |
by (blast_tac (claset() addSDs [Confidentiality_B, |
|
1212 |
B_Knows_B_Knows_ServKey_lemma]) 1); |
|
1213 |
qed "B_Knows_B_Knows_ServKey"; |
|
1214 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1215 |
Goal "[| Says B A (Crypt ServKey (Number Ta)) \\<in> set evs; \ |
6452 | 1216 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1217 |
\ \\<in> parts (spies evs);\ |
6452 | 1218 |
\ ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1219 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
6452 | 1220 |
\ ==> B Issues A with (Crypt ServKey (Number Ta)) on evs"; |
1221 |
by (blast_tac (claset() addSDs [Confidentiality_B_refined, |
|
1222 |
B_Knows_B_Knows_ServKey_lemma]) 1); |
|
1223 |
qed "B_Knows_B_Knows_ServKey_refined"; |
|
1224 |
||
1225 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1226 |
Goal "[| Crypt ServKey (Number Ta) \\<in> parts (spies evs); \ |
6452 | 1227 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1228 |
\ \\<in> parts (spies evs); \ |
6452 | 1229 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1230 |
\ \\<in> parts (spies evs); \ |
6452 | 1231 |
\ ~ ExpirAuth Tk evs; ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1232 |
\ A \\<notin> bad; B \\<notin> bad; B \\<noteq> Tgs; evs \\<in> kerberos |] \ |
6452 | 1233 |
\ ==> B Issues A with (Crypt ServKey (Number Ta)) on evs"; |
1234 |
by (blast_tac (claset() addSDs [B_Authenticity, Confidentiality_Serv_A, |
|
1235 |
B_Knows_B_Knows_ServKey_lemma]) 1); |
|
1236 |
qed "A_Knows_B_Knows_ServKey"; |
|
1237 |
||
1238 |
Goal "[| Says A Tgs \ |
|
1239 |
\ {|AuthTicket, Crypt AuthKey {|Agent A, Number Ta|}, Agent B|}\ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1240 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1241 |
\ A \\<notin> bad; evs \\<in> kerberos |] \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1242 |
\ ==> \\<exists>Tk. Says Kas A (Crypt (shrK A) \ |
6452 | 1243 |
\ {|Key AuthKey, Agent Tgs, Tk, AuthTicket|}) \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1244 |
\ \\<in> set evs"; |
6452 | 1245 |
by (etac rev_mp 1); |
1246 |
by (parts_induct_tac 1); |
|
11222 | 1247 |
by (Blast_tac 1); |
6452 | 1248 |
by (Blast_tac 1); |
1249 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj RS |
|
1250 |
A_trusts_AuthKey]) 1); |
|
1251 |
qed "K3_imp_K2"; |
|
1252 |
||
1253 |
Goal "[| Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1254 |
\ \\<in> parts (spies evs); \ |
6452 | 1255 |
\ Says Kas A (Crypt (shrK A) \ |
1256 |
\ {|Key AuthKey, Agent Tgs, Tk, AuthTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1257 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1258 |
\ Key AuthKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1259 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1260 |
\ ==> Says Tgs A (Crypt AuthKey \ |
1261 |
\ {|Key ServKey, Agent B, Number Tt, ServTicket|}) \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1262 |
\ \\<in> set evs"; |
6452 | 1263 |
by (etac rev_mp 1); |
1264 |
by (etac rev_mp 1); |
|
1265 |
by (etac rev_mp 1); |
|
1266 |
by (parts_induct_tac 1); |
|
11222 | 1267 |
by (Blast_tac 1); |
6452 | 1268 |
by (force_tac (claset() addSDs [Crypt_imp_keysFor], simpset()) 1); |
1269 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj RS parts.Fst RS |
|
1270 |
A_trusts_AuthTicket, unique_AuthKeys]) 1); |
|
1271 |
qed "K4_trustworthy'"; |
|
1272 |
||
1273 |
Goal "[| Says A B {|ServTicket, Crypt ServKey {|Agent A, Number Ta|}|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1274 |
\ \\<in> set evs; \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1275 |
\ Key ServKey \\<notin> analz (spies evs); \ |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1276 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1277 |
\ ==> A Issues B with (Crypt ServKey {|Agent A, Number Ta|}) on evs"; |
1278 |
by (simp_tac (simpset() addsimps [Issues_def]) 1); |
|
1279 |
by (rtac exI 1); |
|
1280 |
by (rtac conjI 1); |
|
1281 |
by (assume_tac 1); |
|
1282 |
by (Simp_tac 1); |
|
1283 |
by (etac rev_mp 1); |
|
1284 |
by (etac rev_mp 1); |
|
1285 |
by (etac kerberos.induct 1); |
|
7499 | 1286 |
by (ftac Says_ticket_in_parts_spies 5); |
1287 |
by (ftac Says_ticket_in_parts_spies 7); |
|
6452 | 1288 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
1289 |
by (ALLGOALS Asm_simp_tac); |
|
1290 |
by (Clarify_tac 1); |
|
1291 |
(*K6*) |
|
1292 |
by Auto_tac; |
|
1293 |
by (asm_full_simp_tac (simpset() addsimps [takeWhile_tail]) 1); |
|
1294 |
(*Level 15: case study necessary because the assumption doesn't state |
|
1295 |
the form of ServTicket. The guarantee becomes stronger.*) |
|
11222 | 1296 |
by (blast_tac (claset() addDs [Says_imp_spies RS analz.Inj RS analz_Decrypt', |
1297 |
K3_imp_K2, K4_trustworthy', |
|
6452 | 1298 |
impOfSubs parts_spies_takeWhile_mono, |
1299 |
impOfSubs parts_spies_evs_revD2] |
|
11222 | 1300 |
addIs [Says_Auth]) 1); |
6452 | 1301 |
by (asm_full_simp_tac (simpset() addsimps [takeWhile_tail]) 1); |
1302 |
qed "A_Knows_A_Knows_ServKey_lemma"; |
|
1303 |
||
1304 |
Goal "[| Says A B {|ServTicket, Crypt ServKey {|Agent A, Number Ta|}|} \ |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1305 |
\ \\<in> set evs; \ |
6452 | 1306 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1307 |
\ \\<in> parts (spies evs);\ |
6452 | 1308 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|}\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1309 |
\ \\<in> parts (spies evs); \ |
6452 | 1310 |
\ ~ ExpirAuth Tk evs; ~ ExpirServ Tt evs;\ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1311 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1312 |
\ ==> A Issues B with (Crypt ServKey {|Agent A, Number Ta|}) on evs"; |
1313 |
by (blast_tac (claset() addSDs [Confidentiality_Serv_A, |
|
1314 |
A_Knows_A_Knows_ServKey_lemma]) 1); |
|
1315 |
qed "A_Knows_A_Knows_ServKey"; |
|
1316 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1317 |
Goal "[| Crypt ServKey {|Agent A, Number Ta|} \\<in> parts (spies evs); \ |
6452 | 1318 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1319 |
\ \\<in> parts (spies evs); \ |
6452 | 1320 |
\ Crypt AuthKey {|Key ServKey, Agent B, Number Tt, ServTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1321 |
\ \\<in> parts (spies evs); \ |
6452 | 1322 |
\ Crypt (shrK A) {|Key AuthKey, Agent Tgs, Number Tk, AuthTicket|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1323 |
\ \\<in> parts (spies evs); \ |
6452 | 1324 |
\ ~ ExpirServ Tt evs; ~ ExpirAuth Tk evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1325 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1326 |
\ ==> A Issues B with (Crypt ServKey {|Agent A, Number Ta|}) on evs"; |
1327 |
by (blast_tac (claset() addDs [A_Authenticity, Confidentiality_B, |
|
1328 |
A_Knows_A_Knows_ServKey_lemma]) 1); |
|
1329 |
qed "B_Knows_A_Knows_ServKey"; |
|
1330 |
||
1331 |
||
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1332 |
Goal "[| Crypt ServKey {|Agent A, Number Ta|} \\<in> parts (spies evs); \ |
6452 | 1333 |
\ Crypt (shrK B) {|Agent A, Agent B, Key ServKey, Number Tt|} \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1334 |
\ \\<in> parts (spies evs); \ |
6452 | 1335 |
\ ~ ExpirServ Tt evs; \ |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
11104
diff
changeset
|
1336 |
\ B \\<noteq> Tgs; A \\<notin> bad; B \\<notin> bad; evs \\<in> kerberos |] \ |
6452 | 1337 |
\ ==> A Issues B with (Crypt ServKey {|Agent A, Number Ta|}) on evs"; |
1338 |
by (blast_tac (claset() addDs [A_Authenticity_refined, |
|
1339 |
Confidentiality_B_refined, |
|
1340 |
A_Knows_A_Knows_ServKey_lemma]) 1); |
|
1341 |
qed "B_Knows_A_Knows_ServKey_refined"; |