scyther/protocols/misc/ns-symmetric.spdl

71 lines
1008 B
Plaintext
Raw Normal View History

2006-11-21 13:40:50 +00:00
/*
* Needham-Schroeder symmetric
*/
/* symmetric */
usertype SessionKey;
secret k: Function;
/* agents */
/* untrusted e */
untrusted e;
const kee: SessionKey;
compromised k(e,e);
compromised k(e,a);
compromised k(e,b);
compromised k(a,e);
compromised k(b,e);
/* {}x used for public (invertible) function modeling */
usertype PseudoFunction;
const succ: PseudoFunction;
usertype Ticket;
protocol nssymmetric(A,S,B)
{
role A
{
fresh na: Nonce;
2006-11-21 13:40:50 +00:00
var T: Ticket;
var kab: SessionKey;
var nb: Nonce;
send_1(A,S, A,B,na );
2012-05-02 22:26:41 +01:00
recv_2(S,A, { na,B,kab,T }k(A,S) );
2006-11-21 13:40:50 +00:00
send_3(A,B, T );
2012-05-02 22:26:41 +01:00
recv_4(B,A, { nb }kab );
2006-11-21 13:40:50 +00:00
send_5(A,B, { {nb}succ }kab );
claim_6(A, Secret, kab);
}
role S
{
fresh kab: SessionKey;
2006-11-21 13:40:50 +00:00
var na: Nonce;
2012-05-02 22:26:41 +01:00
recv_1(A,S, A,B,na );
2006-11-21 13:40:50 +00:00
send_2(S,A, { na,B,kab, { kab,A }k(B,S) }k(A,S) );
}
role B
{
var kab: SessionKey;
fresh nb: Nonce;
2006-11-21 13:40:50 +00:00
2012-05-02 22:26:41 +01:00
recv_3(A,B, { kab,A }k(B,S) );
2006-11-21 13:40:50 +00:00
send_4(B,A, { nb }kab );
2012-05-02 22:26:41 +01:00
recv_5(A,B, { {nb}succ }kab );
2006-11-21 13:40:50 +00:00
claim_7(B, Secret, kab);
}
}