forked from cascremers/scyther
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wmf.spdl
54 lines (43 loc) · 1.12 KB
/
wmf.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
# Wide Mouthed Frog
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/wideMouthedFrog.html
#
# Note
# The name of the party that has generated a message was added in order
# to model the property described in SPORE that an agent can identify
# its own messages and will reject them.
usertype SessionKey;
usertype TimeStamp;
usertype ExpiredTimeStamp;
const Fresh: Function;
const Compromised: Function;
protocol wmf(I,R,S)
{
role I
{
fresh Kir: SessionKey;
fresh Ti: TimeStamp;
var Kr: SessionKey;
send_1(I,S, I, {I, Ti, R, Kir}k(I,S));
claim_I1(I,Secret,Kir);
claim_I2(I,Empty,(Fresh,Kir));
}
role R
{
var Ts: TimeStamp;
var Kir: SessionKey;
recv_2(S,R, {S, Ts, I, Kir}k(R,S) );
claim_R1(R,Secret,Kir);
claim_R2(R,Nisynch);
claim_R3(R,Empty,(Fresh,Kir));
}
role S
{
var Kir: SessionKey;
fresh Ts: TimeStamp;
var Ti: TimeStamp;
recv_1(I,S, I,{I, Ti, R, Kir}k(I,S) );
send_2(S,R, {S, Ts, I, Kir}k(R,S));
}
}