scyther/protocols/misc/tls/tls-paulson-avispa.spdl

72 lines
2.0 KiB
Plaintext
Raw Normal View History

2006-11-21 13:40:50 +00:00
# 1 "tls-paulson-avispa.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "tls-paulson-avispa.cpp"
# 25 "tls-paulson-avispa.cpp"
usertype Params, Bool, SessionID;
const pk,hash: Function;
secret sk,unhash: Function;
inversekeys(pk,sk);
inversekeys(hash,unhash);
const keygen: Function;
secret unkeygen: Function;
inversekeys(keygen, unkeygen);
const pa,pb: Params;
const false,true: Bool;
protocol tlspaulson-avispa(a,b)
{
role a
{
fresh na: Nonce;
fresh sid: SessionID;
fresh pms: Nonce;
2006-11-21 13:40:50 +00:00
var nb: Nonce;
var pb: Params;
send_1( a,b, a,na,sid,pa );
2012-05-02 22:26:41 +01:00
recv_2( b,a, nb,sid,pb );
recv_3( b,a, { b,pk(b) }sk(Terence) );
2006-11-21 13:40:50 +00:00
send_4( a,b, { a,pk(a) }sk(Terence) );
send_5( a,b, { pms }pk(b) );
send_6( a,b, { hash(nb,b,pms) }sk(a) );
send_7( a,b, { hash(hash(pms,na,nb),a,na,sid,pa,pb,nb,sid,pb,{ a,pk(a) }sk(Terence),{ b,pk(b) }sk(Terence),{pms}pk(b)) }keygen(a,na,nb,hash(pms,na,nb)) );
2012-05-02 22:26:41 +01:00
recv_8( b,a, { hash(hash(pms,na,nb),a,na,sid,pa,pb,nb,sid,pb,{ a,pk(a) }sk(Terence),{ b,pk(b) }sk(Terence),{pms}pk(b)) }keygen(b,na,nb,hash(pms,na,nb)) );
2006-11-21 13:40:50 +00:00
claim_9a(a, Secret, keygen(b,na,nb,hash(pms,na,nb)));
claim_9b(a, Secret, keygen(a,na,nb,hash(pms,na,nb)));
claim_9c(a, Niagree);
}
role b
{
var na: Nonce;
var sid: SessionID;
var pms: Nonce;
fresh nb: Nonce;
fresh pb: Params;
2006-11-21 13:40:50 +00:00
2012-05-02 22:26:41 +01:00
recv_1( a,b, a,na,sid,pa );
2006-11-21 13:40:50 +00:00
send_2( b,a, nb,sid,pb );
send_3( b,a, { b,pk(b) }sk(Terence) );
2012-05-02 22:26:41 +01:00
recv_4( a,b, { a,pk(a) }sk(Terence) );
recv_5( a,b, { pms }pk(b) );
recv_6( a,b, { hash(nb,b,pms) }sk(a) );
recv_7( a,b, { hash(hash(pms,na,nb),a,na,sid,pa,pb,nb,sid,pb,{ a,pk(a) }sk(Terence),{ b,pk(b) }sk(Terence),{pms}pk(b)) }keygen(a,na,nb,hash(pms,na,nb)) );
2006-11-21 13:40:50 +00:00
send_8( b,a, { hash(hash(pms,na,nb),a,na,sid,pa,pb,nb,sid,pb,{ a,pk(a) }sk(Terence),{ b,pk(b) }sk(Terence),{pms}pk(b)) }keygen(b,na,nb,hash(pms,na,nb)) );
claim_10a(b, Secret, keygen(b,na,nb,hash(pms,na,nb)));
claim_10b(b, Secret, keygen(a,na,nb,hash(pms,na,nb)));
claim_10c(b, Niagree);
}
}
const side: SessionID;
const pe: Params;