## 7 Results
### Performance Analysis
One of our motivations was to overcome the problems faced by 5G security and design a system suitable for 5G communications and its peers, for future purposes. 5G suffers from secret key sharing with SN and HN, the repetition of keys (incrementing value) for authentication, a lack of cryptography, and channel attacks. Figure 8: Performance with respect to the hash-chain fog/edge protocol in (**a**) Mode 1 and (**b**) Mode 2 time on the workstation, AWS Cloud, and Raspberry Pi. \begin{table}
\begin{tabular}{l l l l l l l l l} \hline \hline
**Features** & [14] & [26] & [27] & [15] & [28] & [29] & [30] & **Hash-Chain** \\ \hline
1. Mutual & & & & & & & & \\ Authentication & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\
2. Session Key & ✓ & ✓ & ✓ & ✓ & & ✓ & ✓ & ✓ \\
3. Zero-Knowledge Proofs & & & & & & & & ✓ \\
4. Cryptography (Enc/Dec) & ✓ & ✓ & ✓ & ✓ & & & ✓ & ✓ \\
5. Message Integrity & ✓ & ✓ & ✓ & ✓ & & ✓ & ✓ & ✓ \\
6. Protocol & & & ✓ & & ✓ & ✓ & ✓ & ✓ \\ Verification Logic & ✓ & & & ✓ & ✓ & ✓ & ✓ & ✓ \\
7. Active Attacks & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\
8. Passive Attacks & ✓ & & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\
9. Advance Attacks & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\
10. Attack Severity Level’s & & ✓ & & & & & & ✓ \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of protocol objectives. Table 7 shows the comparison of the computational cost for some of the protocols that were found to be relevant. \(T_{Hash}\) denotes the time required to calculate the one-way hash function, \(T_{E/D}\) the running time for the encryption/decryption of cryptographic operation, and \(T_{ZKP}\) the time required to calculate the zero-knowledge-proof-based challenge-response operation for authentication. It can be seen that the hash-chain protocol performed better in comparison. A telecare medical information system that utilized a lightweight authentication protocol was demonstrated by [PERSON] et al. [45]. The objective of this research work was anonymity preservation for the remote patient communication with the hospital by using a smart card. The entities involved were the home medical server, foreign medical server, physician server, and patient. The protocol involves multichannel connection and is mostly dependent on the hash of group identities for the protocol authentication. In wireless sensor networks, a real-time data access scheme using a lightweight three-factor scheme was implemented by [PERSON] et al. [46]. A three-factor authentication scheme including biometrics, passwords, and smart cards was implemented between the entities of the user, gateway node, and sensor node. Twelve criteria were satisfied within this scheme with the confirmation of the fuzzy extractor. The authentication of remote users with key agreement was presented by [PERSON] et al. [47]. This scheme involves three entities as the user, smart card, and server, which can help update the passwords on the smart card. This scheme is usually operated by a combination of the timestamp, identity, passwords, and random numbers. It can be noticed that most of the protocols used only hash operations, which are quite vulnerable. The hash-chain performs better when authentication is required for a large number of devices because of the channel encryption. In Table 8, it can be seen that the hash-chain protocol still achieved better performance than the traditional RSA [40] algorithm with respect to the time requirements on Contiki OS, Cooja with Rime-Tmote Sky @ 3.9 MHz. In Table 9, an Ethernet comparison of hash-chain fog/edge protocol performance is shown. First, the workstation as a server authenticates the Raspberry Pi as the client. In the second part, the Raspberry Pi as a server is connected to authenticate another Raspberry Pi as the client. As both of the Ethernet connections have configurations as in Table 9, it can be noticed that due to the high computing power of the workstation, the protocol completion time without encryption/decryption was much less than the Raspberry Pi counterpart.