(*—-SMj process—-*) |
let SMj = |
out(privateChannel, (ID)); |
in(privateChannel, (XK:bitstring)); |
event startfstS(ID); |
in(publicChannel, (XA:bitstring, XV:bitstring, XT:bitstring, XXID:bitstring, Xr:bitstring)); |
let P = xor(xor(XA, XK), XA) in |
let Xm = xor(P, Xr) in |
let XXV = H(concat(concat(Xm, Xr), concat(concat(XXID, XT), XK))) in |
event endfstS(ID); |
event start2ndS(ID); |
if XV = XXV then |
new Tj:bitstring; |
new D:bitstring; |
let E = xor(xor(concat(h(Xr), h(XK)), D), XK) in |
let newK = H(concat(concat(Xr, XXID), concat(XT, XK))) in |
let Vp = H(concat(concat(Xm, Xr), concat(concat(XXID, Tj), newK))) in |
out(publicChannel,(E, Vp, Tj)); |
event end2ndS(ID). |