# A Complete Key Management Scheme for LoRaWAN v1.1 +
## 1 Introduction
Hence, our contribution to the field is that, at first, we did a thorough security structure analysis of LoRaWAN v1.1 based on the American National Institute of Standards and Technology (NIST) key management guideline [25], to conduct analysis for the secret key lifecycle which is a novel approach based on our best knowledge and listed out the potential \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Year** & **Authors** & **Reference** & **Gaps** & **Solutions** \\ \hline
2018 & [PERSON] and [PERSON] & [8] & Lack of root key update. & High randomness static root key updating scheme. \\ \hline
2018 & [PERSON] et al. & [9] & \
\begin{tabular}{c} Inefficient key \\ exchange protocol. \\ \end{tabular} &
\begin{tabular}{c} A more efficient key exchange protocol \\ based on the Elliptic Curve Diffie \\ Hellman (ECDH). \\ \end{tabular} \\ \hline
2018 & [PERSON] et al. & [7] & \
\begin{tabular}{c} Inefficient key \\ exchange protocol. \\ \end{tabular} &
\begin{tabular}{c} A lightweight key exchange protocol \\ based on Ephemeral Diffie-Hellman Over \\ COSE (EDHOC), where COSE stands for \\ Concise binary object representation \\ Object Signing and Encryption. \\ \end{tabular} \\ \hline
2019 & [PERSON] et al. & [10] & Lack of root key update. &
\begin{tabular}{c} A Hierarchical Deterministic (HD) wallet \\ for key management was used by the \\ device and server, ECDH for key \\ exchange. \\ \end{tabular} \\ \hline
2019 & Donmez and Nigussie & [11] & Static root key issue. &
\begin{tabular}{c} Delegated key management using a \\ master device to manage root key. \\ \end{tabular} \\ \hline
2019 & [PERSON] et al. & [12] & \
\begin{tabular}{c} Key management issue related \\ to the failure of the join server. \\ \end{tabular} &
\begin{tabular}{c} A secure architecture for key management \\ based on smart contracts and blockchain. \\ \end{tabular} \\ \hline
2019 & [PERSON] et al. & [6] & Slow session key generation. &
\begin{tabular}{c} A fast session key generation to enhance \\ the speed of session key derivation, and to \\ ensure the high key randomness. \\ \end{tabular} \\ \hline
2021 & [PERSON] et al. & This paper & \
\begin{tabular}{c} Slow session key generation, \\ limited key update \\ mechanisms available, lack of \\ the Key Back-Up/ Recovery/ \\ Revocation Scheme (KBURRS) \\ and Backward Compatibility \\ Scheme (BCS). \\ \end{tabular} &
\begin{tabular}{c} A more efficient and high randomness \\ session key generator, guidance of Key \\ Updating Scheme (KUS), KBURRS, BCS \\ to make the key management scheme \\ completed. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison between different key management solutions and our proposed solutions. vulnerabilities and limitations of the key management scheme. After that, we provide a complete guideline to tackle ambiguously defined issues that exist in the LoRaWAN v1.1 key management scheme, such as the frequency of the session key update, key back-up, recovery, revocation, and handling of backward compatibility issues. At the last, most importantly, a key generation algorithm based on the Rabbit Pseudo-Random Number Generator (PRNG) is proposed to enhance the overall speed of the key generation. The remaining part of this paper is structured as follows. In Section 2, the most recent literature reviews are conducted, strengths and weaknesses of different approaches are analyzed. In Section 3, the structure of the LoRaWAN is discussed, how does the LoRaWAN work is explained. In Section 4, the security analysis of LoRaWAN v1.1 is presented, including the key management of LoRaWAN and the drawbacks of LoRaWAN v1.1. In Section 5, a complete key management scheme of the LoRaWAN for the Over the Air Activation (OTAA) devices is proposed and validated. In Section 6, a proposed Pseudo-Random Number Generator (PRNG) for the session key derivation is designed, implemented, evaluated, and the results of the proposed PRNG with other session key generators are compared.