## 3 System Model and Design Objectives
### Authentication Formation  
Here, we show the performance of the entity-based authentication features of the proposed SDAAA model that helps the base station discover any falsely aggregated data. This is unlike the contending WSN approaches such as SD, EEHA, HAS, IIF, and RHC protocols, which do not utilize entity-based authentication in their network. Let us assume that sensor node '\(k\)' is a compromised node and launches false sub-aggregate data by inserting a few wrong data bits into the collected aggregated data. To prevent this, the base station broadcasts the data aggregation query message that uses the random value '\(R_{val}\)'. In response, sensor node' km sends its message authentication code (_MAC_) to the base station to authenticate the sensed value '\(S_{v}\)'. The node '\(k\)' uses '\(R_{val}\)' and its own identity '\(N_{id}\)' to compute the _MAC_ as follows:  
\[N_{MAC}=\sum k(R_{val})+N_{id} \tag{5}\]  
Based on the computed _MAC_ address, the base station generates the random value and can also determine the falsely inserted portions of the aggregated data:  
\[BS_{n}=G+\sum(R_{val})^{\beta}\times k_{n} \tag{6}\]  
where \(G\) is the random generator, \(\beta\) is the number of generated values based on the number of sensor nodes, and \(k_{n}\) is the total number of sensor nodes in the network.  
Then, the base station '\(BS_{n}\)' generates the random value that determines the inserted false data bits in aggregated data given by:  
\[B_{f}=\sum(BS_{n})\times N_{MAC}\simeq D_{a} \tag{7}\]  
where \(D_{a}\): aggregated data, \(N_{MAC}\): number of MAC addresses, and \(B_{f}\): false data bits that are available in aggregated data.  
**Lemma 1:**_The hacker cannot generate an MAC associated with the false data aggregation data bits '\(B_{f}\)' that the base station cannot discover as false._  
Proof.: Let us assume if sensor node '\(k\)' contributes the data bits \(B=\{b_{1},b_{2},b_{3},\ldots,b_{n}\}\) in its local summation '\(\gamma\
abla\)', then it generates the MAC for authentication purpose '\(k_{MAC}\)' written as \(k_{MAC}(A_{k},K_{l})\).  
Where \(A_{k}\): secret key generated by sensor node '\(k\)' and '\(K_{l}\)': key length.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Notations** & **Description** \\ \hline \(Me\) & Message \\ \hline \(C_{t}\) & The current time of sent message \\ \hline \(Sig(BS_{n})\) & Signature of Base station \\ \hline \(h\) & Hash function \\ \hline \(k_{id}\) & Sensor node’s identity \\ \hline \(PU_{K}\) & Public key \\ \hline \(C_{k_{id}}\) & A certificate was issued to identify the sensor node \\ \hline \(C_{e}\) & Certificate expiration time \\ \hline \hline \end{tabular}
\end{table}
Table 1: Used variables and description.  
The sensor node '\(K\)' shares this key with base station '\(BS_{n}\)' with length '\(K_{l}\)' Thus, the characteristics of the key '\(K_{c}\)' can be written as:  
\[K_{c}=[K_{e}(B+R_{v})]\to BS_{n} \tag{8}\]  
where \(K_{e}\): the encrypted key, which encrypts the data bits before sending them to the base station.  
Each legitimate node '\(L_{n}\)' in the network appends the key length '\(K_{l}\)' with \((K_{l}+K_{l}^{*})\) which is the same as:  
\[(K_{l}+K_{l}^{*})=[K_{e}(B+R_{v})]\]  
Thus, the key can be simplified as follows:  
\[(K_{l}+K_{l}^{*})=K_{c}\]  
\[K_{Ex}=(K_{l}+K_{l}^{*})\]  
\[K_{c}=K_{Ex} \tag{9}\]  
where \(K_{Ex}\): extended key length. \(\square\)  
Let us assume the sensor node's MAC address '\(k_{MAC}\)' is compromised and the extended key '\(K_{Ex}\)' reaches the base station '\(BS_{n}\)'. Another sensor node cannot inject the key of node '\(k\)' without detection. We observe that '\(K_{Ex}\)' cannot include false data bits of aggregated data. This feature helps maintain the authentication process in the SDAAA approach.