forked from fandiputra/isacprotocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isac2.spdl
83 lines (71 loc) · 1.65 KB
/
isac2.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
Getting and Log Data Protocol
*/
// User type declaration
usertype message;
usertype label;
usertype log;
usertype label;
usertype datauser;
protocol ISAC2 (DU,CSP,DO)
{
role DU //DU equals PID(DU)
{
fresh nc: Nonce;
var m1: message;
var m2: message;
fresh lbi: label;
var nd: Nonce;
send_1 (DU,CSP, {lbi, nc, DU}pk(CSP));
recv_2 (CSP,DU, {m1, m2, lbi, nd, CSP}pk(DU));
claim (DU, Running, CSP, lbi, nc, m1, m2, nd);
send_3 (DU,CSP, {nd}pk(CSP));
claim(DU, Secret, m1);
claim(DU, Secret, m2);
claim(DU, Secret, lbi);
claim(DU, Alive, CSP);
claim(DU, Niagree);
claim(DU, Nisynch);
}
role CSP
{
var nc: Nonce;
fresh m1: message;
fresh m2: message;
var lbi: label;
fresh nd: Nonce;
fresh user: datauser; //
var ne: Nonce; //
fresh log: log; //
recv_1 (DU,CSP, {lbi, nc, DU}pk(CSP));
claim(CSP, Running, DU, lbi, nc, m1, m2, gl);
send_2 (CSP,DU, {m1, m2, lbi, nd, CSP}pk(DU));
recv_3 (DU,CSP, {nd}pk(CSP));
send_4 (CSP,DO, {log, user, CSP}pk(DO)); //
recv_5 (DO,CSP, {ne, log, DO}pk(CSP)); //
claim(CSP, Running, DO, ne, log); //
send_6 (CSP,DO, {ne}pk(DO)); //
claim(CSP, Secret, m1);
claim(CSP, Secret, m2);
claim(CSP, Secret, lbi);
claim(CSP, Secret, log);
claim(CSP, Secret, user);
claim(CSP, Alive, DU);
claim(CSP, Alive, DO);
claim(CSP, Niagree);
claim(CSP, Nisynch);
}
role DO //
{
var user: datauser;
fresh ne: Nonce;
var log: log;
recv_4 (CSP,DO, {log, user, CSP}pk(DO));
claim(DO, Running, CSP, log, user);
send_5 (DO,CSP, {ne, log, DO}pk(CSP));
recv_6 (CSP,DO, {ne}pk(DO));
claim(DO, Secret, log);
claim(DO, Secret, user);
claim(DO, Alive, CSP);
}
}