2005-05-23 13:33:03 +01:00
|
|
|
# Paulson's strengthened version of Yahalom
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/yahalomPaulson.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:33:03 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
secret k : Function;
|
|
|
|
|
2005-06-02 13:41:24 +01:00
|
|
|
usertype Key;
|
2005-05-23 13:33:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
protocol yahalomPaulson(I,R,S)
|
|
|
|
{
|
2005-05-23 13:35:58 +01:00
|
|
|
role I
|
|
|
|
{
|
|
|
|
const Ni: Nonce;
|
|
|
|
var Nr: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: Key;
|
|
|
|
|
|
|
|
send_1(I,R, I,Ni);
|
|
|
|
read_3(S,I, Nr, {R,Kir,Ni}k(I,S), T );
|
|
|
|
send_4(I,R, T, {Nr}Kir );
|
|
|
|
|
|
|
|
claim_I1(I, Secret,Kir);
|
|
|
|
claim_I2(I, Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
const Nr: Nonce;
|
|
|
|
var Ni: Nonce;
|
|
|
|
var T: Ticket;
|
|
|
|
var Kir: Key;
|
|
|
|
|
|
|
|
read_1(I,R, I,Ni);
|
|
|
|
send_2(R,S, R, Nr, {I,Ni}k(R,S) );
|
|
|
|
read_4(I,R, {I,R, Kir, Nr}k(R,S) , {Nr}Kir );
|
|
|
|
|
|
|
|
claim_R1(R, Secret,Kir);
|
2005-05-23 13:33:03 +01:00
|
|
|
claim_R2(R, Nisynch);
|
2005-05-23 13:35:58 +01:00
|
|
|
}
|
2005-05-23 13:33:03 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
role S
|
|
|
|
{
|
|
|
|
const Kir: Key;
|
|
|
|
var Ni,Nr: Nonce;
|
2005-05-23 13:33:03 +01:00
|
|
|
|
2005-05-23 13:35:58 +01:00
|
|
|
read_2(R,S, R, Nr, {I,Ni}k(R,S) );
|
|
|
|
send_3(S,I, Nr, {R,Kir,Ni}k(I,S), {I,R,Kir,Nr}k(R,S) );
|
|
|
|
}
|
2005-05-23 13:33:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Simon : Agent;
|
|
|
|
|
|
|
|
run yahalomPaulson.I(Agent,Agent,s);
|
|
|
|
run yahalomPaulson.I(Agent,Agent,s);
|
|
|
|
run yahalomPaulson.R(Agent,Agent,s);
|
|
|
|
|