-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJu(2024)protocol.hlpsl
170 lines (145 loc) · 5.45 KB
/
Ju(2024)protocol.hlpsl
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
role role_U(U:agent,CS:agent,D:agent,Key_set_U_CS:(symmetric_key) set,Key_set_CS_U:(symmetric_key) set,SND,RCV:channel(dy))
played_by U
def=
local
State:nat,IDuj:text,IDcsk:text,PIDuj:text,ECuj:text,TS1:text,M3:text,M1:text,M2:text,V1:text,TS3:text,M6:text,V3:text,Key_3:symmetric_key,Key_1:symmetric_key
,RPWuj,PWuj,RR3,CERTuj,ECujj,RR4,PIDdri,TIDuj,TIDdri,SK:text
init
State := 0
transition
%%% User registration
2. State=0 /\ RCV(start) =|> State':=1
/\ RPWuj':=h(IDuj,PWuj)
/\ Key_1':=new()
/\ Key_set_U_CS':=cons(Key_1',Key_set_U_CS)
/\ SND({IDuj}_Key_1')
3. State=1 /\ in(Key_3',Key_set_CS_U)
/\ RCV({PIDuj'.ECuj'.IDcsk}_Key_3') =|> State':=2
/\ Key_set_CS_U':=delete(Key_3',Key_set_CS_U)
/\ RR3':=new()
/\ CERTuj':=xor(ECuj',h(RR3',PWuj))
%% Login and Authentication key Agreement phase
/\ ECujj':=xor(CERTuj',h(RR3',PWuj))
/\ RR4':=new()
/\ TS1':=new()
/\ M1':= xor(h(IDcsk,TS1'),PIDuj)
/\ M2':= xor(h(PIDuj',ECuj',TS1'),PIDdri)
/\ M3':= xor(h(PIDuj',IDcsk,ECuj',TS1'),TIDuj)
/\ V1':=h(PIDuj',PIDdri,ECuj',TS1')
/\ SND(M1'.M2'.M3'.V1'.TS1')
/\ secret(ECujj',sec_ECujj,{U,CS})
/\ witness(U,CS,u_cs_TS1,TS1')
6. State=2 /\ RCV(M6'.V3'.TS3') =|> State':=3
/\ request(U,D,d_u_TS3,TS3')
/\ TIDdri':=xor(M6',h(TIDuj,PIDdri,TS3'))
/\ SK':= h(TIDuj,TIDdri,TS3')
end role
role role_CS(U:agent,CS:agent,D:agent,Key_set_CS_D:(symmetric_key) set,Key_set_U_CS:(symmetric_key) set,Key_set_CS_U:(symmetric_key) set,SND,RCV:channel(dy))
played_by CS
def=
local
State:nat,RTSdri:text,ECtdri:text,IDdri:text,RR1:text,IDuj:text,IDcsk:text,PIDuj:text,ECuj:text,TS1:text,M3:text,M1:text,M2:text,V1:text,TS2:text,M4:text,V2:text,Key_3:symmetric_key,Key_2:symmetric_key,Key_1:symmetric_key,
CCdri,PIDdri,ECdri,XXcsk,RR2,RTSuj,ECtuj,IDsck,TIDuj,CRdri,CRtdri:text
init
State := 0
transition
%% Drone registraion
1. State=0 /\ RCV(start) =|> State':=1
/\ RR1':=new()
/\ CCdri':=new()
/\ RTSdri':=new()
/\ PIDdri':=h(IDdri,RTSdri')
/\ ECdri':=h(IDdri,XXcsk,RR1',RTSdri')
/\ secret(ECdri',sec_ECdri,{CS,D})
/\ ECtdri':=xor(ECdri',h(XXcsk,RTSdri'))
/\ Key_1':=new()
/\ Key_set_CS_D':=cons(Key_1',Key_set_CS_D)
/\ SND({IDdri.CCdri'.ECdri'}_Key_1')
%% Users registration
2. State=1 /\ in(Key_2',Key_set_U_CS)
/\ RCV({IDuj}_Key_2') =|> State':=2
/\ Key_set_U_CS':=delete(Key_2',Key_set_U_CS)
/\ RR2':=new()
/\ PIDuj':=h(IDuj,RTSuj,XXcsk)
/\ ECuj':=h(PIDuj', RTSuj,RR2',XXcsk)
/\ secret(ECuj',sec_ECuj,{CS,U})
/\ ECtuj':=xor(ECuj,h(XXcsk,RTSuj))
/\ Key_3':=new()
/\ Key_set_CS_U':=cons(Key_3',Key_set_CS_U)
/\ SND({PIDuj'.ECuj'.IDcsk}_Key_3')
%% Login and Authentication key Agreement phase
4. State=2 /\ RCV(M1'.M2'.M3'.V1'.TS1') =|> State':=3
/\ request(CS,U,u_cs_TS1,TS1')
/\ PIDuj':=xor(M1',h(IDsck,TS1'))
/\ ECuj':=xor(ECtuj,h(XXcsk,RTSuj))
/\ PIDdri':=xor(M2',h(PIDuj',ECuj',TS1'))
/\ TIDuj':=xor(h(PIDuj',IDcsk,ECuj',TS1'),M3)
/\ CRdri':= xor(CRtdri,h(XXcsk,RTSdri))
/\ TS2':=new()
/\ M4':= xor(h(CRdri,PIDdri',TS2'),TIDuj)
/\ V2':=h(CRdri,PIDdri',TIDuj,TS2')
/\ SND(M4'.V2'.TS2')
/\ secret(CRdri',sec_CRdri,{CS,D})
/\ witness(CS,D,cs_d_TS2,TS2')
end role
role role_D(U:agent,CS:agent,D:agent,Key_set_CS_D:(symmetric_key) set,SND,RCV:channel(dy))
played_by D
def=
local
State:nat,RTSdri:text,ECtdri:text,IDdri:text,RR1:text,TS2:text,M4:text,V2:text,TS3:text,M6:text,V3:text,Key_1:symmetric_key,
CCdri,ECdri,CRdri,CERTdri,TIDuj,PIDdri,RR5,TIDdri,SK:text
init
State := 0
transition
%% Drone registraion
1. State=0 /\ in(Key_1',Key_set_CS_D)
/\ RCV({IDdri.CCdri'.ECdri'}_Key_1') =|> State':=1
/\ Key_set_CS_D':=delete(Key_1',Key_set_CS_D)
/\ CRdri':=h(CCdri')
/\ CERTdri':=xor(ECdri',h(CRdri',IDdri))
%% Login and Authentication key Agreement phase
5. State=1 /\ RCV(M4'.V2'.TS2') =|> State':=2
/\ request(D,CS,cs_d_TS2,TS2')
/\ CRdri':= h(CCdri)
/\ TIDuj':=xor(M4',h(CRdri',PIDdri,TS2'))
/\ RR5':=new()
/\ TIDdri':= h(CRdri',RR5',TIDuj')
/\ TS3':=new()
/\ SK':= h(TIDuj',TIDdri,TS3')
/\ M6':=xor(h(TIDuj',PIDdri,TS3'), TIDdri')
/\ V3':=h(TIDuj',TIDdri',SK',PIDdri,TS3')
/\ SND(M6'.V3'.TS3')
/\ witness(D,U,d_u_TS3,TS3')
end role
role session(U:agent,CS:agent,D:agent,Key_set_CS_U:(symmetric_key) set,Key_set_U_CS:(symmetric_key) set,Key_set_CS_D:(symmetric_key) set)
def=
local
SND3,RCV3,SND2,RCV2,SND1,RCV1:channel(dy)
composition
role_U(U,CS,D,Key_set_U_CS,Key_set_CS_U,SND1,RCV1)
/\ role_CS(U,CS,D,Key_set_CS_D,Key_set_U_CS,Key_set_CS_U,SND2,RCV2)
/\ role_D(U,CS,D,Key_set_CS_D,SND3,RCV3)
end role
role environment()
def=
const
users:agent,h:hash_func,drone:agent,server:agent,
sec_ECdri,sec_ECuj,sec_ECujj,sec_CRdri, u_cs_TS1,d_u_TS3,cs_d_TS2:protocol_id
intruder_knowledge = {users,server,drone}
composition
session(users,server,drone,{},{},{})
/\ session(users,server,drone,{},{},{})
/\ session(i,server,drone,{},{},{})
/\ session(users,i,drone,{},{},{})
/\ session(users,server,i,{},{},{})
end role
goal
secrecy_of sec_ECdri % secrecy of Drone's ephemeral credential
secrecy_of sec_ECuj % secrecy of User's's ephemeral credential
secrecy_of sec_ECujj % secrecy of User's's ephemeral credential
secrecy_of sec_CRdri % secrecy of Drone's CRdri
authentication_on u_cs_TS1
authentication_on cs_d_TS2
authentication_on d_u_TS3
end goal
environment()