From 908061c33ee7a8d90bf1cbf890c82866a4c8dc9f Mon Sep 17 00:00:00 2001 From: ccremers Date: Mon, 25 Oct 2004 10:33:14 +0000 Subject: [PATCH] - Added another protocol. --- spdl/gong-nonce-b.spdl | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 spdl/gong-nonce-b.spdl diff --git a/spdl/gong-nonce-b.spdl b/spdl/gong-nonce-b.spdl new file mode 100644 index 0000000..30839c0 --- /dev/null +++ b/spdl/gong-nonce-b.spdl @@ -0,0 +1,77 @@ +usertype Sessionkey; +usertype Keypart; +secret k: Function; +const f: Function; + +/* + * Gong nonce based alternative + * + * Boyd & Mathuria: Protocols for authentication and key establishment + * (2003) p. 101 + */ + +protocol gongnonceb(I,R,S) +{ + role I + { + const ni: Nonce; + var nr: Nonce; + const ki: Keypart; + var kr: Keypart; + + send_1 (I,S, I,R, { I,S,I, ki, R }k(I,S), ni ); + read_4 (S,I, { S,I,R,kr,I }k(I,S), { R,I,ni }f(ki,kr), nr ); + send_5 (I,R, { I,R,nr }f(ki,kr) ); + + claim_6 (I, Secret, ki,kr); + claim_8 (I, Nisynch); + } + + role R + { + var ni: Nonce; + const nr: Nonce; + const kr: Keypart; + var ki: Keypart; + + read_2 (S,R, I,R, { S,R,I, ki, R }k(R,S), ni ); + send_3 (R,S, { R,S,R,kr,I }k(R,S), { R,I, ni }f(ki,kr), nr ); + read_5 (I,R, { I,R,nr }f(ki,kr) ); + + claim_7 (R, Secret, ki,kr); + claim_9 (R, Nisynch); + } + + role S + { + var ni,nr: Nonce; + var ki,kr: Keypart; + var T; + + read_1 (I,S, I,R, { I,S,I, ki, R }k(I,S), ni ); + send_2 (S,R, I,R, { S,R,I, ki, R }k(R,S), ni ); + read_3 (R,S, { R,S,R,kr,I }k(R,S), T, nr ); + send_4 (S,I, { S,I,R,kr,I }k(I,S), T, nr ); + } +} + +const Alice,Bob,Simon,Eve: Agent; + +untrusted Eve; +const ne: Nonce; +const kpe: Keypart; +const ke: Sessionkey; +compromised k(Eve,Eve); +compromised k(Eve,Alice); +compromised k(Eve,Bob); +compromised k(Eve,Simon); +compromised k(Alice,Eve); +compromised k(Bob,Eve); +compromised k(Simon,Eve); + +run gongnonceb.I(Agent,Agent,Simon); +run gongnonceb.R(Agent,Agent,Simon); +run gongnonceb.S(Agent,Agent,Simon); +run gongnonceb.I(Agent,Agent,Simon); +run gongnonceb.R(Agent,Agent,Simon); +run gongnonceb.S(Agent,Agent,Simon);