- Added BKE variant which is used in an exercise for 2R890.
This commit is contained in:
parent
73b0f8a4a5
commit
1c72acc47f
62
spdl/bke-variation.spdl
Normal file
62
spdl/bke-variation.spdl
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
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 bke(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,kir }pk(I) );
|
||||||
|
send_3 (I,R, { hash(nr) }kir );
|
||||||
|
claim_4 (I, Secret, kir );
|
||||||
|
claim_5 (I, Niagree );
|
||||||
|
claim_6 (I, Nisynch );
|
||||||
|
}
|
||||||
|
|
||||||
|
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,kir }pk(I) );
|
||||||
|
read_3 (I,R, { hash(nr) }kir );
|
||||||
|
claim_7 (R, Secret, kir );
|
||||||
|
claim_8 (R, Niagree );
|
||||||
|
claim_9 (R, Nisynch );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const a,b,e: Agent;
|
||||||
|
|
||||||
|
untrusted e;
|
||||||
|
compromised sk(e);
|
||||||
|
const ne: Nonce;
|
||||||
|
|
||||||
|
run bke.I(a,Agent);
|
||||||
|
run bke.R(Agent,b);
|
||||||
|
run bke.I(a,Agent);
|
||||||
|
run bke.R(Agent,b);
|
||||||
|
|
||||||
|
run bke.I(a,Agent);
|
||||||
|
run bke.R(Agent,b);
|
||||||
|
run bke.I(a,Agent);
|
||||||
|
run bke.R(Agent,b);
|
||||||
|
|
||||||
|
run bke.I(a,Agent);
|
||||||
|
run bke.R(Agent,b);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user