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

67 lines
1.5 KiB
Plaintext
Raw Normal View History

2006-11-21 13:42:06 +00:00
# Amended Needham Schroeder Symmetric Key
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/nssk_amended.html
#
#
# Note:
# According to SPORE there are no attacks on this protocol, scyther
# finds one however. This has to be investigated further.
# Model dec that is invertible by inc
const dec,inc: Function;
inversekeys(dec,inc);
usertype SessionKey;
const Fresh: Function;
const Compromised: Function;
protocol needhamschroedersk-amend(I,R,S)
{
role I
{
fresh Ni: Nonce;
2006-11-21 13:42:06 +00:00
var Nr: Nonce;
var Kir: SessionKey;
var T,T2: Ticket;
send_1(I,R,I);
2012-04-26 15:40:01 +01:00
recv_2(R,I,T);
2006-11-21 13:42:06 +00:00
send_3(I,S,(I,R,Ni,T));
2012-04-26 15:40:01 +01:00
recv_4(S,I, {Ni,R,Kir,T2}k(I,S));
2006-11-21 13:42:06 +00:00
send_5(I,R,T2);
2012-04-26 15:40:01 +01:00
recv_6(R,I,{Nr}Kir);
2006-11-21 13:42:06 +00:00
send_7(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;
2006-11-21 13:42:06 +00:00
var Kir: SessionKey;
2012-04-26 15:40:01 +01:00
recv_1(I,R,I);
2006-11-21 13:42:06 +00:00
send_2(R,I,{I,Nr}k(R,S));
2012-04-26 15:40:01 +01:00
recv_5(I,R,{Kir,Nr,I}k(R,S));
2006-11-21 13:42:06 +00:00
send_6(R,I,{Nr}Kir);
2012-04-26 15:40:01 +01:00
recv_7(I,R,{{Nr}dec}Kir);
2006-11-21 13:42:06 +00:00
claim_R1(R,Secret,Nr);
claim_R3(R,Nisynch);
claim_R4(R,Empty,(Fresh,Kir));
}
role S
{
var Ni,Nr: Nonce;
fresh Kir: SessionKey;
2012-04-26 15:40:01 +01:00
recv_3(I,S,(I,R,Ni,{I,Nr}k(R,S)));
2006-11-21 13:42:06 +00:00
send_4(S,I,{Ni,R,Kir,{Kir,Nr,I}k(R,S)}k(I,S));
}
}