## 4 Analysis of the Hardness of the Hash-Chain Fog/Edge Zero-Knowledge Protocol (ZKP)  
**Theorem 1**: _Lemma 1 (completeness): If the communicating parties within the protocol \(AS\), \(FS\), and \(C\) always follow the complete authentication process, in that case, the approving \(FS\) always accepts the \(C\) as valid._  
Proof of Theorem 1: In accordance with the authentication protocol steps in the Methodology Section, if the client \(C\) knows the complete procedure for authentication with the secret of the hash-chain, the key generation, the encryption/decryption algorithm, solving the challenge, and supplying multiple parameters for the next part of the process, then the solution to the challenge received from \(C\) to \(FS\):  
\[FS\to C:E_{PK_{C}}(K_{s,c}||V_{c}||\lambda_{s}||PK^{{}^{\prime}}_{s}||tt||mode).\]  
Therefore, \(C\to FS:E^{{}^{\prime}}_{PK_{S}}(K_{c,s}||V_{c}||\lambda_{c}||a_{c})\) is considered to be valid, then once the \(C\) calculates and matches  
\[FS\to C:E^{{}^{\prime}}_{PK_{S}}(K_{s,c}||V_{s+1}||V_{f})\]  
then the authentication is known to be successful.  
**Theorem 2**: _Lemma 2 (soundness): Let us assume it is inefficient to guess and infeasible to calculate several possibilities of the solution to solve the challenge of the hash-chain protocol of Modes 0, 1, and 2 as a malicious user \(\hat{M}_{u}\) does not possess any of the insufficient knowledge of the \(FS\)'s secret. Consider that \(M\) takes up the challenge of the \(FS\) with impersonating \(C\)'s identity and attempts to convince the \(FS\) that he/she is a genuine \(C\), then the success probability of \(\hat{M}_{u}\) is very high._  
Proof of Theorem 2: The process of ZKP is based on the intractability of searching for the solution of Modes 0, 1, and 2. According to number theory, searching for such a solution is equal to calculating matrix combinations. For Mode 0, \(\hat{M}_{u}\) has to first select the block containing the transition matrix with which the challenge is raised. Note that for each session of authentication for all the fog/edge devices, the random-number-based challenge matrix is updated, and also, the time limit \(ttl\) must be achieved. To solve Mode 0, \(\hat{M}_{u}\) has to supply appropriate transition operations to complete the cycle.  
\[FS\to C:E_{PK_{C}}(K_{s,c}||V_{s}||\lambda_{s}||PK^{{}^{\prime}}_{s}||ttl||mode0)\]For Mode 1, \(\hat{M}_{u}\) has to achieve the calculation of \(D=(A\times B)^{-1}\times C^{T}\) by checking all the sub-branches and finding the D that achieves such an expression, then it proceeds to perform the transitions within the time limit.  
\[FS\to C:E_{PKc}(K_{s,c}||V_{s}||\lambda_{s}||PK_{s}^{\prime}||tt||mode1)\]  
Similarly, for Mode 2, \(\hat{M}_{u}\) has to achieve the calculation of \(D=A^{T}\times(B\times C)^{-1}\) and complete the transitions for the challenge.  
\[FS\to C:E_{PKc}(K_{s,c}||V_{s}||\lambda_{s}||PK_{s}^{\prime}||tt||mode2)\]  
Lemma 3 (zero-knowledge): The hash-chain fog/edge is a ZKP protocol.  
Proof of Theorem 3.: In the hash-chain fog/edge, no clue or information can be revealed about the first key \(K_{s,c}\) generation for the hash-chain by the \(FS\). As the \(FS\) can generate and access the challenging matrix in an unspecified time, so the start of \(K_{s,c}\) is unknown and hard to guess with several transitions, and the node number is very high. Therefore, it conveys that \(M\) is not able to guess any possible combination with any of the modes of the challenge in ZKP. Henceforth, this means the hash-chain fog/edge is a ZKP protocol [23].  
In summary, hash-chain succeeds in completing the ZKP protocol for authentication among the \(AS\), \(FS\), and \(C\), thus providing effective defense from impersonation attack \(\hat{M}_{u}\). Section 5 discusses the hash-chain fog/edge's security [6].