scyther/testing/protocols/misc/boyd.spdl

61 lines
1.1 KiB
Plaintext
Raw Normal View History

2006-11-21 13:40:50 +00:00
usertype Sessionkey;
usertype Macseed;
const m: Function;
secret unm: Function;
const f: Function;
inversekeys (m, unm);
/*
* Boyd key agreement
*
* Boyd & Mathuria: Protocols for authentication and key establishment
* (2003) p. 101
*
* Note that MAC_ks(x) has been interpreted as MAC(x,ks); this
* assumption causes some possible false attacks.
*/
protocol boyd(I,R,S)
{
role I
{
fresh ni: Nonce;
2006-11-21 13:40:50 +00:00
var nr: Nonce;
var ks: Macseed;
send_1 (I,S, I,R, ni );
2012-05-02 22:26:41 +01:00
recv_3 (R,I, { I,R, ks }k(I,S), m(ni, m(ks,ni,nr)), nr );
2006-11-21 13:40:50 +00:00
send_4 (I,R, m(nr, m(ks,ni,nr)) );
claim_6 (I, Secret, m(ks,ni,nr) );
claim_7 (I, Niagree);
claim_8 (I, Nisynch);
}
role R
{
var ni: Nonce;
fresh nr: Nonce;
2006-11-21 13:40:50 +00:00
var ks: Macseed;
2012-05-02 22:26:41 +01:00
recv_2 (S,R, { I,R, ks }k(I,S), { I,R, ks }k(R,S), ni );
2006-11-21 13:40:50 +00:00
send_3 (R,I, { I,R, ks }k(I,S), m(ni, m(ks,ni,nr)), nr );
2012-05-02 22:26:41 +01:00
recv_4 (I,R, m(nr, m(ks,ni,nr)) );
2006-11-21 13:40:50 +00:00
claim_10 (R, Secret, m(ks,ni,nr));
claim_11 (R, Niagree);
claim_12 (R, Nisynch);
}
role S
{
var ni,nr: Nonce;
fresh ks: Macseed;
2006-11-21 13:40:50 +00:00
2012-05-02 22:26:41 +01:00
recv_1 (I,S, I,R, ni );
2006-11-21 13:40:50 +00:00
send_2 (S,R, { I,R, ks }k(I,S), { I,R, ks }k(R,S), ni );
}
}