# Secure D2D Communication for 5G IoT Network Based on Lightweight Cryptography
## 4 Simulation Results  
In this section, we conduct a simulation to evaluate the proposed D2D communication system in terms of performance and efficiency. The performance in this section shows the whole processing time of the proposed D2D communication process. Moreover, for evaluating the efficiency of the proposed D2D communication, we perform analysis of implementation cost of lightweight AEAD ciphers, and simulate energy consumption according to AEAD ciphers. The proposed D2D communication includes cryptographic algorithms for providing our security considerations (authentication, data confidentiality/integrity, anonymity). In detail, the applied cryptographic algorithms are the digital signature, the Diffie-Hellman key exchange algorithm and the AEAD cipher. We suppose that the processing time of each cryptographic algorithm is as follows. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Cadidates** & **Type** & **Functionality** \\ \hline ACE & Permutation based & AEAD and Hashing \\ ASCON & Permutation based & AEAD and Hashing \\ COMET & Block cipher based & AEAD only \\ DryGASCON & Permutation based & AEAD and Hashing \\ Elephant & Permutation based & AEAD only \\ ESTATE & Tweakable block cipher based & AEAD only \\ ForkAE & Tweakable block cipher based & AEAD only \\ GIFT-COFB & Block cipher based & AEAD only \\ Gimli & Permutation based & AEAD and Hashing \\ Grain-128 AEAD & Stream cipher based & AEAD only \\ HYENA & Block cipher based & AEAD only \\ ISAR & Permutation based & AEAD only \\ KNOT & Permutation based & AEAD and Hashing \\ LOTUS-AEAD/LOCUS-AEAD & Tweakable block cipher based & AEAD only \\ mixFeed & Block cipher based & AEAD only \\ ORANGE & Permutation based & AEAD and Hashing \\ Orbitaida & Permutation based & AEAD only \\ PHOTON-Beetle & Permutation based & AEAD and Hashing \\ Pyjamask & Block cipher based & AEAD only \\ Romulus & Tweakable block cipher based & AEAD only \\ SAEAES & Block cipher based & AEAD only \\ Saturnin & Block cipher based & AEAD and Hashing \\ SKINNY-AEAD/SKINNY-HASH & Tweakable block cipher based & AEAD and Hashing \\ SPARKLE & Permutation based & AEAD and Hashing \\ SPIX & Permutation based & AEAD only \\ SpoC & Permutation based & AEAD only \\ Spook & Tweakable block cipher based & AEAD only \\ Subterranean 2.0 & Permutation based & AEAD and Hashing \\ SUNDAE-GIFT & Block cipher based & AEAD only \\ TinyJambu & Block cipher based & AEAD only \\ WAGE & Permutation based & AEAD only \\ Xoodyak & Permutation based & AEAD and Hashing \\ \hline \hline \end{tabular}
\end{table} 
Table 2: A list of lightweight authenticated encryption with associated data (AEAD) ciphers (National Institute of Standards and Technology (NIST) lightweight cryptography standardization (Round 2)). Figure 4: Data format for data communication. The processing time for signing of a digital signature \(t_{DS_{sign}}\), the processing time for verification of a digital signature \(t_{DS_{cor}}\), the processing time for key exchange \(t_{DH}\) and the processing time for the AEAD cipher \(t_{AEAD}\). Then we suppose the transmission latency in D2D communication is \(I_{tr}\). Finally, we can estimate the total length of the D2D communication processing time \(t_{D2D}\) through Equation (1). \[t_{D2D}=\sum l_{tr}+\sum t_{DS_{sign}}+\sum t_{DS_{cor}}+\sum t_{DH}+\sum t_{AEAD} \tag{1}\]  
For calculating the summation of each processing time, we analyze the proposed D2D communication in terms of the number of transmissions and the usage count of the cryptographic algorithm at each step. In D2D token generation (step 0), there are two transmissions, request and response, for a D2D token; this step also includes 5G-AKA for user identity authentication. The 5G-AKA have 10 transmissions between UEs, gNB, AMF and UDM. In terms of the usage of the cryptographic algorithm, the D2D token generation step uses ECDSA-signing to process token generation. Moreover, we assume that the 5G-AKA consists of ECDSA-signing and ECDSA verification because the 5G-AKA is based on the ECC certificate.