2005-05-02 11:52:03 +01:00
|
|
|
# Hwang modified Neumann Stubblebine
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/neumannStubblebineHwang.html
|
|
|
|
#
|
|
|
|
# Note:
|
|
|
|
# This protocol uses a ticket so scyther will only be able to verify
|
2005-06-02 13:41:24 +01:00
|
|
|
# the protocol using the ARACHNE engine (-a)
|
2005-05-02 11:52:03 +01:00
|
|
|
#
|
|
|
|
# Note:
|
|
|
|
# According to SPORE there are no attacks on this protocol, scyther
|
|
|
|
# finds one however. This has to be investigated further.
|
|
|
|
|
|
|
|
|
2005-06-02 13:41:24 +01:00
|
|
|
usertype Server, SessionKey, TimeStamp, TicketKey;
|
2005-08-12 12:55:24 +01:00
|
|
|
usertype ExpiredTimeStamp;
|
2005-05-02 11:52:03 +01:00
|
|
|
secret k: Function;
|
|
|
|
|
|
|
|
const a, b, e: Agent;
|
|
|
|
const s: Server;
|
2005-06-23 13:45:32 +01:00
|
|
|
const Fresh: Function;
|
2005-06-24 11:53:15 +01:00
|
|
|
const Compromised: Function;
|
2005-05-02 11:52:03 +01:00
|
|
|
|
|
|
|
const ne: Nonce;
|
|
|
|
const kee: SessionKey;
|
|
|
|
untrusted e;
|
|
|
|
compromised k(e,s);
|
|
|
|
|
2005-08-15 14:31:48 +01:00
|
|
|
protocol neustub-Hwang^KeyCompromise(C)
|
2005-06-24 11:53:15 +01:00
|
|
|
{
|
|
|
|
// Read the names of 3 agents and disclose a session between them including
|
|
|
|
// corresponding session key to simulate key compromise
|
|
|
|
role C {
|
|
|
|
const Ni,Nr,Mi,Mr: Nonce;
|
|
|
|
const Kir: SessionKey;
|
2005-08-12 12:55:24 +01:00
|
|
|
const Tr: ExpiredTimeStamp;
|
2005-06-24 11:53:15 +01:00
|
|
|
var I,R,S: Agent;
|
|
|
|
|
|
|
|
read_C1(C,C, I,R,S);
|
|
|
|
send_C2(C,C, I,Ni,
|
|
|
|
R,{I,Ni,Tr,Nr}k(R,S),
|
|
|
|
{R,Ni,Kir,Tr}k(I,S),
|
|
|
|
{I,Kir,Tr}k(R,S), Nr,
|
|
|
|
{Nr}Kir,
|
|
|
|
Mi,{I,Kir,Tr}k(R,S),
|
|
|
|
Mr,{Mr}Kir,
|
|
|
|
{Mr}Kir,
|
|
|
|
Kir
|
|
|
|
);
|
|
|
|
claim_C3(C,Empty, (Compromised,Kir));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-08-15 14:31:48 +01:00
|
|
|
protocol neustub-Hwang(I,R,S)
|
2005-05-02 11:52:03 +01:00
|
|
|
{
|
2005-05-23 13:35:58 +01:00
|
|
|
role I
|
|
|
|
{
|
|
|
|
const Ni,Mi: Nonce;
|
|
|
|
var Nr,Mr: Nonce;
|
|
|
|
var T: Ticket;
|
2005-05-02 11:52:03 +01:00
|
|
|
var Tb: TimeStamp;
|
2005-05-23 13:35:58 +01:00
|
|
|
var Kir: SessionKey;
|
|
|
|
|
|
|
|
send_1(I,R, I, Ni);
|
|
|
|
read_3(S,I, { R,Ni,Kir,Tb}k(I,S), T, Nr);
|
2005-05-02 11:52:03 +01:00
|
|
|
send_4(I,R,T,{Nr}Kir);
|
|
|
|
send_5(I,R,Mi,T);
|
2005-05-23 13:35:58 +01:00
|
|
|
read_6(R,I,Mr,{Mr}Kir);
|
|
|
|
send_7(I,R,{Mr}Kir);
|
|
|
|
|
|
|
|
claim_I1(I,Secret, Kir);
|
|
|
|
claim_I2(I,Niagree);
|
|
|
|
claim_I3(I,Nisynch);
|
2005-06-23 13:45:32 +01:00
|
|
|
claim_I4(I,Empty,(Fresh,Kir));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-02 11:52:03 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
role R
|
|
|
|
{
|
|
|
|
var Ni,Mi: Nonce;
|
|
|
|
const Nr,Mr: Nonce;
|
|
|
|
var Kir: SessionKey;
|
|
|
|
const Tb: TimeStamp;
|
|
|
|
var T: Ticket;
|
|
|
|
|
2005-05-02 11:52:03 +01:00
|
|
|
read_1(I,R, I, Ni);
|
|
|
|
send_2(R,S, R, {I, Ni, Tb, Nr}k(R,S));
|
|
|
|
read_4(I,R,{I,Kir,Tb}k(R,S),{Nr}Kir);
|
|
|
|
read_5(I,R,Mi,T);
|
2005-05-23 13:35:58 +01:00
|
|
|
send_6(R,I,Mr,{Mr}Kir);
|
|
|
|
read_7(I,R,{Mr}Kir);
|
|
|
|
|
|
|
|
claim_R1(R,Secret, Kir);
|
|
|
|
claim_R2(R,Niagree);
|
|
|
|
claim_R3(R,Nisynch);
|
2005-06-23 13:45:32 +01:00
|
|
|
claim_R4(R,Empty,(Fresh,Kir));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-02 11:52:03 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
role S
|
|
|
|
{
|
|
|
|
var Ni, Nr: Nonce;
|
|
|
|
const Kir: SessionKey;
|
2005-05-02 11:52:03 +01:00
|
|
|
var Tb: TimeStamp;
|
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
read_2(R,S, R, {I,Ni,Tb,Nr}k(R,S));
|
|
|
|
send_3(S,I, { R, Ni, Kir, Tb}k(I,S), { I,Kir,Tb}k(R,S),Nr );
|
|
|
|
}
|
2005-05-02 11:52:03 +01:00
|
|
|
}
|
|
|
|
|
2005-08-15 14:31:48 +01:00
|
|
|
run neustub-Hwang.A(a,b,s);
|
|
|
|
run neustub-Hwang.B(a,b,s);
|
|
|
|
run neustub-Hwang.S(a,b,s);
|
2005-05-02 11:52:03 +01:00
|
|
|
|