Skip to main content

Table 3 User simulation process

From: A secure and privacy-preserving authentication protocol for wireless sensor networks in smart city

(*processuser*)
let processuser = 
  new bi:bitstring;
  new V:bitstring;
  let ai = Rep(BIOi,bi) in
  let V' = hash(concat(concat(UIDi,UPWDi),ai)) in
  if V' = V then
  event SmartcardAccept(ui);
  new T1:bitstring;
  new a:bitstring;
  new Yi:bitstring;
  let Tu = G(a) in
  let Xi = XOR(Yi,hash(concat(UIDi,ai))) in
  let PIDi = XOR(UIDi,hash(GK(a,PKg))) in
  let M1 = hash(concat(UIDi,concat(Xi,concat(Tu,T1)))) in
  out(ch1,(PIDi,SIDj,M1,Tu,T1));
  in(ch1, (M6:bitstring,M7:bitstring,T3:bitstring));
  let (Ts:bitstring,UIDi:bitstring,SIDj:bitstring,T3:bitstring) = D(Xi,M6) in
  let M7' = hash(concat(Xi,concat(Ts,concat(SIDj,concat(UIDi,T3))))) in
  let SKus = hash(concat(GK(a,Ts),concat(UIDi,concat(SIDj,T3))))in
  new T5:bitstring;
  let Vu = hash(concat(SKus,T5)) in
  out(ch3,(Vu,T5));
  in(ch3,(Vs:bitstring,T4:bitstring));
  let Vs' = hash(concat(SKus,T4)) in
  event Sksuccessful(ui,sj)