scyther/spdl/gong-nonce.spdl

73 lines
1.4 KiB
Plaintext
Raw Normal View History

usertype Sessionkey;
usertype Keypart;
secret k: Function;
protocol gongnonce(I,R,S)
{
role I
{
const ni: Nonce;
var nr: Nonce;
const ki: Keypart;
var kr: Keypart;
send_1 (I,R, I,R,ni );
read_3 (S,I, { S,I,R, kr, I, ni }k(I,S), nr);
send_4 (I,S, { I,S,I, ki, R, nr }k(I,S) );
2005-02-19 14:25:30 +00:00
claim_6 (I, Secret, ki);
claim_7 (I, Secret, kr);
claim_8 (I, Nisynch);
2005-03-02 19:12:08 +00:00
claim_9 (I, Niagree);
}
role R
{
var ni: Nonce;
const nr: Nonce;
const kr: Keypart;
var ki: Keypart;
read_1 (I,R, I,R,ni );
send_2 (R,S, I,R, nr, { R,S,R, kr, I,ni }k(R,S));
read_5 (S,R, { S,R,I, ki, R, nr }k(R,S) );
2005-03-02 19:12:08 +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;
read_2 (R,S, I,R, nr, { R,S,R, kr, I,ni }k(R,S));
send_3 (S,I, { S,I,R, kr, I, ni }k(I,S), nr);
read_4 (I,S, { I,S,I, ki, R, nr }k(I,S) );
send_5 (S,R, { S,R,I, ki, R, nr }k(R,S) );
}
}
const Alice,Bob,Simon,Eve: Agent;
untrusted Eve;
const ne: Nonce;
const kpe: Keypart;
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 gongnonce.I(Agent,Agent,Simon);
run gongnonce.R(Agent,Agent,Simon);
run gongnonce.S(Agent,Agent,Simon);
run gongnonce.I(Agent,Agent,Simon);
run gongnonce.R(Agent,Agent,Simon);
run gongnonce.S(Agent,Agent,Simon);