21 Nil "[]: ns_public" |
21 Nil "[]: ns_public" |
22 |
22 |
23 (*The spy MAY say anything he CAN say. We do not expect him to |
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 |
24 invent new nonces here, but he can also use NS1. Common to |
25 all similar protocols.*) |
25 all similar protocols.*) |
26 Fake "[| evs: ns_public; B ~= Spy; |
26 Fake "[| evs: ns_public; X: synth (analz (spies evs)) |] |
27 X: synth (analz (spies evs)) |] |
|
28 ==> Says Spy B X # evs : ns_public" |
27 ==> Says Spy B X # evs : ns_public" |
29 |
28 |
30 (*Alice initiates a protocol run, sending a nonce to Bob*) |
29 (*Alice initiates a protocol run, sending a nonce to Bob*) |
31 NS1 "[| evs1: ns_public; A ~= B; Nonce NA ~: used evs1 |] |
30 NS1 "[| evs1: ns_public; Nonce NA ~: used evs1 |] |
32 ==> Says A B (Crypt (pubK B) {|Nonce NA, Agent A|}) |
31 ==> Says A B (Crypt (pubK B) {|Nonce NA, Agent A|}) |
33 # evs1 : ns_public" |
32 # evs1 : ns_public" |
34 |
33 |
35 (*Bob responds to Alice's message with a further nonce*) |
34 (*Bob responds to Alice's message with a further nonce*) |
36 NS2 "[| evs2: ns_public; A ~= B; Nonce NB ~: used evs2; |
35 NS2 "[| evs2: ns_public; Nonce NB ~: used evs2; |
37 Says A' B (Crypt (pubK B) {|Nonce NA, Agent A|}) : set evs2 |] |
36 Says A' B (Crypt (pubK B) {|Nonce NA, Agent A|}) : set evs2 |] |
38 ==> Says B A (Crypt (pubK A) {|Nonce NA, Nonce NB|}) |
37 ==> Says B A (Crypt (pubK A) {|Nonce NA, Nonce NB|}) |
39 # evs2 : ns_public" |
38 # evs2 : ns_public" |
40 |
39 |
41 (*Alice proves her existence by sending NB back to Bob.*) |
40 (*Alice proves her existence by sending NB back to Bob.*) |