author | paulson |
Fri, 29 Nov 1996 18:03:21 +0100 | |
changeset 2284 | 80ebd1a213fd |
parent 2131 | 3106a99d30a5 |
child 2378 | fc103154ad8f |
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 |
||
10 |
From page 11 of |
|
11 |
Abadi and Needham. Prudent Engineering Practice for Cryptographic Protocols. |
|
12 |
IEEE Trans. SE 22 (1), 1996 |
|
13 |
*) |
|
14 |
||
15 |
OtwayRees_AN = Shared + |
|
16 |
||
17 |
consts otway :: "agent set => event list set" |
|
18 |
inductive "otway lost" |
|
19 |
intrs |
|
20 |
(*Initial trace is empty*) |
|
21 |
Nil "[]: otway lost" |
|
22 |
||
23 |
(*The spy MAY say anything he CAN say. We do not expect him to |
|
24 |
invent new nonces here, but he can also use NS1. Common to |
|
25 |
all similar protocols.*) |
|
26 |
Fake "[| evs: otway lost; B ~= Spy; |
|
27 |
X: synth (analz (sees lost Spy evs)) |] |
|
28 |
==> Says Spy B X # evs : otway lost" |
|
29 |
||
30 |
(*Alice initiates a protocol run*) |
|
31 |
OR1 "[| evs: otway lost; A ~= B; B ~= Server |] |
|
32 |
==> Says A B {|Agent A, Agent B, Nonce (newN evs)|} |
|
33 |
# evs : otway lost" |
|
34 |
||
35 |
(*Bob's response to Alice's message. Bob doesn't know who |
|
36 |
the sender is, hence the A' in the sender field.*) |
|
37 |
OR2 "[| evs: otway lost; B ~= Server; |
|
38 |
Says A' B {|Agent A, Agent B, Nonce NA|} : set_of_list evs |] |
|
39 |
==> Says B Server {|Agent A, Agent B, Nonce NA, Nonce (newN evs)|} |
|
40 |
# evs : otway lost" |
|
41 |
||
42 |
(*The Server receives Bob's message. Then he sends a new |
|
43 |
session key to Bob with a packet for forwarding to Alice.*) |
|
44 |
OR3 "[| evs: otway lost; B ~= Server; A ~= B; |
|
45 |
Says B' Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
|
46 |
: set_of_list evs |] |
|
47 |
==> Says Server B |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
48 |
{|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, Key(newK evs)|}, |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
49 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key(newK evs)|}|} |
2090 | 50 |
# evs : otway lost" |
51 |
||
52 |
(*Bob receives the Server's (?) message and compares the Nonces with |
|
53 |
those in the message he previously sent the Server.*) |
|
2131 | 54 |
OR4 "[| evs: otway lost; A ~= B; |
2090 | 55 |
Says S B {|X, |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
56 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|} |
2090 | 57 |
: set_of_list evs; |
58 |
Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
|
59 |
: set_of_list evs |] |
|
60 |
==> Says B A X # evs : otway lost" |
|
61 |
||
2131 | 62 |
(*This message models possible leaks of session keys. The nonces |
63 |
identify the protocol run. B is not assumed to know shrK A.*) |
|
64 |
Oops "[| evs: otway lost; B ~= Spy; |
|
65 |
Says Server B |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
66 |
{|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
|
67 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|} |
2131 | 68 |
: set_of_list evs |] |
69 |
==> Says B Spy {|Nonce NA, Nonce NB, Key K|} # evs : otway lost" |
|
2090 | 70 |
|
71 |
end |