## 3 System Model and Design Objectives
### Authentication Formation
#### 3.4.1 Authentication and Encryption  
Secure data packet transmission in our proposed SDAAA approach can increase authentication and authorization utilizing encryption. Furthermore, it maintains the freshness of the message, which limits hackers' access to data. Contending approaches, such as SD, EEHA, HAS, IIF, and RHC protocols, only use authentication without any authorization or encryption process. Let us assume that the sensor node 'km' forwards the data to the cluster head '\(C_{H}\)'. The encrypted packet, data sent to the cluster head, and data payload are as shown below:  
\[\left[P_{E}=\left\{k_{id},\ C_{H_{id}},\ R_{v},\ M_{k}\ (k,\ CH).P_{data}\times(\Delta d)\ \right\}\right] \tag{10}\]  
In Equation (10), the packet encrypted procedure includes sensor node '\(k\)' and its identity '\(k_{id}\)', cluster head '\(CH\)' and its identity 'C', randomly chosen value for encrypting the data \(R_{v}\) MAC's key '\(M_{k}\)'. In addition, data payload '\(P_{data}\)' and the amount of data sent '\(\Delta d\)' occur. The base station and other sensor nodes can identify the packet's source based on the inserted information.  
\[\Delta d=k_{id}||C_{H_{id}}||R_{v}||P_{data} \tag{11}\]  
Equation (11) shows the amount of data sent in different forms from different sources (e.g., node's identity, cluster head's identity, randomly generated value, and data payload).  
\[P_{data}=M_{k}(k,CH)k_{r} \tag{12}\]  
Equation (12) shows the data payload format, and it involves the MAC key '\(M_{k}\)' generated for the sensor and cluster head node and the sensor node's reading '\(k_{r}\)' obtained through an event-monitoring process.  
The data sent using the MAC key '\(M_{k}\)' complies with the message authentication code of the data. The cluster head node '\(C_{H}\)' receives the aggregated encrypted packet '\(A_{EP}\)' from node '\(k\)' and forwards it to the next hop node '\(N_{C_{H}}\)', which could be either another sensor node '\(k_{a}\)', cluster head node '\(CH\)' or base station '\(BS_{n}\)'. Thus, Equation (13) shows the aggregated encrypted packet as:  
\[A_{EP}=\big{[}k_{a}||C_{H_{id}}||\mathbf{BS_{n}}(id)\{P_{data}\ \}\times R_{v}\big{]} \tag{13}\]  
where \(BS_{n}(id)\): base station' identity.  
Equation (13) shows secure data sent via encryption \(e\big{(}\Delta d^{\prime}\big{)}\) after applying the aggregation process '\(D_{ag}\)'.  
\[e(\Delta d^{\prime})(D_{ag})=(GK_{ran}\{(CH||BS_{n}).\Delta d1\}+k_{a}||CH( \Delta d2)) \tag{14}\]  
where \(\Delta d1\) denotes data shared between the cluster head node and the base station; \(\Delta d2\) denotes data transmitted between the next-hop sensor node and the cluster head node.  
We observed that for data \(e(\Delta d^{\prime})(D_{ag})\), the attacker or hacker could not modify data e(\(\Delta d^{\prime}\))(\(D_{ag}\)) because they were fully encrypted using the group's secret random keys '\(GK_{ran}\)'.  
Where \(GK_{ran}\): group of secret random keys shared by either two cluster head nodes or cluster head nodes and base station.  
Equation (14) shows fully encrypted shared data \(\Delta d1^{\prime}\) between cluster head node '\(CH\)' and base '\(BS_{n}\)' station as:  
\[\Delta d1^{\prime}=e\{\mathbf{BS_{n}}(id)+C_{H_{id}}\}+R_{v}\times P_{data} \tag{15}\]  
where \(\Delta d2\) denotes data transmitted between the next hop sensor node and cluster head.  
In Equation (16), the secure data transmitted between the next-hop sensor node and cluster head \(\Delta d2^{\prime}\) is given by:  
\[\Delta d2^{\prime}=\Big{\{}e\Big{(}k_{a(id)}||C_{H_{id}}\Big{)}\Delta d2+(R_{v }\times P_{data})\Big{\}} \tag{16}\]  
\(k_{a(id)}\): next hop sensor node's ID; e: identity encryption process  
By combining the features of equations from above, we obtain the secure data aggregation and authentication processes, which leads to QoS '\(Q_{pr}\)' in the WSN as follows:  
\[Q_{pr}=A_{EP}+\Delta d1^{\prime}+\Delta d2^{\prime}+e(\Delta d^{\prime})(D_{ ag}) \tag{17}\]