author | paulson |
Fri, 20 Dec 1996 10:23:48 +0100 | |
changeset 2454 | 92f43ed48935 |
parent 2451 | ce85a2aafc7a |
child 2516 | 4d68fbe6378b |
permissions | -rw-r--r-- |
1995 | 1 |
(* Title: HOL/Auth/Yahalom |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
2 |
ID: $Id$ |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
4 |
Copyright 1996 University of Cambridge |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
5 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
6 |
Inductive relation "otway" for the Yahalom protocol. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
7 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
8 |
From page 257 of |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
9 |
Burrows, Abadi and Needham. A Logic of Authentication. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
10 |
Proc. Royal Soc. 426 (1989) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
11 |
*) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
12 |
|
1995 | 13 |
open Yahalom; |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
14 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
15 |
proof_timing:=true; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
16 |
HOL_quantifiers := false; |
2133 | 17 |
Pretty.setdepth 20; |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
18 |
|
1995 | 19 |
|
2322 | 20 |
(*A "possibility property": there are traces that reach the end*) |
1995 | 21 |
goal thy |
22 |
"!!A B. [| A ~= B; A ~= Server; B ~= Server |] \ |
|
2032 | 23 |
\ ==> EX X NB K. EX evs: yahalom lost. \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
24 |
\ Says A B {|X, Crypt K (Nonce NB)|} : set_of_list evs"; |
1995 | 25 |
by (REPEAT (resolve_tac [exI,bexI] 1)); |
2032 | 26 |
by (rtac (yahalom.Nil RS yahalom.YM1 RS yahalom.YM2 RS yahalom.YM3 RS yahalom.YM4) 2); |
1995 | 27 |
by (ALLGOALS (simp_tac (!simpset setsolver safe_solver))); |
28 |
by (ALLGOALS Fast_tac); |
|
2013 | 29 |
result(); |
1995 | 30 |
|
31 |
||
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
32 |
(**** Inductive proofs about yahalom ****) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
33 |
|
2110 | 34 |
(*Monotonicity*) |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
35 |
goal thy "!!evs. lost' <= lost ==> yahalom lost' <= yahalom lost"; |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
36 |
by (rtac subsetI 1); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
37 |
by (etac yahalom.induct 1); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
38 |
by (REPEAT_FIRST |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
39 |
(best_tac (!claset addIs (impOfSubs (sees_mono RS analz_mono RS synth_mono) |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
40 |
:: yahalom.intrs)))); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
41 |
qed "yahalom_mono"; |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
42 |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
43 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
44 |
(*Nobody sends themselves messages*) |
2051 | 45 |
goal thy "!!evs. evs: yahalom lost ==> ALL A X. Says A A X ~: set_of_list evs"; |
2032 | 46 |
by (etac yahalom.induct 1); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
47 |
by (Auto_tac()); |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
48 |
qed_spec_mp "not_Says_to_self"; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
49 |
Addsimps [not_Says_to_self]; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
50 |
AddSEs [not_Says_to_self RSN (2, rev_notE)]; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
51 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
52 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
53 |
(** For reasoning about the encrypted portion of messages **) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
54 |
|
1995 | 55 |
(*Lets us treat YM4 using a similar argument as for the Fake case.*) |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
56 |
goal thy "!!evs. Says S A {|Crypt (shrK A) Y, X|} : set_of_list evs ==> \ |
2032 | 57 |
\ X : analz (sees lost Spy evs)"; |
58 |
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]) 1); |
|
59 |
qed "YM4_analz_sees_Spy"; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
60 |
|
2110 | 61 |
bind_thm ("YM4_parts_sees_Spy", |
62 |
YM4_analz_sees_Spy RS (impOfSubs analz_subset_parts)); |
|
63 |
||
2133 | 64 |
(*Relates to both YM4 and Oops*) |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
65 |
goal thy "!!evs. Says S A {|Crypt (shrK A) {|B, K, NA, NB|}, X|} \ |
1995 | 66 |
\ : set_of_list evs ==> \ |
2032 | 67 |
\ K : parts (sees lost Spy evs)"; |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
68 |
by (fast_tac (!claset addSEs partsEs |
2032 | 69 |
addSDs [Says_imp_sees_Spy RS parts.Inj]) 1); |
2110 | 70 |
qed "YM4_Key_parts_sees_Spy"; |
71 |
||
72 |
(*We instantiate the variable to "lost". Leaving it as a Var makes proofs |
|
73 |
harder: the simplifier does less.*) |
|
74 |
val parts_Fake_tac = |
|
75 |
forw_inst_tac [("lost","lost")] YM4_parts_sees_Spy 6 THEN |
|
76 |
forw_inst_tac [("lost","lost")] YM4_Key_parts_sees_Spy 7; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
77 |
|
2110 | 78 |
(*For proving the easier theorems about X ~: parts (sees lost Spy evs) *) |
79 |
fun parts_induct_tac i = SELECT_GOAL |
|
80 |
(DETERM (etac yahalom.induct 1 THEN parts_Fake_tac THEN |
|
2170 | 81 |
(*Fake message*) |
82 |
TRY (best_tac (!claset addDs [impOfSubs analz_subset_parts, |
|
83 |
impOfSubs Fake_parts_insert] |
|
2110 | 84 |
addss (!simpset)) 2)) THEN |
85 |
(*Base case*) |
|
86 |
fast_tac (!claset addss (!simpset)) 1 THEN |
|
87 |
ALLGOALS Asm_simp_tac) i; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
88 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
89 |
|
2032 | 90 |
(** Theorems of the form X ~: parts (sees lost Spy evs) imply that NOBODY |
2013 | 91 |
sends messages containing X! **) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
92 |
|
2133 | 93 |
(*Spy never sees another agent's shared key! (unless it's lost at start)*) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
94 |
goal thy |
2133 | 95 |
"!!evs. evs : yahalom lost \ |
96 |
\ ==> (Key (shrK A) : parts (sees lost Spy evs)) = (A : lost)"; |
|
2110 | 97 |
by (parts_induct_tac 1); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
98 |
by (Auto_tac()); |
2133 | 99 |
qed "Spy_see_shrK"; |
100 |
Addsimps [Spy_see_shrK]; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
101 |
|
2133 | 102 |
goal thy |
103 |
"!!evs. evs : yahalom lost \ |
|
104 |
\ ==> (Key (shrK A) : analz (sees lost Spy evs)) = (A : lost)"; |
|
105 |
by (auto_tac(!claset addDs [impOfSubs analz_subset_parts], !simpset)); |
|
106 |
qed "Spy_analz_shrK"; |
|
107 |
Addsimps [Spy_analz_shrK]; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
108 |
|
2133 | 109 |
goal thy "!!A. [| Key (shrK A) : parts (sees lost Spy evs); \ |
110 |
\ evs : yahalom lost |] ==> A:lost"; |
|
111 |
by (fast_tac (!claset addDs [Spy_see_shrK]) 1); |
|
112 |
qed "Spy_see_shrK_D"; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
113 |
|
2133 | 114 |
bind_thm ("Spy_analz_shrK_D", analz_subset_parts RS subsetD RS Spy_see_shrK_D); |
115 |
AddSDs [Spy_see_shrK_D, Spy_analz_shrK_D]; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
116 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
117 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
118 |
(*** Future keys can't be seen or used! ***) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
119 |
|
2160 | 120 |
(*Nobody can have SEEN keys that will be generated in the future. *) |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
121 |
goal thy "!!i. evs : yahalom lost ==> \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
122 |
\ length evs <= i --> Key(newK i) ~: parts (sees lost Spy evs)"; |
2110 | 123 |
by (parts_induct_tac 1); |
2264
f298678bd54a
Weaking of injectivity assumptions for newK and newN:
paulson
parents:
2170
diff
changeset
|
124 |
by (REPEAT_FIRST (best_tac (!claset addEs [leD RS notE] |
f298678bd54a
Weaking of injectivity assumptions for newK and newN:
paulson
parents:
2170
diff
changeset
|
125 |
addDs [impOfSubs analz_subset_parts, |
2032 | 126 |
impOfSubs parts_insert_subset_Un, |
127 |
Suc_leD] |
|
128 |
addss (!simpset)))); |
|
2160 | 129 |
qed_spec_mp "new_keys_not_seen"; |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
130 |
Addsimps [new_keys_not_seen]; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
131 |
|
2160 | 132 |
(*Variant: old messages must contain old keys!*) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
133 |
goal thy |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
134 |
"!!evs. [| Says A B X : set_of_list evs; \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
135 |
\ Key (newK i) : parts {X}; \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
136 |
\ evs : yahalom lost \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
137 |
\ |] ==> i < length evs"; |
2032 | 138 |
by (rtac ccontr 1); |
139 |
by (dtac leI 1); |
|
140 |
by (fast_tac (!claset addSDs [new_keys_not_seen, Says_imp_sees_Spy] |
|
2013 | 141 |
addIs [impOfSubs parts_mono]) 1); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
142 |
qed "Says_imp_old_keys"; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
143 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
144 |
|
2133 | 145 |
(*Ready-made for the classical reasoner*) |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
146 |
goal thy "!!evs. [| Says A B {|Crypt K {|b,Key(newK(length evs)),na,nb|}, X|}\ |
2133 | 147 |
\ : set_of_list evs; evs : yahalom lost |] \ |
148 |
\ ==> R"; |
|
149 |
by (fast_tac (!claset addEs [Says_imp_old_keys RS less_irrefl] |
|
150 |
addss (!simpset addsimps [parts_insertI])) 1); |
|
151 |
qed "Says_too_new_key"; |
|
152 |
AddSEs [Says_too_new_key]; |
|
153 |
||
154 |
||
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
155 |
(*Nobody can have USED keys that will be generated in the future. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
156 |
...very like new_keys_not_seen*) |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
157 |
goal thy "!!i. evs : yahalom lost ==> \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
158 |
\ length evs <= i --> newK i ~: keysFor(parts(sees lost Spy evs))"; |
2110 | 159 |
by (parts_induct_tac 1); |
1995 | 160 |
(*YM1, YM2 and YM3*) |
161 |
by (EVERY (map (fast_tac (!claset addDs [Suc_leD] addss (!simpset))) [4,3,2])); |
|
2160 | 162 |
(*Fake and Oops: these messages send unknown (X) components*) |
163 |
by (EVERY |
|
164 |
(map (fast_tac |
|
2170 | 165 |
(!claset addDs [impOfSubs analz_subset_parts, |
166 |
impOfSubs (analz_subset_parts RS keysFor_mono), |
|
167 |
impOfSubs (parts_insert_subset_Un RS keysFor_mono), |
|
168 |
Suc_leD] |
|
2160 | 169 |
addss (!simpset))) [3,1])); |
170 |
(*YM4: if K was used then it had been seen, contradicting new_keys_not_seen*) |
|
171 |
by (fast_tac |
|
172 |
(!claset addSEs partsEs |
|
173 |
addSDs [Says_imp_sees_Spy RS parts.Inj] |
|
2032 | 174 |
addEs [new_keys_not_seen RSN(2,rev_notE)] |
2160 | 175 |
addDs [Suc_leD]) 1); |
176 |
qed_spec_mp "new_keys_not_used"; |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
177 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
178 |
bind_thm ("new_keys_not_analzd", |
2032 | 179 |
[analz_subset_parts RS keysFor_mono, |
180 |
new_keys_not_used] MRS contra_subsetD); |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
181 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
182 |
Addsimps [new_keys_not_used, new_keys_not_analzd]; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
183 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
184 |
|
2133 | 185 |
(*Describes the form of K when the Server sends this message. Useful for |
186 |
Oops as well as main secrecy property.*) |
|
2110 | 187 |
goal thy |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
188 |
"!!evs. [| Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
189 |
\ {|Crypt (shrK A) {|Agent B, K, NA, NB|}, X|} : set_of_list evs; \ |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
190 |
\ evs : yahalom lost |] \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
191 |
\ ==> EX i. K = Key(newK i)"; |
2133 | 192 |
by (etac rev_mp 1); |
193 |
by (etac yahalom.induct 1); |
|
194 |
by (ALLGOALS (fast_tac (!claset addss (!simpset)))); |
|
195 |
qed "Says_Server_message_form"; |
|
2110 | 196 |
|
197 |
||
198 |
(*For proofs involving analz. We again instantiate the variable to "lost".*) |
|
199 |
val analz_Fake_tac = |
|
2133 | 200 |
forw_inst_tac [("lost","lost")] YM4_analz_sees_Spy 6 THEN |
201 |
forw_inst_tac [("lost","lost")] Says_Server_message_form 7 THEN |
|
202 |
assume_tac 7 THEN Full_simp_tac 7 THEN |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
203 |
REPEAT ((etac exE ORELSE' hyp_subst_tac) 7); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
204 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
205 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
206 |
(**** |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
207 |
The following is to prove theorems of the form |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
208 |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
209 |
Key K : analz (insert (Key (newK i)) (sees lost Spy evs)) ==> |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
210 |
Key K : analz (sees lost Spy evs) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
211 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
212 |
A more general formula must be proved inductively. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
213 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
214 |
****) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
215 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
216 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
217 |
(*NOT useful in this form, but it says that session keys are not used |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
218 |
to encrypt messages containing other keys, in the actual protocol. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
219 |
We require that agents should behave like this subsequently also.*) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
220 |
goal thy |
2032 | 221 |
"!!evs. evs : yahalom lost ==> \ |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
222 |
\ (Crypt (newK i) X) : parts (sees lost Spy evs) & \ |
2032 | 223 |
\ Key K : parts {X} --> Key K : parts (sees lost Spy evs)"; |
224 |
by (etac yahalom.induct 1); |
|
2110 | 225 |
by parts_Fake_tac; |
2060 | 226 |
by (ALLGOALS Asm_simp_tac); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
227 |
(*Deals with Faked messages*) |
2110 | 228 |
by (best_tac (!claset addSEs partsEs |
229 |
addDs [impOfSubs parts_insert_subset_Un] |
|
230 |
addss (!simpset)) 2); |
|
1995 | 231 |
(*Base case*) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
232 |
by (Auto_tac()); |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
233 |
result(); |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
234 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
235 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
236 |
(** Session keys are not used to encrypt other session keys **) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
237 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
238 |
goal thy |
2032 | 239 |
"!!evs. evs : yahalom lost ==> \ |
240 |
\ ALL K E. (Key K : analz (Key``(newK``E) Un (sees lost Spy evs))) = \ |
|
241 |
\ (K : newK``E | Key K : analz (sees lost Spy evs))"; |
|
242 |
by (etac yahalom.induct 1); |
|
2110 | 243 |
by analz_Fake_tac; |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
244 |
by (REPEAT_FIRST (resolve_tac [allI, analz_image_newK_lemma])); |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
245 |
by (ALLGOALS (*Takes 11 secs*) |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
246 |
(asm_simp_tac |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
247 |
(!simpset addsimps [Un_assoc RS sym, |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
248 |
insert_Key_singleton, insert_Key_image, pushKey_newK] |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
249 |
setloop split_tac [expand_if]))); |
2133 | 250 |
(*YM4, Fake*) |
251 |
by (EVERY (map spy_analz_tac [4, 2])); |
|
252 |
(*Oops, YM3, Base*) |
|
2110 | 253 |
by (REPEAT (fast_tac (!claset addIs [image_eqI] addss (!simpset)) 1)); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
254 |
qed_spec_mp "analz_image_newK"; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
255 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
256 |
goal thy |
2032 | 257 |
"!!evs. evs : yahalom lost ==> \ |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
258 |
\ Key K : analz (insert (Key(newK i)) (sees lost Spy evs)) = \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
259 |
\ (K = newK i | Key K : analz (sees lost Spy evs))"; |
2133 | 260 |
by (asm_simp_tac (HOL_ss addsimps [analz_image_newK, |
2032 | 261 |
insert_Key_singleton]) 1); |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
262 |
by (Fast_tac 1); |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
263 |
qed "analz_insert_Key_newK"; |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
264 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
265 |
|
2110 | 266 |
(*** The Key K uniquely identifies the Server's message. **) |
267 |
||
268 |
goal thy |
|
269 |
"!!evs. evs : yahalom lost ==> \ |
|
2133 | 270 |
\ EX A' B' NA' NB' X'. ALL A B NA NB X. \ |
2110 | 271 |
\ Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
272 |
\ {|Crypt (shrK A) {|Agent B, Key K, NA, NB|}, X|} \ |
2133 | 273 |
\ : set_of_list evs --> A=A' & B=B' & NA=NA' & NB=NB' & X=X'"; |
2110 | 274 |
by (etac yahalom.induct 1); |
275 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps [all_conj_distrib]))); |
|
276 |
by (Step_tac 1); |
|
2133 | 277 |
by (ex_strip_tac 2); |
278 |
by (Fast_tac 2); |
|
2110 | 279 |
(*Remaining case: YM3*) |
280 |
by (expand_case_tac "K = ?y" 1); |
|
281 |
by (REPEAT (ares_tac [refl,exI,impI,conjI] 2)); |
|
282 |
(*...we assume X is a very new message, and handle this case by contradiction*) |
|
2133 | 283 |
by (Fast_tac 1); (*uses Says_too_new_key*) |
2110 | 284 |
val lemma = result(); |
285 |
||
286 |
goal thy |
|
287 |
"!!evs. [| Says Server A \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
288 |
\ {|Crypt (shrK A) {|Agent B, Key K, NA, NB|}, X|} \ |
2110 | 289 |
\ : set_of_list evs; \ |
290 |
\ Says Server A' \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
291 |
\ {|Crypt (shrK A') {|Agent B', Key K, NA', NB'|}, X'|} \ |
2110 | 292 |
\ : set_of_list evs; \ |
293 |
\ evs : yahalom lost |] \ |
|
294 |
\ ==> A=A' & B=B' & NA=NA' & NB=NB'"; |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
295 |
by (prove_unique_tac lemma 1); |
2110 | 296 |
qed "unique_session_keys"; |
297 |
||
298 |
||
299 |
(*If the encrypted message appears then it originated with the Server*) |
|
300 |
goal thy |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
301 |
"!!evs. [| Crypt (shrK A) {|Agent B, Key K, NA, NB|} \ |
2110 | 302 |
\ : parts (sees lost Spy evs); \ |
303 |
\ A ~: lost; evs : yahalom lost |] \ |
|
304 |
\ ==> Says Server A \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
305 |
\ {|Crypt (shrK A) {|Agent B, Key K, NA, NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
306 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2110 | 307 |
\ : set_of_list evs"; |
308 |
by (etac rev_mp 1); |
|
309 |
by (parts_induct_tac 1); |
|
2322 | 310 |
qed "A_trusts_YM3"; |
2110 | 311 |
|
312 |
||
313 |
(** Crucial secrecy property: Spy does not see the keys sent in msg YM3 **) |
|
2013 | 314 |
|
315 |
goal thy |
|
2133 | 316 |
"!!evs. [| A ~: lost; B ~: lost; evs : yahalom lost |] \ |
2051 | 317 |
\ ==> Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
318 |
\ {|Crypt (shrK A) {|Agent B, Key K, NA, NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
319 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2110 | 320 |
\ : set_of_list evs --> \ |
321 |
\ Says A Spy {|NA, NB, Key K|} ~: set_of_list evs --> \ |
|
2051 | 322 |
\ Key K ~: analz (sees lost Spy evs)"; |
2032 | 323 |
by (etac yahalom.induct 1); |
2110 | 324 |
by analz_Fake_tac; |
2013 | 325 |
by (ALLGOALS |
326 |
(asm_simp_tac |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
327 |
(!simpset addsimps [not_parts_not_analz, analz_insert_Key_newK] |
2013 | 328 |
setloop split_tac [expand_if]))); |
329 |
(*YM3*) |
|
2133 | 330 |
by (Fast_tac 2); (*uses Says_too_new_key*) |
331 |
(*OR4, Fake*) |
|
2377 | 332 |
by (REPEAT_FIRST spy_analz_tac); |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
333 |
(*Oops*) |
2110 | 334 |
by (fast_tac (!claset delrules [disjE] |
2170 | 335 |
addDs [unique_session_keys] |
336 |
addss (!simpset)) 1); |
|
2110 | 337 |
val lemma = result() RS mp RS mp RSN(2,rev_notE); |
2013 | 338 |
|
339 |
||
340 |
(*Final version: Server's message in the most abstract form*) |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
341 |
goal thy |
2110 | 342 |
"!!evs. [| Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
343 |
\ {|Crypt (shrK A) {|Agent B, K, NA, NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
344 |
\ Crypt (shrK B) {|Agent A, K|}|} : set_of_list evs; \ |
2110 | 345 |
\ Says A Spy {|NA, NB, K|} ~: set_of_list evs; \ |
346 |
\ A ~: lost; B ~: lost; evs : yahalom lost |] ==> \ |
|
2032 | 347 |
\ K ~: analz (sees lost Spy evs)"; |
2013 | 348 |
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1); |
349 |
by (fast_tac (!claset addSEs [lemma]) 1); |
|
2032 | 350 |
qed "Spy_not_see_encrypted_key"; |
2001 | 351 |
|
352 |
||
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
353 |
goal thy |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
354 |
"!!evs. [| C ~: {A,B,Server}; \ |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
355 |
\ Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
356 |
\ {|Crypt (shrK A) {|Agent B, K, NA, NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
357 |
\ Crypt (shrK B) {|Agent A, K|}|} : set_of_list evs; \ |
2110 | 358 |
\ Says A Spy {|NA, NB, K|} ~: set_of_list evs; \ |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
359 |
\ A ~: lost; B ~: lost; evs : yahalom lost |] ==> \ |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
360 |
\ K ~: analz (sees lost C evs)"; |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
361 |
by (rtac (subset_insertI RS sees_mono RS analz_mono RS contra_subsetD) 1); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
362 |
by (rtac (sees_lost_agent_subset_sees_Spy RS analz_mono RS contra_subsetD) 1); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
363 |
by (FIRSTGOAL (rtac Spy_not_see_encrypted_key)); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
364 |
by (REPEAT_FIRST (fast_tac (!claset addIs [yahalom_mono RS subsetD]))); |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
365 |
qed "Agent_not_see_encrypted_key"; |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
366 |
|
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
367 |
|
2110 | 368 |
(*** Security Guarantee for B upon receiving YM4 ***) |
2013 | 369 |
|
2110 | 370 |
(*B knows, by the first part of A's message, that the Server distributed |
371 |
the key for A and B. But this part says nothing about nonces.*) |
|
2001 | 372 |
goal thy |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
373 |
"!!evs. [| Crypt (shrK B) {|Agent A, Key K|} : parts (sees lost Spy evs); \ |
2051 | 374 |
\ B ~: lost; evs : yahalom lost |] \ |
2001 | 375 |
\ ==> EX NA NB. Says Server A \ |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
376 |
\ {|Crypt (shrK A) {|Agent B, Key K, \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
377 |
\ Nonce NA, Nonce NB|}, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
378 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2013 | 379 |
\ : set_of_list evs"; |
2032 | 380 |
by (etac rev_mp 1); |
2110 | 381 |
by (parts_induct_tac 1); |
382 |
(*YM3*) |
|
383 |
by (Fast_tac 1); |
|
384 |
qed "B_trusts_YM4_shrK"; |
|
385 |
||
2133 | 386 |
|
387 |
(*** General properties of nonces ***) |
|
388 |
||
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
389 |
goal thy "!!evs. evs : yahalom lost ==> \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
390 |
\ length evs <= i --> \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
391 |
\ Nonce (newN i) ~: parts (sees lost Spy evs)"; |
2160 | 392 |
by (parts_induct_tac 1); |
393 |
by (REPEAT_FIRST (fast_tac (!claset |
|
394 |
addSEs partsEs |
|
395 |
addSDs [Says_imp_sees_Spy RS parts.Inj] |
|
2269 | 396 |
addEs [leD RS notE] |
397 |
addDs [impOfSubs analz_subset_parts, |
|
2160 | 398 |
impOfSubs parts_insert_subset_Un, |
399 |
Suc_leD] |
|
400 |
addss (!simpset)))); |
|
401 |
qed_spec_mp "new_nonces_not_seen"; |
|
2133 | 402 |
Addsimps [new_nonces_not_seen]; |
403 |
||
2160 | 404 |
(*Variant: old messages must contain old nonces!*) |
2133 | 405 |
goal thy |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
406 |
"!!evs. [| Says A B X : set_of_list evs; \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
407 |
\ Nonce (newN i) : parts {X}; \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
408 |
\ evs : yahalom lost \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
409 |
\ |] ==> i < length evs"; |
2133 | 410 |
by (rtac ccontr 1); |
411 |
by (dtac leI 1); |
|
412 |
by (fast_tac (!claset addSDs [new_nonces_not_seen, Says_imp_sees_Spy] |
|
413 |
addIs [impOfSubs parts_mono]) 1); |
|
414 |
qed "Says_imp_old_nonces"; |
|
415 |
||
416 |
||
417 |
(** The Nonce NB uniquely identifies B's message. **) |
|
418 |
||
419 |
val nonce_not_seen_now = le_refl RSN (2, new_nonces_not_seen) RSN (2,rev_notE); |
|
420 |
||
421 |
goal thy |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
422 |
"!!evs. evs : yahalom lost ==> \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
423 |
\ EX NA' A' B'. ALL NA A B. \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
424 |
\ Crypt (shrK B) {|Agent A, Nonce NA, NB|} : parts(sees lost Spy evs) \ |
2133 | 425 |
\ --> B ~: lost --> NA = NA' & A = A' & B = B'"; |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
426 |
by (etac yahalom.induct 1 THEN parts_Fake_tac); |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
427 |
(*Fake: the tactic in parts_induct_tac works, but takes 4 times longer*) |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
428 |
by (REPEAT (etac exE 2) THEN |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
429 |
best_tac (!claset addSIs [exI] |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
430 |
addDs [impOfSubs Fake_parts_insert] |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
431 |
addss (!simpset)) 2); |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
432 |
(*Base case*) |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
433 |
by (fast_tac (!claset addss (!simpset)) 1); |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
434 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps [all_conj_distrib]))); |
2133 | 435 |
(*YM2: creation of new Nonce. Move assertion into global context*) |
436 |
by (expand_case_tac "NB = ?y" 1); |
|
437 |
by (fast_tac (!claset addSEs (nonce_not_seen_now::partsEs)) 1); |
|
438 |
val lemma = result(); |
|
439 |
||
2110 | 440 |
goal thy |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
441 |
"!!evs.[| Crypt (shrK B) {|Agent A, Nonce NA, NB|} \ |
2133 | 442 |
\ : parts (sees lost Spy evs); \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
443 |
\ Crypt (shrK B') {|Agent A', Nonce NA', NB|} \ |
2133 | 444 |
\ : parts (sees lost Spy evs); \ |
445 |
\ evs : yahalom lost; B ~: lost; B' ~: lost |] \ |
|
446 |
\ ==> NA' = NA & A' = A & B' = B"; |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
447 |
by (prove_unique_tac lemma 1); |
2133 | 448 |
qed "unique_NB"; |
449 |
||
2377 | 450 |
(*OLD VERSION |
2133 | 451 |
fun lost_tac s = |
452 |
case_tac ("(" ^ s ^ ") : lost") THEN' |
|
453 |
SELECT_GOAL |
|
454 |
(REPEAT_DETERM (dtac (Says_imp_sees_Spy RS analz.Inj) 1) THEN |
|
455 |
REPEAT_DETERM (etac MPair_analz 1) THEN |
|
456 |
dres_inst_tac [("A", s)] Crypt_Spy_analz_lost 1 THEN |
|
457 |
assume_tac 1 THEN Fast_tac 1); |
|
2377 | 458 |
*) |
2133 | 459 |
|
460 |
fun lost_tac s = |
|
461 |
case_tac ("(" ^ s ^ ") : lost") THEN' |
|
462 |
SELECT_GOAL |
|
463 |
(REPEAT_DETERM (dtac (Says_imp_sees_Spy RS analz.Inj) 1) THEN |
|
464 |
REPEAT_DETERM (etac MPair_analz 1) THEN |
|
465 |
THEN_BEST_FIRST |
|
466 |
(dres_inst_tac [("A", s)] Crypt_Spy_analz_lost 1 THEN assume_tac 1) |
|
2170 | 467 |
(has_fewer_prems 1, size_of_thm) |
468 |
(Step_tac 1)); |
|
2133 | 469 |
|
470 |
||
471 |
(*Variant useful for proving secrecy of NB*) |
|
472 |
goal thy |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
473 |
"!!evs.[| Says C D {|X, Crypt (shrK B) {|Agent A, Nonce NA, NB|}|} \ |
2133 | 474 |
\ : set_of_list evs; B ~: lost; \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
475 |
\ Says C' D' {|X', Crypt (shrK B') {|Agent A', Nonce NA', NB|}|} \ |
2133 | 476 |
\ : set_of_list evs; \ |
477 |
\ NB ~: analz (sees lost Spy evs); \ |
|
478 |
\ evs : yahalom lost |] \ |
|
479 |
\ ==> NA' = NA & A' = A & B' = B"; |
|
480 |
by (lost_tac "B'" 1); |
|
481 |
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS parts.Inj] |
|
482 |
addSEs [MPair_parts] |
|
483 |
addDs [unique_NB]) 1); |
|
484 |
qed "Says_unique_NB"; |
|
485 |
||
486 |
goal thy |
|
487 |
"!!evs. [| B ~: lost; evs : yahalom lost |] \ |
|
488 |
\ ==> Nonce NB ~: analz (sees lost Spy evs) --> \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
489 |
\ Crypt (shrK B) {|Agent A, Nonce NA, Nonce NB|} : parts (sees lost Spy evs) \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
490 |
\ --> Crypt (shrK B') {|Agent A', Nonce NB, NB'|} ~: parts (sees lost Spy evs)"; |
2133 | 491 |
by (etac yahalom.induct 1); |
492 |
by parts_Fake_tac; |
|
493 |
by (REPEAT_FIRST |
|
494 |
(rtac impI THEN' |
|
495 |
dtac (sees_subset_sees_Says RS analz_mono RS contra_subsetD) THEN' |
|
496 |
mp_tac)); |
|
497 |
by (best_tac (!claset addDs [impOfSubs analz_subset_parts, |
|
2170 | 498 |
impOfSubs Fake_parts_insert] |
499 |
addss (!simpset)) 2); |
|
2133 | 500 |
by (ALLGOALS Asm_simp_tac); |
501 |
by (fast_tac (!claset addss (!simpset)) 1); |
|
502 |
by (fast_tac (!claset addDs [Says_imp_sees_Spy RS analz.Inj] |
|
2170 | 503 |
addSIs [parts_insertI] |
2133 | 504 |
addSEs partsEs |
505 |
addEs [Says_imp_old_nonces RS less_irrefl] |
|
506 |
addss (!simpset)) 1); |
|
507 |
val no_nonce_YM1_YM2 = standard (result() RS mp RSN (2, rev_mp) RS notE); |
|
508 |
||
509 |
||
510 |
||
511 |
(**** Towards proving secrecy of Nonce NB ****) |
|
512 |
||
513 |
(*B knows, by the second part of A's message, that the Server distributed |
|
514 |
the key quoting nonce NB. This part says nothing about agent names. |
|
515 |
Secrecy of NB is crucial.*) |
|
516 |
goal thy |
|
517 |
"!!evs. evs : yahalom lost \ |
|
518 |
\ ==> Nonce NB ~: analz (sees lost Spy evs) --> \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
519 |
\ Crypt K (Nonce NB) : parts (sees lost Spy evs) --> \ |
2133 | 520 |
\ (EX A B NA. Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
521 |
\ {|Crypt (shrK A) {|Agent B, Key K, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
522 |
\ Nonce NA, Nonce NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
523 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2133 | 524 |
\ : set_of_list evs)"; |
525 |
by (etac yahalom.induct 1); |
|
526 |
by parts_Fake_tac; |
|
527 |
by (fast_tac (!claset addss (!simpset)) 1); |
|
528 |
by (REPEAT_FIRST |
|
529 |
(rtac impI THEN' |
|
530 |
dtac (sees_subset_sees_Says RS analz_mono RS contra_subsetD))); |
|
531 |
by (ALLGOALS Asm_simp_tac); |
|
532 |
(*Fake, YM3, YM4*) |
|
533 |
by (Fast_tac 2); |
|
534 |
by (fast_tac (!claset addSDs [impOfSubs Fake_parts_insert] |
|
535 |
addDs [impOfSubs analz_subset_parts] |
|
536 |
addss (!simpset)) 1); |
|
537 |
(*YM4*) |
|
538 |
by (Step_tac 1); |
|
539 |
by (lost_tac "A" 1); |
|
540 |
by (fast_tac (!claset addDs [Says_imp_sees_Spy RS parts.Inj RS parts.Fst RS |
|
2322 | 541 |
A_trusts_YM3]) 1); |
2133 | 542 |
val B_trusts_YM4_newK = result() RS mp RSN (2, rev_mp); |
543 |
||
544 |
||
545 |
(*This is the original version of the result above. But it is of little |
|
546 |
value because it assumes secrecy of K, which we cannot be assured of |
|
547 |
until we know that K is fresh -- which we do not know at the point this |
|
548 |
result is applied.*) |
|
549 |
goal thy |
|
550 |
"!!evs. evs : yahalom lost \ |
|
551 |
\ ==> Key K ~: analz (sees lost Spy evs) --> \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
552 |
\ Crypt K (Nonce NB) : parts (sees lost Spy evs) --> \ |
2110 | 553 |
\ (EX A B NA. Says Server A \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
554 |
\ {|Crypt (shrK A) {|Agent B, Key K, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
555 |
\ Nonce NA, Nonce NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
556 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2110 | 557 |
\ : set_of_list evs)"; |
2032 | 558 |
by (etac yahalom.induct 1); |
2110 | 559 |
by parts_Fake_tac; |
2001 | 560 |
by (fast_tac (!claset addss (!simpset)) 1); |
2110 | 561 |
by (TRYALL (rtac impI)); |
562 |
by (REPEAT_FIRST |
|
563 |
(dtac (sees_subset_sees_Says RS analz_mono RS contra_subsetD))); |
|
564 |
by (ALLGOALS Asm_simp_tac); |
|
565 |
(*Fake, YM3, YM4*) |
|
566 |
by (fast_tac (!claset addSDs [Crypt_Fake_parts_insert] |
|
2133 | 567 |
addDs [impOfSubs analz_subset_parts]) 1); |
2110 | 568 |
by (Fast_tac 1); |
569 |
(*YM4*) |
|
570 |
by (Step_tac 1); |
|
2133 | 571 |
by (lost_tac "A" 1); |
2110 | 572 |
by (fast_tac (!claset addDs [Says_imp_sees_Spy RS parts.Inj RS parts.Fst RS |
2322 | 573 |
A_trusts_YM3]) 1); |
2133 | 574 |
result() RS mp RSN (2, rev_mp); |
575 |
||
576 |
||
577 |
(*YM3 can only be triggered by YM2*) |
|
578 |
goal thy |
|
579 |
"!!evs. [| Says Server A \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
580 |
\ {|Crypt (shrK A) {|Agent B, k, na, nb|}, X|} : set_of_list evs; \ |
2133 | 581 |
\ evs : yahalom lost |] \ |
582 |
\ ==> EX B'. Says B' Server \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
583 |
\ {| Agent B, Crypt (shrK B) {|Agent A, na, nb|} |} \ |
2133 | 584 |
\ : set_of_list evs"; |
585 |
by (etac rev_mp 1); |
|
586 |
by (etac yahalom.induct 1); |
|
587 |
by (ALLGOALS Asm_simp_tac); |
|
588 |
by (ALLGOALS Fast_tac); |
|
589 |
qed "Says_Server_imp_YM2"; |
|
590 |
||
591 |
||
592 |
(** Dedicated tactics for the nonce secrecy proofs **) |
|
593 |
||
594 |
val no_nonce_tac = SELECT_GOAL |
|
595 |
(REPEAT (resolve_tac [impI, notI] 1) THEN |
|
596 |
REPEAT (hyp_subst_tac 1) THEN |
|
597 |
etac (Says_imp_sees_Spy RS parts.Inj RS parts.Snd RS no_nonce_YM1_YM2) 1 |
|
598 |
THEN |
|
599 |
etac (Says_imp_sees_Spy RS parts.Inj RS parts.Snd) 4 |
|
600 |
THEN |
|
601 |
REPEAT_FIRST assume_tac); |
|
602 |
||
603 |
val not_analz_insert = subset_insertI RS analz_mono RS contra_subsetD; |
|
604 |
||
605 |
fun grind_tac i = |
|
606 |
SELECT_GOAL |
|
607 |
(REPEAT_FIRST |
|
608 |
(Safe_step_tac ORELSE' (dtac spec THEN' mp_tac) ORELSE' |
|
609 |
assume_tac ORELSE' |
|
610 |
depth_tac (!claset delrules [conjI] |
|
2377 | 611 |
addSIs [exI, analz_insertI, |
2170 | 612 |
impOfSubs (Un_upper2 RS analz_mono)]) 2)) i; |
2133 | 613 |
|
614 |
(*The only nonces that can be found with the help of session keys are |
|
615 |
those distributed as nonce NB by the Server. The form of the theorem |
|
616 |
recalls analz_image_newK, but it is much more complicated.*) |
|
617 |
goal thy |
|
618 |
"!!evs. evs : yahalom lost ==> \ |
|
619 |
\ ALL E. Nonce NB : analz (Key``(newK``E) Un (sees lost Spy evs)) --> \ |
|
620 |
\ (EX K: newK``E. EX A B na X. \ |
|
621 |
\ Says Server A \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
622 |
\ {|Crypt (shrK A) {|Agent B, Key K, na, Nonce NB|}, X|} \ |
2133 | 623 |
\ : set_of_list evs) | Nonce NB : analz (sees lost Spy evs)"; |
624 |
by (etac yahalom.induct 1); |
|
625 |
by analz_Fake_tac; |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
626 |
by (ALLGOALS (*22 seconds*) |
2133 | 627 |
(asm_simp_tac |
2454 | 628 |
(!simpset addsimps ([not_parts_not_analz, analz_image_newK, |
2170 | 629 |
insert_Key_singleton, insert_Key_image] |
630 |
@ pushes) |
|
2133 | 631 |
setloop split_tac [expand_if]))); |
632 |
(*Base*) |
|
633 |
by (fast_tac (!claset addss (!simpset)) 1); |
|
634 |
(*Fake*) (** LEVEL 4 **) |
|
635 |
by (spy_analz_tac 1); |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
636 |
(*YM1-YM3*) (*24 seconds*) |
2133 | 637 |
by (EVERY (map grind_tac [3,2,1])); |
638 |
(*Oops*) |
|
639 |
by (Full_simp_tac 2); |
|
640 |
by (simp_tac (!simpset addsimps [insert_Key_image]) 2); |
|
641 |
by (grind_tac 2); |
|
642 |
by (fast_tac (!claset delrules [bexI] |
|
2170 | 643 |
addDs [unique_session_keys] |
644 |
addss (!simpset)) 2); |
|
2133 | 645 |
(*YM4*) |
2454 | 646 |
(** LEVEL 10 **) |
2170 | 647 |
by (rtac (impI RS allI) 1); |
2377 | 648 |
by (dtac (impOfSubs Fake_analz_insert) 1 THEN etac synth.Inj 1); |
2133 | 649 |
by (eres_inst_tac [("P","Nonce NB : ?HH")] rev_mp 1); |
650 |
by (asm_simp_tac (!simpset addsimps [analz_image_newK] |
|
2170 | 651 |
setloop split_tac [expand_if]) 1); |
2454 | 652 |
(** LEVEL 14 **) |
2133 | 653 |
by (grind_tac 1); |
654 |
by (REPEAT (dtac not_analz_insert 1)); |
|
655 |
by (lost_tac "A" 1); |
|
2322 | 656 |
by (dtac (Says_imp_sees_Spy RS parts.Inj RS parts.Fst RS A_trusts_YM3) 1 |
2133 | 657 |
THEN REPEAT (assume_tac 1)); |
658 |
by (fast_tac (!claset delrules [allE, conjI] addSIs [bexI, exI]) 1); |
|
659 |
by (fast_tac (!claset delrules [conjI] |
|
2377 | 660 |
addIs [analz_insertI] |
2170 | 661 |
addss (!simpset)) 1); |
2133 | 662 |
val Nonce_secrecy = result() RS spec RSN (2, rev_mp) |> standard; |
663 |
||
664 |
||
665 |
(*Version required below: if NB can be decrypted using a session key then it |
|
666 |
was distributed with that key. The more general form above is required |
|
667 |
for the induction to carry through.*) |
|
668 |
goal thy |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
669 |
"!!evs. [| Says Server A \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
670 |
\ {|Crypt (shrK A) {|Agent B, Key (newK i), na, Nonce NB'|}, X|} \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
671 |
\ : set_of_list evs; \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
672 |
\ Nonce NB : analz (insert (Key (newK i)) (sees lost Spy evs)); \ |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2377
diff
changeset
|
673 |
\ evs : yahalom lost |] \ |
2133 | 674 |
\ ==> Nonce NB : analz (sees lost Spy evs) | NB = NB'"; |
675 |
by (asm_full_simp_tac (HOL_ss addsimps [insert_Key_singleton]) 1); |
|
676 |
by (dtac Nonce_secrecy 1 THEN assume_tac 1); |
|
677 |
by (fast_tac (!claset addDs [unique_session_keys] |
|
2170 | 678 |
addss (!simpset)) 1); |
2133 | 679 |
val single_Nonce_secrecy = result(); |
680 |
||
681 |
||
682 |
goal thy |
|
683 |
"!!evs. [| A ~: lost; B ~: lost; Spy: lost; evs : yahalom lost |] \ |
|
684 |
\ ==> Says B Server \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
685 |
\ {|Agent B, Crypt (shrK B) {|Agent A, Nonce NA, Nonce NB|}|} \ |
2133 | 686 |
\ : set_of_list evs --> \ |
687 |
\ (ALL k. Says A Spy {|Nonce NA, Nonce NB, k|} ~: set_of_list evs) --> \ |
|
688 |
\ Nonce NB ~: analz (sees lost Spy evs)"; |
|
689 |
by (etac yahalom.induct 1); |
|
690 |
by analz_Fake_tac; |
|
691 |
by (ALLGOALS |
|
692 |
(asm_simp_tac |
|
2377 | 693 |
(!simpset addsimps ([not_parts_not_analz, |
2133 | 694 |
analz_insert_Key_newK] @ pushes) |
695 |
setloop split_tac [expand_if]))); |
|
696 |
by (fast_tac (!claset addSIs [parts_insertI] |
|
697 |
addSEs partsEs |
|
698 |
addEs [Says_imp_old_nonces RS less_irrefl] |
|
699 |
addss (!simpset)) 2); |
|
2377 | 700 |
(*Proof of YM2*) (** LEVEL 4 **) |
2133 | 701 |
by (REPEAT (Safe_step_tac 2 ORELSE Fast_tac 2)); |
702 |
by (fast_tac (!claset addIs [parts_insertI] |
|
703 |
addSEs partsEs |
|
704 |
addEs [Says_imp_old_nonces RS less_irrefl] |
|
705 |
addss (!simpset)) 3); |
|
706 |
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj]) 2); |
|
707 |
(*Prove YM3 by showing that no NB can also be an NA*) |
|
708 |
by (REPEAT (Safe_step_tac 2 ORELSE no_nonce_tac 2)); |
|
709 |
by (deepen_tac (!claset addDs [Says_unique_NB]) 1 2); |
|
2377 | 710 |
(*Fake*) |
711 |
by (spy_analz_tac 1); |
|
712 |
(*YM4*) (** LEVEL 10 **) |
|
2133 | 713 |
by (res_inst_tac [("x1","X")] (insert_commute RS ssubst) 1); |
714 |
by (simp_tac (!simpset setloop split_tac [expand_if]) 1); |
|
2377 | 715 |
by (SELECT_GOAL (REPEAT_FIRST (spy_analz_tac ORELSE' Safe_step_tac)) 1); |
716 |
(** LEVEL 13 **) |
|
2133 | 717 |
by (lost_tac "Aa" 1); |
2322 | 718 |
by (dtac (Says_imp_sees_Spy RS parts.Inj RS parts.Fst RS A_trusts_YM3) 1); |
2133 | 719 |
by (forward_tac [Says_Server_message_form] 3); |
720 |
by (forward_tac [Says_Server_imp_YM2] 4); |
|
721 |
by (REPEAT_FIRST ((eresolve_tac [asm_rl, bexE, exE, disjE]))); |
|
722 |
by (Full_simp_tac 1); |
|
2377 | 723 |
by (REPEAT_FIRST hyp_subst_tac); |
2133 | 724 |
(** LEVEL 20 **) |
725 |
by (lost_tac "Ba" 1); |
|
2170 | 726 |
by (dtac (Says_imp_sees_Spy RS parts.Inj RS parts.Snd RS unique_NB) 1); |
2133 | 727 |
by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS parts.Inj] |
728 |
addSEs [MPair_parts]) 1); |
|
729 |
by (REPEAT (assume_tac 1 ORELSE Safe_step_tac 1)); |
|
2170 | 730 |
by (dtac Spy_not_see_encrypted_key 1); |
2133 | 731 |
by (REPEAT (assume_tac 1 ORELSE Fast_tac 1)); |
732 |
by (spy_analz_tac 1); |
|
2377 | 733 |
(*Oops case*) (** LEVEL 27 **) |
2133 | 734 |
by (full_simp_tac (!simpset addsimps [all_conj_distrib]) 1); |
735 |
by (step_tac (!claset delrules [disjE, conjI]) 1); |
|
736 |
by (forward_tac [Says_Server_imp_YM2] 1 THEN assume_tac 1 THEN etac exE 1); |
|
737 |
by (expand_case_tac "NB = NBa" 1); |
|
738 |
by (deepen_tac (!claset addDs [Says_unique_NB]) 1 1); |
|
2170 | 739 |
by (rtac conjI 1); |
2133 | 740 |
by (no_nonce_tac 1); |
2377 | 741 |
(** LEVEL 34 **) |
2133 | 742 |
by (thin_tac "?PP|?QQ" 1); (*subsumption!*) |
743 |
by (fast_tac (!claset addSDs [single_Nonce_secrecy]) 1); |
|
744 |
val Spy_not_see_NB = result() RSN(2,rev_mp) RSN(2,rev_mp) |> standard; |
|
745 |
||
2001 | 746 |
|
2110 | 747 |
(*What can B deduce from receipt of YM4? Note how the two components of |
748 |
the message contribute to a single conclusion about the Server's message. |
|
749 |
It's annoying that the "Says A Spy" assumption must quantify over |
|
2133 | 750 |
ALL POSSIBLE keys instead of our particular K (though at least the |
751 |
nonces are forced to agree with NA and NB). *) |
|
2001 | 752 |
goal thy |
2133 | 753 |
"!!evs. [| Says B Server \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
754 |
\ {|Agent B, Crypt (shrK B) {|Agent A, Nonce NA, Nonce NB|}|} \ |
2133 | 755 |
\ : set_of_list evs; \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
756 |
\ Says A' B {|Crypt (shrK B) {|Agent A, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
757 |
\ Crypt K (Nonce NB)|} : set_of_list evs; \ |
2133 | 758 |
\ ALL k. Says A Spy {|Nonce NA, Nonce NB, k|} ~: set_of_list evs; \ |
759 |
\ A ~: lost; B ~: lost; Spy: lost; evs : yahalom lost |] \ |
|
760 |
\ ==> Says Server A \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
761 |
\ {|Crypt (shrK A) {|Agent B, Key K, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
762 |
\ Nonce NA, Nonce NB|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2269
diff
changeset
|
763 |
\ Crypt (shrK B) {|Agent A, Key K|}|} \ |
2001 | 764 |
\ : set_of_list evs"; |
2133 | 765 |
by (forward_tac [Spy_not_see_NB] 1 THEN REPEAT (assume_tac 1)); |
766 |
by (etac (Says_imp_sees_Spy RS parts.Inj RS MPair_parts) 1 THEN |
|
767 |
dtac B_trusts_YM4_shrK 1); |
|
2170 | 768 |
by (dtac B_trusts_YM4_newK 3); |
2110 | 769 |
by (REPEAT_FIRST (eresolve_tac [asm_rl, exE])); |
2133 | 770 |
by (forward_tac [Says_Server_imp_YM2] 1 THEN assume_tac 1); |
2170 | 771 |
by (dtac unique_session_keys 1 THEN REPEAT (assume_tac 1)); |
2133 | 772 |
by (deepen_tac (!claset addDs [Says_unique_NB] addss (!simpset)) 0 1); |
2322 | 773 |
qed "B_trusts_YM4"; |
2133 | 774 |