2006-11-21 13:42:06 +00:00
|
|
|
# Neumann Stubblebine
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/neumannStubblebine.html
|
|
|
|
#
|
|
|
|
# Note:
|
|
|
|
# In SPORE this protocol is not described correctly, there are in fact 2
|
|
|
|
# different protocols (the key establishment protocol and the repeated
|
|
|
|
# authentication protocol)
|
|
|
|
|
|
|
|
usertype Server, SessionKey, TimeStamp, TicketKey;
|
|
|
|
usertype ExpiredTimeStamp;
|
|
|
|
|
|
|
|
const Fresh: Function;
|
|
|
|
const Compromised: Function;
|
|
|
|
|
|
|
|
protocol neustub^Repeat(I,R,S)
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Kir: SessionKey;
|
2006-11-21 13:42:06 +00:00
|
|
|
|
|
|
|
role I
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Mi: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Mr: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Kir: SessionKey;
|
|
|
|
fresh Tr: TimeStamp;
|
2006-11-21 13:42:06 +00:00
|
|
|
|
|
|
|
send_5(I,R,Mi,{I,Kir,Tr}k(R,S));
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_6(R,I,Mr,{Mi}Kir);
|
2006-11-21 13:42:06 +00:00
|
|
|
send_7(I,R,{Mr}Kir);
|
|
|
|
claim_I1(I,Secret, Kir);
|
|
|
|
claim_I2(I,Niagree);
|
|
|
|
claim_I3(I,Nisynch);
|
|
|
|
claim_I4(I,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Mr: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Tr: TimeStamp;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
var Mi: Nonce;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_5(I,R,Mi,{I,Kir,Tr}k(R,S));
|
2006-11-21 13:42:06 +00:00
|
|
|
send_6(R,I,Mr,{Mi}Kir);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_7(I,R,{Mr}Kir);
|
2006-11-21 13:42:06 +00:00
|
|
|
claim_R1(R,Secret, Kir);
|
|
|
|
claim_R2(R,Niagree);
|
|
|
|
claim_R3(R,Nisynch);
|
|
|
|
claim_R4(R,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
protocol neustub(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 Tb: TimeStamp;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
|
|
|
|
send_1(I,R, I, Ni);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_3(S,I, { R,Ni,Kir,Tb}k(I,S), T, Nr);
|
2006-11-21 13:42:06 +00:00
|
|
|
send_4(I,R,T,{Nr}Kir);
|
|
|
|
|
|
|
|
claim_I1(I,Secret, Kir);
|
|
|
|
claim_I2(I,Niagree);
|
|
|
|
claim_I3(I,Nisynch);
|
|
|
|
claim_I4(I,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var Ni,Mi: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Nr,Mr: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Kir: SessionKey;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Tb: TimeStamp;
|
2006-11-21 13:42:06 +00:00
|
|
|
var T: Ticket;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_1(I,R, I, Ni);
|
2006-11-21 13:42:06 +00:00
|
|
|
send_2(R,S, R, {I, Ni, Tb}k(R,S),Nr);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_4(I,R,{I,Kir,Tb}k(R,S),{Nr}Kir);
|
2006-11-21 13:42:06 +00:00
|
|
|
|
|
|
|
claim_R1(R,Secret, Kir);
|
|
|
|
claim_R2(R,Niagree);
|
|
|
|
claim_R3(R,Nisynch);
|
|
|
|
claim_R4(R,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var Ni, Nr: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Kir: SessionKey;
|
2006-11-21 13:42:06 +00:00
|
|
|
var Tb: TimeStamp;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_2(R,S, R, {I,Ni,Tb}k(R,S), Nr);
|
2006-11-21 13:42:06 +00:00
|
|
|
send_3(S,I, { R, Ni, Kir, Tb}k(I,S), { I,Kir,Tb}k(R,S),Nr );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|