diff --git a/spdl/carkey-broken.spdl b/spdl/carkey-broken.spdl new file mode 100644 index 0000000..cba0666 --- /dev/null +++ b/spdl/carkey-broken.spdl @@ -0,0 +1,33 @@ +const pk: Function; +secret sk: Function; +inversekeys (pk,sk); + +protocol carkeybroken(I,R) +{ + role I + { + const ni: Nonce; + + send_1(I,R, {ni}sk(I) ); + claim_3(I,Nisynch); + } + + role R + { + var ni: Nonce; + + read_1(I,R, {ni}sk(I) ); + claim_2(R,Nisynch); + } +} + +const Alice,Bob,Eve: Agent; + +untrusted Eve; +const nc: Nonce; +compromised sk(Eve); + +run carkeybroken.I(Agent,Agent); +run carkeybroken.R(Agent,Agent); +run carkeybroken.I(Agent,Agent); +run carkeybroken.R(Agent,Agent); diff --git a/spdl/carkey-ni.spdl b/spdl/carkey-ni.spdl new file mode 100644 index 0000000..6d9245c --- /dev/null +++ b/spdl/carkey-ni.spdl @@ -0,0 +1,33 @@ +const pk: Function; +secret sk: Function; +inversekeys (pk,sk); + +protocol carkeyni(I,R) +{ + role I + { + const ni: Nonce; + + send_1(I,R, {R,ni}sk(I) ); + claim_3(I,Nisynch); + } + + role R + { + var ni: Nonce; + + read_1(I,R, {R,ni}sk(I) ); + claim_2(R,Nisynch); + } +} + +const Alice,Bob,Eve: Agent; + +untrusted Eve; +const nc: Nonce; +compromised sk(Eve); + +run carkeyni.I(Agent,Agent); +run carkeyni.R(Agent,Agent); +run carkeyni.I(Agent,Agent); +run carkeyni.R(Agent,Agent); diff --git a/spdl/carkey-ni2.spdl b/spdl/carkey-ni2.spdl new file mode 100644 index 0000000..8d40deb --- /dev/null +++ b/spdl/carkey-ni2.spdl @@ -0,0 +1,35 @@ +const pk: Function; +secret sk: Function; +inversekeys (pk,sk); + +protocol carkeyni(I,R) +{ + role I + { + const ni: Nonce; + + send_1(I,R, {R,ni}sk(I) ); + send_2(I,R, {R,ni}sk(I) ); + claim_5(I,Nisynch); + } + + role R + { + var ni: Nonce; + + read_1(I,R, {R,ni}sk(I) ); + read_2(I,R, {R,ni}sk(I) ); + claim_4(R,Nisynch); + } +} + +const Alice,Bob,Eve: Agent; + +untrusted Eve; +const nc: Nonce; +compromised sk(Eve); + +run carkeyni.I(Agent,Agent); +run carkeyni.R(Agent,Agent); +run carkeyni.I(Agent,Agent); +run carkeyni.R(Agent,Agent); diff --git a/spdl/ns3.spdl b/spdl/ns3.spdl index 272d968..3c250ac 100644 --- a/spdl/ns3.spdl +++ b/spdl/ns3.spdl @@ -12,7 +12,7 @@ protocol ns3(I,R) send_1(I,R, {I,ni}pk(R) ); read_2(R,I, {ni,nr}pk(I) ); send_3(I,R, {nr}pk(R) ); - claim(I,Secret,ni,nr); + claim_4(I,Secret,ni,nr); } role R @@ -23,7 +23,7 @@ protocol ns3(I,R) read_1(I,R, {I,ni}pk(R) ); send_2(R,I, {ni,nr}pk(I) ); read_3(I,R, {nr}pk(R) ); - claim(R,Secret,ni,nr); + claim_5(R,Secret,ni,nr); } } diff --git a/spdl/nsl3.spdl b/spdl/nsl3.spdl index 5176a4a..b74ae11 100644 --- a/spdl/nsl3.spdl +++ b/spdl/nsl3.spdl @@ -12,7 +12,7 @@ protocol nsl3(I,R) send_1(I,R, {I,ni}pk(R) ); read_2(R,I, {ni,nr,R}pk(I) ); send_3(I,R, {nr}pk(R) ); - claim(I,Secret,ni,nr); + claim_4(I,Secret,ni,nr); } role R @@ -23,7 +23,7 @@ protocol nsl3(I,R) read_1(I,R, {I,ni}pk(R) ); send_2(R,I, {ni,nr,R}pk(I) ); read_3(I,R, {nr}pk(R) ); - claim(I,Secret,ni,nr); + claim_5(I,Secret,ni,nr); } }