(*—-GW process—-*) |
let GW = |
in(privateChannel1, XIDi:bitstring); |
new rgw1:bitstring; |
new rgw2:bitstring; |
new rgw3:bitstring; |
let TIDi = h(concat(concat(IDi, rgw1), kgw)) in |
let Si1 = h(concat(concat(IDi, rgw2), kgw)) in |
let Si2 =h(concat(concat(IDi, rgw1), kgw)) in |
out(privateChannel1, (TIDi, Si1, Si2)); |
in(privateChannel2, XSIDj:bitstring); |
new rgw4:bitstring; |
let TSIDj = h(concat(concat(XSIDj, rgw4), kgw)) in |
out(privateChannel2, (TSIDj, TIDi, Si2)); |
event startGW(IDg); |
in(publicChannel1, (XUiM6:bitstring, XUiM7:bitstring, XUiM8:bitstring, XTID:bitstring)); |
let Xru2 = xor(XUiM6, Si1) in |
if h(concat(Xru2, TIDi)) = XUiM8 then |
new rgw5:bitstring; |
let TIDinew = h(concat(concat(XIDi, rgw5), kgw)) in |
let GM1 = xor(TSIDj, rgw5) in |
let GM2 = xor(TIDi, rgw5) in |
let GM3 = xor(TIDinew, rgw5) in |
let GM4 = h(concat(concat(concat(rgw5, TSIDj),TIDi), TIDinew)) in |
out(publicChannel2, (GM1, GM2, GM3, GM4, XUiM7)); |
in(publicChannel2, (XSNjM1:bitstring, XSNjM2:bitstring, XSNjM3:bitstring)); |
if h(concat(concat(XSNjM1, XSNjM2), TSIDj)) =XSNjM3 then |
let GM5 = h(concat(TIDi, TIDinew)) in |
let GM6 = xor(TIDinew, Si1) in |
let TIDi = TIDinew in |
out(publicChannel1, (GM5, GM6, XSNjM1, XSNjM2)); |
event endGW(IDg). |