2006-11-21 13:40:50 +00:00
|
|
|
/*
|
|
|
|
Bilateral Key Exchange with Public Key protocol (BKEPK)
|
|
|
|
*/
|
|
|
|
|
|
|
|
usertype Key;
|
|
|
|
|
2012-05-02 22:01:08 +01:00
|
|
|
hashfunction hash;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
protocol bke(I,R)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh ni: Nonce;
|
2006-11-21 13:40:50 +00:00
|
|
|
var nr: Nonce;
|
|
|
|
var kir: Key;
|
|
|
|
|
|
|
|
send_1 (I,R, { ni,I }pk(R) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_2 (R,I, { hash(ni),nr,R,kir }pk(I) );
|
2006-11-21 13:40:50 +00:00
|
|
|
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;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh nr: Nonce;
|
|
|
|
fresh kir: Key;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1 (I,R, { ni,I }pk(R) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_2 (R,I, { hash(ni),nr,R,kir }pk(I) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_3 (I,R, { hash(nr) }kir );
|
2006-11-21 13:40:50 +00:00
|
|
|
claim_7 (R, Secret, kir );
|
|
|
|
claim_8 (R, Niagree );
|
|
|
|
claim_9 (R, Nisynch );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
untrusted e;
|
|
|
|
compromised sk(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|