2010-11-09 09:05:34 +00:00
|
|
|
usertype Sessionkey;
|
|
|
|
usertype Keypart;
|
|
|
|
hashfunction f;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Gong nonce based alternative
|
|
|
|
*
|
|
|
|
* Boyd & Mathuria: Protocols for authentication and key establishment
|
|
|
|
* (2003) p. 101
|
|
|
|
*/
|
|
|
|
|
|
|
|
protocol gongnonceb(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
|
|
|
fresh ni: Nonce;
|
|
|
|
var nr: Nonce;
|
|
|
|
fresh ki: Keypart;
|
|
|
|
var kr: Keypart;
|
|
|
|
|
|
|
|
send_1 (I,S, I,R, { I,S,I, ki, R }k(I,S), ni );
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_4 (S,I, { S,I,R,kr,I }k(I,S), { R,I,ni }f(ki,kr), nr );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_5 (I,R, { I,R,nr }f(ki,kr) );
|
|
|
|
|
|
|
|
claim_6 (I, Secret, ki);
|
|
|
|
claim_7 (I, Secret, kr);
|
|
|
|
claim_8 (I, Nisynch);
|
|
|
|
claim_9 (I, Niagree);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
|
|
|
fresh nr: Nonce;
|
|
|
|
fresh kr: Keypart;
|
|
|
|
var ki: Keypart;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_2 (S,R, I,R, { S,R,I, ki, R }k(R,S), ni );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_3 (R,S, { R,S,R,kr,I }k(R,S), { R,I, ni }f(ki,kr), nr );
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_5 (I,R, { I,R,nr }f(ki,kr) );
|
2010-11-09 09:05:34 +00:00
|
|
|
|
|
|
|
claim_10 (R, Secret, ki);
|
|
|
|
claim_11 (R, Secret, kr);
|
|
|
|
claim_12 (R, Nisynch);
|
|
|
|
claim_13 (R, Niagree);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var ni,nr: Nonce;
|
|
|
|
var ki,kr: Keypart;
|
|
|
|
var T;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_1 (I,S, I,R, { I,S,I, ki, R }k(I,S), ni );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_2 (S,R, I,R, { S,R,I, ki, R }k(R,S), ni );
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_3 (R,S, { R,S,R,kr,I }k(R,S), T, nr );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_4 (S,I, { S,I,R,kr,I }k(I,S), T, nr );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|