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