## 1 Introduction
Blockchain commonly comes under network attacks such as DDoS and Eclipse, so this research will assess the performance of the proposed system against DDoS and Eclipse attacks. Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (zk-SNARK) is a protocol that creates a framework where a party known as \"Prover\" can convince another party known as a \"Verifier\" that he/she knows certain information without revealing that information. zk-SNARK uses the concept of zero-knowledge proof. zk-SNARK can be explained with a simple example. To develop a proof of a transaction between two parties, at least one of the two parties must have complete information about the transaction. In the traditional proof system, the proof (password) is compared with the password the user enters to access some online system. In any online system, the user enters a password and the network checks the password for its verification. The network must have access to the user's password, and only then password verification can be completed, and the system can verify if the user has entered the correct password or not. On the other hand, in the zk-SNARK proof system, the same example can be demonstrated in a manner where the user would ensure the system that he/she owns a correct password without revealing the password. Therefore, zk-SNARK ensures security and privacy in case the system does not save the password, so it cannot be stolen by any unauthorized access to the system. zk-SNARK can be applied to blockchain transactions as it hides the sender and receiver of the transaction resulting in privacy-preserving, which is going to be achieved in this research. In this paper, the security of the user's data and user/vehicle first place is proposed using blockchain technology while the privacy of user/vehicle identification is preserved using zk-SNARK. The conceptual diagram of the proposed architecture is represented in Figure 1.  
The goal of this paper is to provide a blockchain-based privacy-preserving and secure data communication mechanism among CAVs using the zk-SNAKR protocol. This scheme also intends to ensure the confidentiality, integrity, and availability of data. The main contributions of the paper can be summarized as follows:  
1. A secure decentralized data sharing scheme has been proposed based on blockchain to achieve privacy-preserving;
2. The proposed scheme utilizes zk-SNARK, in which users can prove that they meet certain requirements imposed for valid communication without revealing their identities. The requirements are set by the centralized authority and are saved in a smart contract where the user constructs a zero-knowledge proof (\(\pi\)) and submits it to RSU for verification. Once verification has passed, the user will be capable of starting communication with other vehicles;
3. The analysis of the proposed scheme and performance evaluation on specified attack vectors (DDoS and Eclipse) demonstrates that the proposed scheme achieves the security and privacy of the users and data. The rest of the paper is organized as follows: Section 2 is the literature study, Section 3 is problem formulation, Section 4 discusses the Proposed System, Section 5 is the performance evaluation of the proposed system, Section 6 is the discussion part, and Section 7 is the conclusion.