author | wenzelm |
Mon, 03 Nov 1997 12:24:13 +0100 | |
changeset 4091 | 771b1f6422a8 |
parent 3961 | 6a8996fb7d99 |
child 4155 | 53f60f51333c |
permissions | -rw-r--r-- |
2090 | 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 |
Simplified version with minimal encryption but explicit messages |
|
9 |
||
10 |
From page 11 of |
|
11 |
Abadi and Needham. Prudent Engineering Practice for Cryptographic Protocols. |
|
12 |
IEEE Trans. SE 22 (1), 1996 |
|
13 |
*) |
|
14 |
||
15 |
open OtwayRees_AN; |
|
16 |
||
17 |
proof_timing:=true; |
|
18 |
HOL_quantifiers := false; |
|
19 |
||
20 |
||
2331 | 21 |
(*A "possibility property": there are traces that reach the end*) |
2090 | 22 |
goal thy |
2331 | 23 |
"!!A B. [| A ~= B; A ~= Server; B ~= Server |] \ |
3543 | 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 (Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|}) \ |
3465 | 26 |
\ : set evs"; |
2090 | 27 |
by (REPEAT (resolve_tac [exI,bexI] 1)); |
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:
2454
diff
changeset
|
29 |
by possibility_tac; |
2090 | 30 |
result(); |
31 |
||
32 |
||
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"; |
2090 | 37 |
by (etac otway.induct 1); |
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 S' B {|X, Crypt(shrK 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 "OR4_analz_spies"; |
2090 | 50 |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
51 |
goal thy "!!evs. Says Server B {|X, Crypt K' {|NB, a, Agent B, K|}|} \ |
3683 | 52 |
\ : set evs ==> K : parts (spies evs)"; |
4091 | 53 |
by (blast_tac (claset() addSEs spies_partsEs) 1); |
3683 | 54 |
qed "Oops_parts_spies"; |
2090 | 55 |
|
3683 | 56 |
(*OR4_analz_spies lets us treat those cases using the same |
2090 | 57 |
argument as for the Fake case. This is possible for most, but not all, |
2131 | 58 |
proofs, since Fake messages originate from the Spy. *) |
2090 | 59 |
|
3683 | 60 |
bind_thm ("OR4_parts_spies", |
61 |
OR4_analz_spies RS (impOfSubs analz_subset_parts)); |
|
2090 | 62 |
|
3683 | 63 |
(*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
|
64 |
fun parts_induct_tac i = |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
65 |
etac otway.induct i THEN |
3683 | 66 |
forward_tac [Oops_parts_spies] (i+6) THEN |
67 |
forward_tac [OR4_parts_spies] (i+5) THEN |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
68 |
prove_simple_subgoals_tac i; |
2090 | 69 |
|
70 |
||
3683 | 71 |
(** Theorems of the form X ~: parts (spies evs) imply that NOBODY |
2090 | 72 |
sends messages containing X! **) |
73 |
||
3683 | 74 |
(*Spy never sees another agent's shared key! (unless it's bad at start)*) |
2090 | 75 |
goal thy |
3683 | 76 |
"!!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
|
77 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
78 |
by (Fake_parts_insert_tac 1); |
3961 | 79 |
by (ALLGOALS Blast_tac); |
2131 | 80 |
qed "Spy_see_shrK"; |
81 |
Addsimps [Spy_see_shrK]; |
|
2090 | 82 |
|
2131 | 83 |
goal thy |
3683 | 84 |
"!!evs. evs : otway ==> (Key (shrK A) : analz (spies evs)) = (A : bad)"; |
4091 | 85 |
by (auto_tac(claset() addDs [impOfSubs analz_subset_parts], simpset())); |
2131 | 86 |
qed "Spy_analz_shrK"; |
87 |
Addsimps [Spy_analz_shrK]; |
|
2090 | 88 |
|
3683 | 89 |
goal thy "!!A. [| Key (shrK A) : parts (spies evs); evs : otway |] ==> A:bad"; |
4091 | 90 |
by (blast_tac (claset() addDs [Spy_see_shrK]) 1); |
2131 | 91 |
qed "Spy_see_shrK_D"; |
2090 | 92 |
|
2131 | 93 |
bind_thm ("Spy_analz_shrK_D", analz_subset_parts RS subsetD RS Spy_see_shrK_D); |
94 |
AddSDs [Spy_see_shrK_D, Spy_analz_shrK_D]; |
|
2090 | 95 |
|
96 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
97 |
(*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
|
98 |
goal thy "!!evs. evs : otway ==> \ |
3683 | 99 |
\ 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
|
100 |
by (parts_induct_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
101 |
(*Fake*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
102 |
by (best_tac |
4091 | 103 |
(claset() addSDs [impOfSubs (parts_insert_subset_Un RS keysFor_mono)] |
3961 | 104 |
addIs [impOfSubs analz_subset_parts] |
105 |
addDs [impOfSubs (analz_subset_parts RS keysFor_mono)] |
|
4091 | 106 |
addss (simpset())) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
107 |
(*OR3*) |
3102 | 108 |
by (Blast_tac 1); |
2160 | 109 |
qed_spec_mp "new_keys_not_used"; |
2090 | 110 |
|
111 |
bind_thm ("new_keys_not_analzd", |
|
112 |
[analz_subset_parts RS keysFor_mono, |
|
113 |
new_keys_not_used] MRS contra_subsetD); |
|
114 |
||
115 |
Addsimps [new_keys_not_used, new_keys_not_analzd]; |
|
116 |
||
117 |
||
118 |
||
119 |
(*** Proofs involving analz ***) |
|
120 |
||
2131 | 121 |
(*Describes the form of K and NA when the Server sends this message.*) |
2090 | 122 |
goal thy |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
123 |
"!!evs. [| Says Server B \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
124 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
125 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
126 |
\ : set evs; \ |
3543 | 127 |
\ evs : otway |] \ |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
128 |
\ ==> K ~: range shrK & (EX i. NA = Nonce i) & (EX j. NB = Nonce j)"; |
2131 | 129 |
by (etac rev_mp 1); |
130 |
by (etac otway.induct 1); |
|
3102 | 131 |
by (ALLGOALS Asm_simp_tac); |
132 |
by (Blast_tac 1); |
|
2131 | 133 |
qed "Says_Server_message_form"; |
2090 | 134 |
|
135 |
||
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
136 |
(*For proofs involving analz.*) |
3683 | 137 |
val analz_spies_tac = |
138 |
dtac OR4_analz_spies 6 THEN |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
139 |
forward_tac [Says_Server_message_form] 7 THEN |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
140 |
assume_tac 7 THEN |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2417
diff
changeset
|
141 |
REPEAT ((eresolve_tac [exE, conjE] ORELSE' hyp_subst_tac) 7); |
2090 | 142 |
|
143 |
||
144 |
(**** |
|
145 |
The following is to prove theorems of the form |
|
146 |
||
3683 | 147 |
Key K : analz (insert (Key KAB) (spies evs)) ==> |
148 |
Key K : analz (spies evs) |
|
2090 | 149 |
|
150 |
A more general formula must be proved inductively. |
|
151 |
****) |
|
152 |
||
153 |
||
154 |
(** Session keys are not used to encrypt other session keys **) |
|
155 |
||
156 |
(*The equality makes the induction hypothesis easier to apply*) |
|
157 |
goal thy |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
158 |
"!!evs. evs : otway ==> \ |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
159 |
\ ALL K KK. KK <= Compl (range shrK) --> \ |
3683 | 160 |
\ (Key K : analz (Key``KK Un (spies evs))) = \ |
161 |
\ (K : KK | Key K : analz (spies evs))"; |
|
2090 | 162 |
by (etac otway.induct 1); |
3683 | 163 |
by analz_spies_tac; |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
164 |
by (REPEAT_FIRST (resolve_tac [allI, impI])); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
165 |
by (REPEAT_FIRST (rtac analz_image_freshK_lemma )); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
166 |
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
|
167 |
(*Fake*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
168 |
by (spy_analz_tac 2); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
169 |
(*Base*) |
3102 | 170 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
171 |
qed_spec_mp "analz_image_freshK"; |
2090 | 172 |
|
173 |
||
174 |
goal thy |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
175 |
"!!evs. [| evs : otway; KAB ~: range shrK |] ==> \ |
3683 | 176 |
\ Key K : analz (insert (Key KAB) (spies evs)) = \ |
177 |
\ (K = KAB | Key K : analz (spies evs))"; |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
178 |
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:
2454
diff
changeset
|
179 |
qed "analz_insert_freshK"; |
2090 | 180 |
|
181 |
||
182 |
(*** The Key K uniquely identifies the Server's message. **) |
|
183 |
||
184 |
goal thy |
|
3543 | 185 |
"!!evs. evs : otway ==> \ |
186 |
\ EX A' B' NA' NB'. ALL A B NA NB. \ |
|
187 |
\ Says Server B \ |
|
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
188 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, K|}, \ |
3465 | 189 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, K|}|} : set evs \ |
2090 | 190 |
\ --> A=A' & B=B' & NA=NA' & NB=NB'"; |
191 |
by (etac otway.induct 1); |
|
4091 | 192 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
3730 | 193 |
by (ALLGOALS Clarify_tac); |
2090 | 194 |
(*Remaining cases: OR3 and OR4*) |
195 |
by (ex_strip_tac 2); |
|
3102 | 196 |
by (Blast_tac 2); |
2090 | 197 |
by (expand_case_tac "K = ?y" 1); |
198 |
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:
2454
diff
changeset
|
199 |
(*...we assume X is a recent message and handle this case by contradiction*) |
4091 | 200 |
by (blast_tac (claset() addSEs spies_partsEs |
3102 | 201 |
delrules[conjI] (*prevent splitup into 4 subgoals*)) 1); |
2090 | 202 |
val lemma = result(); |
203 |
||
204 |
||
205 |
goal thy |
|
206 |
"!!evs. [| Says Server B \ |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
207 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
208 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, K|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
209 |
\ : set evs; \ |
2090 | 210 |
\ Says Server B' \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
211 |
\ {|Crypt (shrK A') {|NA', Agent A', Agent B', K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
212 |
\ Crypt (shrK B') {|NB', Agent A', Agent B', K|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
213 |
\ : set evs; \ |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
214 |
\ evs : otway |] \ |
2090 | 215 |
\ ==> A=A' & B=B' & NA=NA' & NB=NB'"; |
2417 | 216 |
by (prove_unique_tac lemma 1); |
2090 | 217 |
qed "unique_session_keys"; |
218 |
||
219 |
||
220 |
||
221 |
(**** Authenticity properties relating to NA ****) |
|
222 |
||
223 |
(*If the encrypted message appears then it originated with the Server!*) |
|
224 |
goal thy |
|
3683 | 225 |
"!!evs. [| A ~: bad; evs : otway |] \ |
226 |
\ ==> Crypt (shrK A) {|NA, Agent A, Agent B, Key K|} : parts (spies evs) \ |
|
2331 | 227 |
\ --> (EX NB. Says Server B \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
228 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
229 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3465 | 230 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
231 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
232 |
by (Fake_parts_insert_tac 1); |
4091 | 233 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [ex_disj_distrib]))); |
2090 | 234 |
(*OR3*) |
3102 | 235 |
by (Blast_tac 1); |
2090 | 236 |
qed_spec_mp "NA_Crypt_imp_Server_msg"; |
237 |
||
238 |
||
2454 | 239 |
(*Corollary: if A receives B's OR4 message then it originated with the Server. |
240 |
Freshness may be inferred from nonce NA.*) |
|
2090 | 241 |
goal thy |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
242 |
"!!evs. [| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}) \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
243 |
\ : set evs; \ |
3683 | 244 |
\ A ~: bad; evs : otway |] \ |
2090 | 245 |
\ ==> EX NB. Says Server B \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
246 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
247 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3465 | 248 |
\ : set evs"; |
4091 | 249 |
by (blast_tac (claset() addSIs [NA_Crypt_imp_Server_msg] |
3683 | 250 |
addEs spies_partsEs) 1); |
2331 | 251 |
qed "A_trusts_OR4"; |
2090 | 252 |
|
253 |
||
254 |
(** Crucial secrecy property: Spy does not see the keys sent in msg OR3 |
|
255 |
Does not in itself guarantee security: an attack could violate |
|
256 |
the premises, e.g. by having A=Spy **) |
|
257 |
||
258 |
goal thy |
|
3683 | 259 |
"!!evs. [| A ~: bad; B ~: bad; evs : otway |] \ |
3543 | 260 |
\ ==> Says Server B \ |
261 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
|
262 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
|
263 |
\ : set evs --> \ |
|
264 |
\ Says B Spy {|NA, NB, Key K|} ~: set evs --> \ |
|
3683 | 265 |
\ Key K ~: analz (spies evs)"; |
2090 | 266 |
by (etac otway.induct 1); |
3683 | 267 |
by analz_spies_tac; |
2090 | 268 |
by (ALLGOALS |
4091 | 269 |
(asm_simp_tac (simpset() addcongs [conj_cong, if_weak_cong] |
3674
65ec38fbb265
Deleted the redundant simprule not_parts_not_analz
paulson
parents:
3543
diff
changeset
|
270 |
addsimps [analz_insert_eq, analz_insert_freshK] |
3961 | 271 |
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
|
272 |
(*Oops*) |
4091 | 273 |
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
|
274 |
(*OR4*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
275 |
by (Blast_tac 3); |
2090 | 276 |
(*OR3*) |
4091 | 277 |
by (blast_tac (claset() addSEs spies_partsEs |
3102 | 278 |
addIs [impOfSubs analz_subset_parts]) 2); |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
279 |
(*Fake*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
280 |
by (spy_analz_tac 1); |
2090 | 281 |
val lemma = result() RS mp RS mp RSN(2,rev_notE); |
282 |
||
283 |
goal thy |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
284 |
"!!evs. [| Says Server B \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
285 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
286 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
287 |
\ : set evs; \ |
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
288 |
\ Says B Spy {|NA, NB, Key K|} ~: set evs; \ |
3683 | 289 |
\ A ~: bad; B ~: bad; evs : otway |] \ |
290 |
\ ==> Key K ~: analz (spies evs)"; |
|
2090 | 291 |
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1); |
4091 | 292 |
by (blast_tac (claset() addSEs [lemma]) 1); |
2090 | 293 |
qed "Spy_not_see_encrypted_key"; |
294 |
||
295 |
||
296 |
(**** Authenticity properties relating to NB ****) |
|
297 |
||
298 |
(*If the encrypted message appears then it originated with the Server!*) |
|
299 |
goal thy |
|
3683 | 300 |
"!!evs. [| B ~: bad; evs : otway |] \ |
301 |
\ ==> Crypt (shrK B) {|NB, Agent A, Agent B, Key K|} : parts (spies evs) \ |
|
2090 | 302 |
\ --> (EX NA. Says Server B \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
303 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
304 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3465 | 305 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
306 |
by (parts_induct_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
307 |
by (Fake_parts_insert_tac 1); |
4091 | 308 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [ex_disj_distrib]))); |
2090 | 309 |
(*OR3*) |
3102 | 310 |
by (Blast_tac 1); |
2090 | 311 |
qed_spec_mp "NB_Crypt_imp_Server_msg"; |
312 |
||
313 |
||
2454 | 314 |
(*Guarantee for B: if it gets a well-formed certificate then the Server |
315 |
has sent the correct message in round 3.*) |
|
2090 | 316 |
goal thy |
3683 | 317 |
"!!evs. [| B ~: bad; evs : otway; \ |
2837
dee1c7f1f576
Trivial renamings (for consistency with CSFW papers)
paulson
parents:
2637
diff
changeset
|
318 |
\ Says S' B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3466
30791e5a69c4
Corrected indentations and margins after the renaming of "set_of_list"
paulson
parents:
3465
diff
changeset
|
319 |
\ : set evs |] \ |
2106 | 320 |
\ ==> EX NA. Says Server B \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
321 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2264
diff
changeset
|
322 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
3465 | 323 |
\ : set evs"; |
4091 | 324 |
by (blast_tac (claset() addSIs [NB_Crypt_imp_Server_msg] |
3683 | 325 |
addEs spies_partsEs) 1); |
2331 | 326 |
qed "B_trusts_OR3"; |