## 6 Security and Feature Analysis
### Security Analysis
In the proposed protocol, if a malicious actor labeled as M captures the message sent from an edge device to a 5G network and wants to obtain the data, the acquisition of the master key \(S_{u_{v}}\) becomes imperative. This key serves as a mean to decrypt authentication messages and any additional messages intended for \(M\). The absence of the master key renders \(M\) incapable of accessing any information. The response message sent from the 5G service provider to edge device \(\delta_{d}\) is encrypted by the secret key of \(\delta_{d}\). If \(M\) does not know the secret key, \(M\) is unable to access or alter the data. The session key encrypts messages transmitted between the edge device and the fog node \(K_{\delta_{d}\delta_{c}}\). For \(M\) to illicitly acquire the data after intercepting the information, it is imperativethat \(M\) possesses the session key. The above scenarios illustrate that the designed protocol can resist MitM attacks. * Replay attacks: These involve an attacker maliciously re-transmitting captured data without altering the content, causing security vulnerabilities and compromising system integrity and authenticity, without altering the data themselves. The proposed protocol is designed to guarantee the freshness of messages. For example, in the mutual authentication protocol between the edge device and fog node, the 5G service provider \(u_{v}\) receives the self-authentication message \(proofMe\) and the token \(O_{\delta_{d}}\) from edge device \(\delta_{d}\). Then, \(u_{v}\) decrypts the received \(proofMe\) using \(K_{\delta_{d}}\), and verifies that \(T\) is within the current time skew. The message \(M_{\delta_{d}\zeta_{z}}\) includes a text \"\(\delta_{d}t\phi_{z}\)\". This text ensures that this message's direction is from the edge device \(\delta_{d}\) to fog node \(\zeta_{z}\). The malevolent attacker is unable to dispatch the message \(M_{\delta_{d}\zeta_{z}}\) to other fog nodes in order to execute a replay attack. Therefore, the proposed protocol can prevent replay attacks. * Information disclosure: Also known as leakage or exposure, this involves unauthorized access to protocol information, potentially enabling attackers to launch further attacks like phishing emails or identity theft. The proposed protocol is designed to hide the identity of the participants, which includes the edge device, the 5G network, fog node, and the cloud server. Therefore, the attacker is unaware of who is exchanging the protocol messages. Also, all messages sent between entities are encrypted by Advanced Encryption Standard (AES) encryption technology. The adversary cannot guess the edge/fog/cloud secret keys (\(K_{\delta_{d}},K_{\zeta_{z}},K_{\gamma_{c}}\)) or 5G network master secret key \(S_{u_{v}}\) to illegally obtain the user ID or session key. * Denial of service (DoS): This is a security attack where an attacker overwhelms a system with traffic, requests, or data, disrupting its normal functioning. The most common scenario involves a system requiring high storage capacity, making it vulnerable to a DoS attack. The proposed protocol is designed to eliminate the need for the 5G service provider to remember/store the edge devices' IDs or keys and remain stateless, eliminating the possibility of a DoS attack. * Elevation of privilege (EOP): Here, an attacker gains access to a system. This attack aims to escalate their privileges from a low-level user, i.e., edge device's account, to a higher level, i.e., 5G administrator role, allowing them to gain access to sensitive data such as the 5G network master secret key. This means a legitimate edge device could perform this attack by exploiting vulnerabilities in the 5G security system to gain administrative access to a system and reveal information about the 5G service provider \(u_{v}\) master key. Therefore, the security level of the proposed protocol to protect against the EOP solely depends on the security level of the 5G network.