scyther/gui/Protocols/MultiProtocolAttacks/BKE.spdl

46 lines
772 B
Plaintext
Raw Normal View History

/*
Bilateral Key Exchange with Public Key protocol (BKEPK)
*/
usertype SessionKey;
hashfunction hash;
protocol bke(I,R)
{
role I
{
fresh ni: Nonce;
var nr: Nonce;
var kir: SessionKey;
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 );
//claim_5 (I, Niagree );
//claim_6 (I, Nisynch );
}
role R
{
var ni: Nonce;
fresh nr: Nonce;
fresh kir: SessionKey;
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_7 (R, Secret, kir );
//claim_8 (R, Niagree );
//claim_9 (R, Nisynch );
}
}
2010-12-31 14:41:52 +00:00
// An untrusted agent, with leaked information
const Eve: Agent;
untrusted Eve;
compromised sk(Eve);