# A Lightweight Hash-Based Blockchain Architecture for Industrial IoT
## 3 Proposed Lightweight Hash Based Blockchain Architecture for IIoT
### Network Interaction Process
As previously mentioned, the lightweight hash list consists of three algorithms (QUARK, PHOTON, and SPONGENT) which have different features in terms of cryptographic security and performance. Following this reason, the whole processing time of the network is changed by the selected hash function. For the simulating our proposed architecture, we build an equation that can approximately calculate the whole processing time. We supposed that the parameters which can exist in our proposed architecture are as follows (the processing time is \(T\) (sec), the network communication delay is \(d_{n}\), the difficulty of the block mining is \(D\), the throughput (kbps) of the hash function is \(s\), the size of transactions (bytes) is \(W\) the validate communication delay is \(d_{v}\), the updating delay for storing the block is \(d_{u}\), and the thresholds for changing hash function are \(h_{1}\) and \(h_{2}\), respectively). Then, we can get the approximated processing time using Equation (1). \[ \begin{split} T\;=\;d_{n}+D\frac{W\times 8}{s\times 1000}+d_{v} \frac{W\times 8}{s\times 1000}+d_{u}W,\;\text{where}\;D<h_{1}:s=11.43\;(\text{SPONGENT}),\\ h_{1}<D<h_{2}:s=20.51\;(\text{PHOTON}),D>h_{2}:s=50\;(\text{ QUARK}).\end{split}  \tag{1}\]

Following the above equation, we first calculated the processing time of each three hash functions without changing the hash function. When we calculate the processing time, we supposed that the difficulty changed from 1 to 10, and the size of data is changed from 7 to 260. The difficulty is a minimum exponentiation value of the trials, \(2^{x}\), for finding the right hash value; we thought it did not need to be too reputable, such as bitcoin, because the IIoT may be constructed by private blockchain, and not the public blockchain. We supposed that the size of data is packet size of Modbus-TCP that has a range of 7 to 260 bytes. Also, we supposed that the delay does not exist in the network (\(d_{n}=0,d_{v}=0,d_{u}=0\)). Figure 4 represents the results. As you can see, if the difficulty increases, the processing time increases exponentially, and if the size of data increases, the processing time increases linearly. To figure out the effect of changing the hash function, we simulated the processing time with the fixed difficulty (\(D=9\)), and we supposed that the multiple packets are processed. You can see the result in Figure 5, also note that the processing time decreases when it reaches a certain level. However, for performing similar to the simulated result, the threshold \(h_{1},h_{2}\) is carefully selected. Additionally, we simulated a situation where the hash function is implemented redundantly for parallel computation. In reality, IIoT technology has various applications, and each application has different requirements: there is much difference in terms of latency and update frequency. For example, in monitoring and supervision field, the gas detection or pressure sensor requires the latency under 1 s, and the vibration sensor requires the latency from a few seconds to a few days. In the closed-loop control field, the required latency of sensors is less than 500 milliseconds. In the interlocking and control field, the latency is more restricted, and it is less than 250 milliseconds [35]. In the simulation, we assume that the multiple QUARK module is implemented by hardware and compared the processing time, see the result in Figure 6. In our simulation, if the hash function is multiple implemented, the processing time decreases

Figure 4: Processing time of QUARK, PHOTON, and SPONGENT. Figure 5: Result of changing hash function. linearly to the number of the module parallel implemented (\(p\)). The simulated processing time is about 2 seconds when the five QUARK modules are implemented. Based on results, this architecture can be applied to various IIoT applications, especially vibration sensor and temperature sensor in the monitoring and supervision field.