A Blockchain-Based Method for Conditional Privacy Data Sharing in the Internet of Vehicles
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-08-14
AI Technical Summary
然而,直接共享原始数据会严重泄露用户隐私
[0032]本发明完全摒弃了计算开销巨大的双线性配对操作,全面采用轻量级的椭圆曲线密码学,显著降低了车辆端的计算与能耗开销,更适合车联网等资源受限场景。
Smart Images

Figure CN121308943B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of blockchain and data privacy protection technology, and in particular relates to a blockchain-based method for sharing conditional privacy data in the Internet of Vehicles. Background Technology
[0002] In intelligent transportation systems, efficient and secure data sharing (such as road conditions and accident information) among vehicles is crucial. However, directly sharing raw data can seriously compromise user privacy. Existing solutions often employ attribute-based encryption (ABE) based on bilinear pairing to achieve fine-grained access control, but pairing operations are computationally complex and energy-intensive, making efficient deployment on resource-constrained devices difficult.
[0003] Meanwhile, centralized data management architectures suffer from single points of failure and trust bottlenecks. Although blockchain technology provides a decentralized and tamper-proof storage platform, how to achieve conditional privacy protection and effective access control—ensuring "normal anonymity and traceability of anomalies"—while eliminating expensive pairing operations remains a pressing technical challenge.
[0004] While numerous privacy protection solutions have been proposed in existing technologies, effectively protecting privacy while reducing communication and computational overhead remains a challenge. Therefore, a novel data sharing framework based on lightweight elliptic curve cryptography is urgently needed to balance security, privacy, and system efficiency. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a blockchain-based method for sharing conditional privacy data in the Internet of Vehicles, thereby resolving the issues present in the existing technologies.
[0006] To achieve the above objectives, this invention provides a blockchain-based method for sharing conditional privacy data in the Internet of Vehicles, comprising:
[0007] The authorization center generates system public parameters and master key pairs, and deploys blockchain smart contracts;
[0008] Based on the real identity and attribute set submitted by the vehicle, the authorization center uses the master key pair to generate a pseudo identity and signature key pair, and writes the registration information into the blockchain; the data owner vehicle uploads the collected vehicle data to the blockchain and generates a data index;
[0009] The data requesting vehicle queries the data index on the blockchain, generates an authentication request based on the selected target index, the system public parameters, and the signature key pair, and sends it to the blockchain;
[0010] The blockchain smart contract verifies the authentication request based on the registration information of the data requesting vehicle, and determines whether to return the encrypted data to the data requesting vehicle based on the verification result; after receiving the encrypted data, the data requesting vehicle decrypts it and verifies its integrity; if the verification fails, it initiates a traceability request to the authorization center.
[0011] Upon receiving a traceability request, the authorization center traces the identity of the data provider based on the blockchain audit logs to perform management operations.
[0012] Optionally, the process by which the authorization center generates system public parameters and master key pairs includes:
[0013] The authorization center selects security parameters to generate prime numbers and determines elliptic curves, multiplicative groups, and additive cyclic groups; wherein the additive cyclic group has a specific generator; a system master private key is randomly selected from the multiplicative group; the system public key is calculated based on the system master private key and the generator; a secure one-way hash function is selected; and a master key pair and system common parameters including prime numbers, elliptic curves, multiplicative groups, additive cyclic groups, generators, secure one-way hash functions, and the system public key are obtained.
[0014] Optionally, the process by which the authorization center generates a pseudo-identity and signature key pair using the master key pair based on the vehicle's submitted real identity and attribute set, and writes the registration information into the blockchain, includes:
[0015] The authorization center receives the vehicle's real identity and attribute set and selects a random number from the multiplication group;
[0016] A false identity is calculated based on the real identity, the random number, and the generator, and the mapping relationship between the real identity and the false identity is securely stored locally.
[0017] The vehicle private key is calculated based on the system master private key and the pseudo-identity, and the vehicle public key is calculated based on the vehicle private key and the generator. The registration information, including the pseudo-identity, attribute set, and vehicle public key, is written into the blockchain smart contract.
[0018] Optionally, the process by which the data owner vehicle uploads the collected vehicle data to the blockchain and generates a data index includes:
[0019] The data owner collects vehicle data; creates data description information including data size, data type, storage location, and upload timestamp; sets vehicle owner identifier and access policy; constructs a data index including the vehicle data, data description information, owner identifier, and access policy; and stores the data index in the blockchain's index storage.
[0020] Optionally, the process by which the data requesting vehicle queries a data index on the blockchain, generates an authentication request based on the selected target index, the system public parameters, and the signature key pair, and sends it to the blockchain includes:
[0021] The data requesting vehicle accesses the blockchain and reads the data index set in the index storage; selects the target index from the data index set according to the requirements; obtains the current timestamp and generates a request message by combining the pseudo identity and the target index; hashes the request message to obtain the message hash value; signs the message hash value using the signing private key to generate a digital signature; and sends an authentication request including the request message, digital signature, and current timestamp to the blockchain.
[0022] Optionally, the process by which the blockchain smart contract verifies the authentication request based on the registration information of the data request vehicle includes: the blockchain smart contract receiving the authentication request and extracting the timestamp therein, and verifying the validity of the timestamp; extracting the pseudo-identity in the authentication request and querying the corresponding public key stored in the blockchain; using the queried public key to verify the validity of the digital signature in the authentication request; and extracting the attribute set corresponding to the pseudo-identity and matching it with the access policy of the target index for verification.
[0023] Optionally, the process of determining whether to return encrypted data to the data-requesting vehicle based on the verification result includes:
[0024] When verification is successful, the smart contract retrieves the original data from the data storage; randomly generates a symmetric key; encrypts the original data using the symmetric key to obtain ciphertext; encrypts the symmetric key using the public key of the data requesting vehicle to obtain symmetric ciphertext; returns the ciphertext and symmetric ciphertext to the data requesting vehicle; and adds a shared record containing the data request, digital signature, index, and timestamp to the audit storage.
[0025] Optionally, the process of decryption and integrity verification includes:
[0026] The data request vehicle receives encrypted data and symmetric encrypted data; it decrypts the symmetric encrypted data using the signing private key to obtain the symmetric key; it decrypts the encrypted data using the symmetric key to obtain the original data; it calculates the local hash value of the decrypted data and retrieves the original data hash value from the index storage; and it compares whether the local hash value is consistent with the original data hash value.
[0027] Optionally, if verification fails, the process of initiating a traceability request to the authorization center includes:
[0028] When data integrity verification fails, the data requesting vehicle generates a traceability message based on the target index and the current timestamp; signs the traceability message using a signing private key; and sends the traceability request, including the traceability message and the signature, to the authorization center.
[0029] Optionally, after receiving a traceability request, the process by which the authorization center traces the identity of the data provider based on the blockchain audit log to perform management operations includes:
[0030] The authorization center receives the traceability request and verifies the validity of the signature; locates the audit record based on the index and timestamp in the traceability request; queries the audit storage log for the data provider's false identity; restores the data provider's true identity by querying the local security database; and performs the revocation operation.
[0031] Compared with the prior art, the present invention has the following advantages and technical effects:
[0032] This invention completely abandons the computationally expensive bilinear pairing operation and fully adopts lightweight elliptic curve cryptography, which significantly reduces the computational and energy consumption of the vehicle and is more suitable for resource-constrained scenarios such as vehicle networking.
[0033] This invention uses a pseudo-identity mechanism to keep vehicles anonymous during normal data sharing; at the same time, the TA, as a trusted authority, retains traceability capabilities, thus achieving the conditional privacy protection goal of "normal anonymity and abnormal traceability".
[0034] This invention utilizes blockchain as the sole trusted platform to store data, indexes, and complete audit logs, ensuring the transparency, immutability, and traceability of the data sharing process and eliminating dependence on centralized servers. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 This is a system model diagram of an embodiment of the present invention;
[0037] Figure 2 This is a flowchart of the method described in this invention. Detailed Implementation
[0038] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0039] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0040] Example 1
[0041] like Figure 1 As shown, the following three types of entities are involved:
[0042] Control Center (TA): This is a trusted third party responsible for system initialization, participant registration, master key generation, and identity verification when necessary.
[0043] Vehicles: As the owners and requesters of data, vehicles obtain system credentials through registration and use blockchain for secure and privacy-preserving data sharing.
[0044] Blockchain: Blockchain smart contracts define three data storage structures: data storage (for storing the encrypted original data), index storage (for storing data indexes), and audit storage (for storing operation logs of all data sharing and updates, preventing tampering with the records). Blockchain is a distributed ledger technology that allows multiple participants to collaboratively maintain a continuously growing list of data records called blocks. Each block contains a certain amount of data and is cryptographically linked to the previous block, forming a chain.
[0045] like Figure 2 As shown, this embodiment provides a blockchain-based method for sharing conditional privacy data in the Internet of Vehicles (IoV), including:
[0046] S1. System initialization: Generate system public parameters. The Authorization Center (TA) selects security parameters, generates a system master key pair, and broadcasts the public parameters to each vehicle and roadside unit. Deploy blockchain smart contracts; the TA deploys the blockchain for data, indexing, and auditing functions.
[0047] S1-1 TA Select Safety Parameters Generate prime numbers and ,set up and These represent elliptic curves and multiplication groups, respectively. It is an additive cyclic group. yes The generator, then TA randomly selects Used as the system's private key, and used to calculate the system's public key. TA chooses a secure one-way hash function. , TA generates common parameters for the system. And made public.
[0048] The S1-2 blockchain smart contract defines three data storage structures: data storage (for storing encrypted original data), index storage (for storing data indexes), and audit storage (for storing operation logs for all data sharing and updates, preventing tampering with the records).
[0049] Elliptic Curve Cryptography (ECC) uses the discrete logarithm problem on elliptic curves to achieve secure encryption and decryption operations.
[0050] S2, Entity Registration.
[0051] S2-1 Vehicle Registration: The vehicle sends its true identity and attribute set to the Authorization Center (TA). The TA verifies the uniqueness of the identity and generates a pseudo-identity and signature key pair for the vehicle. The vehicle's true identity is then stored in a smart contract via a secure channel.
[0052] S2-1-1 Vehicle selection: Choose your real identity. A set of attributes describing its permissions or roles. Send it to them. To protect vehicle privacy, they will generate a temporary pseudo-identity for it. Specifically, TA randomly selects a number. And calculate false identities and in local secure storage mapping relationship .
[0053] S2-1-2 TA calculates the vehicle's private key. public key And generate a signature key pair. Used for authentication in subsequent data requests. TA will register information. Write it into a smart contract on the blockchain. Then, use a secure channel to... Send to the vehicle.
[0054] S3, Data Sharing.
[0055] S3-1 Data Generation. The data owner vehicle uploads the collected data to the blockchain, generating a corresponding index.
[0056] S3-1-1 Data Owner Vehicle Its vehicle data is collected, uploaded to a blockchain smart contract, and an index is generated. ,in ,in The middle part contains vehicle data. It is vehicle data Description, including size ,type Storage location and upload timestamp , It is a sign indicating the vehicle owner's identity. It's an access strategy.
[0057] S3-2 Data Request. The data requesting vehicle queries the data index on the blockchain, selects the target index data, uses its signing private key to generate an authentication request, and sends it to the blockchain.
[0058] S3-2-1 Data Requester Access the blockchain and read the data index set in the index store. Data requester Choose a target index based on your needs. .
[0059] S3-2-2 Data Requester Get the current timestamp Generate request message and the message Perform hash processing, that is .
[0060] Data requester Use its private key Sign the request message, that is Generate an unforgeable digital signature .
[0061] S3-2-3 Data Requester Package the request and the signed transaction together and send the data request to the blockchain. .
[0062] S3-3 Data Query. The blockchain smart contract verifies the signature of the vehicle requesting the data and checks whether its registration attributes meet the access policy of the target index data. If so, it returns the symmetric key ciphertext encrypted for the target index data and the encrypted data.
[0063] The smart contract on the S3-3-1 blockchain receives a data requester. Data requests First, check the validity of the timestamp. The blockchain sets the current timestamp to [value]. ,if Then retrieve data request The false identity of the requester The smart contract queries the pseudo-identity in the index store. The public key in the corresponding registration information and use the public key Verify the validity of the signature, that is If verification fails, the request is immediately rejected; if verification succeeds, the signature is valid, and the smart contract extracts the false identity. Corresponding attribute set and compare it with the target index. Access strategy To make a comparison, that is If requesting a vehicle attribute set Satisfy access policy At that time, the smart contract indicates that authorization has been successful.
[0064] The S3-3-2 smart contract retrieves the data owner's data from the data storage. A symmetric key is randomly generated through a smart contract. ,calculate , on data Encryption is performed to obtain encrypted data. And retrieve the requester's public key from the index store. For symmetric keys Encryption yields symmetric ciphertext ,Right now Smart contracts will Returned to the data requester At the same time, add shared records to the storage involved. ,in, For data requests, For digital signatures, For indexing, For timestamps.
[0065] S3-4 Data Acquisition. The data requesting vehicle uses its private key to decrypt and obtain the symmetric key, then uses that key to decrypt and obtain the original data. To ensure data integrity, the vehicle calculates the hash value of the data and compares it with the metadata in the index.
[0066] S3-4-1 Data Requester Received the return from the smart contract First, check the validity of the timestamp. (Data requester) Set the current timestamp to ,if Then use its private key. For the received ciphertext Decrypt and recover the symmetric key. ,Right now ,verify Check if they are equal; if they are equal, decrypt the original data. Using the recovered symmetric key Decrypting the encrypted data ,Right now .
[0067] S3-4-2 Data Requester Verify data integrity and calculate local data hash value. At the same time, the hash value of the original data is retrieved from the index storage. ,verify If they are equal, it indicates that the data has been tampered with, and a traceability request is sent to the Authorization Center (TA). ,in, For indexing, For timestamps. To ensure the legitimacy of the request, the data requester is used. Signing with private key And send, among which, For private key, For retrospective requests.
[0068] S4. Management Operations. If data anomalies are detected (such as tampering or false information), the vehicle can initiate a traceability request. Upon receiving the request, the Authorization Center (TA) uses the blockchain audit log to locate the false identity of the data provider and resolves the true identity through its local private mapping table, thereby performing management operations such as revocation.
[0069] S4-1 Authorization Center TA Verification The legitimacy of the request, using the data requester public key For the received Perform signature verification; if the verification is valid, proceed according to the index. and timestamp Locate the target's pseudo-identity in the audit storage logs. By querying the local security database center through the Authorization Center (TA), the true identity of the traceable target can be restored. This allows the cancellation management operation to be performed.
[0070] The core idea of this invention is to decouple the complex access policy verification logic from cryptographic primitives and entrust it to on-chain smart contracts for execution. Data encryption itself employs a hybrid encryption mechanism combining efficient ECC and symmetric encryption. Vehicles obtain a private key based on their pseudo-identity and attribute metadata upon registration. When uploading data, the data owner encrypts the symmetric key using their public key. Data requesters verify whether their attributes meet the access policy through a smart contract; if so, they can obtain their own encryption key and decrypt the data. The Authorization Center (TA), acting as a trusted authority, securely stores the mapping between pseudo-identities and real identities, and traces identities when malicious behavior is detected. By tracking the true identity through information in the blockchain, a revocation operation is performed, removing the malicious vehicle from the system. This achieves efficient identity authentication and privacy protection.
[0071] This invention utilizes attribute-based encryption to achieve fine-grained access control, ensuring that only vehicles meeting the policy requirements can decrypt data. A decentralized platform is built using blockchain to guarantee data immutability and auditability. Furthermore, a conditional privacy mechanism is designed to protect vehicle anonymity while supporting the tracing of malicious behavior. This method effectively solves the security, privacy, and efficiency issues of data sharing in the Internet of Vehicles.
[0072] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A blockchain-based method for sharing conditional privacy data in the Internet of Vehicles (IoV), characterized in that, Includes the following steps: The authorization center generates system public parameters and master key pairs, and deploys blockchain smart contracts; The process by which the authorization center generates system public parameters and master key pairs includes: The authorization center selects security parameters to generate prime numbers and determines elliptic curves, multiplicative groups, and additive cyclic groups; wherein the additive cyclic group has a specific generator; a system master private key is randomly selected from the multiplicative group; the system public key is calculated based on the system master private key and the generator; a secure one-way hash function is selected; and a master key pair and system common parameters including prime numbers, elliptic curves, multiplicative groups, additive cyclic groups, generators, secure one-way hash functions, and the system public key are obtained. Based on the real identity and attribute set submitted by the vehicle, the authorization center uses the master key pair to generate a pseudo identity and signature key pair, and writes the registration information into the blockchain; the data owner vehicle uploads the collected vehicle data to the blockchain and generates a data index; The process by which the authorization center generates a pseudo-identity and signature key pair using the master key pair based on the vehicle's submitted real identity and attribute set, and then writes the registration information into the blockchain, includes: The authorization center receives the vehicle's real identity and attribute set and selects a random number from the multiplication group; A false identity is calculated based on the real identity, the random number, and the generator, and the mapping relationship between the real identity and the false identity is securely stored locally. Calculate the vehicle private key based on the system master private key and the pseudo-identity, and calculate the vehicle public key based on the vehicle private key and the generator; write the registration information, including the pseudo-identity, attribute set, and vehicle public key, into the blockchain smart contract; The data requesting vehicle queries the data index on the blockchain, generates an authentication request based on the selected target index, the system public parameters, and the signature key pair, and sends it to the blockchain; The blockchain smart contract verifies the authentication request based on the registration information of the data requesting vehicle, and determines whether to return encrypted data to the data requesting vehicle based on the verification result; The step of determining whether to return encrypted data based on the verification result includes: when the verification is successful, the smart contract queries the original data from the data storage; randomly generates a symmetric key; encrypts the original data using the symmetric key to obtain data ciphertext; encrypts the symmetric key using the public key of the data request vehicle to obtain symmetric ciphertext; and returns the data ciphertext and symmetric ciphertext to the data request vehicle. After receiving encrypted data, the data requesting vehicle decrypts it and verifies its integrity; if the verification fails, it sends a traceability request to the authorization center. The decryption process includes: after receiving the data ciphertext and symmetric ciphertext, the data requesting vehicle uses its own signature private key to decrypt the symmetric ciphertext to obtain the symmetric key; and uses the symmetric key to decrypt the data ciphertext to obtain the original data. Upon receiving a traceability request, the authorization center traces the identity of the data provider based on the blockchain audit logs to perform management operations.
2. The method for sharing conditional privacy data in the Internet of Vehicles based on blockchain according to claim 1, characterized in that, The process by which the data owner uploads the collected vehicle data to the blockchain and generates a data index includes: The data owner collects vehicle data; creates data description information including data size, data type, storage location, and upload timestamp; sets vehicle owner identifier and access policy; constructs a data index including the vehicle data, data description information, owner identifier, and access policy; and stores the data index in the blockchain's index storage.
3. The method for sharing conditional privacy data in the Internet of Vehicles based on blockchain according to claim 1, characterized in that, The process by which a data requesting vehicle queries a data index on the blockchain, generates an authentication request based on the selected target index, the system public parameters, and the signature key pair, and sends it to the blockchain includes: The data requesting vehicle accesses the blockchain and reads the data index set in the index storage; selects the target index from the data index set according to the requirements; obtains the current timestamp and generates a request message by combining the pseudo identity and the target index; hashes the request message to obtain the message hash value; signs the message hash value using the signing private key to generate a digital signature; and sends an authentication request including the request message, digital signature, and current timestamp to the blockchain.
4. The blockchain-based method for sharing conditional privacy data in the Internet of Vehicles according to claim 3, characterized in that, The process by which a blockchain smart contract verifies an authentication request based on the registration information of a vehicle requested by data includes: the blockchain smart contract receiving the authentication request and extracting the timestamp therein, and verifying the validity of the timestamp; extracting the pseudo-identity in the authentication request and querying the corresponding public key stored in the blockchain; using the queried public key to verify the validity of the digital signature in the authentication request; and extracting the attribute set corresponding to the pseudo-identity and matching it with the access policy of the target index for verification.
5. The blockchain-based method for sharing conditional privacy data in the Internet of Vehicles according to claim 4, characterized in that, The process of determining whether to return encrypted data to the data-requesting vehicle based on the verification results includes: When verification is successful, the smart contract retrieves the original data from the data storage; randomly generates a symmetric key; encrypts the original data using the symmetric key to obtain ciphertext; encrypts the symmetric key using the public key of the data requesting vehicle to obtain symmetric ciphertext; returns the ciphertext and symmetric ciphertext to the data requesting vehicle; and adds a shared record containing the data request, digital signature, index, and timestamp to the audit storage.
6. The blockchain-based method for sharing conditional privacy data in the Internet of Vehicles according to claim 5, characterized in that, The process of decryption and integrity verification includes: The data request vehicle receives encrypted data and symmetric encrypted data; it decrypts the symmetric encrypted data using the signing private key to obtain the symmetric key; it decrypts the encrypted data using the symmetric key to obtain the original data; it calculates the local hash value of the decrypted data and retrieves the original data hash value from the index storage; and it compares whether the local hash value is consistent with the original data hash value.
7. The blockchain-based method for sharing conditional privacy data in the Internet of Vehicles according to claim 6, characterized in that, If verification fails, the process of initiating a traceability request to the authorization center includes: When data integrity verification fails, the data requesting vehicle generates a traceability message based on the target index and the current timestamp; signs the traceability message using a signing private key; and sends the traceability request, including the traceability message and the signature, to the authorization center.
8. The blockchain-based method for sharing conditional privacy data in the Internet of Vehicles according to claim 7, characterized in that, After receiving a traceability request, the authorization center traces the identity of the data provider based on the blockchain audit log to perform management operations. The process includes: The authorization center receives the traceability request and verifies the validity of the signature; locates the audit record based on the index and timestamp in the traceability request; queries the audit storage log for the data provider's false identity; restores the data provider's true identity by querying the local security database; and performs the revocation operation.
Citation Information
Patent Citations
Intelligent Internet of Vehicles credible data encryption method and system based on block chain
CN110830235A
Road rescue privacy protection system and method based on block chain in fog computing environment
CN112261078A