# A Secure and Efficient Authentication Scheme for Fog-Based Vehicular Ad Hoc Networks
## 6 Performance Analysis
### Computational Cost Analysis  
This subsection compares the computational cost of our proposed protocol with [8; 17; 18; 19; 20; 21; 22]. We denoted the consumption time of the ECC scalar multiplication, hash operation, symmetric cryptography operation, and fuzzy extractor as \(T_{em}\), \(T_{h}\), \(T_{e/d}\), and \(T_{f}\). We used a cryptography library called MIRACL to measure all operations in these protocols. We conducted experiments in different environments, considering the computing performance of vehicles and fog nodes. First, we conducted an experiment on a desktop equipped with an i7-4790 intel CPU, 16 GB of RAM, and a Linux Ubuntu 20.04-desktop-amd64 operating system to reflect the high computing performance of the fog nodes. Moreover, we conducted the same experiment on a Raspberry PI 3B with an ARM Cortex-A53 and 1 GB of RAM to reflect the low computing performance of vehicles. We summarized the execution time for each operation in Table 4. We configured the PUF response produced by a fuzzy extractor to ensure noise resilience, assuming that the execution time is the same as that for ECC scalar multiplication. We investigated the computational costs deriving from all operations performed during the authentication phase of these protocols. In [PERSON] et al. 's protocol [17], a vehicle performed three ECC scalar multiplications and four hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+4T_{h}=4.479\) ms. A fog node performed four ECC scalar multiplications and four hash operations, so we calculated the computational cost of the fog node as \(4T_{em}+4T_{h}=5.968\) ms. The cloud server performed eight ECC scalar multiplications and nine hash operations, so we calculated the computational cost of the cloud server as \(8T_{em}+9T_{h}=11.939\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(15T_{em}+17T_{h}=22.386\) ms. In [PERSON] et al. 's protocol [18], a vehicle performed three ECC scalar multiplication operations and fourteen hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+14T_{h}=4.509\) ms. A fog node performed three ECC scalar multiplications and sixteen hash operations, so we calculated the computational cost of the fog node as \(3T_{em}+16T_{h}=4.515\) ms. The cloud server performed three ECC scalar multiplications and seventeen hash operations, so we calculated the computational cost of the cloud server as \(3T_{em}+17T_{h}=4.518\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(9T_{em}+47T_{h}=13.542\) ms. \begin{table}
\begin{tabular}{l l c c} \hline \hline
**Notations** & **Descriptions** & **Desktop** & **Raspberry PI** \\ \hline \(T_{em}\) & ECC scalar multiplication & 1.489 ms & 2.579 ms \\ \(T_{h}\) & Hash operation & 0.003 ms & 0.021 ms \\ \(T_{e/d}\) & Symmetric cryptography operation & 0.001 ms & 0.013 ms \\ \(T_{f}\) & Fuzzy extractor & 1.489 ms & 2.579 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Execution time for each operation. In [PERSON] et al. 's protocol [19], a vehicle performed five ECC scalar multiplications, eleven hash operations, and one symmetric cryptography operation, so we calculated the computational cost of the vehicle as \(5T_{em}+11T_{h}+1T_{e/d}=7.479\) ms. A fog node performed five ECC scalar multiplications, ten hash operations, and two symmetric cryptography operations, so we calculated the computational cost of the fog node as \(5T_{em}+10T_{h}+2T_{e/d}=7.477\) ms. The cloud server performed two ECC scalar multiplications, three hash operations, and three symmetric cryptography operations, so we calculated the computational cost of the cloud server as \(2T_{em}+3T_{h}+3T_{e/d}=2.99\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(12T_{em}+24T_{h}+6T_{e/d}=17.946\) ms. In [PERSON] et al.