2004-02-20 11:37:28 +00:00
|
|
|
secret const k : Function;
|
|
|
|
|
|
|
|
/* Version from the Spore Librairy
|
|
|
|
http://www.lsv.ens-cachan.fr/spore/otwayRees.html
|
|
|
|
*/
|
|
|
|
|
2004-02-22 15:22:19 +00:00
|
|
|
usertype String, SesKey, Ticket, Server;
|
|
|
|
|
2004-02-20 11:37:28 +00:00
|
|
|
protocol otwayrees(A,B,S)
|
|
|
|
{
|
|
|
|
role A
|
|
|
|
{
|
|
|
|
const na : Nonce;
|
|
|
|
const M : String;
|
|
|
|
var nb : Nonce;
|
|
|
|
var kab : SesKey;
|
|
|
|
|
|
|
|
send_1(A,B, M,A,B, { na,M,A,B }k(A,S) );
|
|
|
|
read_4(B,A, M, { na,kab }k(A,S) );
|
|
|
|
|
2004-02-22 13:16:53 +00:00
|
|
|
claim(A, Secret,kab);
|
2004-02-20 11:37:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
role B
|
|
|
|
{
|
|
|
|
var na : Nonce;
|
|
|
|
var M : String;
|
|
|
|
const nb : Nonce;
|
|
|
|
var kab : SesKey;
|
|
|
|
var t1,t2 : Ticket;
|
|
|
|
|
|
|
|
read_1(A,B, M,A,B, t1 );
|
|
|
|
send_2(B,S, M,A,B, t2, { nb,M,A,B }k(B,S) );
|
|
|
|
read_3(S,B, M, t2, { nb,kab }k(B,S) );
|
|
|
|
send_4(B,A, M, t2 );
|
|
|
|
|
2004-02-22 13:16:53 +00:00
|
|
|
claim(B, Secret,kab);
|
2004-02-20 11:37:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var na,nb : Nonce;
|
|
|
|
var M : String;
|
|
|
|
const kab : SesKey;
|
|
|
|
|
|
|
|
read_2(B,S, M,A,B, { na,M,A,B }k(A,S), { nb,M,A,B }k(B,S) );
|
|
|
|
send_3(S,B, M, { na,kab }k(A,S) , { nb,kab }k(B,S) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const Alice, Bob, Eve: Agent;
|
|
|
|
const Simon: Server;
|
|
|
|
|
|
|
|
untrusted Eve;
|
|
|
|
compromised k(Eve,Simon);
|
|
|
|
|
|
|
|
run otwayrees.A(Alice, Agent, Simon);
|
|
|
|
run otwayrees.B(Agent, Bob, Simon);
|
|
|
|
run otwayrees.S(Agent, Agent, Simon);
|
|
|
|
|
|
|
|
run otwayrees.A(Agent, Agent, Simon);
|
|
|
|
run otwayrees.B(Agent, Agent, Simon);
|
|
|
|
run otwayrees.S(Agent, Agent, Simon);
|
|
|
|
|