role gateway (Ui, Sj, GW : agent, | Kdi, Kxj: symmetric_key, | Kug : symmetric_key, | H: hash_func, | SND_SG, RCV_SG: channel(dy)) | played_by GW | def= | local State : nat, | T1,T2,Na,Nb,IDi,SIDj : text | const sk_User_gwn,sk_sensor_gwn,sc_sensor_id,sc_user_id:protocol_id | initState ≔ 5 | transition | (1) State= 5 RCV_SG( Na | .xor((IDi.SIDj),Kug) | .H(Na.xor((IDi.SIDj),Kug).Kdi.T1) | .T1 | .Nb | .H(Nb.H(Na.xor((IDi.SIDj),Kug).Kdi.T1).Kxj.T2) | .T2) => | State ≔ 7 SND_SG( | H(Na.Kxj.H(Nb.H(Na.xor((IDi.SIDj),Kug).Kdi.T1).Kxj.T2).T2) | .H(Nb.Kdi.H(Na.xor((IDi.SIDj),Kug).Kdi.T1).Na.T1) | ) | secret(IDi,sc_user_id,) | secret(SIDj,sc_sensor_id,) | end role |
|