role gateway (Ui, Sj, GW: agent, | Kdi,Kei, Kxj, Xgwn: symmetric_key, | H: hash_func, | SND_UG,RCV_UG,SND_SG,RCV_SG: channel(dy)) | played_by GW | def= | local State: nat, | T1,T2,A,B,IDi,SIDj,M2,M3,M4,M6,M7,Ki,Keinew,K3: text | const sc_user_id,sc_sensor_id:protocol_id | init State: = 2 | transition | 1. State = 2 ⋀ RCV_UG(A’. | xor(H(Ki’.Xgwn),(IDi’.SIDj’.H(A’.IDi’.SIDj’.Kdi.T1’))). | Ki’. | T1’ | )=|> | State’:= 3 ⋀ T2’: = new() | ⋀ M3’:= H(A’.SIDj’.Kxj.T2’) | ⋀ SND_SG(A’.M3’.T2’) | ⋀ secret(IDi,sc_user_id,{Ui,GW}) | ⋀ secret(SIDj,sc_sensor_id,{Ui,GW}) | 2. State = 5 ⋀ RCV_SG(B | .M4’ | .H(Kxj.M3.M4’.B) | )=|> | State’:=6 ⋀ K3’:= new() | ⋀ Keinew’:= H(K3’.Xgwn) | ⋀ M7’:= H(Kei.K3’.Kdi.T1.M4’) | ⋀ M6’:= xor((Keinew’.K3’.M7’),Kei) | ⋀ SND_UG(B.M6’) | end role |
|