# Improving IoT Data Security and Integrity Using Lightweight Blockchain Dynamic Table
## 7 Evaluation and Analysis
### Performance Evaluation  
The BC-based architecture suffers from the computational and packet burden on smart home devices and miners to provide improved security and privacy. To assess this overhead, we simulated the scenario of data transmitted within the IoT network in the Cooja simulator. To compare the overhead of a BC-based architecture, we simulate another scenario that deals with transactions without encryption, hashing, and BC. We used IPv6 over Low Energy Wireless Personal Area Networks (6 LoWPAN) as the primary communication protocol in our simulation, since it is well suited to the resource constraints of a smart home setup. We simulated three z1 more sensors (simulating smart home devices), which send data directly to the home miner (also simulated as a z1 note) every 10 s. Each simulation lasted for 3 min and the results presented over this duration were averaged. Cloud storage is directly connected to the miner to store data and save the transmitted block data. It is noteworthy that the overlay delay and its processing are not taken into account in our simulation. To provide a comprehensive assessment, we have simulated store and access transactions. The following metrics have been implemented to evaluate the performance of the proposed system:  
1. **Packet overhead**: Indicates the length of the sent packets. \begin{table}
\begin{tabular}{c c} \hline \hline
**Requirement** & **Employed Safeguard** \\ \hline Confidentiality & Achieved using AES Encryption \\ Integrity & Blockchain Technology is employed for integrity achievement \\ User Control & Using logging transaction of Blockchain \\ Authorization & Achieved using Dynamic Blockchain Array \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Security requirements evaluation. 2. **Time overhead**: Refers to the processing time for each transaction in the miner and is measured from the time the transaction is received in the miner until the appropriate response is sent to the server. 3. **Power consumption**: Refers to the power that the miner consumes in the hardware to process transactions. The miner is the most power-consuming device in the IoT network because it handles all transactions and does a lot of hashing and encryption. The power consumption of other devices is limited to coding for their transactions. To understand the performance results, each result is discussed separately:
* Packets overhead: Table 2 shows the simulation results for packets in the network. The content of the table applies to both the access and storage parameters, as they both have the same packet size. The use of encryption and hashing increases the payload of packets due to the transformation of data from its explicit form to its encrypted form; however, given the lower layer headers (i.e., 6 LowPAN), the increase in data payload has a relatively small impact, because multi-key encryption with an appropriate meta-array size in the data will result in a slight increase in the size of the transmitted data. Table 3 shows the high performance of the proposed solution in terms of packet overhead compared with the recent solution presented in 2022 [19]. The results show that the proposed solution keeps the packet overhead four times lower than the compared solution. Such a low bytes usage keeps the energy consumption very low for the IoT device. * Time overhead: Figure 7 shows the results of overtime. The BC-based design alone takes more time to process packets than the basic method due to additional coding and hashing, as the system needs more processing. However, comparing it with the previous works that used the blockchain technology, we find that the system has given a better time as a result of the presence of a simplified block technology in the proposed work, which helped reduce the effort significantly. * Energy consumption: Clearly, the blockchain method in previous research increases the energy consumption by 0.07 (mJ), but in the proposed work, the amount of energy consumed was much better and very close to the basic work.