2004-09-07 11:20:20 +01:00
|
|
|
/*
|
2004-11-18 16:07:58 +00:00
|
|
|
Bilateral Key Exchange with Public Key protocol (bkeONE)
|
2004-09-07 11:20:20 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
usertype Key;
|
|
|
|
|
|
|
|
const pk,hash: Function;
|
|
|
|
secret sk,unhash: Function;
|
|
|
|
|
|
|
|
inversekeys (pk,sk);
|
|
|
|
inversekeys (hash,unhash);
|
|
|
|
|
2004-11-18 16:07:58 +00:00
|
|
|
protocol bkeONE(I,R)
|
2004-09-07 11:20:20 +01:00
|
|
|
{
|
|
|
|
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;
|
|
|
|
|
2004-11-18 16:07:58 +00:00
|
|
|
run bkeONE.I(a,Agent);
|
|
|
|
run bkeONE.R(Agent,a);
|
|
|
|
run bkeONE.I(a,Agent);
|
|
|
|
run bkeONE.R(Agent,a);
|
2004-09-07 11:20:20 +01:00
|
|
|
|
2004-11-18 16:07:58 +00:00
|
|
|
run bkeONE.I(a,Agent);
|
|
|
|
run bkeONE.R(Agent,a);
|
|
|
|
run bkeONE.I(a,Agent);
|
|
|
|
run bkeONE.R(Agent,a);
|
2004-09-07 11:20:20 +01:00
|
|
|
|
2004-11-18 16:07:58 +00:00
|
|
|
run bkeONE.I(a,Agent);
|
|
|
|
run bkeONE.R(Agent,a);
|
2004-09-07 11:20:20 +01:00
|
|
|
|