Skip to main content
. 2022 Nov 27;22(23):9236. doi: 10.3390/s22239236
Algorithm 1: Secure edge-based energy management protocol
Input:
N: nodes.
sk: secret keys.
Xi: fitness function.
SN: sink node.
GW: gateway devices.List_N: list of neighbors.
Output: Data forwarders, multiple routes, nearest neighbors, authentic nodes, privacy
Procedure multipaths
for (i=1; i<=N; i++)
  do
   construct routing tables
   store the information
 end for
for (i=1; i<=List_N; i++)
  extract node information id, di , positioning coordinates
  compute fitness function Xi=αei+βli + γpi
  identify group Gi using fitness function
  compute error rate f(Xi)=i=0nXi+ µ
  end for
end procedure
Procedure authentic_comm
  for each nodei [1: list_N ]
  do
  SN shares the keys for nodes and edges
  Validate the incoming keys and store them in the table
   if key= valid
   call encryption ( )
    else
    record the information in the table
    end if
end for
Procedure data_verification( )
    negotiate edge devices and SN
    if authentication is verified
    call data transmission ( )
 end procedure