author | oheimb |
Wed, 12 Nov 1997 18:58:50 +0100 | |
changeset 4223 | f60e3d2c81d3 |
parent 4091 | 771b1f6422a8 |
child 4422 | 21238c9d363e |
permissions | -rw-r--r-- |
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 |
||
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
8 |
Version that encrypts Nonce NB |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
9 |
|
1941 | 10 |
From page 244 of |
11 |
Burrows, Abadi and Needham. A Logic of Authentication. |
|
12 |
Proc. Royal Soc. 426 (1989) |
|
13 |
*) |
|
14 |
||
15 |
open OtwayRees; |
|
16 |
||
17 |
proof_timing:=true; |
|
18 |
HOL_quantifiers := false; |
|
19 |
||
1996
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
20 |
|
2328 | 21 |
(*A "possibility property": there are traces that reach the end*) |
1996
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
22 |
goal thy |
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
23 |
"!!A B. [| A ~= B; A ~= Server; B ~= Server |] \ |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
24 |
\ ==> EX K. EX NA. EX evs: otway. \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
25 |
\ Says B A {|Nonce NA, Crypt (shrK A) {|Nonce NA, Key K|}|} \ |
3465 | 26 |
\ : set evs"; |
1996
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
27 |
by (REPEAT (resolve_tac [exI,bexI] 1)); |
2032 | 28 |
by (rtac (otway.Nil RS otway.OR1 RS otway.OR2 RS otway.OR3 RS otway.OR4) 2); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
29 |
by possibility_tac; |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
30 |
result(); |
1996
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
31 |
|
33c42cae3dd0
Uses the improved enemy_analz_tac of Shared.ML, with simpler proofs
paulson
parents:
1967
diff
changeset
|
32 |
|
1941 | 33 |
(**** Inductive proofs about otway ****) |
34 |
||
35 |
(*Nobody sends themselves messages*) |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
36 |
goal thy "!!evs. evs : otway ==> ALL A X. Says A A X ~: set evs"; |
2032 | 37 |
by (etac otway.induct 1); |
1941 | 38 |
by (Auto_tac()); |
39 |
qed_spec_mp "not_Says_to_self"; |
|
40 |
Addsimps [not_Says_to_self]; |
|
41 |
AddSEs [not_Says_to_self RSN (2, rev_notE)]; |
|
42 |
||
43 |
||
44 |
(** For reasoning about the encrypted portion of messages **) |
|
45 |
||
3465 | 46 |
goal thy "!!evs. Says A' B {|N, Agent A, Agent B, X|} : set evs \ |
3683 | 47 |
\ ==> X : analz (spies evs)"; |
4091 | 48 |
by (blast_tac (claset() addSDs [Says_imp_spies RS analz.Inj]) 1); |
3683 | 49 |
qed "OR2_analz_spies"; |
1941 | 50 |
|
3465 | 51 |
goal thy "!!evs. Says S' B {|N, X, Crypt (shrK B) X'|} : set evs \ |
3683 | 52 |
\ ==> X : analz (spies evs)"; |
4091 | 53 |
by (blast_tac (claset() addSDs [Says_imp_spies RS analz.Inj]) 1); |
3683 | 54 |
qed "OR4_analz_spies"; |
1941 | 55 |
|
3465 | 56 |
goal thy "!!evs. Says Server B {|NA, X, Crypt K' {|NB,K|}|} : set evs \ |
3683 | 57 |
\ ==> K : parts (spies evs)"; |
4091 | 58 |
by (blast_tac (claset() addSEs spies_partsEs) 1); |
3683 | 59 |
qed "Oops_parts_spies"; |
1941 | 60 |
|
61 |
(*OR2_analz... and OR4_analz... let us treat those cases using the same |
|
1964 | 62 |
argument as for the Fake case. This is possible for most, but not all, |
63 |
proofs: Fake does not invent new nonces (as in OR2), and of course Fake |
|
2032 | 64 |
messages originate from the Spy. *) |
1964 | 65 |
|
3683 | 66 |
bind_thm ("OR2_parts_spies", |
67 |
OR2_analz_spies RS (impOfSubs analz_subset_parts)); |
|
68 |
bind_thm ("OR4_parts_spies", |
|
69 |
OR4_analz_spies RS (impOfSubs analz_subset_parts)); |
|
2032 | 70 |
|
3683 | 71 |
(*For proving the easier theorems about X ~: parts (spies evs).*) |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
72 |
fun parts_induct_tac i = |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
73 |
etac otway.induct i THEN |
3683 | 74 |
forward_tac [Oops_parts_spies] (i+6) THEN |
75 |
forward_tac [OR4_parts_spies] (i+5) THEN |
|
76 |
forward_tac [OR2_parts_spies] (i+3) THEN |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
77 |
prove_simple_subgoals_tac i; |
1941 | 78 |
|
79 |
||
3683 | 80 |
(** Theorems of the form X ~: parts (spies evs) imply that NOBODY |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
81 |
sends messages containing X! **) |
1941 | 82 |
|
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
83 |
|
3683 | 84 |
(*Spy never sees another agent's shared key! (unless it's bad at start)*) |
1941 | 85 |
goal thy |
3683 | 86 |
"!!evs. evs : otway ==> (Key (shrK A) : parts (spies evs)) = (A : bad)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
87 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
88 |
by (Fake_parts_insert_tac 1); |
3961 | 89 |
by (ALLGOALS Blast_tac); |
2135 | 90 |
qed "Spy_see_shrK"; |
91 |
Addsimps [Spy_see_shrK]; |
|
1941 | 92 |
|
2135 | 93 |
goal thy |
3683 | 94 |
"!!evs. evs : otway ==> (Key (shrK A) : analz (spies evs)) = (A : bad)"; |
4091 | 95 |
by (auto_tac(claset() addDs [impOfSubs analz_subset_parts], simpset())); |
2135 | 96 |
qed "Spy_analz_shrK"; |
97 |
Addsimps [Spy_analz_shrK]; |
|
1941 | 98 |
|
3683 | 99 |
goal thy "!!A. [| Key (shrK A) : parts (spies evs); evs : otway |] ==> A:bad"; |
4091 | 100 |
by (blast_tac (claset() addDs [Spy_see_shrK]) 1); |
2135 | 101 |
qed "Spy_see_shrK_D"; |
1941 | 102 |
|
2135 | 103 |
bind_thm ("Spy_analz_shrK_D", analz_subset_parts RS subsetD RS Spy_see_shrK_D); |
104 |
AddSDs [Spy_see_shrK_D, Spy_analz_shrK_D]; |
|
1941 | 105 |
|
106 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
107 |
(*Nobody can have used non-existent keys!*) |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
108 |
goal thy "!!evs. evs : otway ==> \ |
3683 | 109 |
\ Key K ~: used evs --> K ~: keysFor (parts (spies evs))"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
110 |
by (parts_induct_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
111 |
(*Fake*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
112 |
by (best_tac |
4091 | 113 |
(claset() addSDs [impOfSubs (parts_insert_subset_Un RS keysFor_mono)] |
3961 | 114 |
addIs [impOfSubs analz_subset_parts] |
115 |
addDs [impOfSubs (analz_subset_parts RS keysFor_mono)] |
|
4091 | 116 |
addss (simpset())) 1); |
3102 | 117 |
by (ALLGOALS Blast_tac); |
2160 | 118 |
qed_spec_mp "new_keys_not_used"; |
1941 | 119 |
|
120 |
bind_thm ("new_keys_not_analzd", |
|
2032 | 121 |
[analz_subset_parts RS keysFor_mono, |
122 |
new_keys_not_used] MRS contra_subsetD); |
|
1941 | 123 |
|
124 |
Addsimps [new_keys_not_used, new_keys_not_analzd]; |
|
125 |
||
126 |
||
2064 | 127 |
|
128 |
(*** Proofs involving analz ***) |
|
129 |
||
2135 | 130 |
(*Describes the form of K and NA when the Server sends this message. Also |
131 |
for Oops case.*) |
|
2064 | 132 |
goal thy |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
133 |
"!!evs. [| Says Server B {|NA, X, Crypt (shrK B) {|NB, Key K|}|} : set evs; \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
134 |
\ evs : otway |] \ |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
135 |
\ ==> K ~: range shrK & (EX i. NA = Nonce i) & (EX j. NB = Nonce j)"; |
2135 | 136 |
by (etac rev_mp 1); |
137 |
by (etac otway.induct 1); |
|
3102 | 138 |
by (ALLGOALS Simp_tac); |
139 |
by (ALLGOALS Blast_tac); |
|
2135 | 140 |
qed "Says_Server_message_form"; |
2064 | 141 |
|
142 |
||
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
143 |
(*For proofs involving analz.*) |
3683 | 144 |
val analz_spies_tac = |
145 |
dtac OR2_analz_spies 4 THEN |
|
146 |
dtac OR4_analz_spies 6 THEN |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
147 |
forward_tac [Says_Server_message_form] 7 THEN |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
148 |
assume_tac 7 THEN |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2417
diff
changeset
|
149 |
REPEAT ((eresolve_tac [exE, conjE] ORELSE' hyp_subst_tac) 7); |
1941 | 150 |
|
151 |
||
152 |
(**** |
|
153 |
The following is to prove theorems of the form |
|
154 |
||
3683 | 155 |
Key K : analz (insert (Key KAB) (spies evs)) ==> |
156 |
Key K : analz (spies evs) |
|
1941 | 157 |
|
158 |
A more general formula must be proved inductively. |
|
159 |
****) |
|
160 |
||
161 |
||
162 |
(** Session keys are not used to encrypt other session keys **) |
|
163 |
||
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
164 |
(*The equality makes the induction hypothesis easier to apply*) |
1941 | 165 |
goal thy |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
166 |
"!!evs. evs : otway ==> \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
167 |
\ ALL K KK. KK <= Compl (range shrK) --> \ |
3683 | 168 |
\ (Key K : analz (Key``KK Un (spies evs))) = \ |
169 |
\ (K : KK | Key K : analz (spies evs))"; |
|
2032 | 170 |
by (etac otway.induct 1); |
3683 | 171 |
by analz_spies_tac; |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
172 |
by (REPEAT_FIRST (resolve_tac [allI, impI])); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
173 |
by (REPEAT_FIRST (rtac analz_image_freshK_lemma )); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
174 |
by (ALLGOALS (asm_simp_tac analz_image_freshK_ss)); |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
175 |
(*Fake*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
176 |
by (spy_analz_tac 2); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
177 |
(*Base*) |
3102 | 178 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
179 |
qed_spec_mp "analz_image_freshK"; |
1941 | 180 |
|
181 |
||
182 |
goal thy |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
183 |
"!!evs. [| evs : otway; KAB ~: range shrK |] ==> \ |
3683 | 184 |
\ Key K : analz (insert (Key KAB) (spies evs)) = \ |
185 |
\ (K = KAB | Key K : analz (spies evs))"; |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
186 |
by (asm_simp_tac (analz_image_freshK_ss addsimps [analz_image_freshK]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
187 |
qed "analz_insert_freshK"; |
1941 | 188 |
|
189 |
||
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2014
diff
changeset
|
190 |
(*** The Key K uniquely identifies the Server's message. **) |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
191 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
192 |
goal thy |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
193 |
"!!evs. evs : otway ==> \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
194 |
\ EX B' NA' NB' X'. ALL B NA NB X. \ |
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
195 |
\ Says Server B {|NA, X, Crypt (shrK B) {|NB, K|}|} : set evs --> \ |
2135 | 196 |
\ B=B' & NA=NA' & NB=NB' & X=X'"; |
2032 | 197 |
by (etac otway.induct 1); |
4091 | 198 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
3730 | 199 |
by (ALLGOALS Clarify_tac); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
200 |
(*Remaining cases: OR3 and OR4*) |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
201 |
by (ex_strip_tac 2); |
3102 | 202 |
by (Best_tac 2); |
2064 | 203 |
by (expand_case_tac "K = ?y" 1); |
204 |
by (REPEAT (ares_tac [refl,exI,impI,conjI] 2)); |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
205 |
(*...we assume X is a recent message, and handle this case by contradiction*) |
4091 | 206 |
by (blast_tac (claset() addSEs spies_partsEs |
3102 | 207 |
delrules [conjI] (*no split-up into 4 subgoals*)) 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
208 |
val lemma = result(); |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
209 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
210 |
goal thy |
3543 | 211 |
"!!evs. [| Says Server B {|NA, X, Crypt (shrK B) {|NB, K|}|} : set evs; \ |
212 |
\ Says Server B' {|NA',X',Crypt (shrK B') {|NB',K|}|} : set evs; \ |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
213 |
\ evs : otway |] ==> X=X' & B=B' & NA=NA' & NB=NB'"; |
2417 | 214 |
by (prove_unique_tac lemma 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
215 |
qed "unique_session_keys"; |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
216 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
217 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
218 |
|
2048 | 219 |
(**** Authenticity properties relating to NA ****) |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
220 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
221 |
(*Only OR1 can have caused such a part of a message to appear.*) |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
222 |
goal thy |
3683 | 223 |
"!!evs. [| A ~: bad; evs : otway |] \ |
224 |
\ ==> Crypt (shrK A) {|NA, Agent A, Agent B|} : parts (spies evs) --> \ |
|
2064 | 225 |
\ Says A B {|NA, Agent A, Agent B, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
226 |
\ Crypt (shrK A) {|NA, Agent A, Agent B|}|} \ |
3465 | 227 |
\ : set evs"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
228 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
229 |
by (Fake_parts_insert_tac 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
230 |
qed_spec_mp "Crypt_imp_OR1"; |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
231 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
232 |
|
2064 | 233 |
(** The Nonce NA uniquely identifies A's message. **) |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
234 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
235 |
goal thy |
3683 | 236 |
"!!evs. [| evs : otway; A ~: bad |] \ |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
237 |
\ ==> EX B'. ALL B. \ |
3683 | 238 |
\ Crypt (shrK A) {|NA, Agent A, Agent B|} : parts (spies evs) \ |
2048 | 239 |
\ --> B = B'"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
240 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
241 |
by (Fake_parts_insert_tac 1); |
4091 | 242 |
by (simp_tac (simpset() addsimps [all_conj_distrib]) 1); |
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2014
diff
changeset
|
243 |
(*OR1: creation of new Nonce. Move assertion into global context*) |
2064 | 244 |
by (expand_case_tac "NA = ?y" 1); |
4091 | 245 |
by (blast_tac (claset() addSEs spies_partsEs) 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
246 |
val lemma = result(); |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
247 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
248 |
goal thy |
3683 | 249 |
"!!evs.[| Crypt (shrK A) {|NA, Agent A, Agent B|}: parts (spies evs); \ |
250 |
\ Crypt (shrK A) {|NA, Agent A, Agent C|}: parts (spies evs); \ |
|
251 |
\ evs : otway; A ~: bad |] \ |
|
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
252 |
\ ==> B = C"; |
2417 | 253 |
by (prove_unique_tac lemma 1); |
2048 | 254 |
qed "unique_NA"; |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
255 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
256 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
257 |
(*It is impossible to re-use a nonce in both OR1 and OR2. This holds because |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
258 |
OR2 encrypts Nonce NB. It prevents the attack that can occur in the |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
259 |
over-simplified version of this protocol: see OtwayRees_Bad.*) |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
260 |
goal thy |
3683 | 261 |
"!!evs. [| A ~: bad; evs : otway |] \ |
262 |
\ ==> Crypt (shrK A) {|NA, Agent A, Agent B|} : parts (spies evs) --> \ |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
263 |
\ Crypt (shrK A) {|NA', NA, Agent A', Agent A|} \ |
3683 | 264 |
\ ~: parts (spies evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
265 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
266 |
by (Fake_parts_insert_tac 1); |
4091 | 267 |
by (REPEAT (blast_tac (claset() addSEs spies_partsEs |
3102 | 268 |
addSDs [impOfSubs parts_insert_subset_Un]) 1)); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
269 |
qed_spec_mp"no_nonce_OR1_OR2"; |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
270 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
271 |
|
2053 | 272 |
(*Crucial property: If the encrypted message appears, and A has used NA |
273 |
to start a run, then it originated with the Server!*) |
|
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
274 |
goal thy |
3683 | 275 |
"!!evs. [| A ~: bad; A ~= Spy; evs : otway |] \ |
276 |
\ ==> Crypt (shrK A) {|NA, Key K|} : parts (spies evs) \ |
|
2048 | 277 |
\ --> Says A B {|NA, Agent A, Agent B, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
278 |
\ Crypt (shrK A) {|NA, Agent A, Agent B|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
279 |
\ : set evs --> \ |
2048 | 280 |
\ (EX NB. Says Server B \ |
281 |
\ {|NA, \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
282 |
\ Crypt (shrK A) {|NA, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
283 |
\ Crypt (shrK B) {|NB, Key K|}|} \ |
3465 | 284 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
285 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
286 |
by (Fake_parts_insert_tac 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
287 |
(*OR1: it cannot be a new Nonce, contradiction.*) |
4091 | 288 |
by (blast_tac (claset() addSIs [parts_insertI] addSEs spies_partsEs) 1); |
3730 | 289 |
(*OR3 and OR4*) |
4091 | 290 |
by (asm_simp_tac (simpset() addsimps [ex_disj_distrib]) 1); |
3730 | 291 |
by (rtac conjI 1); |
292 |
by (ALLGOALS Clarify_tac); |
|
293 |
(*OR4*) |
|
4091 | 294 |
by (blast_tac (claset() addSIs [Crypt_imp_OR1] |
3730 | 295 |
addEs spies_partsEs) 3); |
296 |
(*OR3, two cases*) (** LEVEL 5 **) |
|
4091 | 297 |
by (blast_tac (claset() addSEs [MPair_parts] |
3730 | 298 |
addSDs [Says_imp_spies RS parts.Inj] |
299 |
addEs [no_nonce_OR1_OR2 RSN (2, rev_notE)] |
|
300 |
delrules [conjI] (*stop split-up into 4 subgoals*)) 2); |
|
4091 | 301 |
by (blast_tac (claset() addSDs [Says_imp_spies RS parts.Inj] |
3730 | 302 |
addSEs [MPair_parts] |
303 |
addIs [unique_NA]) 1); |
|
2048 | 304 |
qed_spec_mp "NA_Crypt_imp_Server_msg"; |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
305 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
306 |
|
2053 | 307 |
(*Corollary: if A receives B's OR4 message and the nonce NA agrees |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
308 |
then the key really did come from the Server! CANNOT prove this of the |
2048 | 309 |
bad form of this protocol, even though we can prove |
2032 | 310 |
Spy_not_see_encrypted_key*) |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
311 |
goal thy |
3683 | 312 |
"!!evs. [| Says B' A {|NA, Crypt (shrK A) {|NA, Key K|}|} : set evs; \ |
313 |
\ Says A B {|NA, Agent A, Agent B, \ |
|
314 |
\ Crypt (shrK A) {|NA, Agent A, Agent B|}|} : set evs; \ |
|
315 |
\ A ~: bad; A ~= Spy; evs : otway |] \ |
|
2053 | 316 |
\ ==> EX NB. Says Server B \ |
2048 | 317 |
\ {|NA, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
318 |
\ Crypt (shrK A) {|NA, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
319 |
\ Crypt (shrK B) {|NB, Key K|}|} \ |
3465 | 320 |
\ : set evs"; |
4091 | 321 |
by (blast_tac (claset() addSIs [NA_Crypt_imp_Server_msg] |
3683 | 322 |
addEs spies_partsEs) 1); |
2328 | 323 |
qed "A_trusts_OR4"; |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
324 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
325 |
|
2048 | 326 |
(** Crucial secrecy property: Spy does not see the keys sent in msg OR3 |
327 |
Does not in itself guarantee security: an attack could violate |
|
328 |
the premises, e.g. by having A=Spy **) |
|
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
329 |
|
1941 | 330 |
goal thy |
3683 | 331 |
"!!evs. [| A ~: bad; B ~: bad; evs : otway |] \ |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
332 |
\ ==> Says Server B \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
333 |
\ {|NA, Crypt (shrK A) {|NA, Key K|}, \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
334 |
\ Crypt (shrK B) {|NB, Key K|}|} : set evs --> \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
335 |
\ Says B Spy {|NA, NB, Key K|} ~: set evs --> \ |
3683 | 336 |
\ Key K ~: analz (spies evs)"; |
2032 | 337 |
by (etac otway.induct 1); |
3683 | 338 |
by analz_spies_tac; |
1964 | 339 |
by (ALLGOALS |
4091 | 340 |
(asm_simp_tac (simpset() addcongs [conj_cong] |
3674
65ec38fbb265
Deleted the redundant simprule not_parts_not_analz
paulson
parents:
3543
diff
changeset
|
341 |
addsimps [analz_insert_eq, analz_insert_freshK] |
3961 | 342 |
addsimps (pushes@expand_ifs)))); |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
343 |
(*Oops*) |
4091 | 344 |
by (blast_tac (claset() addSDs [unique_session_keys]) 4); |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
345 |
(*OR4*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
346 |
by (Blast_tac 3); |
1941 | 347 |
(*OR3*) |
4091 | 348 |
by (blast_tac (claset() addSEs spies_partsEs |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
349 |
addIs [impOfSubs analz_subset_parts]) 2); |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
350 |
(*Fake*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
351 |
by (spy_analz_tac 1); |
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
352 |
val lemma = result() RS mp RS mp RSN(2,rev_notE); |
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
353 |
|
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
354 |
goal thy |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
355 |
"!!evs. [| Says Server B \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
356 |
\ {|NA, Crypt (shrK A) {|NA, Key K|}, \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
357 |
\ Crypt (shrK B) {|NB, Key K|}|} : set evs; \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
358 |
\ Says B Spy {|NA, NB, Key K|} ~: set evs; \ |
3683 | 359 |
\ A ~: bad; B ~: bad; evs : otway |] \ |
360 |
\ ==> Key K ~: analz (spies evs)"; |
|
2014
5be4c8ca7b25
Correction of protocol; addition of Reveal message; proofs of
paulson
parents:
1999
diff
changeset
|
361 |
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1); |
4091 | 362 |
by (blast_tac (claset() addSEs [lemma]) 1); |
2032 | 363 |
qed "Spy_not_see_encrypted_key"; |
364 |
||
1945 | 365 |
|
2048 | 366 |
(**** Authenticity properties relating to NB ****) |
367 |
||
368 |
(*Only OR2 can have caused such a part of a message to appear. We do not |
|
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
369 |
know anything about X: it does NOT have to have the right form.*) |
2048 | 370 |
goal thy |
3683 | 371 |
"!!evs. [| B ~: bad; evs : otway |] \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
372 |
\ ==> Crypt (shrK B) {|NA, NB, Agent A, Agent B|} \ |
3683 | 373 |
\ : parts (spies evs) --> \ |
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
374 |
\ (EX X. Says B Server \ |
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
375 |
\ {|NA, Agent A, Agent B, X, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
376 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|}|} \ |
3465 | 377 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
378 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
379 |
by (Fake_parts_insert_tac 1); |
3102 | 380 |
by (ALLGOALS Blast_tac); |
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
381 |
bind_thm ("Crypt_imp_OR2", result() RSN (2,rev_mp) RS exE); |
2048 | 382 |
|
383 |
||
384 |
(** The Nonce NB uniquely identifies B's message. **) |
|
385 |
||
386 |
goal thy |
|
3683 | 387 |
"!!evs. [| evs : otway; B ~: bad |] \ |
2064 | 388 |
\ ==> EX NA' A'. ALL NA A. \ |
3683 | 389 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|} : parts(spies evs) \ |
2048 | 390 |
\ --> NA = NA' & A = A'"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
391 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
392 |
by (Fake_parts_insert_tac 1); |
4091 | 393 |
by (simp_tac (simpset() addsimps [all_conj_distrib]) 1); |
2048 | 394 |
(*OR2: creation of new Nonce. Move assertion into global context*) |
2064 | 395 |
by (expand_case_tac "NB = ?y" 1); |
4091 | 396 |
by (blast_tac (claset() addSEs spies_partsEs) 1); |
2048 | 397 |
val lemma = result(); |
398 |
||
399 |
goal thy |
|
3683 | 400 |
"!!evs.[| Crypt (shrK B) {|NA, NB, Agent A, Agent B|} : parts(spies evs); \ |
401 |
\ Crypt (shrK B) {|NC, NB, Agent C, Agent B|} : parts(spies evs); \ |
|
402 |
\ evs : otway; B ~: bad |] \ |
|
2048 | 403 |
\ ==> NC = NA & C = A"; |
2417 | 404 |
by (prove_unique_tac lemma 1); |
2048 | 405 |
qed "unique_NB"; |
406 |
||
407 |
||
408 |
(*If the encrypted message appears, and B has used Nonce NB, |
|
409 |
then it originated with the Server!*) |
|
410 |
goal thy |
|
3683 | 411 |
"!!evs. [| B ~: bad; B ~= Spy; evs : otway |] \ |
412 |
\ ==> Crypt (shrK B) {|NB, Key K|} : parts (spies evs) \ |
|
2048 | 413 |
\ --> (ALL X'. Says B Server \ |
414 |
\ {|NA, Agent A, Agent B, X', \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
415 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
416 |
\ : set evs \ |
2048 | 417 |
\ --> Says Server B \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
418 |
\ {|NA, Crypt (shrK A) {|NA, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
419 |
\ Crypt (shrK B) {|NB, Key K|}|} \ |
3465 | 420 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
421 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
422 |
by (Fake_parts_insert_tac 1); |
2048 | 423 |
(*OR1: it cannot be a new Nonce, contradiction.*) |
4091 | 424 |
by (blast_tac (claset() addSIs [parts_insertI] addSEs spies_partsEs) 1); |
2048 | 425 |
(*OR4*) |
4091 | 426 |
by (blast_tac (claset() addSEs [MPair_parts, Crypt_imp_OR2]) 2); |
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
427 |
(*OR3*) |
4091 | 428 |
by (safe_tac (claset() delrules [disjCI, impCE])); |
429 |
by (blast_tac (claset() delrules [conjI] (*stop split-up*)) 3); |
|
430 |
by (blast_tac (claset() addSDs [Says_imp_spies RS parts.Inj] |
|
3102 | 431 |
addSEs [MPair_parts] |
432 |
addDs [unique_NB]) 2); |
|
4091 | 433 |
by (blast_tac (claset() addSEs [MPair_parts, no_nonce_OR1_OR2 RSN (2, rev_notE)] |
3683 | 434 |
addSDs [Says_imp_spies RS parts.Inj] |
3102 | 435 |
delrules [conjI, impCE] (*stop split-up*)) 1); |
2048 | 436 |
qed_spec_mp "NB_Crypt_imp_Server_msg"; |
437 |
||
438 |
||
439 |
(*Guarantee for B: if it gets a message with matching NB then the Server |
|
440 |
has sent the correct message.*) |
|
441 |
goal thy |
|
3683 | 442 |
"!!evs. [| B ~: bad; B ~= Spy; evs : otway; \ |
443 |
\ Says S' B {|NA, X, Crypt (shrK B) {|NB, Key K|}|} : set evs; \ |
|
2048 | 444 |
\ Says B Server {|NA, Agent A, Agent B, X', \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
445 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|} |} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
446 |
\ : set evs |] \ |
2048 | 447 |
\ ==> Says Server B \ |
448 |
\ {|NA, \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
449 |
\ Crypt (shrK A) {|NA, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
450 |
\ Crypt (shrK B) {|NB, Key K|}|} \ |
3465 | 451 |
\ : set evs"; |
4091 | 452 |
by (blast_tac (claset() addSIs [NB_Crypt_imp_Server_msg] |
3683 | 453 |
addSEs spies_partsEs) 1); |
2328 | 454 |
qed "B_trusts_OR3"; |
2048 | 455 |
|
456 |
||
2328 | 457 |
B_trusts_OR3 RS Spy_not_see_encrypted_key; |
2048 | 458 |
|
459 |
||
1945 | 460 |
goal thy |
3683 | 461 |
"!!evs. [| B ~: bad; evs : otway |] \ |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
462 |
\ ==> Says Server B \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
463 |
\ {|NA, Crypt (shrK A) {|NA, Key K|}, \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
464 |
\ Crypt (shrK B) {|NB, Key K|}|} : set evs --> \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
465 |
\ (EX X. Says B Server {|NA, Agent A, Agent B, X, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
466 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|} |} \ |
3465 | 467 |
\ : set evs)"; |
2032 | 468 |
by (etac otway.induct 1); |
3102 | 469 |
by (ALLGOALS Asm_simp_tac); |
4091 | 470 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj] |
3102 | 471 |
addSEs [MPair_parts, Crypt_imp_OR2]) 3); |
472 |
by (ALLGOALS Blast_tac); |
|
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
473 |
bind_thm ("OR3_imp_OR2", result() RSN (2,rev_mp) RS exE); |
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
474 |
|
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
475 |
|
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
476 |
(*After getting and checking OR4, agent A can trust that B has been active. |
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
477 |
We could probably prove that X has the expected form, but that is not |
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
478 |
strictly necessary for authentication.*) |
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
479 |
goal thy |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
480 |
"!!evs. [| Says B' A {|NA, Crypt (shrK A) {|NA, Key K|}|} : set evs; \ |
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
481 |
\ Says A B {|NA, Agent A, Agent B, \ |
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
482 |
\ Crypt (shrK A) {|NA, Agent A, Agent B|}|} : set evs; \ |
3683 | 483 |
\ A ~: bad; A ~= Spy; B ~: bad; evs : otway |] \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
484 |
\ ==> EX NB X. Says B Server {|NA, Agent A, Agent B, X, \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
485 |
\ Crypt (shrK B) {|NA, NB, Agent A, Agent B|} |}\ |
3465 | 486 |
\ : set evs"; |
4091 | 487 |
by (blast_tac (claset() addSDs [A_trusts_OR4] |
3102 | 488 |
addSEs [OR3_imp_OR2]) 1); |
2194
63a68a3a8a76
Removal of an obsolete result, and authentication of
paulson
parents:
2171
diff
changeset
|
489 |
qed "A_auths_B"; |