1941
|
1 |
(* Title: HOL/Auth/OtwayRees
|
|
2 |
ID: $Id$
|
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
|
4 |
Copyright 1996 University of Cambridge
|
|
5 |
|
|
6 |
Inductive relation "otway" for the Otway-Rees protocol.
|
|
7 |
|
|
8 |
From page 244 of
|
|
9 |
Burrows, Abadi and Needham. A Logic of Authentication.
|
|
10 |
Proc. Royal Soc. 426 (1989)
|
|
11 |
*)
|
|
12 |
|
|
13 |
open OtwayRees;
|
|
14 |
|
|
15 |
proof_timing:=true;
|
|
16 |
HOL_quantifiers := false;
|
|
17 |
|
|
18 |
(**** Inductive proofs about otway ****)
|
|
19 |
|
|
20 |
(*The Enemy can see more than anybody else, except for their initial state*)
|
|
21 |
goal thy
|
|
22 |
"!!evs. evs : otway ==> \
|
|
23 |
\ sees A evs <= initState A Un sees Enemy evs";
|
|
24 |
be otway.induct 1;
|
|
25 |
by (ALLGOALS (fast_tac (!claset addDs [sees_Says_subset_insert RS subsetD]
|
|
26 |
addss (!simpset))));
|
|
27 |
qed "sees_agent_subset_sees_Enemy";
|
|
28 |
|
|
29 |
|
|
30 |
(*Nobody sends themselves messages*)
|
|
31 |
goal thy "!!evs. evs : otway ==> ALL A X. Says A A X ~: set_of_list evs";
|
|
32 |
be otway.induct 1;
|
|
33 |
by (Auto_tac());
|
|
34 |
qed_spec_mp "not_Says_to_self";
|
|
35 |
Addsimps [not_Says_to_self];
|
|
36 |
AddSEs [not_Says_to_self RSN (2, rev_notE)];
|
|
37 |
|
|
38 |
goal thy "!!evs. evs : otway ==> Notes A X ~: set_of_list evs";
|
|
39 |
be otway.induct 1;
|
|
40 |
by (Auto_tac());
|
|
41 |
qed "not_Notes";
|
|
42 |
Addsimps [not_Notes];
|
|
43 |
AddSEs [not_Notes RSN (2, rev_notE)];
|
|
44 |
|
|
45 |
|
|
46 |
(** For reasoning about the encrypted portion of messages **)
|
|
47 |
|
|
48 |
goal thy "!!evs. (Says A' B {|N, Agent A, Agent B, X|}) : set_of_list evs ==> \
|
|
49 |
\ X : analz (sees Enemy evs)";
|
|
50 |
by (fast_tac (!claset addSDs [Says_imp_sees_Enemy RS analz.Inj]) 1);
|
|
51 |
qed "OR2_analz_sees_Enemy";
|
|
52 |
|
|
53 |
goal thy "!!evs. (Says S B {|N, X, X'|}) : set_of_list evs ==> \
|
|
54 |
\ X : analz (sees Enemy evs)";
|
|
55 |
by (fast_tac (!claset addSDs [Says_imp_sees_Enemy RS analz.Inj]) 1);
|
|
56 |
qed "OR4_analz_sees_Enemy";
|
|
57 |
|
|
58 |
goal thy "!!evs. (Says B' A {|N, Crypt {|N,K|} K'|}) : set_of_list evs ==> \
|
|
59 |
\ K : parts (sees Enemy evs)";
|
|
60 |
by (fast_tac (!claset addSEs partsEs
|
|
61 |
addSDs [Says_imp_sees_Enemy RS parts.Inj]) 1);
|
|
62 |
qed "OR5_parts_sees_Enemy";
|
|
63 |
|
|
64 |
(*OR2_analz... and OR4_analz... let us treat those cases using the same
|
1964
|
65 |
argument as for the Fake case. This is possible for most, but not all,
|
|
66 |
proofs: Fake does not invent new nonces (as in OR2), and of course Fake
|
|
67 |
messages originate from the Enemy. *)
|
|
68 |
|
1941
|
69 |
val OR2_OR4_tac =
|
|
70 |
dtac (OR2_analz_sees_Enemy RS (impOfSubs analz_subset_parts)) 4 THEN
|
|
71 |
dtac (OR4_analz_sees_Enemy RS (impOfSubs analz_subset_parts)) 6;
|
|
72 |
|
|
73 |
|
|
74 |
(*** Shared keys are not betrayed ***)
|
|
75 |
|
1964
|
76 |
(*Enemy never sees another agent's shared key! (unless it is leaked at start)*)
|
1941
|
77 |
goal thy
|
1964
|
78 |
"!!evs. [| evs : otway; A ~= Enemy; A ~: Friend``leaked |] ==> \
|
1941
|
79 |
\ Key (shrK A) ~: parts (sees Enemy evs)";
|
|
80 |
be otway.induct 1;
|
|
81 |
by OR2_OR4_tac;
|
|
82 |
by (Auto_tac());
|
|
83 |
(*Deals with Fake message*)
|
|
84 |
by (best_tac (!claset addDs [impOfSubs analz_subset_parts,
|
|
85 |
impOfSubs Fake_parts_insert]) 1);
|
|
86 |
qed "Enemy_not_see_shrK";
|
|
87 |
|
|
88 |
bind_thm ("Enemy_not_analz_shrK",
|
|
89 |
[analz_subset_parts, Enemy_not_see_shrK] MRS contra_subsetD);
|
|
90 |
|
|
91 |
Addsimps [Enemy_not_see_shrK,
|
|
92 |
not_sym RSN (2, Enemy_not_see_shrK),
|
|
93 |
Enemy_not_analz_shrK,
|
|
94 |
not_sym RSN (2, Enemy_not_analz_shrK)];
|
|
95 |
|
1964
|
96 |
(*We go to some trouble to preserve R in the 3rd and 4th subgoals
|
|
97 |
As usual fast_tac cannot be used because it uses the equalities too soon*)
|
1941
|
98 |
val major::prems =
|
1964
|
99 |
goal thy "[| Key (shrK A) : parts (sees Enemy evs); \
|
|
100 |
\ evs : otway; \
|
|
101 |
\ A=Enemy ==> R; \
|
|
102 |
\ !!i. [| A = Friend i; i: leaked |] ==> R \
|
1941
|
103 |
\ |] ==> R";
|
|
104 |
br ccontr 1;
|
|
105 |
br ([major, Enemy_not_see_shrK] MRS rev_notE) 1;
|
1964
|
106 |
br notI 3;
|
|
107 |
be imageE 3;
|
1941
|
108 |
by (swap_res_tac prems 2);
|
1964
|
109 |
by (swap_res_tac prems 3 THEN ALLGOALS (fast_tac (!claset addIs prems)));
|
1941
|
110 |
qed "Enemy_see_shrK_E";
|
|
111 |
|
|
112 |
bind_thm ("Enemy_analz_shrK_E",
|
|
113 |
analz_subset_parts RS subsetD RS Enemy_see_shrK_E);
|
|
114 |
|
|
115 |
(*Classical reasoner doesn't need the not_sym versions (with swapped ~=) *)
|
|
116 |
AddSEs [Enemy_see_shrK_E, Enemy_analz_shrK_E];
|
|
117 |
|
|
118 |
|
|
119 |
(*** Future keys can't be seen or used! ***)
|
|
120 |
|
|
121 |
(*Nobody can have SEEN keys that will be generated in the future.
|
|
122 |
This has to be proved anew for each protocol description,
|
|
123 |
but should go by similar reasoning every time. Hardest case is the
|
|
124 |
standard Fake rule.
|
|
125 |
The length comparison, and Union over C, are essential for the
|
|
126 |
induction! *)
|
|
127 |
goal thy "!!evs. evs : otway ==> \
|
|
128 |
\ length evs <= length evs' --> \
|
|
129 |
\ Key (newK evs') ~: (UN C. parts (sees C evs))";
|
|
130 |
be otway.induct 1;
|
|
131 |
by OR2_OR4_tac;
|
|
132 |
(*auto_tac does not work here, as it performs safe_tac first*)
|
|
133 |
by (ALLGOALS Asm_simp_tac);
|
|
134 |
by (REPEAT_FIRST (best_tac (!claset addDs [impOfSubs analz_subset_parts,
|
|
135 |
impOfSubs parts_insert_subset_Un,
|
|
136 |
Suc_leD]
|
|
137 |
addss (!simpset))));
|
|
138 |
val lemma = result();
|
|
139 |
|
|
140 |
(*Variant needed for the main theorem below*)
|
|
141 |
goal thy
|
|
142 |
"!!evs. [| evs : otway; length evs <= length evs' |] ==> \
|
|
143 |
\ Key (newK evs') ~: parts (sees C evs)";
|
|
144 |
by (fast_tac (!claset addDs [lemma]) 1);
|
|
145 |
qed "new_keys_not_seen";
|
|
146 |
Addsimps [new_keys_not_seen];
|
|
147 |
|
|
148 |
(*Another variant: old messages must contain old keys!*)
|
|
149 |
goal thy
|
|
150 |
"!!evs. [| Says A B X : set_of_list evs; \
|
|
151 |
\ Key (newK evt) : parts {X}; \
|
|
152 |
\ evs : otway \
|
|
153 |
\ |] ==> length evt < length evs";
|
|
154 |
br ccontr 1;
|
|
155 |
by (fast_tac (!claset addSDs [new_keys_not_seen, Says_imp_sees_Enemy]
|
|
156 |
addIs [impOfSubs parts_mono, leI]) 1);
|
|
157 |
qed "Says_imp_old_keys";
|
|
158 |
|
|
159 |
|
|
160 |
(*Nobody can have USED keys that will be generated in the future.
|
|
161 |
...very like new_keys_not_seen*)
|
|
162 |
goal thy "!!evs. evs : otway ==> \
|
|
163 |
\ length evs <= length evs' --> \
|
|
164 |
\ newK evs' ~: keysFor (UN C. parts (sees C evs))";
|
|
165 |
be otway.induct 1;
|
|
166 |
by OR2_OR4_tac;
|
|
167 |
bd OR5_parts_sees_Enemy 7;
|
|
168 |
by (ALLGOALS Asm_simp_tac);
|
|
169 |
(*OR1 and OR3*)
|
|
170 |
by (EVERY (map (fast_tac (!claset addDs [Suc_leD] addss (!simpset))) [4,2]));
|
|
171 |
(*Fake, OR2, OR4: these messages send unknown (X) components*)
|
|
172 |
by (EVERY
|
|
173 |
(map
|
|
174 |
(best_tac
|
|
175 |
(!claset addSDs [newK_invKey]
|
|
176 |
addDs [impOfSubs (analz_subset_parts RS keysFor_mono),
|
|
177 |
impOfSubs (parts_insert_subset_Un RS keysFor_mono),
|
|
178 |
Suc_leD]
|
|
179 |
addEs [new_keys_not_seen RS not_parts_not_analz RSN(2,rev_notE)]
|
|
180 |
addss (!simpset)))
|
|
181 |
[3,2,1]));
|
|
182 |
(*OR5: dummy message*)
|
|
183 |
by (best_tac (!claset addSDs [newK_invKey]
|
|
184 |
addEs [new_keys_not_seen RSN(2,rev_notE)]
|
|
185 |
addIs [less_SucI, impOfSubs keysFor_mono]
|
|
186 |
addss (!simpset addsimps [le_def])) 1);
|
|
187 |
val lemma = result();
|
|
188 |
|
|
189 |
goal thy
|
|
190 |
"!!evs. [| evs : otway; length evs <= length evs' |] ==> \
|
|
191 |
\ newK evs' ~: keysFor (parts (sees C evs))";
|
|
192 |
by (fast_tac (!claset addSDs [lemma] addss (!simpset)) 1);
|
|
193 |
qed "new_keys_not_used";
|
|
194 |
|
|
195 |
bind_thm ("new_keys_not_analzd",
|
|
196 |
[analz_subset_parts RS keysFor_mono,
|
|
197 |
new_keys_not_used] MRS contra_subsetD);
|
|
198 |
|
|
199 |
Addsimps [new_keys_not_used, new_keys_not_analzd];
|
|
200 |
|
|
201 |
|
|
202 |
(** Lemmas concerning the form of items passed in messages **)
|
|
203 |
|
|
204 |
|
|
205 |
(****
|
|
206 |
The following is to prove theorems of the form
|
|
207 |
|
1964
|
208 |
Key K : analz (insert (Key (newK evt)) (sees Enemy evs)) ==>
|
|
209 |
Key K : analz (sees Enemy evs)
|
1941
|
210 |
|
|
211 |
A more general formula must be proved inductively.
|
|
212 |
|
|
213 |
****)
|
|
214 |
|
|
215 |
|
|
216 |
(*NOT useful in this form, but it says that session keys are not used
|
|
217 |
to encrypt messages containing other keys, in the actual protocol.
|
|
218 |
We require that agents should behave like this subsequently also.*)
|
|
219 |
goal thy
|
|
220 |
"!!evs. evs : otway ==> \
|
|
221 |
\ (Crypt X (newK evt)) : parts (sees Enemy evs) & \
|
|
222 |
\ Key K : parts {X} --> Key K : parts (sees Enemy evs)";
|
|
223 |
be otway.induct 1;
|
|
224 |
by OR2_OR4_tac;
|
|
225 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps pushes)));
|
|
226 |
(*Deals with Faked messages*)
|
|
227 |
by (best_tac (!claset addSEs partsEs
|
|
228 |
addDs [impOfSubs analz_subset_parts,
|
|
229 |
impOfSubs parts_insert_subset_Un]
|
1964
|
230 |
addss (!simpset)) 2);
|
|
231 |
(*Base case and OR5*)
|
|
232 |
by (Auto_tac());
|
1941
|
233 |
result();
|
|
234 |
|
|
235 |
|
|
236 |
(** Specialized rewriting for this proof **)
|
|
237 |
|
|
238 |
Delsimps [image_insert];
|
|
239 |
Addsimps [image_insert RS sym];
|
|
240 |
|
1964
|
241 |
Delsimps [image_Un];
|
|
242 |
Addsimps [image_Un RS sym];
|
|
243 |
|
1941
|
244 |
goal thy "insert (Key (newK x)) (sees A evs) = \
|
|
245 |
\ Key `` (newK``{x}) Un (sees A evs)";
|
|
246 |
by (Fast_tac 1);
|
|
247 |
val insert_Key_singleton = result();
|
|
248 |
|
|
249 |
goal thy "insert (Key (f x)) (Key``(f``E) Un C) = \
|
|
250 |
\ Key `` (f `` (insert x E)) Un C";
|
|
251 |
by (Fast_tac 1);
|
|
252 |
val insert_Key_image = result();
|
|
253 |
|
|
254 |
|
|
255 |
(*This lets us avoid analyzing the new message -- unless we have to!*)
|
|
256 |
(*NEEDED??*)
|
|
257 |
goal thy "synth (analz (sees Enemy evs)) <= \
|
|
258 |
\ synth (analz (sees Enemy (Says A B X # evs)))";
|
|
259 |
by (Simp_tac 1);
|
|
260 |
br (subset_insertI RS analz_mono RS synth_mono) 1;
|
|
261 |
qed "synth_analz_thin";
|
|
262 |
|
|
263 |
AddIs [impOfSubs synth_analz_thin];
|
|
264 |
|
|
265 |
|
|
266 |
|
|
267 |
(** Session keys are not used to encrypt other session keys **)
|
|
268 |
|
|
269 |
(*Could generalize this so that the X component doesn't have to be first
|
|
270 |
in the message?*)
|
|
271 |
val enemy_analz_tac =
|
|
272 |
SELECT_GOAL
|
|
273 |
(EVERY [REPEAT (resolve_tac [impI,notI] 1),
|
|
274 |
dtac (impOfSubs Fake_analz_insert) 1,
|
|
275 |
eresolve_tac [asm_rl, synth.Inj] 1,
|
|
276 |
Fast_tac 1,
|
|
277 |
Asm_full_simp_tac 1,
|
|
278 |
IF_UNSOLVED (deepen_tac (!claset addIs [impOfSubs analz_mono]) 0 1)
|
|
279 |
]);
|
|
280 |
|
|
281 |
|
|
282 |
(*Lemma for the trivial direction of the if-and-only-if*)
|
|
283 |
goal thy
|
1964
|
284 |
"!!evs. (Key K : analz (Key``nE Un sEe)) --> \
|
|
285 |
\ (K : nE | Key K : analz sEe) ==> \
|
|
286 |
\ (Key K : analz (Key``nE Un sEe)) = (K : nE | Key K : analz sEe)";
|
1941
|
287 |
by (fast_tac (!claset addSEs [impOfSubs analz_mono]) 1);
|
|
288 |
val lemma = result();
|
|
289 |
|
1964
|
290 |
|
1941
|
291 |
goal thy
|
|
292 |
"!!evs. evs : otway ==> \
|
1964
|
293 |
\ ALL K E. (Key K : analz (Key``(newK``E) Un (sees Enemy evs))) = \
|
|
294 |
\ (K : newK``E | Key K : analz (sees Enemy evs))";
|
1941
|
295 |
be otway.induct 1;
|
|
296 |
bd OR2_analz_sees_Enemy 4;
|
|
297 |
bd OR4_analz_sees_Enemy 6;
|
|
298 |
by (REPEAT_FIRST (resolve_tac [allI, lemma]));
|
1964
|
299 |
by (ALLGOALS (*Takes 35 secs*)
|
1941
|
300 |
(asm_simp_tac
|
|
301 |
(!simpset addsimps ([insert_Key_singleton, insert_Key_image, pushKey_newK]
|
|
302 |
@ pushes)
|
|
303 |
setloop split_tac [expand_if])));
|
|
304 |
(*OR4*)
|
|
305 |
by (enemy_analz_tac 5);
|
|
306 |
(*OR3*)
|
|
307 |
by (Fast_tac 4);
|
1964
|
308 |
(*OR2*) (** LEVEL 7 **)
|
1941
|
309 |
by (res_inst_tac [("x1","X"), ("y1", "{|?XX,?YY|}")]
|
|
310 |
(insert_commute RS ssubst) 3);
|
|
311 |
by (res_inst_tac [("x1","X"), ("y1", "{|?XX,?YY|}")]
|
|
312 |
(insert_commute RS ssubst) 3);
|
|
313 |
by (asm_simp_tac (!simpset setloop split_tac [expand_if]) 3);
|
|
314 |
by (enemy_analz_tac 3);
|
1964
|
315 |
(*Fake case*) (** LEVEL 11 **)
|
1941
|
316 |
by (res_inst_tac [("y1","X"), ("A1", "?G Un (?H::msg set)")]
|
|
317 |
(insert_commute RS ssubst) 2);
|
|
318 |
by (enemy_analz_tac 2);
|
|
319 |
(*Base case*)
|
|
320 |
by (fast_tac (!claset addIs [image_eqI] addss (!simpset)) 1);
|
|
321 |
qed_spec_mp "analz_image_newK";
|
|
322 |
|
|
323 |
|
|
324 |
goal thy
|
|
325 |
"!!evs. evs : otway ==> \
|
1964
|
326 |
\ Key K : analz (insert (Key (newK evt)) (sees Enemy evs)) = \
|
|
327 |
\ (K = newK evt | Key K : analz (sees Enemy evs))";
|
1941
|
328 |
by (asm_simp_tac (HOL_ss addsimps [pushKey_newK, analz_image_newK,
|
|
329 |
insert_Key_singleton]) 1);
|
|
330 |
by (Fast_tac 1);
|
|
331 |
qed "analz_insert_Key_newK";
|
|
332 |
|
|
333 |
|
|
334 |
(*Describes the form *and age* of K when the following message is sent*)
|
|
335 |
goal thy
|
|
336 |
"!!evs. [| Says Server B \
|
|
337 |
\ {|NA, Crypt {|NA, K|} (shrK A), \
|
|
338 |
\ Crypt {|NB, K|} (shrK B)|} : set_of_list evs; \
|
|
339 |
\ evs : otway |] \
|
|
340 |
\ ==> (EX evt:otway. K = Key(newK evt) & \
|
|
341 |
\ length evt < length evs) & \
|
|
342 |
\ (EX i. NA = Nonce i)";
|
|
343 |
be rev_mp 1;
|
|
344 |
be otway.induct 1;
|
|
345 |
by (ALLGOALS (fast_tac (!claset addIs [less_SucI] addss (!simpset))));
|
|
346 |
qed "Says_Server_message_form";
|
|
347 |
|
|
348 |
|
|
349 |
(*Crucial secrecy property: Enemy does not see the keys sent in msg OR3*)
|
|
350 |
goal thy
|
|
351 |
"!!evs. [| Says Server (Friend j) \
|
|
352 |
\ {|Ni, Crypt {|Ni, K|} (shrK (Friend i)), \
|
|
353 |
\ Crypt {|Nj, K|} (shrK (Friend j))|} : set_of_list evs; \
|
1964
|
354 |
\ i ~: leaked; j ~: leaked; evs : otway |] ==> \
|
|
355 |
\ K ~: analz (sees Enemy evs)";
|
1941
|
356 |
be rev_mp 1;
|
|
357 |
be otway.induct 1;
|
|
358 |
bd OR2_analz_sees_Enemy 4;
|
|
359 |
bd OR4_analz_sees_Enemy 6;
|
|
360 |
by (ALLGOALS Asm_simp_tac);
|
|
361 |
(*Next 3 steps infer that K has the form "Key (newK evs'" ... *)
|
|
362 |
by (REPEAT_FIRST (resolve_tac [conjI, impI]));
|
|
363 |
by (TRYALL (forward_tac [Says_Server_message_form] THEN' assume_tac));
|
|
364 |
by (REPEAT_FIRST (eresolve_tac [bexE, exE, conjE] ORELSE' hyp_subst_tac));
|
1964
|
365 |
by (ALLGOALS
|
1941
|
366 |
(asm_full_simp_tac
|
|
367 |
(!simpset addsimps ([analz_subset_parts RS contra_subsetD,
|
|
368 |
analz_insert_Key_newK] @ pushes)
|
|
369 |
setloop split_tac [expand_if])));
|
|
370 |
(*OR3*)
|
|
371 |
by (fast_tac (!claset addSEs [less_irrefl]) 3);
|
1964
|
372 |
(*Fake*) (** LEVEL 10 **)
|
1941
|
373 |
by (res_inst_tac [("y1","X"), ("x1", "Key ?K")] (insert_commute RS ssubst) 1);
|
|
374 |
by (enemy_analz_tac 1);
|
|
375 |
(*OR4*)
|
|
376 |
by (mp_tac 2);
|
|
377 |
by (enemy_analz_tac 2);
|
|
378 |
(*OR2*)
|
|
379 |
by (mp_tac 1);
|
|
380 |
by (res_inst_tac [("x1","X"), ("y1", "{|?XX,?YY|}")]
|
|
381 |
(insert_commute RS ssubst) 1);
|
|
382 |
by (asm_simp_tac (!simpset setloop split_tac [expand_if]) 1);
|
|
383 |
by (enemy_analz_tac 1);
|
|
384 |
qed "Enemy_not_see_encrypted_key";
|
1945
|
385 |
|
|
386 |
|
|
387 |
|
|
388 |
(*** Session keys are issued at most once, and identify the principals ***)
|
|
389 |
|
|
390 |
(** First, two lemmas for the Fake, OR2 and OR4 cases **)
|
|
391 |
|
|
392 |
goal thy
|
1964
|
393 |
"!!evs. [| X : synth (analz (sees Enemy evs)); \
|
|
394 |
\ Crypt X' (shrK C) : parts{X}; \
|
|
395 |
\ C ~= Enemy; C ~: Friend``leaked; evs : otway |] \
|
1945
|
396 |
\ ==> Crypt X' (shrK C) : parts (sees Enemy evs)";
|
|
397 |
by (best_tac (!claset addSEs [impOfSubs analz_subset_parts]
|
|
398 |
addDs [impOfSubs parts_insert_subset_Un]
|
|
399 |
addss (!simpset)) 1);
|
|
400 |
qed "Crypt_Fake_parts";
|
|
401 |
|
|
402 |
goal thy
|
|
403 |
"!!evs. [| Crypt X' K : parts (sees A evs); evs : otway |] \
|
|
404 |
\ ==> EX S S' Y. Says S S' Y : set_of_list evs & \
|
|
405 |
\ Crypt X' K : parts {Y}";
|
|
406 |
bd parts_singleton 1;
|
|
407 |
by (fast_tac (!claset addSDs [seesD] addss (!simpset)) 1);
|
|
408 |
qed "Crypt_parts_singleton";
|
|
409 |
|
|
410 |
fun ex_strip_tac i = REPEAT (ares_tac [exI, conjI] i) THEN assume_tac (i+1);
|
|
411 |
|
|
412 |
(*The Key K uniquely identifies a pair of senders in the message encrypted by
|
|
413 |
C, but if C=Enemy then he could send all sorts of nonsense.*)
|
|
414 |
goal thy
|
1964
|
415 |
"!!evs. evs : otway ==> \
|
|
416 |
\ EX A B. ALL C. \
|
|
417 |
\ C ~= Enemy & C ~: Friend``leaked --> \
|
1945
|
418 |
\ (ALL S S' X. Says S S' X : set_of_list evs --> \
|
|
419 |
\ (EX NA. Crypt {|NA, Key K|} (shrK C) : parts{X}) --> C=A | C=B)";
|
|
420 |
by (Simp_tac 1);
|
|
421 |
be otway.induct 1;
|
|
422 |
bd OR2_analz_sees_Enemy 4;
|
|
423 |
bd OR4_analz_sees_Enemy 6;
|
|
424 |
by (ALLGOALS
|
|
425 |
(asm_simp_tac (!simpset addsimps [all_conj_distrib, imp_conj_distrib])));
|
|
426 |
by (REPEAT_FIRST (etac exE));
|
|
427 |
(*OR4*)
|
|
428 |
by (ex_strip_tac 4);
|
|
429 |
by (fast_tac (!claset addSDs [synth.Inj RS Crypt_Fake_parts,
|
|
430 |
Crypt_parts_singleton]) 4);
|
|
431 |
(*OR3: Case split propagates some context to other subgoal...*)
|
|
432 |
(** LEVEL 8 **)
|
|
433 |
by (excluded_middle_tac "K = newK evsa" 3);
|
|
434 |
by (Asm_simp_tac 3);
|
|
435 |
by (REPEAT (ares_tac [exI] 3));
|
|
436 |
(*...we prove this case by contradiction: the key is too new!*)
|
|
437 |
by (fast_tac (!claset addIs [impOfSubs (subset_insertI RS parts_mono)]
|
|
438 |
addSEs partsEs
|
|
439 |
addEs [Says_imp_old_keys RS less_irrefl]
|
|
440 |
addss (!simpset)) 3);
|
|
441 |
(*OR2*) (** LEVEL 12 **)
|
|
442 |
by (ex_strip_tac 2);
|
|
443 |
by (res_inst_tac [("x1","X"), ("y1", "{|?XX,?YY|}")]
|
|
444 |
(insert_commute RS ssubst) 2);
|
|
445 |
by (Simp_tac 2);
|
|
446 |
by (fast_tac (!claset addSDs [synth.Inj RS Crypt_Fake_parts,
|
|
447 |
Crypt_parts_singleton]) 2);
|
|
448 |
(*Fake*) (** LEVEL 16 **)
|
|
449 |
by (ex_strip_tac 1);
|
|
450 |
by (fast_tac (!claset addSDs [Crypt_Fake_parts, Crypt_parts_singleton]) 1);
|
|
451 |
qed "unique_session_keys";
|
|
452 |
|
|
453 |
(*It seems strange but this theorem is NOT needed to prove the main result!*)
|