## 3 Approach
### System Model  
The details of the system model, where the scheme proposed in this paper is applied, are as follows:  
* Communication between devices that generate dynamic encryption keys occurs between a sensor device and a gateway device. * The sensor device and gateway device use Bluetooth low-energy, which can encounter communication delay and message loss due to signal interference between devices. * The sensor device and gateway device use an asynchronous network control flow. * A sensor device measures environment data that cannot be reproduced. * In ModResult (SensorData, N), N is set to 16. \begin{table}
\begin{tabular}{l l} \hline \multicolumn{1}{c}{**Notation**} & \multicolumn{1}{c}{**Description**} \\ \hline SensorData\({}_{i}\) & \(i\)-th sensor data. \\ \hline KeyGenerationInfo & Encryption key generation information. \\ \hline Device\({}_{\text{sensor}}\) & Sensor device \\ \hline Device\({}_{\text{gateway}}\) & Gateway device that receives and collects sensor data \\ \hline DataPeriodic & Data transmission cycle from sensor device to gateway device \\ \hline ModResult(SensorData\({}_{i}\), N) & Modular result of SensorData\({}_{i}\) by N \\ \hline DataCount\({}_{i}\) & The counter value of the \(i\)-th data send by the sensorDevice \\ \hline TransactionPool & Pool that stores the modular results of sensor \\ \hline TransactionPool(DataCount\({}_{i}\), Modresult) & Store [Key:DataCount\({}_{i}\) Value:modular results] value in \\ TransactionPool & TransactionPool \\ \hline TargetValue & TransactionPool\({}_{\text{sensor}}\) hashed through SHA256 \\ \hline Block\({}_{n}\) & N\({}^{\text{th}}\) block stored by sensor device and gateway device. Only previous hash value and current hash value exist in the block. The hash value of the block is the seed value of a new dynamic encryption key. \\ \hline BlockCondition\({}_{\text{X}}\) & Block generation condition. A block is generated when the number of modular results stored in the transaction pool satisfies k. \\ \hline FrequencyTable & Frequency table indicating the frequency of modular result of the data \\ \hline FrequencyCount(i,list) & Count value corresponding to i in the list items \\ \hline FrequencyTable(i,result) & Generate FrequencyTable for [Key: i, value: result] \\ \hline TransformFrequencyTable (Hash,FrequencyTable) & FrequencyTable transformation Based on hash value \\ \hline Device\({}_{n}\) & N\({}^{\text{th}}\) dynamic encryption key \\ \hline lossFrequencyList & Loss Modular result list. The Difference between FrequencyTable\({}_{\text{sensor}}\) and FrequencyTable\({}_{\text{gateway}}\) \\ \hline PermutationList(lossFrequencyList) & List of possible permutations from lossFrequencyList \\ \hline CandidateNonce & Candidate nonce for recovering loss packets on FrequencyTable\({}_{\text{gateway}}\) \\ \hline FindNonce & Trial and error for recovering loss packets on FrequencyTable\({}_{\text{gateway}}\) \\ \hline Synchronization & Recover loss packets on the FrequencyTable\({}_{\text{gateway}}\) from \\ \multicolumn{1}{c}{CandidateNonce} \\ \hline Seed\({}_{n}\) & Seed value of Device\({}_{n}\) \\ \hline Encrypt(Key,data) & Data encryption using Key \\ \hline Decrypt(Key,data) & Data decryption using Key \\ \hline initialize() & Initialization to generate N + 1 block after N\({}^{\text{th}}\) block is generated. \\ \multicolumn{1}{c}{TransactionPool Initialization. DataCount\({}_{i}\) Initialization} \\ \hline \end{tabular}
\end{table} 
Table 2: Notation. A sensor device transmits a measured environment sensor data value to a gateway device with DataPeriodic = 1 (1 s interval). The BlockCondition\({}_{\text{K}}\) is 64. When 64 data entries are filled in a transaction pool, block generation is attempted. The reason behind setting the number to 64 is because a malicious attacker must randomly substitute 2\({}^{256}\) number of cases to guess the transaction pool, which is the seed value of an encryption key.