## 3 Approach  
This paper presents a method of encryption key generation between a sensor device that measures an environment and a gateway device used for collection. We propose a method of generating a dynamic encryption key using a block hash value that is dynamically generated based on the stored sensor data by referring to the methods of dynamically generating an unpredictable block hash by transaction history in the studies of [23; 24]. The proposed method is illustrated in Figure 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **OTP (S/Key)** & **[PERSON]–[PERSON]** & **[PERSON]** \\  & **[PERSON] et al. [29]** & **[PERSON] and [PERSON] [30]** & **[PERSON] [24]** \\ \hline \multirow{4}{*}{Availability} & Encryption Key Generation Communication Method/Steps & \multirow{2}{*}{Asynchronous/1 step} & \multirow{2}{*}{Synchronous/2 steps} & \multirow{2}{*}{Asynchronous/0 step} \\ \cline{3-3} \cline{5-5}  & Asynchronous/1 step & & \\ \cline{2-3} \cline{5-5}  & Encryption Key Recovery Communication Method/Steps & & \\ \cline{2-3} \cline{5-5}  & Synchronous/2 steps & Synchronous/2 steps & Synchronous/2 steps \\ \cline{2-3} \cline{5-5}  & Required Computational Cost/Time for Encryption Key Generation & \\ \cline{2-3} \cline{5-5}  & Low & High & Low \\ \hline \multirow{4}{*}{Security} & Security Against Encryption Key Hijacking Attack & \multirow{2}{*}{Vulnerable} & \multirow{2}{*}{Average} & \multirow{2}{*}{High} \\ \cline{3-3} \cline{5-5}  & Prevention of Key Generation Information Exposure & & \\ \cline{2-3} \cline{5-5}  & Prevention & Prevention & Prevention \\ \cline{2-3} \cline{5-5}  & Randomness/Unpredictability of Encryption Key & \\ \cline{2-3} \cline{5-5}  & Randomness & Randomness & Randomness \\ \cline{2-3} \cline{5-5}  &/Unpredictability & /Unpredictability & /Unpredictability \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison table of related work. Figure 4: Concept of dynamic encryption key using block hash value. The sensor device (Device\({}_{\text{sensor}}\)) periodically sends environmental sensor values (sensor) to the gateway device (Device\({}_{\text{gateway}}\)). The sensor device stores the send sensor values in the transaction pool (TransactionPool) and the gateway device also stores the received sensor values in its transaction pool. The send and received sensor data are stored in the transaction pool of each device. When a block generation condition (K transactions) is met, the hash value of N\({}^{\text{th}}\) block is generated by hashing the values obtained by adding the hash value of a previous block to the hash value of current transaction pool in generating the subsequent N\({}^{\text{th}}\) block. The hash value of N\({}^{\text{th}}\) block is used as a seed value of symmetric key generation algorithm (AES) to generate a new N\({}^{\text{th}}\) symmetric key. This encryption key is called Device\({}_{\text{n}}\), i.e., the N\({}^{\text{th}}\) dynamic encryption key. When a dynamic encryption key is generated through this method, a seed value for unlimited number of dynamic encryption key can be generated for an environment sensor value that cannot be reproduced. In order to obtain the newly generated N\({}^{\text{th}}\) dynamic block key information, it is necessary to know all the sensor data values sent and received, between devices. Additionally, it is impossible to know a key generated next even if the current N\({}^{\text{th}}\) key is stolen key because all the histories of N\(-1^{\text{th}}\) key must be obtained. However, if this is applied to a low-power wireless communication environment as shown in Figure 5, encryption key mismatch occurs due to packet loss. To address this issue, a method of generating the same dynamic encryption key through one-time asynchronous communication is proposed in consideration of packet loss.