author | paulson |
Wed, 23 Sep 1998 10:03:32 +0200 | |
changeset 5535 | 678999604ee9 |
parent 5492 | d9fc3457554e |
child 6308 | 76f3865a2b1d |
permissions | -rw-r--r-- |
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
1 |
(* Title: HOL/Auth/OtwayRees_AN |
2090 | 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 |
||
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
8 |
Abadi-Needham version: minimal encryption, explicit messages |
2090 | 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 |
||
4470 | 15 |
AddEs spies_partsEs; |
16 |
AddDs [impOfSubs analz_subset_parts]; |
|
17 |
AddDs [impOfSubs Fake_parts_insert]; |
|
18 |
||
2090 | 19 |
|
2331 | 20 |
(*A "possibility property": there are traces that reach the end*) |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
21 |
Goal "[| B ~= Server |] \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
22 |
\ ==> EX K. EX NA. EX evs: otway. \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
23 |
\ Says B A (Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|}) \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
24 |
\ : set evs"; |
2090 | 25 |
by (REPEAT (resolve_tac [exI,bexI] 1)); |
26 |
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
|
27 |
by possibility_tac; |
2090 | 28 |
result(); |
29 |
||
30 |
||
31 |
(**** Inductive proofs about otway ****) |
|
32 |
||
33 |
(** For reasoning about the encrypted portion of messages **) |
|
34 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
35 |
Goal "Says S' B {|X, Crypt(shrK B) X'|} : set evs ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
36 |
\ X : analz (spies evs)"; |
4477
b3e5857d8d99
New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents:
4470
diff
changeset
|
37 |
by (dtac (Says_imp_spies RS analz.Inj) 1); |
4470 | 38 |
by (Blast_tac 1); |
3683 | 39 |
qed "OR4_analz_spies"; |
2090 | 40 |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
41 |
Goal "Says Server B {|X, Crypt K' {|NB, a, Agent B, K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
42 |
\ : set evs ==> K : parts (spies evs)"; |
4470 | 43 |
by (Blast_tac 1); |
3683 | 44 |
qed "Oops_parts_spies"; |
2090 | 45 |
|
3683 | 46 |
bind_thm ("OR4_parts_spies", |
47 |
OR4_analz_spies RS (impOfSubs analz_subset_parts)); |
|
2090 | 48 |
|
3683 | 49 |
(*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
|
50 |
fun parts_induct_tac i = |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
51 |
etac otway.induct i THEN |
3683 | 52 |
forward_tac [Oops_parts_spies] (i+6) THEN |
53 |
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
|
54 |
prove_simple_subgoals_tac i; |
2090 | 55 |
|
56 |
||
3683 | 57 |
(** Theorems of the form X ~: parts (spies evs) imply that NOBODY |
2090 | 58 |
sends messages containing X! **) |
59 |
||
4537
4e835bd9fada
Expressed most Oops rules using Notes instead of Says, and other tidying
paulson
parents:
4509
diff
changeset
|
60 |
(*Spy never sees a good agent's shared key!*) |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
61 |
Goal "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
|
62 |
by (parts_induct_tac 1); |
3961 | 63 |
by (ALLGOALS Blast_tac); |
2131 | 64 |
qed "Spy_see_shrK"; |
65 |
Addsimps [Spy_see_shrK]; |
|
2090 | 66 |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
67 |
Goal "evs : otway ==> (Key (shrK A) : analz (spies evs)) = (A : bad)"; |
4091 | 68 |
by (auto_tac(claset() addDs [impOfSubs analz_subset_parts], simpset())); |
2131 | 69 |
qed "Spy_analz_shrK"; |
70 |
Addsimps [Spy_analz_shrK]; |
|
2090 | 71 |
|
4470 | 72 |
AddSDs [Spy_see_shrK RSN (2, rev_iffD1), |
73 |
Spy_analz_shrK RSN (2, rev_iffD1)]; |
|
2090 | 74 |
|
75 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
76 |
(*Nobody can have used non-existent keys!*) |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
77 |
Goal "evs : otway ==> 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
|
78 |
by (parts_induct_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
79 |
(*Fake*) |
4509
828148415197
Making proofs faster, especially using keysFor_parts_insert
paulson
parents:
4477
diff
changeset
|
80 |
by (blast_tac (claset() addSDs [keysFor_parts_insert]) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
81 |
(*OR3*) |
3102 | 82 |
by (Blast_tac 1); |
2160 | 83 |
qed_spec_mp "new_keys_not_used"; |
2090 | 84 |
|
85 |
bind_thm ("new_keys_not_analzd", |
|
86 |
[analz_subset_parts RS keysFor_mono, |
|
87 |
new_keys_not_used] MRS contra_subsetD); |
|
88 |
||
89 |
Addsimps [new_keys_not_used, new_keys_not_analzd]; |
|
90 |
||
91 |
||
92 |
||
93 |
(*** Proofs involving analz ***) |
|
94 |
||
2131 | 95 |
(*Describes the form of K and NA when the Server sends this message.*) |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
96 |
Goal "[| Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
97 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
98 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
99 |
\ : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
100 |
\ evs : otway |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
101 |
\ ==> K ~: range shrK & (EX i. NA = Nonce i) & (EX j. NB = Nonce j)"; |
2131 | 102 |
by (etac rev_mp 1); |
103 |
by (etac otway.induct 1); |
|
3102 | 104 |
by (ALLGOALS Asm_simp_tac); |
105 |
by (Blast_tac 1); |
|
2131 | 106 |
qed "Says_Server_message_form"; |
2090 | 107 |
|
108 |
||
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
109 |
(*For proofs involving analz.*) |
3683 | 110 |
val analz_spies_tac = |
111 |
dtac OR4_analz_spies 6 THEN |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
112 |
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
|
113 |
assume_tac 7 THEN |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2417
diff
changeset
|
114 |
REPEAT ((eresolve_tac [exE, conjE] ORELSE' hyp_subst_tac) 7); |
2090 | 115 |
|
116 |
||
117 |
(**** |
|
118 |
The following is to prove theorems of the form |
|
119 |
||
3683 | 120 |
Key K : analz (insert (Key KAB) (spies evs)) ==> |
121 |
Key K : analz (spies evs) |
|
2090 | 122 |
|
123 |
A more general formula must be proved inductively. |
|
124 |
****) |
|
125 |
||
126 |
||
127 |
(** Session keys are not used to encrypt other session keys **) |
|
128 |
||
129 |
(*The equality makes the induction hypothesis easier to apply*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
130 |
Goal "evs : otway ==> \ |
5492 | 131 |
\ ALL K KK. KK <= -(range shrK) --> \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
132 |
\ (Key K : analz (Key``KK Un (spies evs))) = \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
133 |
\ (K : KK | Key K : analz (spies evs))"; |
2090 | 134 |
by (etac otway.induct 1); |
3683 | 135 |
by analz_spies_tac; |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
136 |
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
|
137 |
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
|
138 |
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
|
139 |
(*Fake*) |
4422
21238c9d363e
Simplified proofs using rewrites for f``A where f is injective
paulson
parents:
4155
diff
changeset
|
140 |
by (spy_analz_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2454
diff
changeset
|
141 |
qed_spec_mp "analz_image_freshK"; |
2090 | 142 |
|
143 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
144 |
Goal "[| evs : otway; KAB ~: range shrK |] ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
145 |
\ Key K : analz (insert (Key KAB) (spies evs)) = \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
146 |
\ (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
|
147 |
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
|
148 |
qed "analz_insert_freshK"; |
2090 | 149 |
|
150 |
||
4155 | 151 |
(*** The Key K uniquely identifies the Server's message. **) |
2090 | 152 |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
153 |
Goal "evs : otway ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
154 |
\ EX A' B' NA' NB'. ALL A B NA NB. \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
155 |
\ Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
156 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
157 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, K|}|} : set evs \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
158 |
\ --> A=A' & B=B' & NA=NA' & NB=NB'"; |
2090 | 159 |
by (etac otway.induct 1); |
4091 | 160 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
3730 | 161 |
by (ALLGOALS Clarify_tac); |
2090 | 162 |
(*Remaining cases: OR3 and OR4*) |
163 |
by (ex_strip_tac 2); |
|
3102 | 164 |
by (Blast_tac 2); |
2090 | 165 |
by (expand_case_tac "K = ?y" 1); |
166 |
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
|
167 |
(*...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
|
168 |
by (blast_tac (claset() addSEs spies_partsEs) 1); |
2090 | 169 |
val lemma = result(); |
170 |
||
171 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
172 |
Goal "[| Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
173 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
174 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
175 |
\ : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
176 |
\ Says Server B' \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
177 |
\ {|Crypt (shrK A') {|NA', Agent A', Agent B', K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
178 |
\ Crypt (shrK B') {|NB', Agent A', Agent B', K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
179 |
\ : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
180 |
\ evs : otway |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
181 |
\ ==> A=A' & B=B' & NA=NA' & NB=NB'"; |
2417 | 182 |
by (prove_unique_tac lemma 1); |
2090 | 183 |
qed "unique_session_keys"; |
184 |
||
185 |
||
186 |
||
187 |
(**** Authenticity properties relating to NA ****) |
|
188 |
||
189 |
(*If the encrypted message appears then it originated with the Server!*) |
|
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
190 |
Goal "[| A ~: bad; A ~= B; evs : otway |] \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
191 |
\ ==> Crypt (shrK A) {|NA, Agent A, Agent B, Key K|} : parts (spies evs) \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
192 |
\ --> (EX NB. Says Server B \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
193 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
194 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
195 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
196 |
by (parts_induct_tac 1); |
4470 | 197 |
by (Blast_tac 1); |
4091 | 198 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [ex_disj_distrib]))); |
2090 | 199 |
(*OR3*) |
3102 | 200 |
by (Blast_tac 1); |
2090 | 201 |
qed_spec_mp "NA_Crypt_imp_Server_msg"; |
202 |
||
203 |
||
2454 | 204 |
(*Corollary: if A receives B's OR4 message then it originated with the Server. |
205 |
Freshness may be inferred from nonce NA.*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
206 |
Goal "[| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
207 |
\ : set evs; \ |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
208 |
\ A ~: bad; A ~= B; evs : otway |] \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
209 |
\ ==> EX NB. Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
210 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
211 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
212 |
\ : set evs"; |
4470 | 213 |
by (blast_tac (claset() addSIs [NA_Crypt_imp_Server_msg]) 1); |
2331 | 214 |
qed "A_trusts_OR4"; |
2090 | 215 |
|
216 |
||
217 |
(** Crucial secrecy property: Spy does not see the keys sent in msg OR3 |
|
218 |
Does not in itself guarantee security: an attack could violate |
|
219 |
the premises, e.g. by having A=Spy **) |
|
220 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
221 |
Goal "[| A ~: bad; B ~: bad; evs : otway |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
222 |
\ ==> Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
223 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
224 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
225 |
\ : set evs --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
226 |
\ Notes Spy {|NA, NB, Key K|} ~: set evs --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
227 |
\ Key K ~: analz (spies evs)"; |
2090 | 228 |
by (etac otway.induct 1); |
3683 | 229 |
by analz_spies_tac; |
2090 | 230 |
by (ALLGOALS |
4091 | 231 |
(asm_simp_tac (simpset() addcongs [conj_cong, if_weak_cong] |
4509
828148415197
Making proofs faster, especially using keysFor_parts_insert
paulson
parents:
4477
diff
changeset
|
232 |
addsimps [analz_insert_eq, analz_insert_freshK] |
5535 | 233 |
@ pushes @ split_ifs))); |
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
234 |
(*Oops*) |
4091 | 235 |
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
|
236 |
(*OR4*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
237 |
by (Blast_tac 3); |
2090 | 238 |
(*OR3*) |
4470 | 239 |
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
|
240 |
(*Fake*) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3207
diff
changeset
|
241 |
by (spy_analz_tac 1); |
2090 | 242 |
val lemma = result() RS mp RS mp RSN(2,rev_notE); |
243 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
244 |
Goal "[| Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
245 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
246 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
247 |
\ : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
248 |
\ Notes Spy {|NA, NB, Key K|} ~: set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
249 |
\ A ~: bad; B ~: bad; evs : otway |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
250 |
\ ==> Key K ~: analz (spies evs)"; |
2090 | 251 |
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1); |
4091 | 252 |
by (blast_tac (claset() addSEs [lemma]) 1); |
2090 | 253 |
qed "Spy_not_see_encrypted_key"; |
254 |
||
255 |
||
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
256 |
(*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
|
257 |
what it is.*) |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
258 |
Goal "[| Says B' A (Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
259 |
\ : set evs; \ |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
260 |
\ ALL NB. Notes Spy {|NA, NB, Key K|} ~: set evs; \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
261 |
\ A ~: bad; B ~: bad; A ~= B; evs : otway |] \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
262 |
\ ==> Key K ~: analz (spies evs)"; |
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
263 |
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
|
264 |
qed "A_gets_good_key"; |
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
265 |
|
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
266 |
|
2090 | 267 |
(**** Authenticity properties relating to NB ****) |
268 |
||
269 |
(*If the encrypted message appears then it originated with the Server!*) |
|
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
270 |
Goal "[| B ~: bad; A ~= B; evs : otway |] \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
271 |
\ ==> Crypt (shrK B) {|NB, Agent A, Agent B, Key K|} : parts (spies evs) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
272 |
\ --> (EX NA. Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
273 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
274 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
275 |
\ : set evs)"; |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3516
diff
changeset
|
276 |
by (parts_induct_tac 1); |
4470 | 277 |
by (Blast_tac 1); |
4091 | 278 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [ex_disj_distrib]))); |
2090 | 279 |
(*OR3*) |
3102 | 280 |
by (Blast_tac 1); |
2090 | 281 |
qed_spec_mp "NB_Crypt_imp_Server_msg"; |
282 |
||
283 |
||
2454 | 284 |
(*Guarantee for B: if it gets a well-formed certificate then the Server |
285 |
has sent the correct message in round 3.*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
286 |
Goal "[| Says S' B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
287 |
\ : set evs; \ |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
288 |
\ B ~: bad; A ~= B; evs : otway |] \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
289 |
\ ==> EX NA. Says Server B \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
290 |
\ {|Crypt (shrK A) {|NA, Agent A, Agent B, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
291 |
\ Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
292 |
\ : set evs"; |
4470 | 293 |
by (blast_tac (claset() addSIs [NB_Crypt_imp_Server_msg]) 1); |
2331 | 294 |
qed "B_trusts_OR3"; |
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
295 |
|
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
296 |
|
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
297 |
(*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
|
298 |
Goal "[| Says S' B {|X, Crypt (shrK B) {|NB, Agent A, Agent B, Key K|}|} \ |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
299 |
\ : set evs; \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
300 |
\ ALL NA. Notes Spy {|NA, NB, Key K|} ~: set evs; \ |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5421
diff
changeset
|
301 |
\ A ~: bad; B ~: bad; A ~= B; evs : otway |] \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
302 |
\ ==> Key K ~: analz (spies evs)"; |
4598
649bf14debe7
Added some more explicit guarantees of key secrecy for agents
paulson
parents:
4537
diff
changeset
|
303 |
by (blast_tac (claset() addDs [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
|
304 |
qed "B_gets_good_key"; |