( Role of the user) | let processUser(idi: bitstring, sidj: bitstring, pwi: bitstring) = | ( registration phase of the user ) | new ri:bitstring; | let mpi = hash(con(ri,con(idi,pwi))) in | out(scUser,(idi,mpi)); | in(scUser,(fi:bitstring,li:bitstring,ki:bitstring)); | let (ei:bitstring) = xor(li, mpi) in | let (di:bitstring) = xor(fi, mpi) in | ( Real start of the role ) | ( Message 1) | new k1:exponent; | let A = exp(g,k1) in | new T1:bitstring; | let m2 = hash(con(g2 h(A),con(idi,(con(sidj,con(di,T1)))))) in | let m1 = xor(ei,con(idi,con(sidj,m2))) in | out(cug, (A, ki, m1, T1)); | ( Message 4 ) | in(cug, (B:G, M6:bitstring)); | let (tem:bitstring) = xor(M6, ei) in | let (einew’:bitstring, tem1: bitstring) = Split(tem) in | let (k3’:bitstring, m7’:bitstring) = Split(tem1) in | let skiju = hash(g2h(exp (B, k1))) in | let m4’ = hash(con(g2h(B),con(skiju,g2h(A)))) in | if (m7’) = hash(con(einew’,con(k3’,con(di,con(T1,m4’))))) then | event acceptUser(di); | let li = xor(mpi,einew’) in | let ki = k3’ in | event termUser(di). |
|