## 4 Proposed Solution
### Blockchain  
The increasing security concerns within IoV make it difficult to realize it as a reality. Centralized security measures are being adopted but they are not as effective as they should be, so the research community is now moving towards decentralized security approaches. Blockchain technology is the most suitable and ideal approach to providing a decentralized means of communication within IoT, particularly for IoV [35]. Blockchain is a distributed ledger that is maintained by distrusted miner network nodes. These nodes mutually reach an agreement through some consensus protocol such as proof-of-stake and proof-of-work. Blockchain has major characteristics which distinguish it from other technologies and these are: (1) _Correctness and Traceability._ Blockchain is a transparent ledger that encourages every node to trace and verify the correctness of data that arrives for storage on it. (2) _Irreversibility and Immutability._ Once the data is recorded on blocks, it is hard to format or temper it since every block is saved using hash codes in such a manner that the hash of the previous block is stored in a current block along with its hash, which ensures irreversibility and immutability [33].  
There are two types of blockchain: online/public [36,37] and offline/private blockchains [36,38]. The results of transactions are stored on an online blockchain e.g., the output of a smart contract [36], resulting in the public part of the blockchain while offline blockchain takes the transaction value outside of the blockchain, forming the private part of blockchain. In our proposed system, the Merkle tree is stored in a public blockchain whose updates are constantly being distributed among all the nodes within the blockchain while the vehicle identity is stored in a private blockchain. It is also important to mention here that every communication between CAVs is not required to be stored as a transaction since it increases the computation time in validation and authentication. Instead, the malicious communication/behavior of the CAV/user is required to be stored as a transaction. The structure of the blockchain is represented in Figure 3. Blockchain has been proposed as a mechanism for annonimity and decentralization of information within VANETs [39]. Blockchain has been integrated smartly with the Internet of Vehicles (IoV) from the perspective of the Intelligent Transportation System (ITS) [40]. This is because of the decentralized management and strong security measures. Blockchain has been made to be light-weight with the complete features of the normal blockchain to reduce the reliance on computing  
\begin{table}
\begin{tabular}{c c} \hline
**Acronym** & **Definition** \\ \hline CAV(s) & Connected and Autonomous Vehicle(s) \\ CPS & Cyber Physical System \\ IoT & Internet of Things \\ zk-SNARK & Zero Knowledge Succinct Non-Interactive \\  & Argument of Knowledge \\ RSU(s) & Roadside Unit(s) \\ DoS & Denial of Service \\ ECU(s) & Electronic Control Unit(s) \\ VANET & Vehicular Adhoc Network \\ IoV & Internet of Vehicles \\ CA & Certification Authority \\ \(\pi\) & zk-SNARK proof \\ w & Witness \\ x & Statement/argument \\ DDoS & Distributed Denial of Service \\ Sig\({}_{i}\)/sig\({}_{j}\) & Signature of vehicle i/j \\ PK\({}_{i}\)/PK\({}_{j}\) & Public Key of vehicle i/j \\ \hline \end{tabular}
\end{table}
Table 1: List of Acronyms.  
resources [41]. The light-weight blockchain has been proposed for IoV, which reduces the delay in a blockchain query within the IoV system.