scyther/gui/Protocols/MultiProtocolAttacks/needham-schroeder-sk.spdl

57 lines
1.2 KiB
Plaintext
Raw Normal View History

# Needham Schroeder Symmetric Key
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/nssk.html
#
#
# Model dec that is invertible by inc
const dec,inc: Function;
inversekeys(dec,inc);
usertype SessionKey;
const Fresh: Function;
const Compromised: Function;
protocol needhamschroedersk(I,R,S)
{
role I
{
fresh Ni: Nonce;
var Nr: Nonce;
var Kir: SessionKey;
var T: Ticket;
send_1(I,S,(I,R,Ni));
2012-04-26 15:40:01 +01:00
recv_2(S,I, {Ni,R,Kir,T}k(I,S));
send_3(I,R,T);
2012-04-26 15:40:01 +01:00
recv_4(R,I,{Nr}Kir);
send_5(I,R,{{Nr}dec}Kir);
claim_I2(I,Secret,Kir);
claim_I3(I,Nisynch);
claim_I4(I,Empty,(Fresh,Kir));
}
role R
{
fresh Nr: Nonce;
var Kir: SessionKey;
2012-04-26 15:40:01 +01:00
recv_3(I,R,{Kir,I}k(R,S));
send_4(R,I,{Nr}Kir);
2012-04-26 15:40:01 +01:00
recv_5(I,R,{{Nr}dec}Kir);
claim_R1(R,Secret,Kir);
claim_R3(R,Nisynch);
claim_R4(R,Empty,(Fresh,Kir));
}
role S
{
var Ni: Nonce;
fresh Kir: SessionKey;
2012-04-26 15:40:01 +01:00
recv_1(I,S,(I,R,Ni));
send_2(S,I,{Ni,R,Kir,{Kir,I}k(R,S)}k(I,S));
}
}