## 6 Security and Feature Analysis
### Feature Analysis  
The following feature analysis examines the functional features and capabilities of 3-Tier AKA. The feature analysis aims to evaluate how well the protocol meets the desired requirements and compares its features with similar existing solutions or the industry standards. * Hidden identities anonymous: A security mechanism designed to enable authentication while preserving the privacy and anonymity of the entities involved. It allows users to authenticate themselves without revealing their identities to the public. This protocol is useful in scenarios where privacy and anonymity are crucial, such as online transactions, communication platforms, and anonymous voting systems. The main objective of the hidden identities anonymous authentication protocol is to ensure that the authentication process does not disclose sensitive information about the users' identities. In the proposed 3-Tier AKA, during the authentication phase, the message sent from the edge device \(\delta_{d}\) to 5G service provider \(u_{v}\) includes \(proofMe=E(T\parallel^{\prime}\delta_{d}t\phi_{z}\)\", \(K_{\delta_{d}})\) and a token \(O_{\delta_{d}}=E(^{\prime}\delta_{d}ID^{\prime\prime}\parallel K_{\delta_{d}}, S_{u_{v}})\). In this message, the identity of \(\delta_{d}\) and target fog node \(\zeta_{z}\) are encrypted by AES encryption technology. The malicious attacker \(M\) cannot acquire any \(\delta_{d}\) or \(\zeta_{z}\) identity information from the intercepted message. Based on this, the protocol delivers on hiding the identity feature. * Mutual authentication: This is a bidirectional security mechanism that ensures trust and identity verification between two entities. It prevents unauthorized entities from posing as legitimate and mitigates man-in-the-middle attacks by requiring both to prove their identities. 3-Tier AKA has been designed to provide mutual authentication between the edge node and the 5G service provider, between the fog node and the 5G service provider, and between the edge device and the fog node. In Figure 6, line 3, the 5G service provider extracts the edge device key from the received token and decrypts the received proofME to check the value of \(T\). If \(T\) matches, the current time clock is authenticated. In line 5, the edge device receives and decrypts \(R_{\delta_{d}}\), if the retrieved \(T\) matches the sending \(T\) in line 1, then the edge device authenticates the 5G service provider. Similarly, in line 9, the 5G server provider authenticates the fog node, and in line 10, when the fog node decrypts \(R_{\zeta_{z}}\) and finds the retrieved \(T\) matches the sending \(T\) in line 7, then the fog node authenticates the 5G service provider. In line 11, the fog node \(\zeta_{z}\) retrieves the session key \(K_{\delta_{d}\zeta_{z}}=D(R_{\zeta_{z}},K_{\zeta_{z}})\) to be used to decrypt and verify the message \(M_{\delta_{d}\zeta_{z}}\) received in line 6. Again, the correct value of \(T\) and the text \(``\delta_{d}to\zeta_{z}\)\" is enough to authenticate the edge device. The edge device also authenticates the fog node when it decrypts the message \(M_{\zeta_{z}\delta_{d}}\), as shown in line 12, and verifies the value of \(T\) and the text \(``\zeta_{z}to\delta_{d}\)\". * Lightweight authentication protocol: This is a security mechanism designed to verify the identity of IoT devices while minimizing computational overhead, considering resource constraints and device diversity in the environment. The following points outline the reasons why the protocol is considered lightweight. Storage resources in the proposed 3-Tier AKA: After the registration phase and authentication phase, the 5G service provider \(u_{v}\) forgets every temporary key or secret key except its master key. Edge device \(\delta_{d}\) and fog node \(\zeta_{z}\) also forget the temporary secret key and only store the session key \(K_{\delta_{d}\zeta_{z}}\) and secret key. In the computational resources and during the registration phase, \(\delta_{d}\) only computes once when it retrieves the secret key \(K_{\delta_{d}}\).