# Adaptive Authentication Protocol Based on Zero-Knowledge Proof
## 4 ZKAP Using Session Keys
\begin{array}{ll}9.\,\mathit{OBU}:&S_{\mathit{OBU}}(i)=(X(i)\big{|}|X^{*}(i )\big{|}|G_{1}(i)\big{|}|G_{2}(i)).\\ 10.\,\mathit{OBU}\to\mathit{RSU}:&S_{\mathit{OBU}}(i).\end{array} \]  
After receiving a signal from the prover (\(\mathit{OBU}\)), \(\mathit{RSU}\) calculates the expression  
\[ \begin{array}{ll}11.\,\mathit{RSU}:&S(i)=X^{K(i)}(i)u^{G_{1}(i)}u^{G_{2}(i)} \text{mod}D\end{array}  \tag{11}\]  
If the answers to the question-number given by \(\mathit{OBU}\) are correct, then \(S(i)=X^{*}(i)\). This means that the \(\mathit{OBU}\) has passed authentication. After authentication, \(\mathit{RSU}\) can arrange a communication session with SP to provide the necessary service to the vehicle owner. At the same time, \(\mathit{RSU}\) cannot obtain information about the vehicle itself, or calculate its route, which ensures the confidentiality of the VANET network. Since \(\mathit{OBU}\) and \(\mathit{RSU}\) do not trust each other, the authentication protocol must be executed in the other direction. In this case, \(\mathit{RSU}\) acts as a prover, and \(\mathit{OBU}\) acts as a verifier. Authentication protocol \(\mathit{RSU}(\mathit{Prover})\to\mathit{OBU}(\mathit{Verifer})\). \[ \begin{array}{ll}1.\,\mathit{RSU}:&F(i)=u^{R_{private}}u^{Y(i)}\text{mod}D \end{array}  \tag{12}\]  
where \(F(i)\) is the true index of \(\mathit{RSU}\); \(i\) is authentication session number. \[ \begin{array}{ll}2.\,\mathit{RSU}:&\Big{\{}\Delta R_{private}(i),\ \Delta Y(i)\Big{\}}<D-1\end{array}  \tag{13}\]\[3.\;RSU:\;\;R^{*}_{private}(i)=\Big{(}R_{private}+\;\Delta R_{ private}(i)\Big{)}\text{mod}\varphi(D), \tag{14}\] \[4.\;RSU:\;\;Y^{*}(i)=(Y(i)+\Delta Y(i),)\text{mod}\varphi(D).\] \[5.\;RSU:\;\;F^{*}(i)=u^{R^{*}_{private}(i)}u^{Y^{*}(i)}\text{mod}D \tag{15}\]  
where \(F^{*}(i)\) is the \"noisy\" index of \(RSU\). \[6.\;OBU:\;\;Q(i)<D-1,\;OBU\to RSU:\;\;Q(i). \tag{16}\]  
\[7.\;RSU:\;\;T_{1}(i)=(R^{*}_{private}(i)-Q(i)R_{private})\text{mod}\varphi(D), \tag{17}\]  
where \(T_{1}(i)\) is the first answer to the posed question \(Q(i)\). \[8.\;RSU:\;\;T_{2}(i)=(Y^{*}(i)-Q(i)Y(i))\text{mod}\varphi(D) \tag{18}\]  
where \(T_{2}(i)\) is the second answer to the posed question \(Q(i)\). \[9.\;RSU:\;\;S_{RSU}(i)=(F(i)||F^{*}(i)||T_{1}(i)||T_{2}(i)).\] \[10.\;RSU\to OBU:\;\;S_{RSU}(i).\]  
\[11.\;RSU:\;\;H(i)=F^{Q(i)}(i)u^{T_{1}(i)}u^{T_{2}(i)}\text{mod}D \tag{19}\]  
If \(H(i)=F^{*}(i)\), then \(RSU\) is authenticated. After two-way authentication, \(RSU\) can receive information from \(OBU\), bring the situation on the road to the vehicle, and provide warnings about dangerous areas, as well as accidents on the highway. In addition, \(RSU\) can provide a channel for communication with SP. This will allow the vehicle owner to receive the necessary service in real-time. Thanks to the developed protocol, \(RSU\) does not have the opportunity to obtain information about the vehicle, or calculate its route. This ensures VANET's confidentiality. The authentication protocol can also be implemented between two \(OBU\)s. In this case, the roles of prover and verifier are performed by two different \(OBU\)s.  
Analysis of the developed ZKAP shows that its cryptographic strength is determined by the computational complexity of solving the Diffie-Hellman problem (DHP). The use of a zero-knowledge authentication protocol allows us to ensure a level of confidentiality comparable to the confidentiality of encryption algorithms and electronic digital signatures. The authentication process takes place without the use of secret keys and a secure communication channel, unlike encryption algorithms and electronic digital signatures. Therefore, an open communication channel is used in VANET for authentication by the developed protocol. This channel will be used after authentication to transfer information packets between \(OBU\)s and \(RSU\) and provide various services.