## 6 Security and Efficiency Analysis
### General Evaluation  
The number of studies involving blockchain-based WSNs is limited in the literature. Comparisons were made with studies [50; 51], since there was no sufficient safety-efficiency analysis result in the study numbered [35]. Comparison results are given in Table 5. The meanings of the \(+\) and \(-\) signs in Table 5 are as follows: The \(+\) sign indicates that the specified criterion is met, and the \(-\) sign indicates that the specified criterion is not met.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline  & [50] & [51] & **Proposed Protocol (BBAP-WSN)** \\ \hline Data Integrity & \(+\) & \(+\) & \(+\) \\ \hline Scalability & Low & Low & High \\ \hline Non-Repudiation & \(+\) & \(+\) & \(+\) \\ \hline Mutual Authentication & \(+\) & \(+\) & \(+\) \\ \hline Sybil Attack & \(+\) & \(+\) & \(+\) \\ \hline Spoofing Attack & \(+\) & \(-\) & \(+\) \\ \hline Message Substitution Attack & \(+\) & \(+\) & \(+\) \\ \hline Message Replay Attack & \(+\) & \(+\) & \(+\) \\ \hline Man in the Middle Attack & \(+\) & \(+\) & \(+\) \\ \hline Denial of Service & \(+\) & \(+\) & \(+\) \\ \hline Implementation & \(-\) & \(-\) & \(+\) \\ \hline Blockchain’s type & Public + Private & Public + Private & Private \\ \hline Consensus mechanism & Not specified & Not specified & PoAh \\ \hline Latency & High & High & Low \\ \hline \hline \end{tabular}
\end{table}
Table 5: General analysis.  
Blockchain requires a lot of storage capacity and transaction speed. Although it provides high security, it causes high energy consumption. Especially, scalability is a big issue. As the number of nodes increases, the naturally generated data will also increase, increasing the number of blocks. As the number of blocks increases, the transaction speeds will slow down, and the power consumption and storage space requirements will increase. Therefore, it is unthinkable for SNs and CNs with limited processing capacity, memory, and energy to keep these blocks in their memory.  
Other studies have noted that block data are also kept in their CNs. Therefore, their scalability is low. In the proposed protocol, blocks are not kept in CNs. The CNs can access the BCN by communicating with the BS.  
The study comes to the fore with a proposed new system model that uses only Private Blockchain in CN-BS communication and checks with ECC primarily in SN-CN communications.  
The use of Public Blockchain at the BS level, while other studies use Private Blockchain at the CN level, has reduced the effectiveness of these studies.  
In addition, using PoAh as a consensus mechanism further increased the effectiveness of this study.  
Public blockchain can be a risk for WSNs in uncontrolled environments simultaneously. Anyone can join the network in the public blockchain. It increases the risk against a 51% attack in this case.  
All participants are allowed and known in a private blockchain.  
In the proposed protocol, SNs only save their IDs and PVKs, which take up very little space; CNs can only download the required node credentials from the base station for the corresponding authentication when necessary.  
In addition, the implementation of the work performed is a valuable issue.  
As can be seen from the results, a certain amount of energy-process-memory requirement increases according to the traditional method. However, in the traditional method, the WSN is open against all attacks, which is not the case in the proposed protocol. Therefore, the proposed protocol can be used for WSN applications that have high-security needs.