Data sharing method and system based on equality test
By employing equality testing and trapdoor authorization mechanisms, the redundancy and security issues of data sharing among multiple senders and receivers in the Internet of Vehicles (IoV) are resolved, achieving efficient and secure data sharing and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHERY AUTOMOBILE CO LTD
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-12
AI Technical Summary
Existing vehicle-to-everything (V2X) data sharing solutions are ill-suited for efficient data distribution with multiple senders and receivers. Public-key encryption schemes have high computational overhead, and malicious node revocation is inefficient, leading to data redundancy and low transmission efficiency.
A data sharing method based on equality testing is adopted, which distributes global public parameters and vehicle pseudonym information through a trusted institution, generates trapdoors and encrypted messages, and combines equality testing and a lightweight polynomial reversal mechanism to eliminate duplicate data and quickly isolate malicious nodes.
It enables efficient data processing and distribution in scenarios with multiple senders and multiple receivers, ensuring data security and privacy protection, and improving the security and efficiency of data sharing.
Smart Images

Figure CN122028032A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of vehicle network data sharing, and in particular to a data sharing method and system based on equality testing. Background Technology
[0002] With the rapid development of intelligent transportation systems and vehicle-to-everything (V2X) technology, collaborative work between vehicles, roadside units (RSUs), and cloud servers has become crucial for improving road safety and traffic efficiency. In existing technologies, vehicles and RSUs share traffic data in real time via wireless communication, such as vehicle location, speed, road conditions, and emergency information, to enable functions like dynamic route planning, collision warning, and traffic flow optimization.
[0003] Existing vehicle-to-everything (V2X) data sharing solutions are mostly limited to communication modes of single sender and single receiver or single sender and multiple receivers. This makes it difficult to adapt to the needs of real-world scenarios where vehicles and RSUs synchronize large amounts of data to cloud servers and efficiently distribute it to multiple receivers, resulting in data redundancy and low transmission efficiency. In terms of data security, public key and keyword search encryption (PKKS) only supports searching encrypted ciphertext under the same keyword, which cannot adapt to scenarios where different users in the V2X network encrypt and upload data using different public keys. While public key encryption (PKEET) with equality testing solves the cross-public key search problem, its computational overhead and security still have room for improvement. Regarding malicious node revocation, existing solutions mostly rely on blockchain technology. Although it can achieve trusted revocation, it suffers from excessive computational load and system overhead, affecting communication efficiency.
[0004] In summary, in intelligent transportation and vehicle-to-everything (V2X) scenarios, efficient data sharing among multiple senders and receivers, secure retrieval of encrypted data, and rapid removal of malicious nodes remain pressing technical challenges that need to be addressed. Summary of the Invention
[0005] The purpose of this invention is to provide a data sharing method and system based on equality testing to alleviate the technical problems of low sharing security and low sharing efficiency in multi-party sharing scenarios.
[0006] In a first aspect, the present invention provides a data sharing method based on an equality test, comprising: Retrieve global public parameters, vehicle pseudonym information, and vehicle private key; Based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, a trapdoor for authorized cloud server equality testing and a message for encrypting shared data are integrated to generate a message. Based on the set of pseudonyms of the receiving group corresponding to the message, the messages are divided into groups, and then the messages belonging to the same group are tested for equality. Duplicate messages are removed and then stored. Based on the vehicle pseudonym information, the vehicle private key, and the global public parameters, the sent message to be shared is decrypted to obtain the shared data.
[0007] In an optional implementation, the step of integrating the shared data message, the vehicle pseudonym information, the global public parameters, and the vehicle private key to generate a message including a trapdoor for authorizing cloud server equality testing and a message for encrypting shared data includes: Based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, ciphertext for encrypting the shared data is generated. Based on the global public parameters, the vehicle pseudonym information, and the ciphertext, a message including a trapdoor for authorizing cloud server equality testing is generated.
[0008] In an optional implementation, the step of generating ciphertext for encrypting shared data based on the shared data packet, the vehicle pseudonym information, the global public parameters, and the vehicle private key includes: When data needs to be shared, determine the set of pseudonyms for the data receiving group corresponding to the shared data message and the vehicle pseudonym information; Based on the first true random number generated by the vehicle-mounted quantum random number generator, the shared data message, the pseudonym set of the data receiving group, the global public parameters, and the vehicle private key, the ciphertext including each encryption parameter of the shared data is calculated.
[0009] In an optional implementation, the step of integrating the global public parameters, the vehicle pseudonym information, and the ciphertext to generate a message including a trapdoor for authorizing cloud server equality testing includes: Based on the vehicle pseudonym information and the second true random number corresponding to the master private key in the global public parameters, a trapdoor is generated; the trapdoor is an authorization credential used for cloud server equality testing. According to the trapdoor, the set of receiving group pseudonyms corresponding to the vehicle pseudonym information and the ciphertext are integrated into a message and uploaded to the cloud server.
[0010] In an optional implementation, the steps of dividing the packets into groups based on the set of pseudonyms corresponding to the receiving groups, performing an equality test on packets belonging to the same group, removing duplicate packets, and then storing and sending the packets include: Based on the set of receiving group pseudonyms corresponding to each message, messages with the same set of receiving group pseudonyms are grouped into one group. If there is only one such message in the group, then the message is stored. If there are multiple messages in the group, the ciphertext in each message is extracted according to the trapdoor, an equality test is performed, and a unique message is selected for storage based on each test result.
[0011] In an optional implementation, before the step of decrypting the stored and distributed messages based on the vehicle pseudonym information, the vehicle private key, and the global public parameters to obtain the shared data, the method further includes: Based on the set of identities to be revoked synchronized from a trusted institution and the encryption parameters of the ciphertext in the stored global public parameters, a message to be shared after removing users to be revoked is obtained.
[0012] In an optional implementation, the steps of obtaining global public parameters, vehicle pseudonym information, and vehicle private key include: Based on the security parameters and the maximum number of data receivers corresponding to the current vehicle-to-everything (V2X) data sharing scenario, global common parameters are derived and determined; wherein, the global common parameters include bilinear pairs, group generators, preset parameters, and hash functions; Based on the vehicle's unique identity information generated from the global public parameters, the vehicle's pseudonym information and vehicle private key are determined.
[0013] Secondly, the present invention provides a data sharing system based on an equality test, comprising: The module retrieves global public parameters, vehicle pseudonym information, and vehicle private key. The generation module, based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, integrates and generates a trapdoor for authorized cloud server equality testing and a message for encrypting shared data. The testing module divides the packets into groups based on the set of pseudonyms of the receiving groups corresponding to the packets, and then performs an equality test on the packets belonging to the same group, and stores the duplicate packets after removing them. The sharing module, based on the vehicle pseudonym information, the vehicle private key, and the global public parameters, decrypts the sent message to be shared to obtain the shared data.
[0014] Thirdly, the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as described in any of the foregoing embodiments.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements the method described in any of the foregoing embodiments.
[0016] This invention provides a data sharing method and system based on equality testing. First, a basic security system is built based on globally public parameters distributed by a trusted institution, vehicle pseudonym information, and private keys. Then, by integrating these, a message containing a trapdoor and encrypted data is generated. The trapdoor enables precise authorization for equality testing on the cloud server, while encryption protects data privacy. Subsequently, messages are grouped according to the pseudonym set of the receiving group, and equality testing is performed only on messages within the same group to eliminate duplicate data. Finally, decryption is completed based on the pseudonym information, private key, and globally public parameters. Technically, the combination of trapdoors and equality testing alleviates the problem of secure retrieval of data encrypted with different public keys, avoids data redundancy, and improves data processing and distribution efficiency in scenarios with multiple senders and receivers. The application of vehicle pseudonym information ensures identity privacy, while the collaboration of globally public parameters and private keys strengthens the data security defense. Overall, this achieves a unified approach to security, efficiency, and privacy protection in vehicle-to-everything (V2X) data sharing.
[0017] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the application architecture of a data sharing method based on equality testing provided in an embodiment of the present invention; Figure 2 A flowchart of a data sharing method based on equality testing provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the system initialization and key distribution phases in a data sharing method based on equality testing provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the data authorization sharing and equality testing phases in a data sharing method based on equality testing provided in an embodiment of the present invention; Figure 5This is a schematic diagram of the data revocation and decryption stage in a data sharing method based on equality testing provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the functional modules of a data sharing device based on an equality test provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Current vehicle-to-everything (V2X) data sharing solutions are primarily based on communication modes with a single sender and a single receiver, or a single sender and multiple receivers. However, in real-world scenarios, vehicles and RSUs on the road often need to simultaneously send large amounts of data to cloud servers and efficiently distribute this data to multiple receivers. This multi-sender, multi-receiver communication mode has not yet been adequately addressed, leading to data redundancy and low transmission efficiency.
[0023] In terms of data security, existing technologies primarily protect sensitive information (such as vehicle identity, location, and driving records) through encryption. Public Key Key Search Encryption (PKKS) is a common scheme that allows searching for specific keywords within ciphertext. However, PKKS only supports searching ciphertext encrypted with the same keyword, and since vehicle network data is typically uploaded by different users using different public keys, its applicability is limited. To address this issue, Public Key Encryption with an equality test (PKEET) has been proposed, making searching within data encrypted with different public keys possible, but its computational overhead and security still require further optimization.
[0024] Furthermore, there is a risk of malicious nodes forging data or launching attacks in connected vehicle systems. Existing malicious node revocation schemes mainly rely on blockchain technology, using a distributed ledger to record node behavior to achieve reliable revocation. However, the introduction of blockchain brings increased computational load and system overhead, affecting overall communication efficiency.
[0025] Based on this, the present invention provides a data sharing method and system based on equality testing, which can efficiently adapt to the multi-sender and multi-receiver scenario of vehicle networking by integrating equality testing, trapdoor authorization and lightweight polynomial revocation mechanism, realize secure retrieval of encrypted data, duplicate data removal and rapid isolation of malicious nodes, and take into account the security, efficiency and privacy protection of data sharing.
[0026] To facilitate understanding of this embodiment, a data sharing method based on equality testing disclosed in this invention will first be described in detail. The application architecture of this method is as follows: Figure 1 As shown; Trusted Authority: A trusted authority is a third-party entity trusted by all participants in the system. Its primary responsibility is to help manage and maintain the security and integrity of the system. In this system, the trusted authority is mainly responsible for system initialization, setting security parameters, vehicle registration with the trusted authority to obtain Vehicle Information ID (VID), distributing keys to each vehicle, and generating pseudonymous PVIDs.
[0027] The cloud server, acting as a semi-trusted entity, is primarily responsible for storing the encrypted data uploaded by vehicles; determining whether to perform an equality test based on the received set of encrypted data; performing the equality test; and performing corresponding revocation operations based on the set of illegal users synchronized by the trusted entity.
[0028] Data sending group: mainly acts as the sender of data sharing, and is mainly responsible for encrypting the data packets to be shared, selecting the identity set of the data receiving group, and uploading them to the cloud server for storage.
[0029] Data Recipient Group: This group is primarily determined jointly by the data sender and the cloud server. The data sender selects the initial set of identities for the data recipient group, and the cloud server, based on unauthorized users synchronized from trusted institutions, removes some users from the initial data recipient group, thereby determining the final data recipient group.
[0030] Among them, the equality test is an important tool in cryptography, used to verify the equality of data items while maintaining data privacy, providing strong support for privacy protection and secure computation. When outsourcing data to cloud servers to obtain powerful storage and computing capabilities, in order to further prevent information leakage from cloud servers that are not fully trusted, the data uploader will encrypt the data before outsourcing it to the cloud. This phenomenon presents a challenge to cloud servers: how to perform computation and retrieval on encrypted outsourced data without decryption. Scientists have conducted extensive research on this, such as searchable encryption that supports searching encrypted data, fully homomorphic encryption that supports addition and multiplication of encrypted data, and public-key encryption with equality testing that supports equality testing of encrypted data. These methods each have their own advantages and disadvantages; for example, the first two methods focus more on cloud computing, while the last method focuses on "testing". For example, in the application scenario of this invention, we need to test the reported traffic information ciphertext with the traffic information stored in the cloud server to query whether there is an equal traffic information ciphertext, so as to better share traffic information. Searchable encryption can also achieve this function, but its drawbacks include cumbersome calculations and the need for key management; if the key is leaked, data security will be compromised. On the other hand, traffic information reporting messages in this scenario are highly standardized and concise, making them more suitable for equality testing.
[0031] Trapdoor: In equality testing, a trapdoor is an important technique that simplifies the equality verification process by providing specific secret information while ensuring data privacy. Using a trapdoor can make calculations to verify the equality of two data points simpler in certain situations. For example, with a specific secret key, it's possible to quickly verify the equality of two encrypted data points without direct decryption. Without a trapdoor, verifying the equality of two data points under the same conditions would be extremely difficult. Therefore, using trapdoors can also be seen as a form of authorization for organizations conducting equality tests. That is, only those possessing both the ciphertext and the corresponding trapdoor can perform an equality test.
[0032] Bilinear maps: In cryptography, bilinear maps are a crucial mathematical tool due to their unique properties. Their core lies in constructing mappings from elements of two groups to a third group, satisfying bilinearity, non-degeneracy, and computability. Specifically, for finite abelian groups... , mapping Must meet: Bilinear: for any and integers ,have That is, the mapping remains linear with respect to both inputs; Non-degeneracy: exists Make ( (unit element), ensuring that the mapping is non-trivial; Computability: There exists an efficient algorithm to compute the mapping value of any pair of elements in a group.
[0033] Compared to traditional linear systems, bilinear pairings achieve efficient protocol construction through the flexible transformation of coefficients in group elements.
[0034] Figure 2 This is a flowchart of a data sharing method based on equality testing provided in an embodiment of the present invention.
[0035] Reference Figure 2 The data sharing method includes the following steps: S102, obtain global public parameters, vehicle pseudonym information and vehicle private key.
[0036] In some embodiments, the acquisition of the above-mentioned key parameters can be achieved through the following system initialization phase and key distribution phase, specifically including: First, based on the security parameters and the maximum number of data receivers corresponding to the current vehicle-to-everything (V2X) data sharing scenario, global common parameters are derived and determined. These global common parameters include bilinear pairs, group generators, preset parameters, and hash functions.
[0037] like Figure 3 As shown, the trusted organization determines the security parameters based on the input. And the maximum number of receivers N in this encryption process, outputting global common parameters. First, based on the input security parameters... Selecting appropriate bilinear pairs ,in, And there are for Factorial Cyclic Group Two random generators are selected. A one-way, collision-free hash function is chosen. And generate true random numbers through a quantum random number generator. Calculate the following parameters: . Therefore, the master public key ; Master private key .
[0038] Finally, output the global common parameters. .
[0039] It should be noted that the global public parameter par is a set of basic configurations that are publicly disclosed. The parameters of the master public key mpk are calculated in the same step as the configuration of par. par encapsulates mpk and related public configurations to achieve generation timing synchronization.
[0040] Secondly, based on the unique vehicle identity information generated from global public parameters, the vehicle pseudonym information and vehicle private key are determined.
[0041] Based on the foregoing embodiments, refer to Figure 3 The vehicle registers with a trusted authority, obtaining a unique identity information VID = VIDGen(par). The vehicle periodically sends its VID information to the trusted authority to update its pseudonym information. The trusted authority then uses security parameters... Generating true random numbers using a quantum random number generator Using symmetric encryption algorithms Generate pseudonym information PVID for the vehicle. A trusted authority distributes keys to vehicles. The trusted authority calculates the following formula:
[0042] Thus, the vehicle obtains the private key. .
[0043] Here, the master private key is a secret parameter unique to the trusted institution and is not disclosed to the public. Its existence is the foundation of the entire security closed loop of the scheme. For example, the calculation of the vehicle private key depends on h and a in the master private key—h is the group generator and a is the core secret random number. The two are combined with the hash function H and the vehicle pseudonym PVID to generate a unique and secure vehicle private key, ensuring that only legitimate vehicles registered by the trusted institution can obtain decryption and encryption permissions. In this embodiment of the invention, the security parameter λ is used to derive basic parameters such as bilinear pairing, generator, and random number a, and simultaneously generate publicly available global public parameters par (including the master public key mpk) and master private key msk, which is only known to trusted institutions: the global public parameter par (including mpk) provides the foundation for public computing throughout the entire process, ensuring operational compatibility among the sender, receiver, and cloud server; the master private key msk provides the foundation for secret authorization, ensuring the uniqueness and security of private key distribution and encrypted authorization.
[0044] S104, based on shared data messages, vehicle pseudonym information, global public parameters and vehicle private keys, integrates and generates a trapdoor for authorized cloud server equality testing and a message for encrypting shared data.
[0045] In practical applications, step S104 can be implemented through a data encryption phase and an authorized sharing phase, including: Step 1.1: Based on the shared data message, vehicle pseudonym information, global public parameters, and vehicle private key, generate ciphertext for encrypting the shared data.
[0046] For example, firstly, when data needs to be shared, the set of pseudonyms for the data receiving group corresponding to the shared data message and vehicle pseudonym information is determined; here, when vehicle i equipped with a quantum random number generator needs to share data message M, a digest of the shared message is generated. Furthermore, a data receiving group was selected for this data transmission, and a set of pseudonyms for the data receiving group was obtained. .
[0047] Secondly, based on the first true random number generated by the vehicle-mounted quantum random number generator, the shared data message, the pseudonym set of the data receiving group, the global public parameters, and the vehicle private key, the ciphertext including each encryption parameter of the shared data is calculated.
[0048] Here, the first truly random number is obtained based on the onboard random number generator. And calculate the following formula:
[0049] Finally, the ciphertext was obtained. =( ).
[0050] in, It is generated by combining the group generator g, and is used for subsequent equality tests; Combine bilinear pair e and private key Generate data to verify its validity; It is used to implement the encrypted storage of message M, which is calculated using the preset parameter D in mpk; To support subsequent reversal functionality, it combines 'a' from the master private key and the vehicle pseudonym PVID. i Receiver pseudonym PVID j Calculated; Based on The auxiliary parameters derived from the pseudonyms of the receiving group are used to accommodate k revocation slots; that is, the ciphertext contains message digest binding parameters. Data validity verification parameters Core data encryption parameters Undo function adaptation parameters and cancel auxiliary parameters Multi-component encrypted text.
[0051] Step 1.2: Based on global public parameters, vehicle pseudonym information, and ciphertext, integrate and generate a message that includes a trapdoor for the authorization cloud server equality test.
[0052] For example, firstly, a trapdoor is generated based on the vehicle pseudonym information and the second true random number corresponding to the master private key in the global public parameters; the trapdoor is an authorization credential used for cloud server equality testing. like Figure 4 As shown, when vehicle i wants to share data, it needs to authorize the cloud server so that the cloud server can perform an equality test and choose whether to share the data. Authorization is achieved through a trapdoor, which is calculated as follows: , where PVID is the pseudonym information of vehicle i.
[0053] Secondly, based on the trapdoor, the set of pseudonyms of the receiving group corresponding to the vehicle pseudonym information and the ciphertext are integrated into a message and uploaded to the cloud server.
[0054] Finally, vehicle i sends the trapdoor, the received identity set, and the ciphertext to the cloud server, message AT={ }
[0055] Among them, the vehicle private key Implicit true random number a and PVID i The connection ensures the trapdoor Uniqueness and validity of authorization; trapdoor It is an authorization credential for cloud servers to perform equality tests, and only those holding this credential are authorized. Only then can the ciphertext be legally verified to be duplicated.
[0056] S106. Based on the set of pseudonyms of the receiving group corresponding to the message, the message is divided into groups. Then, the messages belonging to the same group are tested for equality. Duplicate messages are removed and stored.
[0057] Here, step S106, without decryption, quickly filters out duplicate encrypted data uploaded by multiple senders, avoiding redundancy in cloud server storage while ensuring data privacy. The equality test stage includes: Step 2.1: Based on the receiving group pseudonym set corresponding to each message, messages with the same receiving group pseudonym set are grouped into one group.
[0058] Here, we first determine whether the receiving groups are consistent. Only when the receiver pseudonym sets (S) of multiple messages are the same is it necessary to verify whether the data is duplicated. For example, we iterate through all received messages and group messages with the same receiver group pseudonym set S into one group (e.g., AT1 and AT3 have S={PVID1,PVID2}, grouped into Group1; AT2 and AT4 have S={PVID3,PVID4}, grouped into Group2). Messages in different groups (with different S) do not interfere with each other and do not require equality testing. All groups are directly retained (because the distribution targets are different, even if the data content is the same, they need to be stored and distributed separately).
[0059] Step 2.2: If there is only one message in the group, then store the message.
[0060] At this point, there is no need for an equality test; the message can be directly determined to be unique and can be stored.
[0061] Step 2.3: If there are multiple messages in a group, extract the ciphertext from each message according to the trapdoor, perform an equality test, and select a unique message for each test result to store.
[0062] An equality test is performed by bilinear pairing calculation. For messages from the same receiving group, the original data is verified based on the digest parameter bound to the ciphertext. If they are the same, they are discarded; otherwise, they are stored.
[0063] For each group (e.g., Group1 contains messages AT1, AT3, and AT5), verify each pair using the baseline comparison method: First, select the first message in the group as the baseline message (e.g., AT1), and extract its ciphertext CT1 and trapdoor td1; then, pair the baseline message with all other messages (AT3, AT5) in the group one by one to obtain pair 1: AT1 (CT1, td1) and AT3 (CT3, td3). At this point, judge the test output results of AT1 and AT3. If the test output result is 1 (same), then AT3 needs to be discarded; if the test output result is 0 (different), then both AT1 and AT3 are retained. Similarly, for pair 2: AT1 (CT1, td1) and AT5 (CT5, td5), also judge the test output results to determine if messages AT1 and AT5 are the same. If they are the same, discard them; if they are different, retain them. In practical applications, if there are many messages in a group (e.g., 10), the retained messages can be used as the new baseline to continue comparing the remaining messages until all messages in the group have been compared and there is no duplicate data to delete. At this point, each group will only retain messages with distinct content, and all duplicate messages will be discarded. For example, consider the following messages: AT1 (S1={PVID1}), AT2 (S1={PVID1}), AT3 (S1={PVID1}), and AT4 (S2={PVID2}). Group them as follows: Group1 (AT1, AT2, AT3) and Group2 (AT4). Perform an equality test: within Group1, AT1 vs AT2 (different, both are retained), and AT1 vs AT3 (same, AT3 is discarded). Group2 has no other messages, so it is directly retained. Ultimately, AT1, AT2, and AT4 are retained.
[0064] For example, such as Figure 4 As shown, when the cloud server receives messages from multiple vehicles, it first needs to verify whether the receiver identity sets in the messages are the same. If the receiver identity sets are the same, it needs to verify whether the messages are the same; that is, if the messages are the same, an equality test is performed. If the receiver identity sets are different, an equality test is not required. When an equality test is required for two messages, the messages are abbreviated as:
[0065] calculate ; if If the condition is met, output 1; otherwise, output 0.
[0066] In this context, 1 indicates that the two messages are identical, and the new message can be discarded; 0 indicates that the two messages are different, and both messages are stored on the cloud server. It should be noted that... It is based on the bilinear pair mapping value between the group generator g and the message digest Mw1, that is, the result obtained by performing a mapping operation on the group generator g and the message digest Mw1 through the bilinear pair mapping function e. It is based on the bilinear pair mapping value between the group generator g and the message digest Mw2, that is, the result of the operation of the bilinear pair mapping function e on the group generator g and the message digest Mw2.
[0067] The method further includes the following steps prior to step S108: Step 3.1: Based on the set of identities to be revoked synchronized from the trusted institution and the global public parameters, adjust the encryption parameters of the ciphertext in the stored message to obtain the message to be shared after removing the users to be revoked.
[0068] like Figure 5As shown, after performing an equality test, the cloud server confirms that the message needs to be shared with the recipient group S. However, within this group, due to various reasons, such as some recipients being unauthorized users or some users refusing to receive relevant information, and the trusted authority also synchronizing relevant unauthorized user information to the cloud server, the cloud server needs to revoke the information of these users, preventing them from obtaining or receiving the correct information. The set of identities of these users whose identities need to be revoked is denoted as... .
[0069] Calculate the following polynomial:
[0070]
[0071] Calculate the ciphertext after revocation:
[0072] Calculate the following formula:
[0073] Thus obtain Ultimately, a message is received after certain recipients have been withdrawn. ,in, .
[0074] Where k is the maximum number of undo operations set), this polynomial is used to process Co, C1~C in the encrypted CT. k+1 Adjustments are made to remove access permissions for users whose permissions are to be revoked; essentially, numerical operations are performed within the finite multiplicative cyclic group G defined by the global public parameter par; here, BG=(p,e,G,GT) in par explicitly states that the order of the group G is a large prime number p, and the coefficients f of the polynomials are... l ,f l-1 All values of f0, ..., f0 must be taken within the finite field Z_p of group G (i.e., the coefficient range is [1, p-1]) to ensure the validity and security of the calculation results.
[0075] S108, based on vehicle pseudonym information, vehicle private key and global public parameters, decrypts the sent message to be shared to obtain the shared data.
[0076] Based on the foregoing embodiments, refer to Figure 5 This allows you to retrieve the decrypted shared data. The cloud server distributes the data to the corresponding data receivers based on the receiver identity set in the shared message.
[0077] After receiving the shared message, data receiver j decrypts it and first calculates the polynomial:
[0078] Calculate the following formula:
[0079] The shared data M can then be obtained.
[0080] It should be noted that after vehicle j receives AT', it calculates polynomial G(x) based on its own pseudonym PVIDj and global public parameter par (corresponding to polynomial f(x) in the aforementioned embodiment, suitable for matching the identity of the receiver); then, it combines its own private key skj and polynomial G(x) to decrypt Cm in the ciphertext CT', and finally obtains the shared data M.
[0081] In a preferred embodiment for practical application, on the one hand, the equality test algorithm is used to achieve secure retrieval of encrypted data, while better handling the data processing and distribution problem of multiple senders; on the other hand, a revocable identity-based broadcast encryption algorithm is used to achieve efficient data sharing and the revocation of malicious nodes, which greatly improves the efficiency and security of data sharing.
[0082] In some embodiments, such as Figure 6 As shown, embodiments of the present invention also provide a data sharing system based on an equality test, comprising: The module retrieves global public parameters, vehicle pseudonym information, and vehicle private key. The generation module, based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, integrates and generates a trapdoor for authorized cloud server equality testing and a message for encrypting shared data. The testing module divides the packets into groups based on the set of pseudonyms of the receiving groups corresponding to the packets, and then performs an equality test on the packets belonging to the same group, and stores the duplicate packets after removing them. The sharing module, based on the vehicle pseudonym information, the vehicle private key, and the global public parameters, decrypts the sent message to be shared to obtain the shared data.
[0083] In practical applications, by acquiring global public parameters, vehicle pseudonym information, and vehicle private keys; based on shared data messages, the aforementioned parameters, and private keys, a message containing a trapdoor for authorized cloud servers to perform equality tests and encrypted shared data is generated; the message is divided into groups according to the pseudonym set of the receiving group corresponding to the message, and equality tests are performed on messages in the same group, and duplicate messages are removed before storage; the receiver decrypts the message to be shared based on its own pseudonym information, private key, and global public parameters to obtain the shared data; it is adaptable to scenarios with multiple senders and multiple receivers, realizes secure retrieval of encrypted data and deduplication of duplicate data, and takes into account the security, efficiency, and privacy protection of data sharing, making it suitable for the real-time data sharing needs of vehicle networking.
[0084] The present invention provides an embodiment for implementing an electronic device. In this embodiment, the electronic device may be, but is not limited to, a personal computer (PC), a laptop computer, a monitoring device, a server, or other computer device with analysis and processing capabilities.
[0085] As an exemplary embodiment, see [link to example]. Figure 7 The electronic device 110 includes a communication interface 111, a processor 112, a memory 113, and a bus 114. The processor 112, the communication interface 111, and the memory 113 are connected via the bus 114. The memory 113 is used to store a computer program that supports the processor 112 in executing the above-described method. The processor 112 is configured to execute the program stored in the memory 113.
[0086] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0087] Non-volatile media can be non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar non-volatile storage media, or combinations thereof.
[0088] It is understood that the specific operation methods of each functional module in this embodiment can be referred to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.
[0089] The computer-readable storage medium provided in the embodiments of the present invention stores a computer program. When the computer program code is executed, it can implement the method described in any of the above embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0091] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0092] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0093] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention.
Claims
1. A data sharing method based on equality testing, characterized in that, include: Retrieve global public parameters, vehicle pseudonym information, and vehicle private key; Based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, a trapdoor for authorized cloud server equality testing and a message for encrypting shared data are integrated to generate a message. Based on the set of pseudonyms of the receiving group corresponding to the message, the messages are divided into groups, and then the messages belonging to the same group are tested for equality. Duplicate messages are removed and then stored. Based on the vehicle pseudonym information, the vehicle private key, and the global public parameters, the sent message to be shared is decrypted to obtain the shared data.
2. The method according to claim 1, characterized in that, Based on the shared data message, the vehicle pseudonym information, the global public parameters, and the vehicle private key, the steps of integrating and generating a trapdoor for authorizing cloud server equality testing and a message for encrypting shared data include: Based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, ciphertext for encrypting the shared data is generated. Based on the global public parameters, the vehicle pseudonym information, and the ciphertext, a message including a trapdoor for authorizing cloud server equality testing is generated.
3. The method according to claim 2, characterized in that, The steps for generating ciphertext for encrypting shared data based on shared data packets, the vehicle pseudonym information, the global public parameters, and the vehicle private key include: When data needs to be shared, determine the set of pseudonyms for the data receiving group corresponding to the shared data message and the vehicle pseudonym information; Based on the first true random number generated by the vehicle-mounted quantum random number generator, the shared data message, the pseudonym set of the data receiving group, the global public parameters, and the vehicle private key, the ciphertext including each encryption parameter of the shared data is calculated.
4. The method according to claim 2, characterized in that, The steps of integrating the global public parameters, the vehicle pseudonym information, and the ciphertext to generate a message including a trapdoor for authorizing cloud server equality testing include: Based on the vehicle pseudonym information and the second true random number corresponding to the master private key in the global public parameters, a trapdoor is generated; the trapdoor is an authorization credential used for cloud server equality testing. According to the trapdoor, the set of receiving group pseudonyms corresponding to the vehicle pseudonym information and the ciphertext are integrated into a message and uploaded to the cloud server.
5. The method according to claim 1, characterized in that, The steps include: dividing the packets into groups based on the set of pseudonyms corresponding to the receiving groups; performing an equality test on packets belonging to the same group; removing duplicate packets; and storing and distributing the packets. Based on the set of receiving group pseudonyms corresponding to each message, messages with the same set of receiving group pseudonyms are grouped into one group. If there is only one such message in the group, then the message is stored. If there are multiple messages in the group, the ciphertext in each message is extracted according to the trapdoor, an equality test is performed, and a unique message is selected for storage based on each test result.
6. The method according to claim 1, characterized in that, Before the step of decrypting the stored and sent messages based on the vehicle pseudonym information, the vehicle private key, and the global public parameters to obtain the shared data, the method further includes: Based on the set of identities to be revoked synchronized from a trusted institution and the encryption parameters of the ciphertext in the stored global public parameters, a message to be shared after removing users to be revoked is obtained.
7. The method according to claim 1, characterized in that, The steps to obtain globally public parameters, vehicle pseudonym information, and vehicle private key include: Based on the security parameters and the maximum number of data receivers corresponding to the current vehicle-to-everything (V2X) data sharing scenario, global common parameters are derived and determined; wherein, the global common parameters include bilinear pairs, group generators, preset parameters, and hash functions; Based on the vehicle's unique identity information generated from the global public parameters, the vehicle's pseudonym information and vehicle private key are determined.
8. A data sharing system based on equality testing, characterized in that, include: The module retrieves global public parameters, vehicle pseudonym information, and vehicle private key. The generation module, based on the shared data message, the vehicle pseudonym information, the global public parameters and the vehicle private key, integrates and generates a trapdoor for authorized cloud server equality testing and a message for encrypting shared data. The testing module divides the packets into groups based on the set of pseudonyms of the receiving groups corresponding to the packets, and then performs an equality test on the packets belonging to the same group, and stores the duplicate packets after removing them. The sharing module, based on the vehicle pseudonym information, the vehicle private key, and the global public parameters, decrypts the sent message to be shared to obtain the shared data.
9. An electronic device, characterized in that, It includes a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed, implements the method described in any one of claims 1-7.