# A Secure and Efficient Authentication Scheme for Fog-Based Vehicular Ad Hoc Networks
## 6 Performance Analysis
### Communication Cost Analysis  
This subsection compares the communication cost of our proposed protocol with [8; 17; 18; 19; 20; 21; 22]. We denoted that the ECC point, hash output, random nonce, identity, and timestamp were 320, 256, 256, 128, and 32 bits, respectively. In [PERSON] et al. 's protocol [17], a vehicle transmitted \(\{AID_{U_{t}},T_{U_{t}},R_{1},\alpha\}\), so we calculated the communication cost of the vehicle as 864 bits. A fog node transmitted \(\{AID_{U_{t}},AID_{FN_{j}},T_{U_{t}},T_{FN_{j}},R_{1},R_{2},\delta_{2},\alpha,\beta\}\) and \(\{R_{2},R_{3},\hat{R}^{{}^{\prime}}_{3},T_{\text{CS}},\hat{\gamma}\}\), so we calculated the communication cost of the fog node as 3296 bits. The cloud server transmitted \(\{R_{3},\hat{R}_{3},\hat{R}^{{}^{\prime}}_{3},T_{CS},\gamma,\gamma\}\), so we calculated the communication cost of the cloud server as 1504 bits. Thus, the total cost of vehicle, fog node, and cloud server is 5664 bits. In [PERSON] et al. 's protocol [18], a vehicle transmitted \(\{RID_{DR},X_{VE},y_{VE},h^{CS}_{VE},T\}\), so we calculated the communication cost of the vehicle as 1120 bits. A fog node transmitted \(\{RID_{FS},RID_{DR},X_{FS},X_{VE},y_{VE},h^{CS}_{FS},T\}\) and \(\{mRID^{DR_{Raw}}_{CS},X_{FS},X_{CS},h^{VE}_{FS}\}\), so we calculated the communication cost of the fog node as 3104 bits. The cloud server transmitted \(\{mRID^{DR_{Raw}}_{CS},mRID^{P_{Scan}}_{CS},X_{CS},h^{VE}_{CS}\}\), so we calculated the communication cost of the  
Figure 6: Visualization of computational costs comparison [8; 17; 18; 19; 20; 21; 22]. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Protocol** & **Vehicle User** & **Fog Node** & **Cloud Server** & **Total** \\ \hline [17] & 4.479 ms & 5.968 ms & 11.939 ms & 22.386 ms \\ [18] & 4.509 ms & 4.515 ms & 4.518 ms & 13.542 ms \\ [19] & 7.479 ms & 7.477 ms & 2.99 ms & 17.946 ms \\ [20] & 3.002 ms & 5.971 ms & 4.506 ms & 13.479 ms \\ [8] & 4.485 ms & 5.968 ms & 5.983 ms & 16.436 ms \\ [21] & 4.506 ms & 7.475 ms & 5.974 ms & 17.955 ms \\ [22] & 4.476 ms & 7.46 ms & 8.964 ms & 20.9 ms \\ Proposed & 4.512 ms & 3.008 ms & 4.503 ms & 12.023 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of computational costs. cloud server as 1344 bits. Thus, the total cost of vehicle, fog node, and cloud server is 5568 bits. In [PERSON] et al. 's protocol [19], a vehicle transmitted \(M_{1}=\{PK_{V},PIDV_{i},V_{1},T_{1}\}\) and \(M_{5}=\{PK_{V_{1}},V_{5},T_{5}\}\), so we calculated the communication cost of the vehicle as 1600 bits. A fog node transmitted \(M_{2}=\{M_{1},PK_{F},PIDFN_{j},V_{2},T_{2}\}\) and \(M_{4}=\{PK_{F_{1}},V_{4},T_{4}\}\), so we calculated the communication cost of the fog node as 2592 bits. The cloud server transmitted \(M_{3}=\{C_{3},V_{3},T_{3}\}\), so we calculated the communication cost of the cloud server as 544 bits. Thus, the total cost of vehicle, fog node, and cloud server is 4736 bits. In [PERSON] et al. 's protocol [20], a vehicle transmitted \(M_{1}=\{PID_{i},N_{i},B_{2},B_{3},T_{v}\}\), so we calculated the communication cost of the vehicle as 992 bits. A fog node transmitted \(M_{2}=\{M_{1},PFSID_{i},N_{j},N_{ij},B_{5},B_{6},T_{f}\}\) and \(M_{4}=\{K_{ij},V_{1},N_{jc},T_{c},T_{f2}\}\), so we calculated the communication cost of the fog node as 3200 bits. The cloud server transmitted \(M_{3}=\{K_{ij},V_{1},V_{2},N_{c},N_{ic},T_{c}\}\), so we calculated the communication cost of the cloud server as 1440 bits. Thus, the total cost of vehicle, fog node, and cloud server is 5632 bits. In [PERSON] et al. 's protocol [8], a vehicle transmitted \(D_{1}=\{R_{1},RID_{i},Q_{i}\}\), so we calculated the communication cost of the vehicle as 832 bits. A fog node transmitted \(D_{2}=\{D_{1},R_{2},\hat{R}_{2},RID_{j},L_{j}\}\) and \(D_{4}=\{R_{2},R_{3},X_{i},Auth_{i}\}\), so we calculated the communication cost of the fog node as 3136 bits. The cloud server transmitted \(D_{3}=\{R_{3},Y_{j},X_{i},Auth_{i},Auth_{j}\}\), so we calculated the communication cost of the cloud server as 1344 bits.