/* * From Boyd Mathuria * * To check: 3.38 or other? * */ usertype Sessionkey; usertype Keypart; protocol gongnonce(I,R,S) { role I { fresh ni: Nonce; var nr: Nonce; fresh 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) ); 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; 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) ); 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);