## 3 System Model and Design Objectives
### Authorization Process  
Prevailing contending proposed secure data approaches such as SD, EEHA, HAS, IIF, and RHC protocols focus only on authentication and ignore the authorization process in wireless sensor networks [42]. Since a newly deployed node could be malicious, a WSN protocol must be cautious when a new node deployment occurs in the network. Newly installed malicious nodes may be difficult to distinguish from legitimate ones due to current wireless sensor network design limitations. A secure data aggregation protocol must prevent hackers from directly deploying malicious nodes. Therefore, it is not enough to protect the wireless sensor networks only from the perspective of node identity; cyberattacks such as sinkhole node and sybil node attacks occur. These attacks introduce malicious nodes that hackers could operate and compromise in the existing legitimate sensor nodes.  
The old deployed genuine nodes possess authenticated and authorized certificates, and the newly created malicious nodes have the same legitimate identities. Therefore, there is a need to distinguish between the old, deployed, and new nodes to defend the network from possible cyber hackers or attacks. The proposed SDAAA protocol utilizes a timestamp technique in both the authentication and authorization processes. It maintains freshness to avoid the potential threats and hacking of the data; this feature is unavailable in approaches such as the SD, EEHA, HAS, IIF, and RHC protocols. Thus, our secure authentication process guarantees authentication, authorization, and freshness. In our proposed SDAAA approach, Algorithm 1 describes the authorization procedure as follows:  
```
1. Initialization: (\(K_{auth}\): authorized Sensor node; \(AutH\): authorization; \(k\): sensor node; \(k_{leg}\): legitimate sensor node Me: Message; BS\({}_{n}\): Base station; C\({}_{auth}\): Certificate for authorization; \(E_{BS}\): expected action performed by base station \(W_{sn}\): Wireless Sensor Network; \(k_{id}\): Sensor node's identity
2. Input: (\(Me,C_{t},k_{id},PI_{K},C_{e}\))
3. Output: (\((Auth)\),\(C_{auth}\))
4. Set k = \(W_{sn}\)
5. If \(W_{sn}\) allows entry to the'sensor node, then.
6. \(BS_{n}\) Starts \(E_{BS}\) for \(k\)
7. \(BS_{n}\) releases \(C_{auth}\) for \(k_{leg}\): C\({}_{auth}C_{auth}=h\{k_{id},C_{e}\parallel PU_{K}\}\) // released certificate for legitimate node.
8. Set \(Authfork\) // \(Auth=\{Me,t_{e},Sig(BS_{n})\{(k_{id}||t_{e}||Me)\},C_{ku}\)// Authorization process.
9. end if
10. \(BS_{n}\) broadcasts Auth (Me) for the k node in \(W_{sn}\)
11. If \(k\in K_{auth}\), then
12. \(K_{auth}\) reads Auth (Me)
13. Set \(Auth=k\) node \(\in K_{auth}\)
14. else if \(Auth\
eq k\)
15. \(BS_{n}\)declinesaccesstheKnowledge
16. end if
17. end if else
```  
**Algorithm 1** Authorization process for legitimate and non-legitimate sensor nodes  
Algorithm 1 shows the authorization process. In lines 1-3, we describe the parameter-initialization, input, and output processes, respectively. In line 4, the sensor node forms part of the network to participate in the data-monitoring/data-gathering process. In lines 5-7, if the WSN permits the sensor node to join the network, it performs a particular action as a guaranteed authorization certificate. As a result of the authorization certificate issued by the BS, the BS authorizes the legitimate sensor nodes to send and receive data in the network in line 9. In lines 10-13, the base station (BS) only broadcasts the message to authorized nodes to continue communication with them. Thus, only nodes authorized by the BS can read the messages in the network. In lines 14-15, the node is checked; if thenode does not have authorization, then data communication with that node is stopped. Table 1 shows the variables used in the broadcasting message and certificate.