## 7 Results
### Performance Analysis
Figure 5: Session key generation time on the workstation for (**a**) Session Key 1, (**b**) Session Key 2, and (**c**) Session Key 3, the AWS Cloud for (**d**) Session Key 1, (**e**) Session Key 2, and (**f**) Session Key 3, and the Raspberry Pi (**g**) Session Key 1, (**h**) Session Key 2, and (**i**) Session Key 3. -fog/edge protocol total key generation time and total performance on different platforms for its analysis. The purpose of the experiments on different architectures represents the actual performance of the hash-chain protocol in the fog/edge network. In Part (a) for the workstation, we can see that the first session key \(K_{s,c}\) required less time for the calculation of the first block of the hash chain process, whereas for the second session key \(K_{c,s}\) and updated third session key \(K_{s,c}\), the time required was similar, as they contained the hash from the previous blocks. The total time is a combination of all keys or the completion time for the whole protocol. In Part (b) for the AWS Cloud, the protocol followed a similar behavior as that of the workstation, including that of the session keys. In Part (c) for the Raspberry Pi, even though the behavior was the same as that of the workstation and cloud, the timing requirements were quite higher for all session keys and the total completion time for the protocol. In Part (d), the protocol message exchange completion time performed with cryptography (encryption/decryption) showed a similar behavior as that of the workstation and cloud even though the average key generation time fluctuated in different ranges. For the Raspberry Pi general-purpose computer, the protocol completion time was slightly higher because of the limited system configuration. Figure 8 demonstrates the hash-chain protocol performance's in Mode 1 and Mode 2. On the workstation, cloud, and Raspberry Pi architectures, the time required for calculating Mode 1 and Mode 2 from Equation (1) and Equation (2) are shown, respectively. The workstation performed slightly better than the cloud, whereas the Raspberry Pi suffered  
Figure 6: Independent protocol performance time on the (**a**) workstation, (**b**) AWS Cloud, and (**c**) Raspberry Pi. Figure 7: Performance with respect to the hash-chain fog/edge protocol total time on the (**a**) workstation, (**b**) AWS Cloud, and (**c**) Raspberry Pi and (**d**) for message exchange with cryptography. (approximately by five-times) in calculating the protocol authentication process in different modes because of the large random values used for calculating the matrix inverse, transpose, and multiplication. The time required, as shown, was quite higher because the scenario considered all the authenticating devices entering the Mode 1 and Mode 2 challenge in the worst case. Regardless, such a scenario is quite rare, but still, we had to calculate it, for a detailed performance analysis. Table 5 shows the comparison of the protocol objectives. Many recent protocols performing mutual authentication use session keys and hashes, such as [PERSON] et al. [14], [PERSON] et al. [26], [PERSON] et al. [27], [PERSON] et al. [15], [PERSON] et al. [29], and [PERSON] et al. [30]. A higher cryptographic calculation was used in [PERSON] et al. [14], [PERSON] et al. [26], [PERSON] et al. [27], [PERSON] et al. [15], [PERSON] et al. [28], and [PERSON] et al. [30]. Furthermore, active and advanced attacks were analyzed by all of them. While it appears that [PERSON] et al. [26] and [PERSON] et al. [28] had shortcomings with respect to passive attacks and providing protocol verification logic, the detailed attack severity level was only provided by [PERSON] et al. [26] before the hash-chain. Ultimately, the hash-chain was found to complete with better logic of zero-knowledge proofs (ZKPs). Table 6 shows the comparison of the 5G-AKA protocol [16; 44] with the hash-chain fog/edge protocol, given its respective merit.