scyther/testing/protocols/misc/gong-nonce.spdl

57 lines
1018 B
Plaintext
Raw Normal View History

2006-11-21 13:40:50 +00:00
usertype Sessionkey;
usertype Keypart;
secret k: Function;
protocol gongnonce(I,R,S)
{
role I
{
fresh ni: Nonce;
2006-11-21 13:40:50 +00:00
var nr: Nonce;
fresh ki: Keypart;
2006-11-21 13:40:50 +00:00
var kr: Keypart;
send_1 (I,R, I,R,ni );
2012-05-02 22:26:41 +01:00
recv_3 (S,I, { S,I,R, kr, I, ni }k(I,S), nr);
2006-11-21 13:40:50 +00:00
send_4 (I,S, { I,S,I, ki, R, nr }k(I,S) );
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;
2006-11-21 13:40:50 +00:00
var ki: Keypart;
2012-05-02 22:26:41 +01:00
recv_1 (I,R, I,R,ni );
2006-11-21 13:40:50 +00:00
send_2 (R,S, I,R, nr, { R,S,R, kr, I,ni }k(R,S));
2012-05-02 22:26:41 +01:00
recv_5 (S,R, { S,R,I, ki, R, nr }k(R,S) );
2006-11-21 13:40:50 +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;
2012-05-02 22:26:41 +01:00
recv_2 (R,S, I,R, nr, { R,S,R, kr, I,ni }k(R,S));
2006-11-21 13:40:50 +00:00
send_3 (S,I, { S,I,R, kr, I, ni }k(I,S), nr);
2012-05-02 22:26:41 +01:00
recv_4 (I,S, { I,S,I, ki, R, nr }k(I,S) );
2006-11-21 13:40:50 +00:00
send_5 (S,R, { S,R,I, ki, R, nr }k(R,S) );
}
}
const kpe: Keypart;
const ke: Sessionkey;