2005-05-18 13:17:08 +01:00
|
|
|
# Lowe modified Wide Mouthed Frog
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/wideMouthedFrogLowe.html
|
|
|
|
#
|
|
|
|
# Note:
|
|
|
|
# According to SPORE there are no known attacks on this protocol, scyther
|
|
|
|
# finds one however this has to do with the unusual assumption that every
|
|
|
|
# agent can recognise and will reject to read messages that it has created
|
|
|
|
# itself.
|
|
|
|
|
2005-06-29 13:42:25 +01:00
|
|
|
usertype SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
usertype TimeStamp;
|
|
|
|
const succ,pred: Function;
|
|
|
|
inversekeys (succ,pred);
|
2005-06-23 13:45:32 +01:00
|
|
|
const Fresh: Function;
|
2005-06-24 11:53:15 +01:00
|
|
|
const Compromised: Function;
|
2005-05-18 13:17:08 +01:00
|
|
|
|
|
|
|
secret k: Function;
|
|
|
|
|
2005-06-24 11:53:15 +01:00
|
|
|
protocol wmfLoweSessionKeyCompromise(C)
|
|
|
|
{
|
|
|
|
// 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: Nonce;
|
2005-06-29 13:42:25 +01:00
|
|
|
const Kir: SessionKey;
|
2005-06-24 11:53:15 +01:00
|
|
|
const Ti,Ts: TimeStamp;
|
|
|
|
var I,R,S: Agent;
|
|
|
|
|
|
|
|
read_C1(C,C, I,R,S);
|
2005-07-04 14:40:09 +01:00
|
|
|
send_C2(C,C, I, {I,Ti,R,Kir}k(I,S),
|
|
|
|
{S,Ts,I,Kir}k(R,S),
|
|
|
|
{R,Nr}Kir,
|
|
|
|
{I,{Nr}succ}Kir,
|
2005-06-24 11:53:15 +01:00
|
|
|
Kir
|
|
|
|
);
|
|
|
|
claim_C3(C,Empty, (Compromised,Kir));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-05-18 13:17:08 +01:00
|
|
|
protocol wmfLowe(I,R,S)
|
|
|
|
{
|
2005-05-23 13:35:58 +01:00
|
|
|
role I
|
|
|
|
{
|
2005-06-29 13:42:25 +01:00
|
|
|
const Kir: SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
const Ti: TimeStamp;
|
2005-06-29 13:42:25 +01:00
|
|
|
var Kr: SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
var Nr: Nonce;
|
|
|
|
|
2005-07-04 14:40:09 +01:00
|
|
|
send_1(I,S, I, {I, Ti, R, Kir}k(I,S));
|
|
|
|
read_3(R,I,{R,Nr}Kir);
|
|
|
|
send_4(I,R,{I,{Nr}succ}Kir);
|
2005-05-18 13:17:08 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
claim_I1(I,Secret,Kir);
|
2005-05-18 13:17:08 +01:00
|
|
|
claim_I2(I,Nisynch);
|
2005-06-23 13:45:32 +01:00
|
|
|
claim_I3(I,Empty,(Fresh,Kir));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2005-05-18 13:17:08 +01:00
|
|
|
var Ts: TimeStamp;
|
2005-06-29 13:42:25 +01:00
|
|
|
var Kir: SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
const Nr: Nonce;
|
|
|
|
|
2005-07-04 14:40:09 +01:00
|
|
|
read_2(S,R, {S, Ts, I, Kir}k(R,S) );
|
|
|
|
send_3(R,I, {R, Nr}Kir);
|
|
|
|
read_4(I,R, {I,{Nr}succ}Kir);
|
2005-05-18 13:17:08 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
claim_R1(R,Secret,Kir);
|
2005-05-18 13:17:08 +01:00
|
|
|
claim_R2(R,Nisynch);
|
2005-06-23 13:45:32 +01:00
|
|
|
claim_R3(R,Empty,(Fresh,Kir));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-18 13:17:08 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
role S
|
|
|
|
{
|
2005-06-29 13:42:25 +01:00
|
|
|
var Kir: SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
const Ts: TimeStamp;
|
|
|
|
var Ti: TimeStamp;
|
|
|
|
|
2005-07-04 14:40:09 +01:00
|
|
|
read_1(I,S, I,{I,Ti, R, Kir}k(I,S) );
|
|
|
|
send_2(S,R, {R,Ts, I, Kir}k(R,S));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-18 13:17:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Eve,Simon: Agent;
|
2005-06-29 13:42:25 +01:00
|
|
|
const Ke: SessionKey;
|
2005-05-18 13:17:08 +01:00
|
|
|
const Te: TimeStamp;
|
|
|
|
|
|
|
|
|
|
|
|
untrusted Eve;
|
|
|
|
compromised k(Eve,Simon);
|
|
|
|
|
|
|
|
run wmfLowe.I (Agent,Agent,Simon);
|
|
|
|
run wmfLowe.R (Agent,Agent,Simon);
|
|
|
|
run wmfLowe.S (Agent,Agent,Simon);
|
|
|
|
|
|
|
|
|
|
|
|
|