forked from cascremers/scyther
-
Notifications
You must be signed in to change notification settings - Fork 0
/
otwayrees.spdl
56 lines (44 loc) · 1.15 KB
/
otwayrees.spdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Otway Rees
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/otwayRees.html
#
const Fresh: Function;
const Compromised: Function;
usertype String,SessionKey;
protocol otwayrees(I,R,S)
{
role I
{
fresh Ni : Nonce;
fresh M : String;
var Kir : SessionKey;
send_1(I,R, M,I,R,{Ni,M,I,R}k(I,S) );
recv_4(R,I, M,{Ni,Kir}k(I,S) );
claim_I1(I, Secret,Kir);
claim_I2(I, Nisynch);
claim_I3(I, Empty, (Fresh,Kir));
}
role R
{
var M : String;
fresh Nr : Nonce;
var Kir : SessionKey;
var T1,T2: Ticket;
recv_1(I,R, M,I,R, T1 );
send_2(R,S, M,I,R, T1, { Nr,M,I,R }k(R,S) );
recv_3(S,R, M, T2, { Nr,Kir }k(R,S) );
send_4(R,I, M, T2 );
claim_R1(R, Secret,Kir);
claim_R2(R, Nisynch);
claim_R3(R, Empty, (Fresh,Kir));
}
role S
{
var Ni,Nr : Nonce;
var M : String;
fresh Kir : SessionKey;
recv_2(R,S, M,I,R, { Ni,M,I,R}k(I,S), { Nr,M,I,R }k(R,S) );
send_3(S,R, M, { Ni,Kir }k(I,S) , { Nr,Kir }k(R,S) );
}
}