# Secure D2D Communication for 5G IoT Network Based on Lightweight Cryptography
## 4 Simulation Results
In device discovery (step 1), the requested UE broadcasts the request message; this means that the number of transmissions for a request message equal the number of devices (\(m\)), which are located near the sender UE. Moreover, in this step, there is a transmission to response. In link setup (step 2), when two devices set the connection, there are transmissions, including two for token verification, two for response of verification and two for key exchange, and there are the usages of the cryptographic algorithm, including two for ECDSA verification and one for ECDH. Lastly, the secure data transmission (step 3) has transmissions according to the amount of data (\(n\) bytes), and we assumed that data are transmitted in packets and in units of 1460 bytes, which is a general maximum transmission unit (MTU) size. Moreover, the AEAD cipher is used twice (encryption/decryption) in this step. Then we can finally calculate the summation of processing time by multiplying each processing time by the number of transmissions or the usage count of the cryptographic algorithm. Table 3 shows the summary of processing time at each step of proposed D2D communication. When we simulate Equation (1) using processing time in Table 3, we set each time parameter based on 5G network requirements and existing implementation results of the cryptographic algorithm. The 5G network requires a transmission latency of 1 ms [18]; accordingly, we set \(l_{tr}\) as 0.001. Moreover, we set the processing time of the ECC-based algorithm based on the performance presented in [19]\((t_{DS_{sign}}=0.122,t_{DS_{cor}}=0.458,t_{DS_{DH}}=0.1672)\). In the case of \(t_{AEAD}\), we can calculate processing time by multiplying the throughput (Mbps) of the algorithm by the amount of data (\(n^{\prime}\) (Mb) \(=n\) (MB) \(*\) 8/10\({}^{6}\)). For simulating various AEAD ciphers, we set the parameter following five AEAD ciphers (AES-GCM, ASCON, SpoC, Spook and GIFT-COFB) based on the performance results presented in [20]. Each case of \(t_{AEAD}\) is as follows (power measured: 50 MHz): \(t_{AES-GCM}=n^{\prime}\) (Mb)/31.2 (Mbps), \(t_{ASCON}=n^{\prime}\) (Mb)/39.0 (Mbps), \(t_{SpoC}=n^{\prime}\) (Mb)/28.8 (Mbps), \(t_{SpoR}=n^{\prime}\) (Mb)/88.3 (Mbps), \(t_{GIFT-COFB}=n^{\prime}\) (Mb)/120.8 (Mbps). Figure 5 shows the simulation result of the proposed D2D communication. The AEAD ciphers used in the simulation consist \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Step**} & \multirow{2}{*}{**Transmission Latency**} & \multicolumn{4}{c}{**Processing Time of Cryptographic Algorithm**} \\ \cline{3-6}  & & **ECDSA-Sign** & **ECDSA-Verify** & **ECDH** & **AEAD** \\ \hline Step 0 & (2+10) \(*\) & \((1+1)*\) & \(t_{DS_{sign}}\) & \(1*t_{DS_{cor}}\) & - & - \\ \hline Step 1 & (\(m\)+1) \(*\) & \(l_{tr}\) & - & - & - & - \\ \hline Step 2 & (2+2+2) \(*\) & \(l_{tr}\) & - & \(2*t_{DS_{cor}}\) & \(1*t_{DH}\) & - \\ \hline Step 3 & (n/1460) \(*\) & \(l_{tr}\) & - & - & - & \(2*t_{AEAD}\) \\ \hline Total (\(\sum l\) or \(\sum l\)) & (19+m+n/1460) \(*\) & \(2*t_{DS_{sign}}\) & \(3*t_{DS_{cor}}\) & \(1*t_{DH}\) & \(2*t_{AEAD}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The summary of processing time of proposed D2D communication. AEAD cipher (AES-AEAD) and four lightweight AEAD ciphers. Simulation results show that three lightweight AEAD ciphers (ASCON, Spook and GIFT-COFB) are faster than AES-GCM (optimized). In particular, GIFT-COFB shows about 18.71% faster performance than AES-GCM when transmitting 10 KB data. However, because 5G IoT networks have limited resources, good performance of cryptographic algorithms may not cover all of the 5G IoT devices. This means the cryptographic algorithm has to be implemented lightly and must consume a small amount of power. Table 4 shows the hardware implementation results of AEAD block ciphers [19]. Even though Spook is faster than AES-GCM (optimized), Spook has the highest implementation cost, as in the mentioned area for implementing a look-up tables (LUTs).