5 |
5 |
6 Theory of Shared Keys (common to all symmetric-key protocols) |
6 Theory of Shared Keys (common to all symmetric-key protocols) |
7 |
7 |
8 Server keys; initial states of agents; new nonces and keys; function "sees" |
8 Server keys; initial states of agents; new nonces and keys; function "sees" |
9 *) |
9 *) |
|
10 |
|
11 |
|
12 Addsimps [de_Morgan_conj, de_Morgan_disj, not_all, not_ex]; |
|
13 (**Addsimps [all_conj_distrib, ex_disj_distrib];**) |
10 |
14 |
11 |
15 |
12 val prems = goal HOL.thy "[| P ==> Q(True); ~P ==> Q(False) |] ==> Q(P)"; |
16 val prems = goal HOL.thy "[| P ==> Q(True); ~P ==> Q(False) |] ==> Q(P)"; |
13 by (excluded_middle_tac "P" 1); |
17 by (excluded_middle_tac "P" 1); |
14 by (asm_simp_tac (!simpset addsimps prems) 1); |
18 by (asm_simp_tac (!simpset addsimps prems) 1); |
162 goal thy "Says A B X : set_of_list evs --> X : sees lost Spy evs"; |
166 goal thy "Says A B X : set_of_list evs --> X : sees lost Spy evs"; |
163 by (list.induct_tac "evs" 1); |
167 by (list.induct_tac "evs" 1); |
164 by (Auto_tac ()); |
168 by (Auto_tac ()); |
165 qed_spec_mp "Says_imp_sees_Spy"; |
169 qed_spec_mp "Says_imp_sees_Spy"; |
166 |
170 |
167 Addsimps [Says_imp_sees_Spy]; |
|
168 AddIs [Says_imp_sees_Spy]; |
|
169 |
|
170 goal thy |
171 goal thy |
171 "!!evs. [| Says A B (Crypt X (shrK C)) : set_of_list evs; \ |
172 "!!evs. [| Says A B (Crypt X (shrK C)) : set_of_list evs; \ |
172 \ C : lost |] \ |
173 \ C : lost |] \ |
173 \ ==> X : analz (sees lost Spy evs)"; |
174 \ ==> X : analz (sees lost Spy evs)"; |
174 by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj] |
175 by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj] |
175 addss (!simpset)) 1); |
176 addss (!simpset)) 1); |
176 qed "Says_Crypt_lost"; |
177 qed "Says_Crypt_lost"; |
|
178 |
|
179 goal thy |
|
180 "!!evs. [| Says A B (Crypt X (shrK C)) : set_of_list evs; \ |
|
181 \ X ~: analz (sees lost Spy evs) |] \ |
|
182 \ ==> C ~: lost"; |
|
183 by (fast_tac (!claset addSDs [Says_imp_sees_Spy RS analz.Inj] |
|
184 addss (!simpset)) 1); |
|
185 qed "Says_Crypt_not_lost"; |
177 |
186 |
178 goal thy "initState lost C <= Key `` range shrK"; |
187 goal thy "initState lost C <= Key `` range shrK"; |
179 by (agent.induct_tac "C" 1); |
188 by (agent.induct_tac "C" 1); |
180 by (Auto_tac ()); |
189 by (Auto_tac ()); |
181 qed "initState_subset"; |
190 qed "initState_subset"; |