BLOCKCHAIN-BASED ZERO KNOWLEDGE PROOF MODEL FOR SECURE DATA SHARING SCHEME IN A

The possibility of implementing advanced applications, such as improved driving safety, has increased with the rapid development of vehicular telematics, and existing vehicular services have been enriched through data sharing and analysis between vehicles. This research uses smart contracts and consortium blockchain zero knowledge proof to secure data sharing and storage in vehicular networks. The results indicate that, for message sizes (m), both data_ experiments _2 and 1 produce ciphertext of the same size 157 bits, with the exception of 'gnfuv-temp-exp1-55d487b85b-5g2xh,' which generates ciphertext of 156 bits with the lowest decryption time of 26,865ms and a small decrease in encryption time between 28,620ms and 28,162ms. the proposed model validation shows that the model performed better than the Advanced encryption standard in terms of ciphertext size, encryption time and decryption time in comparison and it satisfies the good and robust blockchain-based zero knowledge proof model for secure data sharing and storage for distributed VANET. The scheme achieves high levels of security while operating with reasonable efficiency, reliability and availability according to numerical results.


INTRODUCTION
With the rapid development of vehicular applications and telematics, huge amount of data will be required by the vehicles to share information. For instance, a vehicle on motion/self-driving can create 1gigabyte of data per second from GPS, radar and cameras (Xu et al,. 2018). Furthermore, data of common interest are share and collected by vehicles (Ni et al., 2017), (Su et al., 2017). Collected data by the vehicles consists of subjective and objective information. Traffic related data, for example road and weather conditions and parking lot occupancy are known as Objective information. The quality of vehicular services and rating of hotel are subjective information (Yang et al., 2016). With data sharing it is possible to realize certain goals such as obtaining service quality during travelling and enhanced driving safety. Large scale data sharing and enormous data storage in vehicles are not sustainable due to resource constraints. Data transmission increasingly becomes complex due to large data generated by vehicles. Traffic information is locally relevant data for vehicles with spatial scope and overt lifetime of utility which requires location awareness and low latency for vehicular data sharing (Ni et al., 2017). In order to address the above challenges, Mobile edge computing is required which is a promising paradigm that can be implanted at the network edge infrastructures, for example Road-Side Units (RSUs), to support immense data storage, sharing and computing near to the vehicles (Ni et al., 2017), (Huang et al., 2017). Privacy and security problems are perilous challenges for vehicular network (VANET) due to risk of single point of failure (SPoF) and data leakage in the centralized server slant. It is therefore essential for further studies on designing a secure data management system in VANET without an intermediary (Firdaus and Rhee, 2020). The data sharing in a VANET contain critical data of users which make data privacy increasable significant in the areas of data storage (Firdaus et al., 2020). Consequently, the register members are unenthusiastic due to risk of different malicious activities in sharing and storing of their data in the system that will endanger security of the system and members privacy. Preferably, as the data management still remains untrusted all data are sent incognito to overcome the problem. It is important to note that real Identity of a user cannot be reveal. However, data reliability is not assured but it can solve privacy violation risk. Furthermore, the user's share data and make it possible to assessing data integrity for other user as reduced due to lack of reward (Li et al., 2018). Thus, the incentives mechanism nature is leveraged to encourage vehicles and users to share and store their data while evaluating the trustworthiness of data in VANET. Since Nakamoto introduced Bitcoin (Nakamoto, 2020), in the past ten years blockchain has gained much popularity as an emerging technology to provide better security for data sharing among many parties without an intermediary. Blockchain is known as a suitable solution that addresses the privacy security issue (Khan et al., 2019), in the last years when Nakamoto introduced Bitcoin (Nakamoto, 2020),  blockchain gained much popularity as an emerging technology in providing better security on data sharing without an intermediary, which can simplify a trusted, secure, trusted and decentralized smart transportation system. In 2008 Satoshi Nakamoto introduces blockchain technology (Nakamoto, 2019) to provide the best security, establish trust entities and ensure privacy. With the increasing number of records stored in the form of blocks, when joined together in chronological order to form a chain using cryptographic hashes. Multiple components are found in a block, for instance, a cryptographic hash of the prior block, timestamp in which the block is generated, transaction data in the form of Merkle root tree and nonce, which is an arbitrary number used for the mining process. The research has established the following contributions: a. The research has established a stronger symmetric key generation approach for VANET data sharing and storage. b. Proposes consortium blockchain and zero-knowledge proof to establish a secure and distributed vehicular blockchain for data management in VANET. c. Deploying zero-knowledge proof on the vehicular blockchain for secure vehicle data sharing and efficient data storage on RSUs.

Related Work
In trustless infrastructures, Blockchain technology is the most powerful tool that addresses data management issues. The blockchain layer controlled all the operations handled on data and also easy to detect all abuse of the data. The literature proposed several blockchains that address storage and data-sharing problems. A decentralized solution was proposed by (Hashemi et al., 2016) for effective data sharing in IoT environment with a distributed data storage system. The proposed system uses blockchain to maintain data access control and data storage model. This later is ensured using blockchains in decentralized manner. However, the proposed solution did not consider the privacy issues that are very important to address in the context of IoT applications. Also, (Xia et al., 2017) proposed a data sharing blockchain-based architecture for healthcare that will manage three layers to access to private ERH (Electronic Medical Record) related to patient's cases. The different users will occupy first layer that are potentially interested to access the patients' data. The blockchain used as a storage data layer is manage based on the access control. Besides the invariability property of blockchain, the ERH are encrypted and inked to ensure the confidentiality, integrity and authenticity of data.
(Arif et al., 2019) discussed security and privacy concerns while presenting the intelligent transportation systems to VANET. They discussed the effectiveness of the VANET and cloud computing as well as a solution to privacy and security issues. Additionally, current VANET issues are discussed. Augot et al., (2017) built an identity management system which depend on third party called identity verifier to authenticate the user with the privacy, that acts as the trusted party for user to be able prove his identity to the service enabler, the identity verifier and partial information proves it correctness. When using the interactive ZKP mode, six miners must confirm the transaction before it can be considered accepted and recorded on the ledger. (Blass et al., 2018) Another tool for making secure auction systems is interactive implementation, which only requires four miner confirmations. There is no direct communication between the parties, and the private data is kept on a central ledger that is overseen by a reliable third party.
To verify the accuracy of the model prediction process without disclosing the private parameters or key of the deep learning model, (Fan et al., 2023) propose a deep learning integrity verification scheme. In order to prove the viability and applicability of the plan, the proving party completes the proof circuit design for each layer of the model using the ZKP system zk-SNARK, and the scheme's feasibility and practicability are established. The health-zkIDM system proposed by (Bai et al., 2022) is a decentralized identity authentication system based on ZKP and blockchain technology. It enables patients to verify and identify their identities transparently in various health sectors and to interact with IDM providers while addressing the privacyharming limitations of centralized IDMs. Chaincode implementation on the fabric demonstrates that the plan can produce throughputs greater than 400 TPs in Caliper.
In vehicular computing and networks, (Jiawen et al., 2019) presented a secure P2P data sharing system. To achieve secure and effective data storage and data sharing, a combination of blockchain and smart contract technologies was used. These technologies effectively stop unauthorized sharing of used data. Strong computing and vast storage resources are made available by vehicular edge computing and networks (VECNETs). The use of roadside units as vehicular edge computing servers, however, raises serious security and privacy concerns because they cannot be completely trusted.
In order to address issues with the openness of the blockchain network, which temporarily jeopardizes the privacy and validity of the voting content, (Yin et al., 2023) developed a smart contract voting system. Additionally, the four stages' execution process and associated algorithm were added to the suggested voting system, and the execution results took the form of a contract transaction. The cryptographic protocol and smart contract voting system can both be effectively provided by the smart contract voting system. (Wenhua et al., 2023) The Internet of Things (IOTs), intelligent manufacturing, finance, and health are just a few of the many subjects covered in the research paper, which also places a strong emphasis on data security and privacy protection. The research focuses on security issues in blockchain technology that are particular to health and identifies six layers of security risks by comparing and contrasting current security countermeasures.

METHODOLOGY Formulation Of Blockchain-Based Secure Data Sharing Scheme Model For Distributed Vanet
The proposed mathematical model is composed of vehicular networks (Ordinary Node, Edge Node and Road side unit (RSU)) and a Certificate Authority (CA) that is in charge of managing the key generation for all system components. The blockchain and zero-knowledge proof (ZKP) will serve as the model's foundations.
On the basis of the consortium blockchain and the cryptographic tool ZKP, the data sharing scheme achieves authentication. The proposed model employs the subsequent procedures: 1. System Initialization: The cryptographic tools that are used by every CA are used in this step. Pairing operations are used by the CA for this. According to effective bilinear map functions ̂, the CA first selects two multiplication groups G1 and G2 of prime order p and p1, respectively. : 1 1 → 2 (1) Conversely, it picks some generators 1 ∈ 1 and 2 ∈ 2 and defines three collision-proof hashing techniques as: Where, p is a prime The CA then creates the ensuing key pairs as: = ( , ) (3) They are a pair of secret and public keys that are used to generate keys and deliver certificates for each network vehicle. The CA selects a secret key at random, ∈ , and computes the key pair for the CA as follows: = , = 1 (4) The pair of secret and public keys utilized for the audit of vehicular data is then provided by:

BLOCKCHAIN-BASED ZERO KNOWLEDGE…
generation, the decision-maker selects a secret key.
∈ and output its public key = 1 (6) Public parameters are output by the setup algorithm as follows: The master key MK is given by: The CA can deliver certificates and audit data using Equation 8. The CA then uses its private key to sign the parameter params and publishes the tuple " < , ( ), > " in the blockchain, which is maintained by the RSU vehicles.

2.
Vehicles and RSU key generation: The CA must authenticate vehicles and RSU nodes to verify their identities. The CA will subsequently confirm and register the entity's (vehicles and RSU nodes) identity. Each authorized organization will then get its secret key, which enables it to authenticate and freely share raw data. CA performs the following operations depending on the type of the entity: a. Vehicle registration: The CA generates a pair of longterm public and secret keys as follows for each vehicle Vi: ( , , , ) (9) Each time it shares data, the vehicle Vi will use the pair of keys to generate one-time pair of keys. Furthermore, On the basis of the long-time public key, CA calculates the certificate Ci for Vi. For this model, the CA generates the pair of keys and the certificate for vehicle Vi as: i. It computes a long-term public key and selects a long-term secret key at random, x1, x2 ∈ and Y1 = 1 1 , Y2 = 2 2 . It outputs the vehicles Vi 's pair of keys, from equation 9, it follows as: Long-time secret key Long-time public key ii. Using the public and secret pair keys of the CA from equation 3 ( , ) and the vehicles long time public key of Vi , = ( 1 , 2 ), the CA randomly pick some key v, h ∈ and employs its secret key. = to figure = ( 1 . 1 . 1 ). 1∕ +ℎ . The CA sends the certificate = ( , ℎ, ) to vehicle Vi b. RSU Nodes Registration: The CA generates public and private keys (PKRSUi and SKRSUi, respectively) as well as the corresponding certificate Certi for each valid RSU node (RSUj). The public key PKRSUi is used to encrypt the raw data, and this certificate is used by entities to authenticate the node RSUj.

3.
Data Sharing: According to the system model, vehicle Vi must first create a one-time pair of keys that are used to sign the data and provide a ZKP of its identity before it can communicate with an RSU edge node to share traffic data. The following operations are performed by vehicle Vi for the above statement. a. A pair of one-time keys is generated by: The vehicle Vi picks a key at random ∈ , so that long time public key from equation 10 will compute one-time public key as: Similarly, long-time secret key from equation 10 and onetime secret key is computed as: = 1 + 1 ( ) (13) Note: The data is shared under the pseudonym " key," and vehicle Vi must use the ZKP mechanism to prove that the data is accurate. b. Generation of ZKPs: According to (Camenisch & Stadler, 1997), the vehicle Vi generates ZKP from the discrete logarithm problem, the known pseudonym and corresponding secret key as follows: i. Random value V ∈ * was picked and computes t = 1 , = 1 ( 1 ∥ ∥ ) was computed again. ii.
finally computed and outputs = ( , , ) Furthermore, the vehicle Vi must submit a ZKP that demonstrates its long-term public key , from equation 10 and its one-time public key given in equation 11. Additionally, the vehicle needs to show that the public key has a current certificate Ci that was delivered by the CA. The vehicle Vi runs the proof of knowledge as follows to construct the ZKP, taking the certificate Ci = (Qi, h, v) as an input, the public key, and audpk auditor public key.

Data Uploading in Raw
After the ZKP are calculated, the Vi vehicle sends a request to share the data M and obtain its certificate to a nearby RSU node in the vehicular edge network, let's say the node RSUjj. After receiving Certj, vehicle Vi used the public key PKRSUJ of the node RSUj to encrypt the data M and validate the signature of Certi. Then, the vehicle Vi generates the metadata, identifying and describing the data M, and containing enough details to enable any node to anonymously authenticate the data M. It includes the vehicle Vi's one-time public key , ZKPs , the list of data M topics, the timestamp of its generation, and the ZKPs. The metadata record is explicitly organized as follows: (14) After encryption with the public key PKRSUj, the vehicle Vi will then send the shared data M with metadata as a record.

4.
Authentication Module: RSU uses its private key SKRSUj to decrypt a Recordi it receives in order to recover the raw data M and any associated metadata. It then completes the subsequent actions: i. Verification of Signature: The node RSU examines the data M and the one-time public key after receiving as a signature ( ( ), ) = ( , 1 )( ( ) ℎ ℎ ℎ ) If this is the case, the subsequent steps of authentication are carried out; otherwise, the received record is deleted.
ii. Checking the correctness of ZKP: The node RSU outputs True if are valid ZKP on the basis of the received ZKPs and the public parameters params.

Putting the Model Solution into Practice as a Smart Contract
In order to create a secure and dependable data sharing protocol in VANETs, the research makes use of smart contracts. The main implementation of the research scheme is carried out by a smart contract that is maintained by each broker. All brokers who are in charge of keeping the raw data M in storage execute this smart contract after it has been deployed on the blockchain. The sharing protocol's security can be increased through the use of smart contracts.

5.
Data Storage and Block generation Module: Each RSU node acts as a data aggregator in this solution, collecting a set of data records periodically from nearby vehicles. Data storage and block generation module. In this study, we make the supposition that the information published is accurate and derived from reliable sources.
However, this study does not take into account how to manage trust in data sources and delivery methods. The RSU node RSUj extracts the associated metadata from each received record "Recordi"_and adds it to a fresh transaction " ." The public keys of all RSU brokers who are in charge of keeping each piece of data that belongs to one or more topics listed in the metadata are then added to this transaction. Additionally, the transaction is structure as follows: = ( ∥ { , ∈ }) (15) Whereas "BrockersListi"_will verify and save both the raw data M and the transaction . Each broker on this list is in charge of at least one list called "Topics." A consensus algorithm is used by the broker RSUj to publish the data M along with the transaction to all of the brokers in the list "BrockersListi" for validation and verification. It is impossible to alter this data after its validation using the consensus and authentication processes because multiple brokers in the network have a copy of it. Each RSU broker must validate the transaction metadata using the underlying consensus algorithm and certify its veracity.
will be included in the blockchain copy of all RSU broker in the system transactions once it has been validated.

5.
Tracking Module: When things go wrong, the CA may occasionally need to investigate the shared data's source to look for signs of system abuse. We suggest a method that enables the CA to monitor each entity's public key by carrying out the following actions: 1) Depending on the attribute = ( = 1 . , = 1 ), The CA calculates and stores the information in the blockchain's metadata. ′ = = .
2) The CA computes Y1 to determine the vehicle that shared the data and a portion of the long-term public key associated with the metadata. who shared data, the CA computes 1 = ∕ ′ . The proposed model is created to offer a reliable and scalable model for data storage and sharing that safeguards the confidentiality of sensitive data while preserving high availability. As a result, it has satisfied (Al-Aswad et al., 2019) and (Hafid et al., 2019) good and strong blockchainbased zero knowledge proof model for secure data sharing and storage for distributed VANET. Table 1 shows the minimal system configurations for the initial assessment and validation of the proposed model.

Data Collection
Transportation datasets will be collected from Georgia Tech Library repository (https://www.fhwa.dot.gov/policyinformation/travel_monito ring/tvt.cfm?CFID=204754188&CFTOKEN=24b7b7f820ee 50e6-D19608D7-C420-C210-3B0984BD35EF1C66) for Travel monitoring. The pre-processing was carried out on various sensor datasets on Microsoft Excel 2017 version for removal of redundancy and reorganization. For the purpose of validating the suggested model for costreduction and efficiency, this study will use synthetic data. Similar synthetic data was used in (Dahmen & Cook, 2019) in a scenario involving a health system. Blockchain-based 49 VANET integration will offer dependable and secure data sharing and storage.

Set Metrics
i. Encryption time ii. Decryption time iii. Reliability iv. Accuracy v. Availability This paper uses smart contracts to facilitate efficient, dependable, and secure data sharing. A smart contract is a piece of code stored on blockchains that enables the automation of multi-step processes that cannot be changed or stopped due to their distributed nature. Because of this, the use of smart contracts may enhance the vehicular blockchain's reliability, efficiency and security. On the vehicular blockchain, smart contracts are implemented to support secure and decentralized data sharing.

RESULTS AND DISCUSSIONS
This section covers the presentation of findings in tables as well as summary and interpretation on findings with regard to the blockchain key generation. Table 2 below illustrates summary of key generation results using several messages (m) to generates cyphertext, cipher size and execution time. In Table 2, both the proposed scheme and the Advanced encryption standard (AES) use the same message size (m). Nevertheless, the US government recognizes and suggests using the AES encryption standard. The maximum key length permitted by AES is 256 bits. However, the encryption and decryption standard's effectiveness were tested using the same message size.

Data Presentation
From the model validation in figure 1 we observed that for message sizes (m), the ciphertext size for both data experiment _2 and 1 are the same except for 'gnfuv-temp-exp1-55d487b85b-5g2xh' which generate ciphertext size 156bits with lowest decryption time of 26,865ms. In overall, submission the proposed scheme has the larger encryption and decryption time than the AES in comparison. Similarly, AES generates the same ciphertext although for both encryption and decryption time, the decryption time takes longer time to decrypt than to encrypt as shown in figure 2. cc62453321db168906a45a4a61595cf 5404cebe32e97a24d14c8e2929f2ce7 ebc9492a2d549c1723f6678b46cd1aa 13
'gnfuv-temp-exp1-55d487b85b-5dmwq' Advanced encryption standard chart in figure 2 shows that AES takes longer time to decrypt than to encrypt message size (m), the line graph shows a projection in decrypting a message.

Figure 4: AES encryption and decryption time graph
We observed from figure 4 that decrypting an AES message using the same message size takes a longer time than encryption as shown in the AES time graph.
The interface of the validation model is presented in Figure  5, it shows the processes of key generation.

CONCLUSION
In this study, we proposed a mathematical model made up of vehicular networks, including Ordinary Node, Edge Node, and Road Side Unit (RSU) networks, as well as a Certificate Authority (CA), which is in charge of overseeing the key generation for all system components. The model is based on the blockchain and zero knowledge proof (ZKP). In this solution, each RSU node performs the role of a data aggregator by routinely gathering a set of data records from nearby vehicles. Block generation and data storage module. In order to establish a secure, dependable data sharing protocol and to assume that the information published is accurate and derived from reliable sources, the study uses smart contracts. Vehicles and RSU nodes must be authenticated by the CA in order to confirm their identities. The CA will then verify and register the identity of the entity (vehicles and RSU nodes). This study, however, does not address the issue of managing trust in data sources and delivery mechanisms. The proposed model aims to provide a scalable, secure, and reliable model for data storage and sharing that maintains high availability while protecting the confidentiality of sensitive data. As a result, the proposed model validation shows that for message sizes (m), both data_ experiments _2 and 1 produce ciphertext of the same size 157 bits, with the exception of 'gnfuv-temp-exp1-55d487b85b-5g2xh,' which generates ciphertext of 156 bits with the lowest decryption time of 26,865ms and a small decrease in encryption time between 28,620ms and 28,162ms, which indicates that the model performed better than Advanced encryption standard in term of ciphertext size, encryption time and decryption time and it satisfies the good and robust blockchain-based zero knowledge proof model for secure data sharing and storage for distributed VANET proposed by (Al-Aswad et al., 2019) and (Hafid et al., 2019).