# A Secure and Efficient Authentication Scheme for Fog-Based Vehicular Ad Hoc Networks
## 6 Performance Analysis
### Computational Cost Analysis
's protocol [20], a vehicle performed two ECC scalar multiplications and eight hash operations, so we calculated the computational cost of the vehicle as \(2T_{em}+8T_{h}=3.002\) ms. A fog node performed four ECC scalar multiplications and five hash operations, so we calculated the computational cost of the fog node as \(4T_{em}+5T_{h}=5.971\) ms. The cloud server performed three ECC scalar multiplications and thirteen hash operations, so we calculated the computational cost of the cloud server as \(3T_{em}+13T_{h}=4.506\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(9T_{em}+26T_{h}=13.479\) ms. In [PERSON] et al. 's protocol [8], a vehicle performed three ECC scalar multiplications and six hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+6T_{h}=3.002\) 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.971\) ms. The cloud server performed four ECC scalar multiplications and nine hash operations, so we calculated the computational cost of the cloud server as \(4T_{em}+9T_{h}=4.506\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(11T_{em}+19T_{h}=16.436\) ms. In [PERSON] et al. 's protocol [21], a smart device performed three ECC scalar multiplications and thirteen hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+13T_{h}=4.506\) ms. A fog node performed five ECC scalar multiplications and ten hash operations, so we calculated the computational cost of the fog node as \(5T_{em}+10T_{h}=7.475\) ms. The cloud server performed four ECC scalar multiplications and six hash operations, so we calculated the computational cost of the cloud server as \(4T_{em}+6T_{h}=5.974\) ms. Thus, the total cost of smart device, fog node and cloud server is \(12T_{em}+29T_{h}=17.955\) ms. In [PERSON] et al. 's protocol [22], we calculated the computational costs by combining those of the fog nodes and the RSUs. A vehicle performed three ECC scalar multiplications and three hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+3T_{h}=4.476\) ms. A fog node performed five ECC scalar multiplications and five hash operations, so we calculated the computational cost of the fog node as \(5T_{em}+5T_{h}=7.46\) ms. The cloud server performed six ECC scalar multiplications and ten hash operations, so we calculated the computational cost of the cloud server as \(6T_{em}+10T_{h}=8.964\) ms. Thus, the total cost of vehicle, fog node and cloud server is \(14T_{em}+18T_{h}=20.9\) ms. In our proposed protocol, a vehicle performed three ECC scalar multiplications and fifteen hash operations, so we calculated the computational cost of the vehicle as \(3T_{em}+15T_{h}=4.512\) ms. A fog node performed two ECC scalar multiplications and ten hash operations, so we calculated the computational cost of the fog node as \(2T_{em}+10T_{h}=3.008\) ms. The cloud server performed three ECC scalar multiplications and twelve hash operations, so we calculated the computational cost of the cloud server as \(3T_{em}+12T_{h}=4.503\) ms. Thus, the total cost of vehicle, fog node, and cloud server is \(8T_{em}+37T_{h}=12.023\) ms.  
We show the comparison results of computational cost of our proposed protocol and other related protocols in Table 5 and Figure 6. The results show that our proposed protocol has a lower total computational cost, especially on the fog node side, than related protocols. Therefore, we can state that our proposed protocol has relatively higher computational efficiency than other related protocols.