author | paulson |
Tue, 27 Feb 2001 16:13:23 +0100 | |
changeset 11185 | 1b737b4c2108 |
parent 6335 | 7e4bffaa2a3e |
child 11251 | a6816d47f41d |
permissions | -rw-r--r-- |
1995 | 1 |
(* Title: HOL/Auth/Yahalom |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
2 |
ID: $Id$ |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
4 |
Copyright 1996 University of Cambridge |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
5 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
6 |
Inductive relation "yahalom" for the Yahalom protocol. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
7 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
8 |
From page 257 of |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
9 |
Burrows, Abadi and Needham. A Logic of Authentication. |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
10 |
Proc. Royal Soc. 426 (1989) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
11 |
*) |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
12 |
|
1995 | 13 |
Yahalom = Shared + |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
14 |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3481
diff
changeset
|
15 |
consts yahalom :: event list set |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3481
diff
changeset
|
16 |
inductive "yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
17 |
intrs |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
18 |
(*Initial trace is empty*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
19 |
Nil "[] \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
20 |
|
2032 | 21 |
(*The spy MAY say anything he CAN say. We do not expect him to |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
22 |
invent new nonces here, but he can also use NS1. Common to |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
23 |
all similar protocols.*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
24 |
Fake "[| evsf \\<in> yahalom; X \\<in> synth (analz (knows Spy evsf)) |] |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
25 |
==> Says Spy B X # evsf \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
26 |
|
6335 | 27 |
(*A message that has been sent can be received by the |
28 |
intended recipient.*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
29 |
Reception "[| evsr \\<in> yahalom; Says A B X \\<in> set evsr |] |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
30 |
==> Gets B X # evsr \\<in> yahalom" |
6335 | 31 |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
32 |
(*Alice initiates a protocol run*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
33 |
YM1 "[| evs1 \\<in> yahalom; Nonce NA \\<notin> used evs1 |] |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
34 |
==> Says A B {|Agent A, Nonce NA|} # evs1 \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
35 |
|
6335 | 36 |
(*Bob's response to Alice's message.*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
37 |
YM2 "[| evs2 \\<in> yahalom; Nonce NB \\<notin> used evs2; |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
38 |
Gets B {|Agent A, Nonce NA|} \\<in> set evs2 |] |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
39 |
==> Says B Server |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
40 |
{|Agent B, Crypt (shrK B) {|Agent A, Nonce NA, Nonce NB|}|} |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
41 |
# evs2 \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
42 |
|
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
43 |
(*The Server receives Bob's message. He responds by sending a |
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
44 |
new session key to Alice, with a packet for forwarding to Bob.*) |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
45 |
YM3 "[| evs3 \\<in> yahalom; Key KAB \\<notin> used evs3; |
6335 | 46 |
Gets Server |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2156
diff
changeset
|
47 |
{|Agent B, Crypt (shrK B) {|Agent A, Nonce NA, Nonce NB|}|} |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
48 |
\\<in> set evs3 |] |
1995 | 49 |
==> Says Server A |
3447
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
50 |
{|Crypt (shrK A) {|Agent B, Key KAB, Nonce NA, Nonce NB|}, |
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
51 |
Crypt (shrK B) {|Agent A, Key KAB|}|} |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
52 |
# evs3 \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
53 |
|
1995 | 54 |
(*Alice receives the Server's (?) message, checks her Nonce, and |
3961 | 55 |
uses the new session key to send Bob his Nonce. The premise |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
56 |
A \\<noteq> Server is needed to prove Says_Server_not_range.*) |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
57 |
YM4 "[| evs4 \\<in> yahalom; A \\<noteq> Server; |
6335 | 58 |
Gets A {|Crypt(shrK A) {|Agent B, Key K, Nonce NA, Nonce NB|}, X|} |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
59 |
\\<in> set evs4; |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
60 |
Says A B {|Agent A, Nonce NA|} \\<in> set evs4 |] |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
61 |
==> Says A B {|X, Crypt K (Nonce NB)|} # evs4 \\<in> yahalom" |
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
62 |
|
2110 | 63 |
(*This message models possible leaks of session keys. The Nonces |
2156 | 64 |
identify the protocol run. Quoting Server here ensures they are |
65 |
correct.*) |
|
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
66 |
Oops "[| evso \\<in> yahalom; |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2156
diff
changeset
|
67 |
Says Server A {|Crypt (shrK A) |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2156
diff
changeset
|
68 |
{|Agent B, Key K, Nonce NA, Nonce NB|}, |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
69 |
X|} \\<in> set evso |] |
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
70 |
==> Notes Spy {|Nonce NA, Nonce NB, Key K|} # evso \\<in> yahalom" |
2110 | 71 |
|
3447
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
72 |
|
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
73 |
constdefs |
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
74 |
KeyWithNonce :: [key, nat, event list] => bool |
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
75 |
"KeyWithNonce K NB evs == |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
76 |
\\<exists>A B na X. |
3447
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
77 |
Says Server A {|Crypt (shrK A) {|Agent B, Key K, na, Nonce NB|}, X|} |
11185
1b737b4c2108
Some X-symbols for <notin>, <noteq>, <forall>, <exists>
paulson
parents:
6335
diff
changeset
|
78 |
\\<in> set evs" |
3447
c7c8c0db05b9
Defines KeyWithNonce, which is used to prove the secrecy of NB
paulson
parents:
2516
diff
changeset
|
79 |
|
1985
84cf16192e03
Tidied many proofs, using AddIffs to let equivalences take
paulson
parents:
diff
changeset
|
80 |
end |