Research Article

A Lightweight Privacy Protection User Authentication and Key Agreement Scheme Tailored for the Internet of Things Environment: LightPriAuth

Algorithm 4

role user (Ui, Sj, GW: agent,
    Kdi,Kei: symmetric_key,
    H: hash_func
    P: text,
    SND_US,RCV_US: channel (dy))
played_by Ui
def=
 local State: nat,
 T1,K1,A,M1,M2,Ki,B,K3,K2,IDi,SIDj,M4,M6,M7,SK,Keinew: text
 const shared_key,sc_user_id,sc_sensor_id:protocol_id
 init State:= 0
 transition
   1. State = 0   RCV_US(start)=|>
   State’: = 2   ⋀ T1’:= new()
         ⋀ K1’:= new()
         ⋀ A’:= exp(P,K1’)
         ⋀ M2’:= H(A’.IDi.SIDj.Kdi.T1’)
         ⋀ M1’:= xor(Kei,(IDi.SIDj. H(A’.IDi.SIDj.Kdi.T1’)))
         ⋀ SND_UG(A’.M1’.Ki.T1’)
   2. State = 7  ⋀ RCV_UG(B
              .xor((Keinew’.K3’.H(Kei.K3’.Kdi.T1.M4’)),Kei)
              )=|>
   State’:= 8  ⋀ Kei’:= Keinew’
         ⋀ Ki’:= K3’
         ⋀ SK’:= H(exp(B,K1))
         ⋀ witness(Ui,Sj,user_sensor_sk,SK’)
         ⋀ request(Ui,Sj,user_sensor_sk,SK’)
  end role