## 5 Performance Evaluation
### Handover Authentication  
#### 5.3.1 Computational Cost  
In our proposed authentication protocol, only AES-128 encryption technology is used. In FogHA [44], the encryption technology used is based on t-degree symmetric polynomials. Based on references [59; 60], the computation time of a symmetric polynomial message authentication code \(T_{MAC}\) closely aligns with the running time of a cryptographic hash function, particularly when the entity's identity consists of 128 bits. Specifically, when polynomial \(t\) degree is 100, calculating a \(t\)-degree symmetric polynomial \(T_{SP}\) takes approximately 16 times longer than computing \(T_{MAC}\)[44]. Number theory research unit (NTRU) encryption is approximately 20 times slower than an AES implementation [61]. The symmetric encryption/decryption key used in [55] is 128 bits. Then, the symmetric encryption/decryption operation time will be the same as AES encryption/decryption. The CPU (central processing unit) running time simulation results are shown in Table 12. This simulation is performed on Google Colab (Intel(R) Xeon(R) CPU @ 2.20 GHz). Figures 9 and 16-18 show the Authentication and Key Agreement phase of each protocol. In 3-Tier AKA, shown in Figure 9, the mutual authentication among fog nodes has been previously executed. Hence, this aspect of the cost is not included in the handover authentication section. The edge user is required to carry out one AES decryption after line 4. As for the old fog node, it necessitates two AES encryptions in lines 3 and 4 of Figure 9. The target fog node performs one AES decryption after line 3. The overall computational cost encompasses two AES encryptions and two AES decryptions. \begin{table}
\begin{tabular}{l c} \hline \hline
**Operation** & **Time (ms)** \\ \hline Hash function \(T_{H}\) & 0.107 \\ \hline AES encryption \(T_{AES,E}\) & 0.217 \\ \hline AES decryption \(T_{AES,D}\) & 0.243 \\ \hline T-degree symmetric polynomial \(T_{SP}\) & 1.712 \\ \hline NTRU encryption \(T_{NTRU,E}\) & 4.340 \\ \hline NTRU decryption \(T_{NTRU,D}\) & 4.860 \\ \hline Elliptic curve point multiplication operation \(T_{ECC}\) & 5.227 \\ \hline Symmetric encryption operation \(T_{ST,E}\) & 0.217 \\ \hline Symmetric decryption operation \(T_{ST,D}\) & 0.243 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Computational cost (handover). Figure 15: Storage cost comparison of 3-Tier AKA, 5G-AKA [31], 4G EPS-AKA [31], and TLS 1.3 [58]. In the FogHA protocol, shown in Figure 16, the handover process begins with the first fog access point (FAPk1) generating a timestamp and a random number in line 1. Subsequently, FAPk1 proceeds to authenticate FAPk2 in line 8 of Figure 16. During this exchange, a temporary session key is established between the FAPs, denoted in lines 4 and 8. Once the temporary session key is in place, FAPk1 sends it to the mobile device in line 9. The mobile device then computes the authentication message and forwards it to the second fog access point (FAPk2) in line 11. In line 13 of Figure 16, FAPk2 performs the authentication of the mobile device. As part of this process, FAPk2 generates the FAP-MD session key, as described in line 14. With FAPk2's authentication successful, the mobile device verifies FAPk2 and proceeds to calculate the session key in line 17, finalizing the handover procedure in the FogHA protocol. The mobile device of the edge user needs to execute eight hash functions and one t-degree symmetric polynomial computation in lines 10 and 17. As for the first fog access point, it performs three hash functions and two t-degree symmetric polynomial computations in lines 7 and 8. Meanwhile, the second fog access point involves line 4 in the handover pre-negotiation process and lines 13 and 14 in the handover process, requiring 10 hash functions and three t-degree symmetric polynomial computations. Overall, this protocol necessitates a total of 21 hash functions and six t-degree symmetric polynomial executions.