2006-11-21 13:42:06 +00:00
|
|
|
# Yahalom
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/yahalom.html
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
usertype SessionKey;
|
|
|
|
|
|
|
|
protocol yahalom(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Ni: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Nr: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
|
|
|
|
send_1(I,R, I,Ni);
|
|
|
|
read_3(S,I, {R,Kir,Ni,Nr}k(I,S), T );
|
|
|
|
send_4(I,R, T, {Nr}Kir );
|
|
|
|
|
|
|
|
claim_I1(I, Secret,Kir);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Nr: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Ni: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
|
|
|
|
read_1(I,R, I,Ni);
|
|
|
|
send_2(R,S, R, {I,Ni,Nr}k(R,S) );
|
|
|
|
read_4(I,R, {I,Kir}k(R,S) , {Nr}Kir );
|
|
|
|
|
|
|
|
claim_R1(R, Secret,Kir);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Kir: SessionKey;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Ni,Nr: Nonce;
|
|
|
|
|
|
|
|
read_2(R,S, R, {I,Ni,Nr}k(R,S) );
|
|
|
|
send_3(S,I, {R,Kir,Ni,Nr}k(I,S), {I,Kir}k(R,S) );
|
2007-05-03 16:52:51 +01:00
|
|
|
|
|
|
|
claim(S, Secret, Ni);
|
|
|
|
claim(S, Secret, Nr);
|
2006-11-21 13:42:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|