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