author | paulson |
Fri, 11 Jul 1997 13:27:15 +0200 | |
changeset 3513 | 4d4f8c18255e |
parent 3465 | e85c24717cad |
child 3519 | ab0a9fbed4c0 |
permissions | -rw-r--r-- |
2002 | 1 |
(* Title: HOL/Auth/OtwayRees_Bad |
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 |
The FAULTY version omitting encryption of Nonce NB, as suggested on page 247 of |
|
9 |
Burrows, Abadi and Needham. A Logic of Authentication. |
|
10 |
Proc. Royal Soc. 426 (1989) |
|
11 |
*) |
|
12 |
||
13 |
OtwayRees_Bad = Shared + |
|
14 |
||
2052 | 15 |
consts lost :: agent set (*No need for it to be a variable*) |
16 |
otway :: event list set |
|
17 |
||
2002 | 18 |
inductive otway |
19 |
intrs |
|
20 |
(*Initial trace is empty*) |
|
21 |
Nil "[]: otway" |
|
22 |
||
2032 | 23 |
(*The spy MAY say anything he CAN say. We do not expect him to |
2002 | 24 |
invent new nonces here, but he can also use NS1. Common to |
25 |
all similar protocols.*) |
|
2052 | 26 |
Fake "[| evs: otway; B ~= Spy; X: synth (analz (sees lost Spy evs)) |] |
2032 | 27 |
==> Says Spy B X # evs : otway" |
2002 | 28 |
|
29 |
(*Alice initiates a protocol run*) |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
30 |
OR1 "[| evs: otway; A ~= B; B ~= Server; Nonce NA ~: used evs |] |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
31 |
==> Says A B {|Nonce NA, Agent A, Agent B, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
32 |
Crypt (shrK A) {|Nonce NA, Agent A, Agent B|} |} |
2002 | 33 |
# evs : otway" |
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 |
We modify the published protocol by NOT encrypting NB.*) |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
38 |
OR2 "[| evs: otway; B ~= Server; Nonce NB ~: used evs; |
3465 | 39 |
Says A' B {|Nonce NA, Agent A, Agent B, X|} : set evs |] |
2002 | 40 |
==> Says B Server |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
41 |
{|Nonce NA, Agent A, Agent B, X, Nonce NB, |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
42 |
Crypt (shrK B) {|Nonce NA, Agent A, Agent B|}|} |
2002 | 43 |
# evs : otway" |
44 |
||
45 |
(*The Server receives Bob's message and checks that the three NAs |
|
46 |
match. Then he sends a new session key to Bob with a packet for |
|
47 |
forwarding to Alice.*) |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
48 |
OR3 "[| evs: otway; B ~= Server; Key KAB ~: used evs; |
2002 | 49 |
Says B' Server |
50 |
{|Nonce NA, Agent A, Agent B, |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
51 |
Crypt (shrK A) {|Nonce NA, Agent A, Agent B|}, |
2002 | 52 |
Nonce NB, |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
53 |
Crypt (shrK B) {|Nonce NA, Agent A, Agent B|}|} |
3465 | 54 |
: set evs |] |
2002 | 55 |
==> Says Server B |
56 |
{|Nonce NA, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
57 |
Crypt (shrK A) {|Nonce NA, Key KAB|}, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
58 |
Crypt (shrK B) {|Nonce NB, Key KAB|}|} |
2002 | 59 |
# evs : otway" |
60 |
||
61 |
(*Bob receives the Server's (?) message and compares the Nonces with |
|
62 |
those in the message he previously sent the Server.*) |
|
2131 | 63 |
OR4 "[| evs: otway; A ~= B; |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
64 |
Says B Server {|Nonce NA, Agent A, Agent B, X', Nonce NB, X''|} |
3465 | 65 |
: set evs; |
2837
dee1c7f1f576
Trivial renamings (for consistency with CSFW papers)
paulson
parents:
2516
diff
changeset
|
66 |
Says S' B {|Nonce NA, X, Crypt (shrK B) {|Nonce NB, Key K|}|} |
3465 | 67 |
: set evs |] |
2002 | 68 |
==> Says B A {|Nonce NA, X|} # evs : otway" |
69 |
||
2131 | 70 |
(*This message models possible leaks of session keys. The nonces |
71 |
identify the protocol run.*) |
|
72 |
Oops "[| evs: otway; B ~= Spy; |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2131
diff
changeset
|
73 |
Says Server B {|Nonce NA, X, Crypt (shrK B) {|Nonce NB, Key K|}|} |
3465 | 74 |
: set evs |] |
2131 | 75 |
==> Says B Spy {|Nonce NA, Nonce NB, Key K|} # evs : otway" |
2002 | 76 |
|
77 |
end |