scyther/spdl/bke-broken.spdl

49 lines
773 B
Plaintext
Raw Normal View History

2004-03-21 16:26:31 +00:00
/*
Bilateral Key Exchange with Public Key protocol (BKEPK)
Broken version with man in the middle attack.
2004-03-21 16:26:31 +00:00
*/
usertype Key;
const PK,h: Function;
secret SK,hinv: Function;
2004-03-21 16:26:31 +00:00
inversekeys (PK,SK);
inversekeys (h,hinv);
2004-03-21 16:26:31 +00:00
protocol bkepk(I,R)
2004-03-21 16:26:31 +00:00
{
role I
2004-03-21 16:26:31 +00:00
{
const ni: Nonce;
var nr: Nonce;
var kir: Key;
send_1 (I,R, { ni,I }PK(R) );
read_2 (R,I, { h(ni),nr,kir }PK(I) );
send_3 (I,R, { h(nr),kir }PK(R) );
claim_4 (I, Secret, kir );
2004-03-21 16:26:31 +00:00
}
role R
2004-03-21 16:26:31 +00:00
{
var ni: Nonce;
const nr: Nonce;
const kir: Key;
read_1 (I,R, { ni,I }PK(R) );
send_2 (R,I, { h(ni),nr,kir }PK(I) );
read_3 (I,R, { h(nr),kir }PK(R) );
claim_5 (R, Secret, kir );
2004-03-21 16:26:31 +00:00
}
}
const a,b,e: Agent;
2004-03-21 16:26:31 +00:00
untrusted e;
compromised SK(e);
2004-03-21 16:26:31 +00:00
const ne: Nonce;
run bkepk.I(a,Agent);
run bkepk.R(Agent,b);