(*—-NG process—-*) |
let NG = |
in(privateChannel, (XID:bitstring)); |
out(privateChannel, (K)); |
event startfstN(N); |
new r:bitstring; |
new m:bitstring; |
new T:bitstring; |
let A = xor(xor(m, r), K) in |
let V = H(concat(concat(m, r), concat(concat(XID, T), K))) in |
out(publicChannel,(A, V, T, XID, r)); |
event endfstN(N); |
event start2ndN(N); |
in(publicChannel,(XE:bitstring, XVp:bitstring, XTj:bitstring)); |
let PP = xor(XE, K) in |
let XD = xor(PP, concat(h(r), h(K))) in |
let XnewK = H(concat(concat(r, XID), concat(T, K))) in |
let XXVp = H(concat(concat(m, r), concat(concat(XID, XTj), XnewK))) in |
if XVp = XXVp then |
event end2ndN(N). |