scyther/spdl/SPORE/yahalom-lowe.spdl
gijs 0f54f2ed23 - Update modeling of needham schroeder to better reflect the modelling in
SPORE:
    - pk is not known to all agents, only pk(Simon) is known
- Use new naming convention:
    - Protocol name starting with an @ means internal protocol
    - For non internal protocols naming is as follows:
      protocolname-variant^subprotocol
    For example: yahalom-Lowe^KeyCompromise meaning the key compromise sub
    protocol of the Lowe variant of the Yahalom protocol.
2005-08-15 13:31:48 +00:00

61 lines
1.1 KiB
Plaintext

# Lowe's modified version of Yahalom
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/yahalomLowe.html
#
#
secret k : Function;
usertype SessionKey;
protocol yahalom-Lowe(I,R,S)
{
role I
{
const Ni: Nonce;
var Nr: Nonce;
var Kir: SessionKey;
send_1(I,R, I,Ni);
read_3(S,I, {R,Kir,Ni,Nr}k(I,S) );
send_5(I,R, {I, R, S, Nr}Kir );
claim_I1(I, Secret,Kir);
claim_I2(I, Nisynch);
}
role R
{
const Nr: Nonce;
var Ni: Nonce;
var Kir: SessionKey;
read_1(I,R, I,Ni);
send_2(R,S, {I,Ni,Nr}k(R,S) );
read_4(S,R, {I,Kir}k(R,S));
read_5(I,R, {I, R, S, Nr}Kir);
claim_R1(R, Secret,Kir);
claim_R2(R, Nisynch);
}
role S
{
const Kir: SessionKey;
var Ni,Nr: Nonce;
read_2(R,S, {I,Ni,Nr}k(R,S) );
send_3(S,I, {R,Kir,Ni,Nr}k(I,S));
send_4(S,R, {I,Kir}k(R,S));
}
}
const Alice,Bob,Simon : Agent;
run yahalom-Lowe.I(Agent,Agent,s);
run yahalom-Lowe.I(Agent,Agent,s);
run yahalom-Lowe.R(Agent,Agent,s);