author | paulson |
Wed, 10 Mar 1999 10:42:11 +0100 | |
changeset 6333 | b1dec44d0018 |
parent 6308 | 76f3865a2b1d |
child 11185 | 1b737b4c2108 |
permissions | -rw-r--r-- |
2090 | 1 |
(* Title: HOL/Auth/OtwayRees |
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 |
||
8 |
Simplified version with minimal encryption but explicit messages |
|
9 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
10 |
Note that the formalization does not even assume that nonces are fresh. |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
11 |
This is because the protocol does not rely on uniqueness of nonces for |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
12 |
security, only for freshness, and the proof script does not prove freshness |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
13 |
properties. |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
14 |
|
2090 | 15 |
From page 11 of |
16 |
Abadi and Needham. Prudent Engineering Practice for Cryptographic Protocols. |
|
17 |
IEEE Trans. SE 22 (1), 1996 |
|
18 |
*) |
|
19 |
||
20 |
OtwayRees_AN = Shared + |
|
21 |
||
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3466
diff
changeset
|
22 |
consts otway :: event list set |
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3466
diff
changeset
|
23 |
inductive "otway" |
2090 | 24 |
intrs |
25 |
(*Initial trace is empty*) |
|
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3466
diff
changeset
|
26 |
Nil "[]: otway" |
2090 | 27 |
|
28 |
(*The spy MAY say anything he CAN say. We do not expect him to |
|
29 |
invent new nonces here, but he can also use NS1. Common to |
|
30 |
all similar protocols.*) |
|
6308
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
31 |
Fake "[| evs: otway; X: synth (analz (knows Spy evs)) |] |
3519
ab0a9fbed4c0
Changing "lost" from a parameter of protocol definitions to a constant.
paulson
parents:
3466
diff
changeset
|
32 |
==> Says Spy B X # evs : otway" |
2090 | 33 |
|
6308
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
34 |
(*A message that has been sent can be received by the |
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
35 |
intended recipient.*) |
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
36 |
Reception "[| evsr: otway; Says A B X : set evsr |] |
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
37 |
==> Gets B X # evsr : otway" |
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
38 |
|
2090 | 39 |
(*Alice initiates a protocol run*) |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
40 |
OR1 "[| evs1: otway |] |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
41 |
==> Says A B {|Agent A, Agent B, Nonce NA|} # evs1 : otway" |
2090 | 42 |
|
6333 | 43 |
(*Bob's response to Alice's message.*) |
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
44 |
OR2 "[| evs2: otway; |
6308
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
45 |
Gets B {|Agent A, Agent B, Nonce NA|} : set evs2 |] |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
46 |
==> Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
47 |
# evs2 : otway" |
2090 | 48 |
|
49 |
(*The Server receives Bob's message. Then he sends a new |
|
50 |
session key to Bob with a packet for forwarding to Alice.*) |
|
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
51 |
OR3 "[| evs3: otway; Key KAB ~: used evs3; |
6308
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
52 |
Gets Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
53 |
: set evs3 |] |
2090 | 54 |
==> Says Server B |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
55 |
{|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key KAB|}, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
56 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key KAB|}|} |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
57 |
# evs3 : otway" |
2090 | 58 |
|
59 |
(*Bob receives the Server's (?) message and compares the Nonces with |
|
5434
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
60 |
those in the message he previously sent the Server. |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
61 |
Need B ~= Server because we allow messages to self.*) |
9b4bed3f394c
Got rid of not_Says_to_self and most uses of ~= in definitions and theorems
paulson
parents:
5359
diff
changeset
|
62 |
OR4 "[| evs4: otway; B ~= Server; |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
63 |
Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|} : set evs4; |
6308
76f3865a2b1d
Added Bella's "Gets" model for Otway_Rees. Also affects some other theories.
paulson
parents:
5434
diff
changeset
|
64 |
Gets B {|X, Crypt(shrK B){|Nonce NB,Agent A,Agent B,Key K|}|} |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
65 |
: set evs4 |] |
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
66 |
==> Says B A X # evs4 : otway" |
2090 | 67 |
|
2131 | 68 |
(*This message models possible leaks of session keys. The nonces |
69 |
identify the protocol run. B is not assumed to know shrK A.*) |
|
5359 | 70 |
Oops "[| evso: otway; |
2131 | 71 |
Says Server B |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
72 |
{|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key K|}, |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
73 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|} |
3659
eddedfe2f3f8
Renamed "evs" to "evs1", "evs2", etc. in protocol inductive definition
paulson
parents:
3519
diff
changeset
|
74 |
: set evso |] |
4537
4e835bd9fada
Expressed most Oops rules using Notes instead of Says, and other tidying
paulson
parents:
3683
diff
changeset
|
75 |
==> Notes Spy {|Nonce NA, Nonce NB, Key K|} # evso : otway" |
2090 | 76 |
|
77 |
end |