2006-11-21 13:40:50 +00:00
|
|
|
/*
|
|
|
|
* Needham-Schroeder symmetric
|
|
|
|
* Amended version (from Sjouke's interpret.)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* 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 nssymmetricamended(A,S,B)
|
|
|
|
{
|
|
|
|
role A
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh na: Nonce;
|
2006-11-21 13:40:50 +00:00
|
|
|
var T1: Ticket;
|
|
|
|
var T2: Ticket;
|
|
|
|
var kab: SessionKey;
|
|
|
|
var nb: Nonce;
|
|
|
|
|
|
|
|
send_1(A,B, A );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_2(B,A, T1 );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_3(A,S, A,B,na,T1 );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_4(S,A, { na,B,kab,T2 }k(A,S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_5(A,B, T2 );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_6(B,A, { nb }kab );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_7(A,B, { {nb}succ }kab );
|
|
|
|
|
|
|
|
claim_8(A, Secret, kab);
|
|
|
|
claim_8a(A, Niagree);
|
|
|
|
claim_8b(A, Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh kab: SessionKey;
|
2006-11-21 13:40:50 +00:00
|
|
|
var na: Nonce;
|
|
|
|
var nb: Nonce;
|
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_3(A,S, A,B,na, { A,nb }k(B,S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_4(S,A, { na,B,kab, { kab,A }k(B,S) }k(A,S) );
|
|
|
|
}
|
|
|
|
|
|
|
|
role B
|
|
|
|
{
|
|
|
|
var kab: SessionKey;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh nb: Nonce;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1(A,B, A );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_2(B,A, { A,nb }k(B,S) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_5(A,B, { kab,A }k(B,S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_6(B,A, { nb }kab );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_7(A,B, { {nb}succ }kab );
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
claim_9(B, Secret, kab);
|
|
|
|
claim_9a(B, Niagree);
|
|
|
|
claim_9b(B, Nisynch);
|
|
|
|
}
|
|
|
|
}
|