# An ECC-Based Anonymous and Fast Handover Authentication Protocol for Internet of Vehicles
## 4 Proposed Protocol
### The Handover Authentication Between Vehicles and RSUs and the Generation of Cryptographic Keys  
The handover authentication and key generation process between the vehicles and the RSUs is shown in Table 6. In this phase, \(V_{i}\) and \(RSU_{j}\) undergo initial authentication while \(SK_{ij}\) is generated through handover authentication, with the entire process conducted over open communication channels.  
1. In this step, \(V_{i}\) randomly selects \(r_{i}\in\mathbb{Z}_{p}^{*}\) as a component of its private key, computes \(R_{i}=r_{i}\cdot P\) and \(V_{i}=PID_{i}\oplus h(T_{3}||R_{i}||C)\), and transmits the message \(\{PID_{i},V_{i},R_{i},T_{3}\}\) to \(RSU_{j}\).
2. Upon receiving the message, the \(RSU_{j}\) first assesses \(T_{3}\)'s freshness by checking \(|T_{3}-T_{c}|<\Delta T\). If this condition is violated, indicating \(T_{3}\) is stale, the \(RSU_{j}\) terminates the current session. Otherwise, it reconstructs \(\{C,ID_{i}\}\) based on \(PID_{i}\) from shared information and verifies vehicle validity by checking whether \(TTL>0\). Then the \(RSU_{j}\) authenticates the message origin through the equation \(V_{i}=PID_{i}\oplus h(T_{3}||R_{i}||C)\) to ensure it originates from a legitimately authenticated vehicle. Upon successful validation, the \(RSU_{j}\) proceeds as follows: generates random numbers \(r_{j}\in\mathbb{Z}_{p}^{*}\), computes \(R=r_{j}\cdot R_{i}\) and \(R_{j}=r_{j}\cdot P\), updates the pseudonymous \(PID_{i}^{+}=h(d_{RSU_{j}}||ID_{V_{i}}||C||T_{4})\) with obfuscation to \(H_{2}=PID_{i}^{+}\oplus h(C||T_{4})\), generates \(V_{j}=h(H_{2}||ID_{V_{i}}||C||R_{j})\) and session key \(SK_{ij}=h(R||C)\), and finally updates the information \(\{PID_{i}^{+},TTL-1\}\) in trusted computing tree and transmits \(\{ID_{RSU_{j}},V_{j},H_{2},R_{j},T_{4}\}\) to \(V_{i}\).
3. Upon receiving the message from \(RSU_{j}\), \(V_{i}\) performs a \(T_{4}\) freshness check firstly and verifies the equation \(V_{j}=h(H_{2}||ID_{V_{i}}||C||R_{j})\). If the equation holds true, \(V_{i}\) proceeds to compute \(R=r_{i}\cdot R_{j}\), generate the session key \(SK_{ij}=h(R||C)\), and subsequently update its pseudonymous \(PID_{i}^{+}=H_{2}\oplus h(C||T_{4})\).  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline \hline \
\begin{tabular}{c} Check \\ Compute \(ID_{V_{i}}^{*}=PID_{i}\oplus h(R_{1}\cdot d_{RSU_{j}})\) \\ \(C=h(ID_{V_{i}}^{*}||X_{v}||Y_{v})\) \\ \(D_{v}=X_{v}+Y_{v}+P_{Pub}\cdot C\) \\ Verify \(V_{v}\cdot P\supseteq R_{1}+D_{v}\cdot h(R_{1}||PID_{i}||T_{1})\) \\ Randomly choose \(r_{2}\) \\ Compute \(R_{2}=r_{2}\cdot P\), \(R_{ij}=R_{1}\cdot r_{2}\) \\ \(SK_{ij}=h(R_{ij}||C)\) \\ \(PID_{i}^{+}=h(d_{RSU_{i}}||ID_{V_{i}}^{*}||C||T_{4})\) \\ \(H_{1}=PID_{i}^{+}\oplus h(r_{2}\cdot D_{v})\) \\ \(V_{r}=r_{2}+d_{RSU_{j}}\cdot h(R_{2}||H_{1}||T_{2})\) \\ send \(\{ID_{RSU_{j}},R_{2},H_{1},V_{r},T_{2}\}\) \\ save \(\{PID_{i},ID_{V_{i}},C,TTL\}\) \\ \end{tabular} \\
\begin{tabular}{c} Check \(|T_{2}-T_{c}|<\Delta T\) \\ Verify \(V_{r}\cdot P\supseteq R_{2}+D_{r}\cdot h(R_{2}||H_{1}||T_{2})\) \\ Compute \(R_{ij}=r_{1}\cdot R_{2}\) \\ \(PID_{i}^{+}=H_{1}\oplus h(R_{2}\cdot d_{V_{i}})\) \\ \(SK_{ij}=h(R_{ij}||C)\) \\ save \(\{PID_{i}^{+}\}\) \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}
Table 5: Cont.