From 120113fe2155414c9f2bb6e1d0df35fe993e000f Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 10 Mar 2004 07:19:27 +0000 Subject: [PATCH] - This is required as well. --- spdl/bkepk-ce2.spdl | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 spdl/bkepk-ce2.spdl diff --git a/spdl/bkepk-ce2.spdl b/spdl/bkepk-ce2.spdl new file mode 100644 index 0000000..da398be --- /dev/null +++ b/spdl/bkepk-ce2.spdl @@ -0,0 +1,61 @@ +/* + Bilateral Key Exchange with Public Key protocol (BKEPK) + + Version from Corin/Etalle: An Improved Constraint-Based System for the Verification of Security Protocols. + Tried to stay as close as possible to compare timing results. +*/ + +usertype Key; + +const pk,hash: Function; +secret sk: Function; + +inversekeys (pk,sk); + +protocol bkepk(A,B,testnonce) +{ + role B + { + const nb: Nonce; + var na: Nonce; + var kab: Key; + + send_1 (B,A, B,{ nb,B }pk(A) ); + read_2 (A,B, { hash(nb),na,A,kab }pk(B) ); + send_3 (B,A, { hash(na) }kab ); + } + + role A + { + var nb: Nonce; + const na: Nonce; + const kab: Key; + + read_1 (B,A, B,{ nb,B }pk(A) ); + send_2 (A,B, { hash(nb),na,A,kab }pk(B) ); + read_3 (B,A, { hash(na) }kab ); + } + + role testnonce + { + var n: Nonce; + + read_4 (A,A, n); + } +} + +const Alice,Bob,Eve; + +compromised sk(Eve); + + +run bkepk.A(Alice,Bob,Alice); +run bkepk.A(Alice,Bob,Alice); +run bkepk.A(Alice,Bob,Alice); +run bkepk.B(Alice,Bob,Alice); +run bkepk.B(Alice,Bob,Alice); +run bkepk.B(Alice,Bob,Alice); + +run bkepk.testnonce(Alice,Bob,Alice); +run bkepk.testnonce(Alice,Bob,Alice); +run bkepk.testnonce(Alice,Bob,Alice);