|
Algorithm 1: Secure edge-based energy management protocol |
| Input: |
| N: nodes. |
|
: secret keys.
|
|
: 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
, positioning coordinates |
| compute fitness function + γ
|
| identify group using fitness function |
| compute error rate + µ |
| end for
|
| end procedure |
|
Procedure authentic_comm |
| for each
] |
| 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
|