From f771d3ef4cb11436a70f91ebae21d0df923a7351 Mon Sep 17 00:00:00 2001 From: ccremers Date: Tue, 7 Sep 2004 10:20:20 +0000 Subject: [PATCH] - Testing to see what the gains are of using one regular agent. Turns out to be half of the states, thus twice as fast. --- spdl/bke-one.spdl | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 spdl/bke-one.spdl diff --git a/spdl/bke-one.spdl b/spdl/bke-one.spdl new file mode 100644 index 0000000..105fde5 --- /dev/null +++ b/spdl/bke-one.spdl @@ -0,0 +1,58 @@ +/* + Bilateral Key Exchange with Public Key protocol (BKEPK) +*/ + +usertype Key; + +const pk,hash: Function; +secret sk,unhash: Function; + +inversekeys (pk,sk); +inversekeys (hash,unhash); + +protocol bkepk(I,R) +{ + role I + { + const ni: Nonce; + var nr: Nonce; + var kir: Key; + + send_1 (I,R, { ni,I }pk(R) ); + read_2 (R,I, { hash(ni),nr,R,kir }pk(I) ); + send_3 (I,R, { hash(nr) }kir ); + claim_4 (I, Secret, kir ); + } + + role R + { + var ni: Nonce; + const nr: Nonce; + const kir: Key; + + read_1 (I,R, { ni,I }pk(R) ); + send_2 (R,I, { hash(ni),nr,R,kir }pk(I) ); + read_3 (I,R, { hash(nr) }kir ); + claim_5 (R, Secret, kir ); + } +} + +const a,e: Agent; + +untrusted e; +compromised sk(e); +const ne: Nonce; + +run bkepk.I(a,Agent); +run bkepk.R(Agent,a); +run bkepk.I(a,Agent); +run bkepk.R(Agent,a); + +run bkepk.I(a,Agent); +run bkepk.R(Agent,a); +run bkepk.I(a,Agent); +run bkepk.R(Agent,a); + +run bkepk.I(a,Agent); +run bkepk.R(Agent,a); +