author | paulson |
Thu, 19 Dec 1996 11:58:39 +0100 | |
changeset 2451 | ce85a2aafc7a |
parent 2378 | fc103154ad8f |
child 2516 | 4d68fbe6378b |
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 |
||
2378 | 17 |
consts otway :: agent set => event list set |
2090 | 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 |] |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
32 |
==> Says A B {|Agent A, Agent B, Nonce (newN(length evs))|} |
2090 | 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 |] |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
39 |
==> Says B Server {|Agent A, Agent B, Nonce NA, |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
40 |
Nonce (newN(length evs))|} |
2090 | 41 |
# evs : otway lost" |
42 |
||
43 |
(*The Server receives Bob's message. Then he sends a new |
|
44 |
session key to Bob with a packet for forwarding to Alice.*) |
|
45 |
OR3 "[| evs: otway lost; B ~= Server; A ~= B; |
|
46 |
Says B' Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
|
47 |
: set_of_list evs |] |
|
48 |
==> Says Server B |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
49 |
{|Crypt (shrK A) {|Nonce NA, Agent A, Agent B, |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
50 |
Key(newK(length evs))|}, |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
51 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, |
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2378
diff
changeset
|
52 |
Key(newK(length evs))|}|} |
2090 | 53 |
# evs : otway lost" |
54 |
||
55 |
(*Bob receives the Server's (?) message and compares the Nonces with |
|
56 |
those in the message he previously sent the Server.*) |
|
2131 | 57 |
OR4 "[| evs: otway lost; A ~= B; |
2090 | 58 |
Says S B {|X, |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
59 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|} |
2090 | 60 |
: set_of_list evs; |
61 |
Says B Server {|Agent A, Agent B, Nonce NA, Nonce NB|} |
|
62 |
: set_of_list evs |] |
|
63 |
==> Says B A X # evs : otway lost" |
|
64 |
||
2131 | 65 |
(*This message models possible leaks of session keys. The nonces |
66 |
identify the protocol run. B is not assumed to know shrK A.*) |
|
67 |
Oops "[| evs: otway lost; B ~= Spy; |
|
68 |
Says Server B |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
69 |
{|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
|
70 |
Crypt (shrK B) {|Nonce NB, Agent A, Agent B, Key K|}|} |
2131 | 71 |
: set_of_list evs |] |
72 |
==> Says B Spy {|Nonce NA, Nonce NB, Key K|} # evs : otway lost" |
|
2090 | 73 |
|
74 |
end |