author | paulson |
Tue, 04 Aug 1998 16:06:55 +0200 | |
changeset 5242 | 3087dafb70ec |
parent 5223 | 4cb05273f764 |
child 5352 | a32312d17ed6 |
permissions | -rw-r--r-- |
5053 | 1 |
(* Title: HOL/Auth/Kerberos_BAN |
2 |
ID: $Id$ |
|
3 |
Author: Giampaolo Bella, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
6 |
The Kerberos protocol, BAN version. |
|
7 |
||
8 |
From page 251 of |
|
9 |
Burrows, Abadi and Needham. A Logic of Authentication. |
|
10 |
Proc. Royal Soc. 426 (1989) |
|
5064 | 11 |
|
5223
4cb05273f764
Removal of obsolete "open" commands from heads of .ML files
paulson
parents:
5114
diff
changeset
|
12 |
Confidentiality (secrecy) and authentication properties rely on |
4cb05273f764
Removal of obsolete "open" commands from heads of .ML files
paulson
parents:
5114
diff
changeset
|
13 |
temporal checks: strong guarantees in a little abstracted - but |
4cb05273f764
Removal of obsolete "open" commands from heads of .ML files
paulson
parents:
5114
diff
changeset
|
14 |
very realistic - model (see .thy). |
5053 | 15 |
|
5223
4cb05273f764
Removal of obsolete "open" commands from heads of .ML files
paulson
parents:
5114
diff
changeset
|
16 |
Tidied by lcp. |
5053 | 17 |
*) |
18 |
||
19 |
proof_timing:=true; |
|
20 |
HOL_quantifiers := false; |
|
21 |
||
22 |
AddEs spies_partsEs; |
|
23 |
AddDs [impOfSubs analz_subset_parts]; |
|
24 |
AddDs [impOfSubs Fake_parts_insert]; |
|
25 |
||
5064 | 26 |
AddIffs [SesKeyLife_LB, AutLife_LB]; |
5053 | 27 |
|
28 |
||
29 |
(*A "possibility property": there are traces that reach the end.*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
30 |
Goal "[| A ~= B; A ~= Server; B ~= Server |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
31 |
\ ==> EX Timestamp K. EX evs: kerberos_ban. \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
32 |
\ Says B A (Crypt K (Number Timestamp)) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
33 |
\ : set evs"; |
5053 | 34 |
by (REPEAT (resolve_tac [exI,bexI] 1)); |
35 |
by (rtac (kerberos_ban.Nil RS kerberos_ban.Kb1 RS kerberos_ban.Kb2 RS |
|
36 |
kerberos_ban.Kb3 RS kerberos_ban.Kb4) 2); |
|
37 |
by possibility_tac; |
|
38 |
by (ALLGOALS (simp_tac (simpset() addsimps [leD]))); (*from NatDef.ML!!!!*) |
|
39 |
by (cut_facts_tac [SesKeyLife_LB] 1); |
|
40 |
by (trans_tac 1); |
|
41 |
result(); |
|
42 |
||
43 |
||
44 |
||
45 |
(**** Inductive proofs about kerberos_ban ****) |
|
46 |
||
47 |
(*Nobody sends themselves messages*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
48 |
Goal "evs : kerberos_ban ==> ALL A X. Says A A X ~: set evs"; |
5053 | 49 |
by (etac kerberos_ban.induct 1); |
50 |
by Auto_tac; |
|
51 |
qed_spec_mp "not_Says_to_self"; |
|
52 |
Addsimps [not_Says_to_self]; |
|
53 |
AddSEs [not_Says_to_self RSN (2, rev_notE)]; |
|
54 |
||
55 |
||
56 |
(*Forwarding Lemma for reasoning about the encrypted portion of message Kb3*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
57 |
Goal "Says S A (Crypt KA {|Timestamp, B, K, X|}) : set evs \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
58 |
\ ==> X : parts (spies evs)"; |
5053 | 59 |
by (Blast_tac 1); |
60 |
qed "Kb3_msg_in_parts_spies"; |
|
61 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
62 |
Goal "Says Server A (Crypt (shrK A) {|Timestamp, B, K, X|}) : set evs \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
63 |
\ ==> K : parts (spies evs)"; |
5053 | 64 |
by (Blast_tac 1); |
65 |
qed "Oops_parts_spies"; |
|
66 |
||
67 |
(*For proving the easier theorems about X ~: parts (spies evs).*) |
|
68 |
fun parts_induct_tac i = |
|
69 |
etac kerberos_ban.induct i THEN |
|
70 |
forward_tac [Oops_parts_spies] (i+6) THEN |
|
71 |
forward_tac [Kb3_msg_in_parts_spies] (i+4) THEN |
|
72 |
prove_simple_subgoals_tac i; |
|
73 |
||
74 |
||
75 |
(*Spy never sees another agent's shared key! (unless it's bad at start)*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
76 |
Goal "evs : kerberos_ban ==> (Key (shrK A) : parts (spies evs)) = (A : bad)"; |
5053 | 77 |
by (parts_induct_tac 1); |
78 |
by (ALLGOALS Blast_tac); |
|
79 |
qed "Spy_see_shrK"; |
|
80 |
Addsimps [Spy_see_shrK]; |
|
81 |
||
82 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
83 |
Goal "evs : kerberos_ban ==> (Key (shrK A) : analz (spies evs)) = (A : bad)"; |
5053 | 84 |
by Auto_tac; |
85 |
qed "Spy_analz_shrK"; |
|
86 |
Addsimps [Spy_analz_shrK]; |
|
87 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
88 |
Goal "[| Key (shrK A) : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
89 |
\ evs : kerberos_ban |] ==> A:bad"; |
5053 | 90 |
by (blast_tac (claset() addDs [Spy_see_shrK]) 1); |
91 |
qed "Spy_see_shrK_D"; |
|
92 |
||
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]; |
|
95 |
||
96 |
||
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 : kerberos_ban ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
99 |
\ Key K ~: used evs --> K ~: keysFor (parts (spies evs))"; |
5053 | 100 |
by (parts_induct_tac 1); |
101 |
(*Fake*) |
|
102 |
by (blast_tac (claset() addSDs [keysFor_parts_insert]) 1); |
|
103 |
(*Kb2, Kb3, Kb4*) |
|
104 |
by (ALLGOALS Blast_tac); |
|
105 |
qed_spec_mp "new_keys_not_used"; |
|
106 |
||
107 |
bind_thm ("new_keys_not_analzd", |
|
108 |
[analz_subset_parts RS keysFor_mono, |
|
109 |
new_keys_not_used] MRS contra_subsetD); |
|
110 |
||
111 |
Addsimps [new_keys_not_used, new_keys_not_analzd]; |
|
112 |
||
113 |
||
114 |
(** Lemmas concerning the form of items passed in messages **) |
|
115 |
||
116 |
(*Describes the form of K, X and K' when the Server sends this message.*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
117 |
Goal "[| Says Server A (Crypt K' {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
118 |
\ : set evs; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
119 |
\ ==> K ~: range shrK & \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
120 |
\ X = (Crypt (shrK B) {|Number Ts, Agent A, Key K|}) & \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
121 |
\ K' = shrK A"; |
5053 | 122 |
by (etac rev_mp 1); |
123 |
by (etac kerberos_ban.induct 1); |
|
124 |
by Auto_tac; |
|
125 |
qed "Says_Server_message_form"; |
|
126 |
||
127 |
||
128 |
(*If the encrypted message appears then it originated with the Server |
|
129 |
PROVIDED that A is NOT compromised! |
|
130 |
||
131 |
This shows implicitly the FRESHNESS OF THE SESSION KEY to A |
|
132 |
*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
133 |
Goal "[| Crypt (shrK A) {|Number Ts, Agent B, Key K, X|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
134 |
\ : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
135 |
\ A ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
136 |
\ ==> Says Server A (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
137 |
\ : set evs"; |
5053 | 138 |
by (etac rev_mp 1); |
139 |
by (parts_induct_tac 1); |
|
140 |
by (Blast_tac 1); |
|
141 |
qed "A_trusts_K_by_Kb2"; |
|
142 |
||
143 |
||
144 |
(*If the TICKET appears then it originated with the Server*) |
|
145 |
(*FRESHNESS OF THE SESSION KEY to B*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
146 |
Goal "[| Crypt (shrK B) {|Number Ts, Agent A, Key K|} : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
147 |
\ B ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
148 |
\ ==> Says Server A \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
149 |
\ (Crypt (shrK A) {|Number Ts, Agent B, Key K, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
150 |
\ Crypt (shrK B) {|Number Ts, Agent A, Key K|}|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
151 |
\ : set evs"; |
5053 | 152 |
by (etac rev_mp 1); |
153 |
by (parts_induct_tac 1); |
|
154 |
by (Blast_tac 1); |
|
155 |
qed "B_trusts_K_by_Kb3"; |
|
156 |
||
157 |
||
158 |
(*EITHER describes the form of X when the following message is sent, |
|
159 |
OR reduces it to the Fake case. |
|
160 |
Use Says_Server_message_form if applicable.*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
161 |
Goal "[| Says S A (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
162 |
\ : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
163 |
\ evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
164 |
\==> (K ~: range shrK & X = (Crypt (shrK B) {|Number Ts, Agent A, Key K|}))\ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
165 |
\ | X : analz (spies evs)"; |
5053 | 166 |
by (case_tac "A : bad" 1); |
167 |
by (fast_tac (claset() addSDs [Says_imp_spies RS analz.Inj] |
|
168 |
addss (simpset())) 1); |
|
169 |
by (forward_tac [Says_imp_spies RS parts.Inj] 1); |
|
170 |
by (blast_tac (claset() addSDs [A_trusts_K_by_Kb2, |
|
171 |
Says_Server_message_form]) 1); |
|
172 |
qed "Says_S_message_form"; |
|
173 |
||
174 |
||
175 |
(*For proofs involving analz.*) |
|
176 |
val analz_spies_tac = |
|
177 |
forward_tac [Says_Server_message_form] 7 THEN |
|
178 |
forward_tac [Says_S_message_form] 5 THEN |
|
179 |
REPEAT_FIRST (eresolve_tac [asm_rl, conjE, disjE] ORELSE' hyp_subst_tac); |
|
180 |
||
181 |
||
182 |
(**** |
|
183 |
The following is to prove theorems of the form |
|
184 |
||
185 |
Key K : analz (insert (Key KAB) (spies evs)) ==> |
|
186 |
Key K : analz (spies evs) |
|
187 |
||
188 |
A more general formula must be proved inductively. |
|
189 |
||
190 |
****) |
|
191 |
||
192 |
||
193 |
(** Session keys are not used to encrypt other session keys **) |
|
194 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
195 |
Goal "evs : kerberos_ban ==> \ |
5053 | 196 |
\ ALL K KK. KK <= Compl (range shrK) --> \ |
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
197 |
\ (Key K : analz (Key``KK Un (spies evs))) = \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
198 |
\ (K : KK | Key K : analz (spies evs))"; |
5053 | 199 |
by (etac kerberos_ban.induct 1); |
200 |
by analz_spies_tac; |
|
201 |
by (REPEAT_FIRST (resolve_tac [allI, impI])); |
|
202 |
by (REPEAT_FIRST (rtac analz_image_freshK_lemma)); |
|
203 |
(*Takes 5 secs*) |
|
204 |
by (ALLGOALS (asm_simp_tac analz_image_freshK_ss)); |
|
205 |
(*Fake*) |
|
206 |
by (spy_analz_tac 1); |
|
207 |
qed_spec_mp "analz_image_freshK"; |
|
208 |
||
209 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
210 |
Goal "[| evs : kerberos_ban; KAB ~: range shrK |] ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
211 |
\ Key K : analz (insert (Key KAB) (spies evs)) = \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
212 |
\ (K = KAB | Key K : analz (spies evs))"; |
5053 | 213 |
by (asm_simp_tac (analz_image_freshK_ss addsimps [analz_image_freshK]) 1); |
214 |
qed "analz_insert_freshK"; |
|
215 |
||
216 |
||
217 |
(** The session key K uniquely identifies the message **) |
|
218 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
219 |
Goal "evs : kerberos_ban ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
220 |
\ EX A' Ts' B' X'. ALL A Ts B X. \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
221 |
\ Says Server A (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
222 |
\ : set evs \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
223 |
\ --> A=A' & Ts=Ts' & B=B' & X=X'"; |
5053 | 224 |
by (etac kerberos_ban.induct 1); |
225 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
|
226 |
by Safe_tac; |
|
227 |
(*Kb2: it can't be a new key*) |
|
228 |
by (expand_case_tac "K = ?y" 1); |
|
229 |
by (REPEAT (ares_tac [refl,exI,impI,conjI] 2)); |
|
230 |
by (blast_tac (claset() delrules [conjI]) 1); |
|
231 |
val lemma = result(); |
|
232 |
||
233 |
(*In messages of this form, the session key uniquely identifies the rest*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
234 |
Goal "[| Says Server A \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
235 |
\ (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
236 |
\ Says Server A' \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
237 |
\ (Crypt (shrK A') {|Number Ts', Agent B', Key K, X'|}) : set evs;\ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
238 |
\ evs : kerberos_ban |] ==> A=A' & Ts=Ts' & B=B' & X = X'"; |
5053 | 239 |
by (prove_unique_tac lemma 1); |
240 |
qed "unique_session_keys"; |
|
241 |
||
242 |
||
243 |
(** Lemma: the session key sent in msg Kb2 would be EXPIRED |
|
244 |
if the spy could see it! |
|
245 |
**) |
|
246 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
247 |
Goal "[| A ~: bad; B ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
248 |
\ ==> Says Server A \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
249 |
\ (Crypt (shrK A) {|Number Ts, Agent B, Key K, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
250 |
\ Crypt (shrK B) {|Number Ts, Agent A, Key K|}|})\ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
251 |
\ : set evs --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
252 |
\ Key K : analz (spies evs) --> Expired Ts evs"; |
5053 | 253 |
by (etac kerberos_ban.induct 1); |
254 |
by analz_spies_tac; |
|
255 |
by (ALLGOALS |
|
5064 | 256 |
(asm_simp_tac (simpset() addsimps ([analz_insert_eq, analz_insert_freshK] |
257 |
@ pushes)))); |
|
5053 | 258 |
(*Oops*) |
259 |
by (blast_tac (claset() addDs [unique_session_keys] addIs [less_SucI]) 4); |
|
260 |
(*Kb2*) |
|
5064 | 261 |
by (blast_tac (claset() addIs [parts_insertI, less_SucI]) 2); |
5053 | 262 |
(*Fake*) |
263 |
by (spy_analz_tac 1); |
|
264 |
(**LEVEL 6 **) |
|
5064 | 265 |
(*Kb3*) |
5053 | 266 |
by (case_tac "Aa : bad" 1); |
5064 | 267 |
by (blast_tac (claset() addDs [A_trusts_K_by_Kb2, unique_session_keys]) 2); |
268 |
by (blast_tac (claset() addDs [Says_imp_spies RS analz.Inj, |
|
269 |
Crypt_Spy_analz_bad, analz.Fst, analz.Snd] |
|
5053 | 270 |
addIs [less_SucI]) 1); |
271 |
val lemma = result() RS mp RS mp RSN(1,rev_notE); |
|
272 |
||
273 |
||
274 |
(** CONFIDENTIALITY for the SERVER: |
|
275 |
Spy does not see the keys sent in msg Kb2 |
|
276 |
as long as they have NOT EXPIRED |
|
277 |
**) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
278 |
Goal "[| Says Server A \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
279 |
\ (Crypt K' {|Number T, Agent B, Key K, X|}) : set evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
280 |
\ ~ Expired T evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
281 |
\ A ~: bad; B ~: bad; evs : kerberos_ban \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
282 |
\ |] ==> Key K ~: analz (spies evs)"; |
5053 | 283 |
by (forward_tac [Says_Server_message_form] 1 THEN assume_tac 1); |
5064 | 284 |
by (Clarify_tac 1); (*prevents PROOF FAILED*) |
5053 | 285 |
by (blast_tac (claset() addSEs [lemma]) 1); |
286 |
qed "Confidentiality_S"; |
|
287 |
||
288 |
(**** THE COUNTERPART OF CONFIDENTIALITY |
|
289 |
[|...; Expired Ts evs; ...|] ==> Key K : analz (spies evs) |
|
290 |
WOULD HOLD ONLY IF AN OOPS OCCURRED! ---> Nothing to prove! ****) |
|
291 |
||
292 |
||
293 |
(** CONFIDENTIALITY for ALICE: **) |
|
294 |
(** Also A_trusts_K_by_Kb2 RS Confidentiality_S **) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
295 |
Goal "[| Crypt (shrK A) {|Number T, Agent B, Key K, X|} : parts (spies evs);\ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
296 |
\ ~ Expired T evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
297 |
\ A ~: bad; B ~: bad; evs : kerberos_ban \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
298 |
\ |] ==> Key K ~: analz (spies evs)"; |
5064 | 299 |
by (blast_tac (claset() addSDs [A_trusts_K_by_Kb2, Confidentiality_S]) 1); |
5053 | 300 |
qed "Confidentiality_A"; |
301 |
||
302 |
||
303 |
(** CONFIDENTIALITY for BOB: **) |
|
304 |
(** Also B_trusts_K_by_Kb3 RS Confidentiality_S **) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
305 |
Goal "[| Crypt (shrK B) {|Number Tk, Agent A, Key K|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
306 |
\ : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
307 |
\ ~ Expired Tk evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
308 |
\ A ~: bad; B ~: bad; evs : kerberos_ban \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
309 |
\ |] ==> Key K ~: analz (spies evs)"; |
5053 | 310 |
by (blast_tac (claset() addSDs [B_trusts_K_by_Kb3, |
311 |
Confidentiality_S]) 1); |
|
312 |
qed "Confidentiality_B"; |
|
313 |
||
314 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
315 |
Goal "[| B ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
316 |
\ ==> Key K ~: analz (spies evs) --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
317 |
\ Says Server A (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
318 |
\ : set evs --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
319 |
\ Crypt K (Number Ta) : parts (spies evs) --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
320 |
\ Says B A (Crypt K (Number Ta)) : set evs"; |
5053 | 321 |
by (etac kerberos_ban.induct 1); |
322 |
by (forward_tac [Says_S_message_form] 5 THEN assume_tac 5); |
|
323 |
by (dtac Kb3_msg_in_parts_spies 5); |
|
324 |
by (forward_tac [Oops_parts_spies] 7); |
|
5064 | 325 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
5053 | 326 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
5064 | 327 |
(**LEVEL 6**) |
5053 | 328 |
by (Blast_tac 1); |
5064 | 329 |
by (Clarify_tac 1); |
5053 | 330 |
(* |
331 |
Subgoal 1: contradiction from the assumptions |
|
332 |
Key K ~: used evs2 and Crypt K (Number Ta) : parts (spies evs2) |
|
333 |
*) |
|
334 |
by (dtac Crypt_imp_invKey_keysFor 1); |
|
335 |
by (Asm_full_simp_tac 1); |
|
5064 | 336 |
(* the two tactics above detect the contradiction*) |
5053 | 337 |
by (case_tac "Ba : bad" 1); (*splits up the subgoal by the stated case*) |
338 |
by (blast_tac (claset() addDs [Says_imp_spies RS parts.Inj RS parts.Fst RS |
|
339 |
B_trusts_K_by_Kb3, |
|
340 |
unique_session_keys]) 2); |
|
341 |
by (blast_tac (claset() addDs [Says_imp_spies RS analz.Inj RS analz.Fst RS |
|
342 |
Crypt_Spy_analz_bad]) 1); |
|
343 |
val lemma_B = result(); |
|
344 |
||
345 |
||
346 |
(*AUTHENTICATION OF B TO A*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
347 |
Goal "[| Crypt K (Number Ta) : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
348 |
\ Crypt (shrK A) {|Number Ts, Agent B, Key K, X|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
349 |
\ : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
350 |
\ ~ Expired Ts evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
351 |
\ A ~: bad; B ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
352 |
\ ==> Says B A (Crypt K (Number Ta)) : set evs"; |
5053 | 353 |
by (blast_tac (claset() addSDs [A_trusts_K_by_Kb2] |
354 |
addSIs [lemma_B RS mp RS mp RS mp] |
|
355 |
addSEs [Confidentiality_S RSN (2,rev_notE)]) 1); |
|
356 |
qed "Authentication_B"; |
|
357 |
||
358 |
||
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
359 |
Goal "[| A ~: bad; B ~: bad; evs : kerberos_ban |] ==> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
360 |
\ Key K ~: analz (spies evs) --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
361 |
\ Says Server A (Crypt (shrK A) {|Number Ts, Agent B, Key K, X|}) \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
362 |
\ : set evs --> \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
363 |
\ Crypt K {|Agent A, Number Ta|} : parts (spies evs) -->\ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
364 |
\ Says A B {|X, Crypt K {|Agent A, Number Ta|}|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
365 |
\ : set evs"; |
5053 | 366 |
by (etac kerberos_ban.induct 1); |
367 |
by (forward_tac [Says_S_message_form] 5 THEN assume_tac 5); |
|
368 |
by (forward_tac [Kb3_msg_in_parts_spies] 5); |
|
369 |
by (forward_tac [Oops_parts_spies] 7); |
|
5064 | 370 |
by (REPEAT (FIRSTGOAL analz_mono_contra_tac)); |
5053 | 371 |
by (ALLGOALS (asm_simp_tac (simpset() addsimps [all_conj_distrib]))); |
5064 | 372 |
(**LEVEL 6**) |
5053 | 373 |
by (Blast_tac 1); |
5064 | 374 |
by (Clarify_tac 1); |
5053 | 375 |
by (dtac Crypt_imp_invKey_keysFor 1); |
376 |
by (Asm_full_simp_tac 1); |
|
5064 | 377 |
by (blast_tac (claset() addDs [A_trusts_K_by_Kb2, unique_session_keys]) 1); |
5053 | 378 |
val lemma_A = result(); |
379 |
||
380 |
||
381 |
(*AUTHENTICATION OF A TO B*) |
|
5114
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
382 |
Goal "[| Crypt K {|Agent A, Number Ta|} : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
383 |
\ Crypt (shrK B) {|Number Ts, Agent A, Key K|} \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
384 |
\ : parts (spies evs); \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
385 |
\ ~ Expired Ts evs; \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
386 |
\ A ~: bad; B ~: bad; evs : kerberos_ban |] \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
387 |
\ ==> Says A B {|Crypt (shrK B) {|Number Ts, Agent A, Key K|}, \ |
c729d4c299c1
Deleted leading parameters thanks to new Goal command
paulson
parents:
5076
diff
changeset
|
388 |
\ Crypt K {|Agent A, Number Ta|}|} : set evs"; |
5053 | 389 |
by (blast_tac (claset() addSDs [B_trusts_K_by_Kb3] |
390 |
addSIs [lemma_A RS mp RS mp RS mp] |
|
391 |
addSEs [Confidentiality_S RSN (2,rev_notE)]) 1); |
|
392 |
qed "Authentication_A"; |