scyther/gui/Protocols/splice-as-hc.spdl

62 lines
1.3 KiB
Plaintext
Raw Normal View History

2006-11-21 13:42:06 +00:00
# Hwang and Chen Modified SPLICE/AS
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/spliceas2.html
#
usertype TimeStamp, LifeTime;
const inc,dec: Function;
inversekeys (inc,dec);
protocol spliceAS-HC(I,R,S)
{
role I
{
fresh N1,N2: Nonce;
fresh T: TimeStamp;
fresh L: LifeTime;
2006-11-21 13:42:06 +00:00
send_1(I,S, I, R, N1 );
2012-04-26 15:40:01 +01:00
recv_2(S,I, S, {S, I, N1, R, pk(R)}sk(S) );
2006-11-21 13:42:06 +00:00
send_3(I,R, I, R, {I, T, L, {N2}pk(R)}sk(I) );
2012-04-26 15:40:01 +01:00
recv_6(R,I, R, I, {R, {N2}inc}pk(I) );
2006-11-21 13:42:06 +00:00
claim_7(I, Secret, N2);
claim_9(I, Niagree);
claim_10(I, Nisynch);
}
role S
{
var N1,N3: Nonce;
2012-04-26 15:40:01 +01:00
recv_1(I,S, I, R, N1 );
2006-11-21 13:42:06 +00:00
send_2(S,I, S, {S, I, N1, R, pk(R)}sk(S) );
2012-04-26 15:40:01 +01:00
recv_4(R,S, R, I, N3 );
2006-11-21 13:42:06 +00:00
send_5(S,R, S, {S, R, N3, I, pk(I)}sk(S) );
}
role R
{
fresh N3: Nonce;
2006-11-21 13:42:06 +00:00
var N2: Nonce;
var T: TimeStamp;
var L: LifeTime;
var ni: Nonce;
fresh nr: Nonce;
2006-11-21 13:42:06 +00:00
2012-04-26 15:40:01 +01:00
recv_3(I,R, I, R, {I, T, L, {N2}pk(R)}sk(I) );
2006-11-21 13:42:06 +00:00
send_4(R,S, R, I, N3 );
2012-04-26 15:40:01 +01:00
recv_5(S,R, S, {S, R, N3, I, pk(I)}sk(S) );
2006-11-21 13:42:06 +00:00
send_6(R,I, R, I, {R, {N2}inc}pk(I) );
claim_8(R, Secret, N2);
claim_11(R, Niagree);
claim_12(R, Nisynch);
}
}