scyther/protocols/misc/yahalom-ban.spdl

52 lines
720 B
Plaintext
Raw Normal View History

2006-11-21 13:40:50 +00:00
// BAN modified version of the yahalom protocol
// Type flaw
// This version actually works!
usertype Server;
const a,b,c : Agent;
const s : Server;
secret k : Function;
protocol yahalomBan(A,B,S)
{
role A
{
fresh na;
2006-11-21 13:40:50 +00:00
var nb;
var ticket;
var kab;
send_1(A,B, A,na);
2012-05-02 22:26:41 +01:00
recv_3(S,A, nb, {B,kab,na}k(A,S), ticket );
2006-11-21 13:40:50 +00:00
send_4(A,B, ticket, {nb}kab );
claim_5(A, Secret,kab);
}
role B
{
fresh nb;
2006-11-21 13:40:50 +00:00
var na;
var ticket;
var kab;
2012-05-02 22:26:41 +01:00
recv_1(A,B, A,na);
2006-11-21 13:40:50 +00:00
send_2(B,S, B,nb, {A,na}k(B,S) );
2012-05-02 22:26:41 +01:00
recv_4(A,B, {A,kab,nb}k(B,S) , {nb}kab );
2006-11-21 13:40:50 +00:00
claim_6(B, Secret,kab);
}
role S
{
fresh kab;
2006-11-21 13:40:50 +00:00
var na,nb;
2012-05-02 22:26:41 +01:00
recv_2(B,S, B,nb, {A,na}k(B,S) );
2006-11-21 13:40:50 +00:00
send_3(S,A, nb, {B,kab,na}k(A,S), {A,kab,nb}k(B,S) );
}
}