2010-11-24 16:13:14 +00:00
|
|
|
# Woo and Lam Pi 2
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/wooLamPi3.html
|
|
|
|
#
|
|
|
|
|
|
|
|
protocol woolamPi-3(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
|
|
|
var Nr: Nonce;
|
|
|
|
|
|
|
|
send_1(I,R, I);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_2(R,I, Nr);
|
2010-11-24 16:13:14 +00:00
|
|
|
send_3(I,R, {Nr}k(I,S));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh Nr: Nonce;
|
2010-11-24 16:13:14 +00:00
|
|
|
var T: Ticket;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_1(I,R, I);
|
2010-11-24 16:13:14 +00:00
|
|
|
send_2(R,I, Nr);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_3(I,R, T);
|
2010-11-24 16:13:14 +00:00
|
|
|
send_4(R,S, {I, T}k(R,S));
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_5(S,R, {I, Nr}k(R,S));
|
2010-11-24 16:13:14 +00:00
|
|
|
|
|
|
|
claim_R1(R,Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var Nr: Nonce;
|
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_4(R,S, {I, {Nr}k(I,S)}k(R,S));
|
2010-11-24 16:13:14 +00:00
|
|
|
send_5(S,R, {I,Nr}k(R,S));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|