2010-11-09 09:05:34 +00:00
|
|
|
# BAN simplified version of Yahalom
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/yahalomBAN.html
|
|
|
|
#
|
|
|
|
|
|
|
|
usertype SessionKey;
|
|
|
|
const Fresh: Function;
|
|
|
|
const Compromised: Function;
|
|
|
|
|
|
|
|
protocol yahalom-BAN(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
|
|
|
fresh Ni: Nonce;
|
|
|
|
var Nr: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
|
|
|
|
send_1(I,R, I,Ni);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_3(S,I, Nr, {R,Kir,Ni}k(I,S), T );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_4(I,R, T, {Nr}Kir );
|
|
|
|
|
|
|
|
claim_I1(I, Secret,Kir);
|
|
|
|
claim_I2(I, Nisynch);
|
|
|
|
claim_I3(I, Empty, (Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
fresh Nr: Nonce;
|
|
|
|
var Ni: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_1(I,R, I,Ni);
|
2010-11-09 09:05:34 +00:00
|
|
|
send_2(R,S, R, Nr, {I,Ni}k(R,S) );
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_4(I,R, {I,Kir,Nr}k(R,S) , {Nr}Kir );
|
2010-11-09 09:05:34 +00:00
|
|
|
|
|
|
|
claim_R1(R, Secret,Kir);
|
|
|
|
claim_R2(R, Nisynch);
|
|
|
|
claim_R3(R, Empty, (Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
fresh Kir: SessionKey;
|
|
|
|
var Ni,Nr: Nonce;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_2(R,S, R, Nr, {I,Ni}k(R,S) );
|
2010-11-09 09:05:34 +00:00
|
|
|
send_3(S,I, Nr, {R,Kir,Ni}k(I,S), {I,Kir,Nr}k(R,S) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|