## 5 System Construction
### System Setup
This means a vehicle has not been registered within the network and is not trying to communicate with other vehicles; therefore, messages with missing '\(\pi\)' are also rejected straightaway. Threat (2) RSUs Showing Malicious Behavior: RSU is also not assumed to be honest in our system, so any RSU can try to behave abnormally. Cyber attackers may try tocompromise RSU by remotely hijacking it. It can verify the authentication of any malicious vehicle without verifying it from the smart contract. Secondly, it can itself send malicious messages intended by the attackers to vehicles to distract them. Cyber attackers can launch DDoS and Eclipse attacks through RSUs easily. This threat is also mitigated by the proposed system as every RSU is also required to be registered with 'CA' before being part of the network. This means an RSU must have to generate the proof '\(\pi\),' which should be verified by the blockchain and the result of verification is then distributed within the network in order to let other RSUs and vehicles know the status of specific RSU [48,49]. Threat (3) Disclosure of Vehicle Identity: Because of the open nature of the blockchain, the identity information of vehicles may be inferred from the blockchain. Owing to linkability This can help adversaries download the full trajectory history of specified vehicle from a blockchain to perform statistical analysis to expose the traveling history and traveling habits of a vehicle. The linkability threat has been mitigated by the proposed model by using the zk-SNARK protocol, which hides the real identities of the communicators. ## 8 Conclusions and Future Work

Security and privacy has always been an issue when the distribution of computation has to take place in real scenarios. CAV is the best example of such a scenario where vehicles are connected with one another and everything along the road, sharing data/information consistently. The autonomous nature of connected vehicles makes them more independent when making decisions on their own after perceiving the environment. Any malicious entity within the surroundings can damage the traveling habit of users travelling in CAVs. In this paper, a security and privacy scheme for CAVs has been proposed on blockchain. The proposed system utilizes the zk-SNARK protocol to preserve the privacy of CAVs in addition to ensuring unaltered communication through blockchain. It successfully achieves secure communication among multiple CAVs in addition to concealing the real identities of the communicators. It has managed to resist SPoF, Eclipse, and DDoS attacks and is capable of tackling/identifying malicious CAVs/RSUs. Blockchain has been an effective technology to achieve security within the IoV, which can be deployed in different scenarios depending on the requirements. The same has been achieved in this paper by cashing in on the features of the unlinkability and immutability of blockchain along with the confidentiality and anonymity of zk-SNARK for preserving the privacy of communicators. The extension to this study will be conducted by removing the Salting function in order to assess the privacy preserving feature of zk-SNARK alone and compare the performance of the new model with this proposed model. [PERSON] and [PERSON] conceived of the presented idea. [PERSON] developed the theory and performed the computations. [PERSON] and [PERSON] verified the analytical methods. [PERSON], [PERSON] and [PERSON] encouraged [PERSON] to investigate the blockchain and its attack vectors and supervised the findings of this work. All authors discussed the results and contributed to the final manuscript. [PERSON] and [PERSON] carried out the experiment under the supervision of [PERSON], [PERSON] and [PERSON], who wrote the manuscript with support from [PERSON], [PERSON] and [PERSON], [PERSON] and [PERSON] conceived the original idea. [PERSON] developed the theoretical formalism, performed the analytic calculations, and performed the numerical simulations.