## 6 Evaluation of the Proposed Protocol
### Communication and Computational Complexity Evaluation  
This section presents an evaluation on the communication and computational cost of the proposed protocol. In order to compare our protocol with others, we make some assumptions for message sizes and computational cost. First we provide our assumption for the length of message component. Table 5 gives the length assumption in bits for every message component. We also assume the length of the cluster key, sensor reading, pattern seed and mapping permutation to be 64 bits. That is for an approximate calculation of the encrypted data size, which is equal to the input data. The size can be varied depending on the WSN application. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Possible Attacks Observed** & **ESPDA** & **Proposed Protocol** \\ \hline Eavesdropping & Yes & Yes \\ Replay & No & Yes \\ CHs impersonation & No & Yes \\ Message tampering & No & Yes \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Possible attacks addressed, in comparison with other secure data aggregation protocols. Tables 6 and 7 detail the approximate size of various message types involved in the setup phase and data aggregation phase for the protocols under study. Some messages are variable-sized, some are fixed. The variable \(n\) and \(n_{s}\) represent the number of cluster member and selected members whose pattern codes get selected, respectively. Table 6 details the message size comparison for our protocol and other secure routing protocol. We also include LEACH protocol here since all other protocols have their roots in LEACH. We only consider the cluster formation phase in which the routing paths get established. Since SLEACH and MS-LEACH have extra transmissions for the legitimate CHs list and group key (steps 1.2 and 1.3 of Figure 2 and 4), we add the message size for them. We assume the number of legitimate CHs for every round to be 10 CHs. The size of the message that contains the information of this list then can be calculated as 10 times the size of the id plus the MAC size, 320 bit, while the size of the message that contains group key information is 64 bits. Table 6 provides clear calculations for other message types. Table 7 details the message size comparison involved in data aggregation phase. Therefore only our protocol and ESPDA get compared in this study. Since the transmission uses wireless medium, the \begin{table}
\begin{tabular}{|c|c|c|c|c|c|} \hline \multirow{2}{*}{**Message Type**} & \multirow{2}{*}{
\begin{tabular}{c} **The Proposed Protocol** \\ **(in bits)** \\ \end{tabular} } & **SLEACH** & **SecLEACH** & **MS-LEACH** & **LEACH** \\  & **(in bits)** & **(in bits)** & **(in bits)** & **(in bits)** \\ \hline \multirow{3}{*}{adv 1  & \(|id|+|MAC|\cong 16\) \\ \hline join req & \(2|id|+|MAC|\cong 192\) & \(2|id|\cong 32\) & \(2|id|+|T|+|MAC|\cong 256\) & \(2|id|\cong 32\) & \(2|id|\cong 32\) \\ \hline \multirow{3}{*}{sched 2  & \(|id|+|TDMA|\cong 80\) & \(|enc|+|MAC|\cong 224\) & \(|id|+|TDMA|\cong 80\) \\ \hline \multirow{3}{*}{CK\_req 3  & \((n+1)|id|+|MAC|\) & & & \\  & \(\cong 16n+176\) & & & & \\ \hline \multirow{3}{*}{CK\_rep 4  & NA & NA & NA & NA \\ \cline{1-1}  & \((n+1)|enc|+|sign|\) & & & & \\ \cline{1-1}  & \(\cong 80n+608\) & & & & \\ \hline \end{tabular}
\end{table} 
Table 6: Message size comparison for setup phase. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Message Component** & **Length (in bits)** & **Description** \\ \hline \(|id|\) & 16 & Identity of node \\ \(|nonce|\) & 64 & Random number \\ \(|sign|\) & 480 & Digital signature \\ \(|MAC|\) & 160 & MAC \\ \(|r|\) & 64 & Key identifier/index \\ \(|TDMA|\) & 64 & TDMA message size \\ \(|pc|\) & 16 & Pattern code \\ \(|T|\) & 32 & Timestamp \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Assumption for the length of message components. unicast transmission is actually a local broadcast transmission. Therefore we consider either unicast or broadcast as one unit transmission. We also consider the wake up state where nodes do not turn off their radios.