2008-02-25 22:28:52 +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;
|
|
|
|
secret k: Function;
|
|
|
|
|
|
|
|
const Fresh: Function;
|
|
|
|
const Compromised: Function;
|
|
|
|
|
|
|
|
const kee: SessionKey;
|
|
|
|
|
|
|
|
protocol neustub^Repeat(I,R,S)
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Kir: SessionKey;
|
2008-02-25 22:28:52 +00:00
|
|
|
|
|
|
|
role I
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Mi: Nonce;
|
2008-02-25 22:28:52 +00:00
|
|
|
var Mr: Nonce;
|
2008-02-25 22:46:22 +00:00
|
|
|
var Kir: SessionKey;
|
|
|
|
var Tr: TimeStamp;
|
|
|
|
|
|
|
|
var Tb: Ticket;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh g: Ticket;
|
2008-02-25 22:46:22 +00:00
|
|
|
var h: Ticket;
|
|
|
|
|
|
|
|
read_!chain(R,I, { R,Tr,Kir }k(I,S), Tb);
|
2008-02-25 22:28:52 +00:00
|
|
|
|
2008-02-25 22:46:22 +00:00
|
|
|
send_5(I,R,Mi,{I,Kir,Tr}k(R,S),g);
|
|
|
|
read_6(R,I,{Mi,Mr,g,h}Kir);
|
2008-02-25 22:28:52 +00:00
|
|
|
send_7(I,R,{I,Mr}Kir);
|
2008-02-25 22:46:22 +00:00
|
|
|
|
|
|
|
claim_I0(I,Secret, g);
|
|
|
|
claim_I5(I,Secret, h);
|
2008-02-25 22:28:52 +00:00
|
|
|
claim_I1(I,Secret, Kir);
|
|
|
|
claim_I2(I,Niagree);
|
|
|
|
claim_I3(I,Nisynch);
|
|
|
|
claim_I4(I,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Mr: Nonce;
|
2008-02-25 22:28:52 +00:00
|
|
|
var Tr: TimeStamp;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
var Mi: Nonce;
|
2008-02-25 22:46:22 +00:00
|
|
|
|
|
|
|
var g: Ticket;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh h: Ticket;
|
2008-02-25 22:28:52 +00:00
|
|
|
|
2008-02-25 22:46:22 +00:00
|
|
|
read_5(I,R,Mi,{I,Kir,Tr}k(R,S),g);
|
|
|
|
send_6(R,I,{Mi,Mr,g,h}Kir);
|
2008-02-25 22:28:52 +00:00
|
|
|
read_7(I,R,{I,Mr}Kir);
|
2008-02-25 22:46:22 +00:00
|
|
|
|
2008-02-25 22:28:52 +00:00
|
|
|
claim_R1(R,Secret, Kir);
|
2008-02-25 22:46:22 +00:00
|
|
|
claim_R5(R,Secret, g);
|
|
|
|
claim_R6(R,Secret, h);
|
2008-02-25 22:28:52 +00:00
|
|
|
claim_R2(R,Niagree);
|
|
|
|
claim_R3(R,Nisynch);
|
|
|
|
claim_R4(R,Empty,(Fresh,Kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|