Skip to main content
. 2022 Jul 7;22(14):5119. doi: 10.3390/s22145119
Algorithm 1: Vehicle Permission
function:VehPer
input:new_vehicle
output: true/false
procedure:
  get((‘hello’, nonce_CH), CH) ← v∗[n].node
ifdist_key==1 then
   get(vehicle_ID, sessionKeyRequest_ID, nonce_CH, nonce_v, distKey) ← v∗[n].node
   get(nonce_v, SessionKey[ ], distKey) ← CH
else
  get(vehicle_ID, sessionKeyRequest_ID, nonce_CH, nonce_v, PK(CH)) ← v∗[n].node
   get(nonce_v, SessionKey[ ], distKey) ← CH
   get(distKey, PK(CH), PK(veh)) ← CH
 set(SessionKey[v]=1, CH) ← permissioned[v]
 search(commReq_ID, SessionKeyID[v], nonce_v, distKey)
ifcommReq_ID==1 then
  get(nonce_v, nonce_s, SessionKey[ ])← permissioned[v]
 comm._Flag[v] = true
else
   comm._Flag[v] = false
  return comm._Flag[v]