2005-05-23 13:00:33 +01:00
|
|
|
# Woo and Lam Pi 2
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/wooLamPi2.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-23 13:00:33 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
secret k: Function;
|
|
|
|
|
2005-08-15 14:31:48 +01:00
|
|
|
protocol woolamPi-2(I,R,S)
|
2005-05-23 13:00:33 +01:00
|
|
|
{
|
2005-05-23 13:35:58 +01:00
|
|
|
role I
|
|
|
|
{
|
|
|
|
var Nr: Nonce;
|
2005-05-23 13:00:33 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
send_1(I,R, I);
|
2005-05-23 13:00:33 +01:00
|
|
|
read_2(R,I, Nr);
|
|
|
|
send_3(I,R, {I,Nr}k(I,S));
|
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2005-05-23 13:00:33 +01:00
|
|
|
const Nr: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
|
|
|
|
read_1(I,R, I);
|
|
|
|
send_2(R,I, Nr);
|
|
|
|
read_3(I,R, T);
|
|
|
|
send_4(R,S, {I, T}k(R,S));
|
|
|
|
read_5(S,R, {I, Nr}k(R,S));
|
|
|
|
|
|
|
|
claim_R1(R,Nisynch);
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-23 13:00:33 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
role S
|
|
|
|
{
|
2005-05-23 13:00:33 +01:00
|
|
|
var Nr: Nonce;
|
|
|
|
|
|
|
|
read_4(R,S, {I, {I,Nr}k(I,S)}k(R,S));
|
|
|
|
send_5(S,R, {I,Nr}k(R,S));
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-23 13:00:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Eve,Simon: Agent;
|
|
|
|
const Te: Ticket;
|
|
|
|
const Ne: Nonce;
|
|
|
|
|
|
|
|
|
|
|
|
untrusted Eve;
|
|
|
|
compromised k(Eve,Simon);
|
|
|
|
|
2005-08-15 14:31:48 +01:00
|
|
|
run woolamPi-2.I (Agent,Agent,Simon);
|
|
|
|
run woolamPi-2.R (Agent,Agent,Simon);
|
|
|
|
run woolamPi-2.S (Agent,Agent,Simon);
|
2005-05-23 13:00:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|