## 4 Experiment Verification
### Availability Aspect  
#### 4.2.1 Communication Method/Step for Encryption Key Generation  
Theory  
Device\({}_{\text{Sensor}}\) and \(\text{Device}_{\text{Gateway}}\) generate the same encryption key through asynchronous one-step communication.  
\begin{table}
\begin{tabular}{c l} \hline
**Package** & \multicolumn{2}{c}{**Description**} \\ \hline communication & \begin{tabular}{c} sender: Bluetooth connection and data send \\ receiver: Bluetooth connection and data receive \\ \end{tabular} \\ \hline encryption module & \begin{tabular}{c} encryption module libraries \\ \end{tabular} \\ \hline algorithm module & \begin{tabular}{c} frequencyable: frequencyable manage \\ transactionPool: transactionPool manage \\ findnonce: trial and error manage \\ permuationa: permutation manage \\ \end{tabular} \\ \hline launcher & \begin{tabular}{c} sensor: execute \(\text{Device}_{\text{sensor}}\) \\ device: execute \(\text{Device}_{\text{Gateway}}\) \\ \end{tabular} \\ \hline test & \
\begin{tabular}{c} KeyGeneration\_Time: key generation time experiment \\ KeyGeneration\_Time\_packetDataloss: key generation time experiment \\ with packet loss \\ Memory\_Check: memory used experiment \\ Permutation\_Check: permutation experiment \\ \end{tabular} \\ \hline logging &
\begin{tabular}{c} log data \\ KeyGeneration\_Time.log \\ KeyGeneration\_Time\_packetDataloss.log \\ Memory\_Check.log \\ \end{tabular} \\ \hline \end{tabular}
\end{table}
Table 4: Software Package.  
\begin{table}
\begin{tabular}{c l} \hline
**Category** & \multicolumn{2}{c}{**Description**} \\ \hline CPU & \begin{tabular}{c} Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64 bit SoC 1.4 GHz \\ \end{tabular} \\ RAM & \begin{tabular}{c} 1 GB LPDDR2 SDRAM \\ \end{tabular} \\ OS & \
\begin{tabular}{c} RaspbianStrech \\ \end{tabular} \\ Language & Python 3.6 \\ \hline Communication &
\begin{tabular}{c} Bluetooth low energy 4.2 \\ -itertools: permutation \\ -hashlin: sha256 \\ -cryptography, cryptodome: encryption module \\ \end{tabular} \\ \hline \end{tabular}
\end{table}
Table 3: System Configuration.  
Proof  
1. In the event of packet loss, \(\text{Device}_{\text{Sensor}}\) and \(\text{Device}_{\text{Gateway}}\) are asynchronous or synchronous if there is a request/response for generate \(\text{Device}\text{Key}_{\text{n}}\)
2. Communication Steps for \(\text{Device}_{\text{Sensor}}\) and \(\text{Device}_{\text{Gateway}}\) to generate \(\text{Device}\text{Key}_{\text{n}}\)
3. \(\text{Device}_{\text{sensor}}\) and the \(\text{Device}_{\text{gateway}}\) generates the same encryption key as (1) (2)  
(1) in case of; \(\text{Device}_{\text{sensor}}\) sends \(\text{Frequency}\text{Table}_{\text{sensor}}\) and \(\text{TargetValue}_{\text{sensor}}\) to key generation notification if \(\text{BlockCondition}_{\text{K}}\) is satisfied. \(\text{Device}_{\text{gateway}}\) that receives the message generates \(\text{Device}\text{Key}_{\text{n}}\). It is an asynchronous method because there is no response to the generate encryption key. (2) There is only one step communication to generate a key from the \(\text{Device}_{\text{sensor}}\)-(3) \(\text{Device}_{\text{sensor}}\) and \(\text{Device}_{\text{gateway}}\) generate the same encryption key based on the same sensor data history. In conclusion, \(\text{Device}_{\text{sensor}}\) and \(\text{Device}_{\text{gateway}}\) generate the same encryption key through asynchronous 1 step communication.