# Autonomous Mutual Authentication Protocol in the Edge Networks
## 3 Methodology
### Authentication Phase  
The public key and protocol interaction format received by user C makes him or her eligible for the authentication process. Figure 2 presents the balanced tree containing 8 octets. The PRNG is applied here in the four time-quarters based on each six-hour slot. For every time-quarter, the PRNG parameters are changed and the pseudo-random numbers generated are distributed serially in the 8 octets. According to Figure 2, the sender initiates the protocol by sending the time-stamp as a challenge in the message, where the time-stamp's last value or a random number is taken as \(node_{value}\). The number obtained can be seen in the figure; blue highlights the position in all adjacent octets, as given in Equation (1). \[node_{value}=\sum_{k=0}^{7}(node_{value}+8) \tag{1}\]  
Therefore, the first challenge set by the sender is completed after the response is combined with the selected pseudo-random values by XOR, and responds to it in the second message. In the second challenge, which is set by the responder, the XOR of the consecutive octets is taken at a particular position by incrementing itself every time in Equation (2), as shown by green in Figure 2.  
\[node_{value}=\sum_{k=0}^{7}(node_{value}+9) \tag{2}\]  
Figure 3 presents the mutual authentication protocol process within the autonomous sender and receiver with notations from Table 1.  
Figure 2: Octet-based balanced tree. The detailed stepwise process for autonomous mutual authentication follows. 1. The sender \(S\) is required to initiate the authentication process by providing the \"Hello\" message with his public-key \(PK_{s}\) and the current time-stamp \(T_{S_{1}}\) in seconds. The \(PK_{s}\) provided by the sender is actually a part of challenge 1 sent for the octet node to be selected. \[S\to R:\left(``Hello\"\parallel PK_{s}\parallel T_{S_{1}}\right)\]
2. The receiver \(R\) first checks for the validity of the sender's public key \(PK_{S}\) and takes the last value of the time-stamp \(T_{S_{1}}\) sent by the sender \(S\) with modulus 8. The receiver then sets the PRNG parameters based on the time-quarter and generates the pseudo-random numbers for 8 octets. Therefore, the value obtained from the time-stamp with modulus 8 of the sender is taken to select the first octet's value and the same value from consecutive octets. Successively, the combination by average from Equation (1) obtained from random numbers is a solution to the first challenge and is returned to the sender for confirmation as transition \(\lambda_{R}\). The second message is formed by the octet group as \(M_{8\times 8}\) multidimensional matrix, \(\lambda_{R}\) transition value, \(PK_{R}\) as receiver's public key, \(ttl\) as time-to-live for this message's validity, and \(K_{S,R}=H\left(\lambda_{R}\oplus\ T_{S_{1}}\right)\) as the session key, which is encrypted by the public key of sender \(E_{PK_{S}}\). \[R\ \to S:\ E_{PK_{S}}(K_{R,S}\parallel M_{8\times 8}\parallel\lambda_{R} \parallel PK_{R}\parallel ttl)\] \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Meaning** \\ \hline \(S\) & Sender \\ \hline \(R\) & Receiver \\ \hline \(AS\) & Registration Server \\ \hline \(a_{x}\) & Device Address/Unique Identity (UID) \\ \hline \(ttl\) & Validity of the message/time to live \\ \hline \(t_{x}\) & Timestamp of \(x\) \\ \hline \(PK_{x}\) & Public key of \(x\) \\ \hline \(SK_{x}\) & Private key of \(x\) \\ \hline \(\lambda_{x}\) & Transition taken by \(x\) \\ \hline \(E_{x}\) & Encryption performed by \(x\)’s public key \\ \hline \(D_{x}\) & Decryption performed by \(x\)’s private key \\ \hline \(K_{x,y}\) & Session key from \(x\) to \(y\) \\ \hline \(\bar{M}_{x}\) & Malicious user \(x\) \\ \hline \(\oplus\) & XOR bitwise operator \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notation. Figure 3: System model. 3. The sender, after receiving the response, decrypts it by his private key \(D_{SK_{S}}\). Optionally, the sender then checks the transition value \(\lambda_{R}\), and calculates it from the consecutive octates.