author | nipkow |
Thu, 26 Jun 1997 13:20:50 +0200 | |
changeset 3465 | e85c24717cad |
parent 2549 | 0c723635b9e6 |
child 3466 | 30791e5a69c4 |
permissions | -rw-r--r-- |
2318 | 1 |
(* Title: HOL/Auth/NS_Public |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1996 University of Cambridge |
|
5 |
||
6 |
Inductive relation "ns_public" for the Needham-Schroeder Public-Key protocol. |
|
2538 | 7 |
Version incorporating Lowe's fix (inclusion of B's identity in round 2). |
2318 | 8 |
*) |
9 |
||
10 |
NS_Public = Public + |
|
11 |
||
2549 | 12 |
consts lost :: agent set (*No need for it to be a variable*) |
2318 | 13 |
ns_public :: event list set |
2549 | 14 |
|
2318 | 15 |
inductive ns_public |
16 |
intrs |
|
17 |
(*Initial trace is empty*) |
|
18 |
Nil "[]: ns_public" |
|
19 |
||
20 |
(*The spy MAY say anything he CAN say. We do not expect him to |
|
21 |
invent new nonces here, but he can also use NS1. Common to |
|
22 |
all similar protocols.*) |
|
23 |
Fake "[| evs: ns_public; B ~= Spy; |
|
24 |
X: synth (analz (sees lost Spy evs)) |] |
|
25 |
==> Says Spy B X # evs : ns_public" |
|
26 |
||
27 |
(*Alice initiates a protocol run, sending a nonce to Bob*) |
|
2497 | 28 |
NS1 "[| evs: ns_public; A ~= B; Nonce NA ~: used evs |] |
29 |
==> Says A B (Crypt (pubK B) {|Nonce NA, Agent A|}) |
|
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2318
diff
changeset
|
30 |
# evs : ns_public" |
2318 | 31 |
|
32 |
(*Bob responds to Alice's message with a further nonce*) |
|
2497 | 33 |
NS2 "[| evs: ns_public; A ~= B; Nonce NB ~: used evs; |
2318 | 34 |
Says A' B (Crypt (pubK B) {|Nonce NA, Agent A|}) |
3465 | 35 |
: set evs |] |
2497 | 36 |
==> Says B A (Crypt (pubK A) {|Nonce NA, Nonce NB, Agent B|}) |
2451
ce85a2aafc7a
Extensive tidying and simplification, largely stemming from
paulson
parents:
2318
diff
changeset
|
37 |
# evs : ns_public" |
2318 | 38 |
|
39 |
(*Alice proves her existence by sending NB back to Bob.*) |
|
40 |
NS3 "[| evs: ns_public; A ~= B; |
|
3465 | 41 |
Says A B (Crypt (pubK B) {|Nonce NA, Agent A|}) : set evs; |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2497
diff
changeset
|
42 |
Says B' A (Crypt (pubK A) {|Nonce NA, Nonce NB, Agent B|}) |
3465 | 43 |
: set evs |] |
2318 | 44 |
==> Says A B (Crypt (pubK B) (Nonce NB)) # evs : ns_public" |
45 |
||
46 |
(**Oops message??**) |
|
47 |
||
48 |
rules |
|
49 |
(*Spy has access to his own key for spoof messages*) |
|
50 |
Spy_in_lost "Spy: lost" |
|
51 |
||
52 |
end |