2004-10-25 12:13:39 +01:00
|
|
|
usertype Sessionkey;
|
|
|
|
usertype Macseed;
|
|
|
|
secret k: Function;
|
|
|
|
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
|
2005-03-14 13:42:15 +00:00
|
|
|
*
|
|
|
|
* Note that MAC_ks(x) has been interpreted as MAC(x,ks); this
|
|
|
|
* assumption causes some possible false attacks.
|
2004-10-25 12:13:39 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
protocol boyd(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
|
|
|
const ni: Nonce;
|
|
|
|
var nr: Nonce;
|
|
|
|
var ks: Macseed;
|
|
|
|
|
|
|
|
send_1 (I,S, I,R, ni );
|
|
|
|
read_3 (R,I, { I,R, ks }k(I,S), m(ni, m(ks,ni,nr)), nr );
|
|
|
|
send_4 (I,R, m(nr, m(ks,ni,nr)) );
|
|
|
|
|
|
|
|
claim_6 (I, Secret, m(ks,ni,nr) );
|
2005-03-02 19:43:03 +00:00
|
|
|
claim_7 (I, Niagree);
|
2004-10-25 12:13:39 +01:00
|
|
|
claim_8 (I, Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
|
|
|
const nr: Nonce;
|
|
|
|
var ks: Macseed;
|
|
|
|
|
|
|
|
read_2 (S,R, { I,R, ks }k(I,S), { I,R, ks }k(R,S), ni );
|
|
|
|
send_3 (R,I, { I,R, ks }k(I,S), m(ni, m(ks,ni,nr)), nr );
|
|
|
|
read_4 (I,R, m(nr, m(ks,ni,nr)) );
|
|
|
|
|
2005-03-02 19:43:03 +00:00
|
|
|
claim_10 (R, Secret, m(ks,ni,nr));
|
|
|
|
claim_11 (R, Niagree);
|
|
|
|
claim_12 (R, Nisynch);
|
2004-10-25 12:13:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var ni,nr: Nonce;
|
|
|
|
const ks: Macseed;
|
|
|
|
|
|
|
|
read_1 (I,S, I,R, ni );
|
|
|
|
send_2 (S,R, { I,R, ks }k(I,S), { I,R, ks }k(R,S), ni );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Simon,Eve: Agent;
|
|
|
|
|
|
|
|
untrusted Eve;
|
|
|
|
const ne: Nonce;
|
|
|
|
const mcsde: Macseed;
|
|
|
|
const ke: Sessionkey;
|
|
|
|
compromised k(Eve,Eve);
|
|
|
|
compromised k(Eve,Alice);
|
|
|
|
compromised k(Eve,Bob);
|
|
|
|
compromised k(Eve,Simon);
|
|
|
|
compromised k(Alice,Eve);
|
|
|
|
compromised k(Bob,Eve);
|
|
|
|
compromised k(Simon,Eve);
|
|
|
|
|
|
|
|
run boyd.I(Agent,Agent,Simon);
|
|
|
|
run boyd.R(Agent,Agent,Simon);
|
|
|
|
run boyd.S(Agent,Agent,Simon);
|
|
|
|
run boyd.I(Agent,Agent,Simon);
|
|
|
|
run boyd.R(Agent,Agent,Simon);
|
|
|
|
run boyd.S(Agent,Agent,Simon);
|