A privacy intersection method based on SM9 and zero-knowledge proof
By employing a privacy-preserving intersection method based on SM9 and zero-knowledge proofs, the authenticity of participant information can be verified without revealing data details. This solves the problems of high computational complexity and expensive communication costs in existing technologies, and improves data transmission efficiency.
Patent Information
- Application Number
- CN202411444731.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Existing privacy intersection methods are computationally complex, have high communication costs, and cannot verify whether the participants are deceiving each other.
A privacy-preserving intersection method based on SM9 and zero-knowledge proof is adopted. The authenticity of the privacy-preserving intersection information is verified through the encryption and decryption process between the client and the intersection object and the zero-knowledge proof technology. The intersection is calculated using a hash table intersection algorithm.
It effectively reduces the computational complexity and communication cost of privacy intersection, can identify whether participants submit false information, and improves data transmission efficiency.
Smart Images

Figure CN119109599B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of data transmission, in particular to a privacy intersection method based on SM9 and zero-knowledge proof. BACKGROUND
[0002] As an advanced cryptographic technology, the core value of privacy intersection (PPSI) lies in guaranteeing privacy and security in the process of data sharing. It enables different participants to discover and utilize the common part in each other's data without revealing the details of their own data.
[0003] The current processing method of privacy intersection includes the methods of oblivious transfer (OT), homomorphic encryption and multi-party secure computation, which generally face the challenges of high computational complexity and expensive communication cost. The hash-based method, such as the exponential differential privacy hash (EDCH) technology, has a simple principle, but its time complexity and resource consumption increase significantly in the case of multiple participants. At the same time, the existing privacy intersection method cannot verify the integrity of the set provided by the participants and cannot confirm whether there is fraud problem.
[0004] Therefore, in order to solve the technical problems of high computational complexity and expensive communication cost of the existing privacy intersection method and the problem of being unable to confirm whether there is fraud problem, an urgent need exists for a privacy intersection method based on SM9 and zero-knowledge proof. SUMMARY
[0005] The purpose of the present application is to provide a privacy intersection method based on SM9 and zero-knowledge proof, which decrypts the encrypted second privacy intersection information by using the private key corresponding to the first identity number of the client and the encrypted second encryption and decryption key of the intersection object, obtains the second privacy intersection information, verifies the second privacy intersection information by using the zero-knowledge proof technology, obtains the correct second privacy intersection information, and then calculates the intersection of the first privacy intersection information of the client and the correct second privacy intersection information by using the hash table intersection algorithm, thereby solving the problems of high computational complexity and expensive communication cost of the existing privacy intersection method and the problem of being unable to confirm whether there is fraud problem, effectively reducing the computational complexity and communication cost during privacy intersection, and at the same time, identifying whether the participant (intersection object) submits false privacy intersection information, thereby improving the data transmission efficiency of privacy intersection.
[0006] In a first aspect, the present application provides a privacy intersection method based on SM9 and zero-knowledge proof, applied to a client, comprising:
[0007] Based on the privacy intersection request between the client and the intersection object, the first identity number of the client is sent to the key management system;
[0008] After receiving the private key corresponding to the first identity number and the preset SM9 key management parameter sent by the key management system, a first encryption and decryption key and a first public key are generated based on the preset SM9 key management parameter and the second identity number of the intersection object, the preset first private intersection information is encrypted using the first encryption and decryption key, and the first encryption and decryption key is encrypted using the first public key, to obtain encrypted first private intersection information and encrypted first encryption and decryption key;
[0009] The encrypted first private intersection information and the encrypted first encryption and decryption key are sent to the intersection object.
[0010] After receiving the encrypted second private intersection information and the encrypted second encryption and decryption key of the intersection object sent by the intersection object, the encrypted second private intersection information of the intersection object is decrypted using the private key and the encrypted second encryption and decryption key of the intersection object, to obtain the second private intersection information of the intersection object.
[0011] The second private intersection information of the intersection object is verified through zero-knowledge proof technology, to obtain correct second private intersection information.
[0012] The preset first private intersection information and the correct second private intersection information are compared using a hash table intersection algorithm, to obtain the intersection of the preset first private intersection information and the correct second private intersection information.
[0013] The private intersection method provided in the application can realize private intersection between participants. The encrypted second private intersection information is decrypted using the private key corresponding to the first identity number of the client and the encrypted second encryption and decryption key of the intersection object, to obtain the second private intersection information. After the second private intersection information is verified through zero-knowledge proof technology, to obtain correct second private intersection information, the intersection of the first private intersection information of the client and the correct second private intersection information is calculated using a hash table intersection algorithm, which solves the problems of high computational complexity and high communication cost of existing private intersection methods and the problem of being unable to confirm whether the participants are fraudulent. The method effectively reduces the computational complexity and communication cost during private intersection, and can identify whether the participants (intersection objects) submit false private intersection information, thereby improving the data transmission efficiency of private intersection.
[0014] Optionally, the preset SM9 key management parameter includes a master public key, an elliptic curve parameter, a pairing function, a hash function, and system security parameters.
[0015] Optionally, a first encryption and decryption key and a first public key are generated based on the preset SM9 key management parameter and the second identity number of the intersection object, the first preset private intersection information is encrypted using the first encryption and decryption key, and the first encryption and decryption key is encrypted using the first public key, to obtain encrypted first private intersection information and encrypted first encryption and decryption key, including:
[0016] The first encryption and decryption key is generated based on the preset SM9 key management parameter and in combination with an SM4 algorithm;
[0017] The first public key is generated according to the preset SM9 key management parameter and the second identity number of the intersection object;
[0018] The first preset private intersection information is encrypted using the first encryption and decryption key, to obtain encrypted first private intersection information;
[0019] The first encryption and decryption key is encrypted using the first public key, to obtain encrypted first encryption and decryption key.
[0020] The private intersection method provided in the application can realize private intersection between participants, the first encryption and decryption key is generated based on the preset SM9 key management parameter and SM4 algorithm, the first preset private intersection information is encrypted, the first public key is generated based on the preset SM9 key management parameter and the second identity number of the intersection object, the first encryption and decryption key is encrypted, and the private intersection information is more secure through double encryption.
[0021] Optionally, the first preset private intersection information is encrypted using the first encryption and decryption key, to obtain encrypted first private intersection information, including:
[0022] The digest value of each data in the first preset private intersection information is calculated using a preset digest algorithm, to obtain the digest data corresponding to the first preset private intersection information;
[0023] The digest data is encrypted using the first encryption and decryption key, to obtain encrypted first private intersection information.
[0024] Optionally, the encrypted second private intersection information of the intersection object is decrypted using the private key and the encrypted second encryption and decryption key of the intersection object, to obtain the second private intersection information of the intersection object, including:
[0025] The encrypted second encryption and decryption key of the intersection object is decrypted according to the private key, to obtain the second encryption and decryption key of the intersection object;
[0026] decrypt the encrypted second privacy intersection information of the intersection object based on the second encryption and decryption key of the intersection object to obtain the second privacy intersection information of the intersection object.
[0027] The privacy intersection method provided in the application can realize privacy intersection between participants, the encrypted second encryption and decryption key of the intersection object is decrypted by a private key to obtain the second encryption and decryption key of the intersection object, and then the encrypted second privacy intersection information of the intersection object is decrypted by the second encryption and decryption key of the intersection object to obtain the second privacy intersection information of the intersection object, and the second encryption and decryption key of the intersection object is decrypted by the private key corresponding to the identity number of the client, so that the privacy intersection information is more secure.
[0028] Optionally, the second privacy intersection information of the intersection object is verified by zero-knowledge proof technology to obtain correct second privacy intersection information, including:
[0029] A second random number challenge value is generated and sent to the intersection object.
[0030] The second public parameter, the second characteristic polynomial and the second random polynomial generated by the second random number challenge value and the second privacy intersection information sent by the intersection object are received.
[0031] The second privacy intersection information of the intersection object is verified by the zero-knowledge proof technology according to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial to obtain correct second privacy intersection information.
[0032] Optionally, the second public parameter includes a second prime number, a second multiplicative group constructed with the second prime number as the order, and two generators extracted from the second multiplicative group, and the second privacy intersection information of the intersection object is verified by the zero-knowledge proof technology according to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial to obtain correct second privacy intersection information, including:
[0033] The second random number challenge value is input into the second characteristic polynomial and the second random polynomial respectively to obtain a first calculation value and a second calculation value.
[0034] The first calculation value and the second calculation value are substituted into the two generators in the second multiplicative group respectively to obtain a first generator value and a second generator value.
[0035] Verify the second private intersection information of the intersection object based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number, to obtain the correct second private intersection information.
[0036] Optionally, verifying the second private intersection information of the intersection object based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number, to obtain the correct second private intersection information, comprises:
[0037] Calculate the remainder of the first generator value and the second generator value;
[0038] Determine whether the remainder is equal to the second prime number; if yes, determine that the second private intersection information of the intersection object is real data, and obtain the correct second private intersection information; if not, determine that the second private intersection information of the intersection object is false data, and re-perform the current private intersection.
[0039] In a second aspect, a private intersection method based on SM9 and zero-knowledge proof is applied to a key management system, comprising:
[0040] In response to a private intersection request initiated by a plurality of clients, obtain the identity identification numbers of a plurality of users corresponding to the clients;
[0041] Generate a private key corresponding to the identity identification number, and send the private key and a preset SM9 key management parameter to the corresponding client;
[0042] After obtaining the intersection of the first private intersection information and the correct second private intersection information of the plurality of clients, determine that the private intersection is completed.
[0043] The private intersection method sends the private key corresponding to the identity identification number of the client and the preset SM9 key management parameter to the corresponding client, so that the corresponding client completes the private intersection, solves the problems of high computational complexity and high communication cost of the existing private intersection method, and cannot confirm whether the participants exist fraud, effectively reduces the computational complexity and communication cost during the private intersection, and can identify whether the participants (intersection objects) submit false private intersection information, thereby improving the data transmission efficiency of the private intersection.
[0044] Beneficial effects: the privacy intersection method provided by the application, through the private key corresponding to the first identity number of the client and the encrypted second encryption and decryption key of the intersection object, decrypts the encrypted second privacy intersection information to obtain the second privacy intersection information, and verifies the second privacy intersection information through zero-knowledge proof technology, obtains the correct second privacy intersection information, and uses the hash table intersection algorithm to calculate the intersection of the first privacy intersection information of the client and the correct second privacy intersection information, solves the problems of high computational complexity and high communication cost of the existing privacy intersection method and the problem of being unable to confirm whether the participants exist fraud, effectively reduces the computational complexity and communication cost during privacy intersection, and can identify whether the participants (intersection object) submit false privacy intersection information, and improves the data transmission efficiency of privacy intersection. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 A flowchart of a privacy intersection method based on SM9 and zero-knowledge proof provided by the embodiment of the application.
[0046] Figure 2 A flowchart of another privacy intersection method based on SM9 and zero-knowledge proof provided by the embodiment of the application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. The components of the embodiments of the application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the application provided in the drawings is not intended to limit the scope of the claimed application, but only represents selected embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the application.
[0048] It should be noted that: similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the application, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0049] Please refer to Figure 1 , Figure 1 The privacy intersection method based on SM9 and zero-knowledge proof provided by the embodiment of the application is applied to a client, and includes:
[0050] Step S101, based on the privacy intersection request between the client and the intersection object, the first identity number of the client is sent to the key management system;
[0051] Step S102, after receiving the private key corresponding to the first identity number and the preset SM9 key management parameter sent by the key management system, the first encryption and decryption key and the first public key are generated based on the preset SM9 key management parameter and the second identity number of the intersection object, the first encryption and decryption key is used to encrypt the preset first privacy intersection information, and the first public key is used to encrypt the first encryption and decryption key, to obtain the encrypted first privacy intersection information and the encrypted first encryption and decryption key;
[0052] Step S103, the encrypted first privacy intersection information and the encrypted first encryption and decryption key are sent to the intersection object;
[0053] Step S104, after receiving the encrypted second privacy intersection information and the encrypted second encryption and decryption key of the intersection object sent by the intersection object, the encrypted second privacy intersection information of the intersection object is decrypted by using the private key and the encrypted second encryption and decryption key of the intersection object, to obtain the second privacy intersection information of the intersection object;
[0054] Step S105, the second privacy intersection information of the intersection object is verified by zero-knowledge proof technology, to obtain the correct second privacy intersection information;
[0055] Step S106, the preset first privacy intersection information and the correct second privacy intersection information are compared by using the hash table intersection algorithm, to obtain the intersection of the preset first privacy intersection information and the correct second privacy intersection information.
[0056] The privacy intersection method provided by the application, through the private key corresponding to the first identity number of the client and the encrypted second encryption and decryption key of the intersection object, the encrypted second privacy intersection information is decrypted to obtain the second privacy intersection information, and through the zero-knowledge proof technology, the second privacy intersection information is verified to obtain the correct second privacy intersection information, and then the hash table intersection algorithm is used to calculate the intersection of the first privacy intersection information of the client and the correct second privacy intersection information, which solves the problems of high computational complexity and high communication cost of the existing privacy intersection method and the problem of being unable to confirm whether the participants exist fraud, effectively reduces the computational complexity and communication cost during privacy intersection, and can identify whether the participants (intersection object) submit false privacy intersection information, thereby improving the data transmission efficiency of privacy intersection.
[0057] Specifically, in step S101, the other client is selected as the intersection object in advance, and after confirming the intersection object, the first identity number (Identity document, ID for short) of the client is sent to the key management system (SM9 key management system) based on the privacy intersection request between the client and the intersection object (including the privacy intersection request initiated by the client to the intersection object and the privacy intersection request initiated by the intersection object to the client, that is, the privacy intersection request here can be initiated by the client or the intersection object). The key management system will generate a corresponding private key according to the first identity number (the process of generating the private key is a prior art, which will not be described here), and send the private key and the preset SM9 key management parameter (specifically, the SM9 key management parameter) back to the corresponding client. The preset SM9 key management parameter includes the master public key, the elliptic curve parameter, the pairing function, the hash function and the system security parameter, and the master public key, the elliptic curve parameter, the pairing function, the hash function and the system security parameter are prior arts, which will not be described here.
[0058] At the same time when the client sends the first identity number of the client, the client of the intersection object also sends the second identity number of the client of the intersection object to the key management system based on the privacy intersection request (in order to distinguish the identity number of the client user and the identity number of the intersection object, the identity number of the client is recorded as the first identity number, and the identity number of the intersection object is recorded as the second identity number).
[0059] Specifically, in step S102, the first encryption and decryption key and the first public key are generated based on the preset SM9 key management parameter and the second identity number of the intersection object, the first privacy intersection information is encrypted using the first encryption and decryption key, and the first encryption and decryption key is encrypted using the first public key, to obtain the encrypted first privacy intersection information and the encrypted first encryption and decryption key, including:
[0060] The first encryption and decryption key is generated based on the preset SM9 key management parameter and combined with the SM4 algorithm;
[0061] The first public key is generated according to the preset SM9 key management parameter and the second identity number of the intersection object;
[0062] The first privacy intersection information is encrypted using the first encryption and decryption key to obtain the encrypted first privacy intersection information;
[0063] The first encryption and decryption key is encrypted using the first public key to obtain the encrypted first encryption and decryption key.
[0064] In step S102, after receiving the private key corresponding to the first identity number and the preset SM9 key management parameter sent by the key management system, the first encryption and decryption key is generated according to the preset SM9 key management parameter and the SM4 algorithm, the second identity number of the intersection object is obtained (after determining the intersection object, each client will send its own identity number to the corresponding intersection object), and the first public key is generated based on the second identity number and the preset SM9 key management parameter in combination with GM / T 0080-2020 “SM9 Cryptographic Algorithm Specification”. The first encryption and decryption key is used to encrypt the preset first private intersection information (i.e. the private intersection information provided by the client), to obtain the encrypted first private intersection information, and then the first public key is used to encrypt the first encryption and decryption key, to obtain the encrypted first encryption and decryption key (after the encrypted first encryption and decryption key and the encrypted first private intersection information are sent to the intersection object, the intersection object can use the private key generated based on the second identity number of the intersection object to decrypt the encrypted first encryption and decryption key, and then use the first encryption and decryption key to decrypt the encrypted first private intersection information). The process of generating the first encryption and decryption key and encrypting the first encryption and decryption key is a prior art, which will not be described in detail here.
[0065] Meanwhile, after receiving the private key corresponding to the second identity number and the preset SM9 key management parameter sent by the key management system, the intersection object generates the second encryption and decryption key according to the preset SM9 key management parameter and the SM4 algorithm, and generates the second public key based on the first identity number of the client and the preset SM9 key management parameter in combination with GM / T 0080-2020 “SM9 Cryptographic Algorithm Specification”. The second encryption and decryption key is used to encrypt the preset second private intersection information (i.e. the private intersection information provided by the intersection object), to obtain the encrypted second private intersection information, and then the second public key is used to encrypt the second encryption and decryption key, to obtain the encrypted second encryption and decryption key.
[0066] For example, user A generates the first encryption and decryption key k_a according to the preset SM9 key management parameter and the SM4 algorithm, and generates the first public key pk_b based on the second identity number of the intersection object and the preset SM9 key management parameter in combination with GM / T 0080-2020 “SM9 Cryptographic Algorithm Specification”. The first encryption and decryption key k_a is used to encrypt the preset first private intersection information X a , to obtain the encrypted first private intersection information X a , and then the first public key pk_b is used to encrypt the first encryption and decryption key k_a, to obtain the encrypted first encryption and decryption key k_a. Similarly, the intersection object user B of user A generates the encrypted second encryption and decryption key k_b and the encrypted second private intersection information X b .
[0067] Specifically, in step S102, the first preset privacy intersection information is encrypted using the first encryption and decryption key to obtain encrypted first privacy intersection information, including:
[0068] The digest value of each data in the first preset privacy intersection information is calculated by a preset digest algorithm to obtain the digest data corresponding to the first preset privacy intersection information;
[0069] The digest data is encrypted using the first encryption and decryption key to obtain the encrypted first privacy intersection information.
[0070] In step S102, the digest value of each data in the first preset privacy intersection information is calculated by a preset digest algorithm (such as MD5 algorithm, SHA-1 algorithm, and SHA-2 algorithm) to obtain the digest data corresponding to the first preset privacy intersection information, and the digest data is encrypted using the first encryption and decryption key to obtain the encrypted first privacy intersection information. The calculation process and encryption process of the digest data are prior art, which will not be described in detail here.
[0071] Specifically, in step S103, the encrypted first privacy intersection information and the encrypted first encryption and decryption key are sent to the intersection object, and at the same time, after the intersection object obtains the encrypted second privacy intersection information and the encrypted second encryption and decryption key, the encrypted second privacy intersection information and the encrypted second encryption and decryption key are also sent to the client. The purpose of this step is to share the privacy intersection information provided by the client and the intersection object respectively, so that the client and the intersection object obtain the intersection between the first privacy intersection information and the second privacy intersection information after respectively decrypting and verifying the correctness of the encrypted second privacy intersection information and the encrypted first privacy intersection information, thereby completing the privacy intersection.
[0072] After the intersection object receives the encrypted first privacy intersection information and the encrypted first encryption and decryption key, the encrypted first encryption and decryption key can be decrypted using the private key generated based on the second identity number of the intersection object, and the encrypted first privacy intersection information can be decrypted using the first encryption and decryption key to obtain the first privacy intersection information provided by the client.
[0073] Specifically, in step S104, the encrypted second privacy intersection information of the intersection object is decrypted using the private key and the encrypted second encryption and decryption key of the intersection object to obtain the second privacy intersection information of the intersection object, including:
[0074] The encrypted second encryption and decryption key of the intersection object is decrypted according to the private key to obtain the second encryption and decryption key of the intersection object;
[0075] Decrypt the encrypted second privacy intersection information of the intersection object based on the second encryption and decryption key of the intersection object, to obtain the second privacy intersection information of the intersection object.
[0076] In step S104, after receiving the encrypted second privacy intersection information and the encrypted second encryption and decryption key sent by the intersection object, the encrypted second encryption and decryption key of the intersection object is decrypted by using the private key generated based on the first identity number of the client, to obtain the second encryption and decryption key of the intersection object. The encrypted second privacy intersection information of the intersection object is decrypted by using the second encryption and decryption key, to obtain the second privacy intersection information of the intersection object. The decryption process of the second encryption and decryption key and the second privacy intersection information is a prior art, which is not described in detail here.
[0077] For example, after user A receives the encrypted second encryption and decryption key k_b and the encrypted second privacy intersection information X b sent by the intersection object user B, the private key sk_a generated based on the first identity number of the client can decrypt the encrypted second encryption and decryption key k_b to obtain the second encryption and decryption key k_b, and the encrypted second privacy intersection information X b is decrypted by using the second encryption and decryption key k_b, to obtain the second privacy intersection information X b of the intersection object user B. Similarly, the intersection object user B can also decrypt the encrypted first encryption and decryption key k_a by using the private key sk_b generated based on the second identity number of the object user B, and the encrypted first privacy intersection information X a is decrypted by using the first encryption and decryption key k_a, to obtain the first privacy intersection information X a of user A.
[0078] Specifically, in step S105, the second privacy intersection information of the intersection object is verified by using the zero-knowledge proof technology, to obtain the correct second privacy intersection information, including:
[0079] Generating a second random number challenge value and sending the second random number challenge value to the intersection object;
[0080] Receiving the second public parameter, the second characteristic polynomial and the second random polynomial generated based on the second random number challenge value and the second privacy intersection information sent by the intersection object;
[0081] According to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial, the second privacy intersection information of the intersection object is verified by using the zero-knowledge proof technology, to obtain the correct second privacy intersection information.
[0082] In step S105, the client selects a prime number p large enough, selects a multiplicative group G constructed with p as the order, selects two generators g and h from the multiplicative group G, the order of which in the multiplicative group G is p, and which should satisfy the discrete logarithm assumption.
[0083] To verify the integrity of the first private intersection information X a , a first characteristic polynomial P(x) is designed, the roots of the first characteristic polynomial P(x) are associated with the elements (i.e. data) in the first private intersection information X a (i.e. the elements in the first private intersection information X a can make the value of the first characteristic polynomial P(x) be 0).
[0084] A first random polynomial R(x) is constructed, the highest order of the first random polynomial R(x) corresponds to the number of elements of the first private intersection information.
[0085] To prevent the client from selecting an advantageous evaluation point, the intersection object is required to generate a first random number challenge value a, which is used to input the first characteristic polynomial P(x) and the first random polynomial R(x) respectively, so that the remainder of the r-th power of any generator (the output value of the first characteristic polynomial input by the first random number challenge value a) and the v-th power of the other generator (the output value of the first random polynomial input by the first random number challenge value a) is a first prime number, i.e. , v, The equation ( ) is determined by Pedersen commitment (Pedersen commitment is a cryptographic algorithm that allows a verifier to submit a value without exposing or being able to change the value). Similarly, the client generates a second random number challenge value b and sends it to the intersection object.
[0086] Similarly, before receiving the second random number challenge value b, the intersection object first generates a preliminary second public parameter, a preliminary second characteristic polynomial and a preliminary second random polynomial according to the above principle, and after receiving the second random number challenge value b, the intersection object adjusts the preliminary second public parameter, the preliminary second characteristic polynomial and the preliminary second random polynomial based on the second random number challenge value b and the second private intersection information according to the above principle to generate the second public parameter, the second characteristic polynomial and the second random polynomial.
[0087] Receive the first random number challenge value a sent by the intersection object, and set the corresponding first public parameter, first characteristic polynomial and first random polynomial based on a;
[0088] The first public parameter, the first characteristic polynomial and the first random polynomial are sent to the intersection object, and the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial of the intersection object sent by the intersection object are received.
[0089] Specifically, the second public parameter includes a second prime number, a second multiplicative group constructed with the second prime number as the order, and two generators randomly extracted from the second multiplicative group.
[0090] Specifically, in step S105, the second private intersection information of the intersection object is verified by a zero-knowledge proof technology according to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial, and correct second private intersection information is obtained, including:
[0091] The second random number challenge value is input into the second characteristic polynomial and the second random polynomial respectively to obtain a first calculation value and a second calculation value;
[0092] The first calculation value and the second calculation value are substituted into the two generators in the second multiplicative group respectively to obtain a first generator value and a second generator value;
[0093] Based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number, the second private intersection information of the intersection object is verified to obtain correct second private intersection information.
[0094] In step S105, the second random number challenge value is input into the second characteristic polynomial and the second random polynomial of the intersection object respectively to obtain a first calculation value and a second calculation value, the first calculation value and the second calculation value are substituted into the two generators in the second multiplicative group of the intersection object respectively to obtain a first generator value and a second generator value, and the size relationship between the remainder of the first generator value and the second generator value and the second prime number is compared to verify whether the second private intersection information of the intersection object is real.
[0095] Similarly, the intersection object also inputs the first random number challenge value into the first characteristic polynomial and the first random polynomial respectively to obtain two outputs, and substitutes the two outputs into the two generators in the first multiplicative group to obtain a third generator value and a fourth generator value, and compares the size relationship between the remainder of the third generator value and the fourth generator value and the first prime number to verify whether the first private intersection information provided by the client is real.
[0096] Specifically, in step S105, based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number, the second private intersection information of the intersection object is verified to obtain correct second private intersection information, including:
[0097] a remainder of the first generated element value and the second generated element value is calculated;
[0098] It is judged whether the remainder is equal to the second prime number. If yes, it is determined that the second privacy intersection information of the intersection object is real data, and correct second privacy intersection information is obtained. If no, it is determined that the second privacy intersection information of the intersection object is false data, and the privacy intersection is re-performed.
[0099] In step S105, a remainder of the first generated element value and the second generated element value is calculated by using a preset remainder function, or the first generated element value is directly divided by the second generated element value to calculate the remainder. It is judged whether the remainder is equal to the second prime number. If the remainder is equal to the second prime number, it is determined that the second privacy intersection information of the intersection object is real data, and correct second privacy intersection information is obtained. If the remainder is not equal to the second prime number, it is determined that the second privacy intersection information of the intersection object is false data, and the privacy intersection is re-performed (i.e., returning to step S101), or the privacy intersection request can be withdrawn.
[0100] Similarly, it is judged whether the remainder of the third generated element value and the fourth generated element value is equal to the first prime number according to the intersection object, so as to judge whether the first privacy intersection information provided by the client is real. If the remainder of the third generated element value and the fourth generated element value is equal to the first prime number, it is determined that the first privacy intersection information provided by the client is real data, and correct first privacy intersection information is obtained. If the remainder of the third generated element value and the fourth generated element value is not equal to the first prime number, it is determined that the first privacy intersection information provided by the client is false data, and the privacy intersection is re-performed, or the privacy intersection request can be withdrawn.
[0101] Specifically, in step S106, it is assumed that the element length of the first privacy intersection information X a is n, and the element length of the second privacy intersection information X b is m. In order to solve the fast comparison of the privacy intersection information and avoid the time complexity of n*m, the client uses the characteristics of the hash table and adopts the hash table intersection algorithm to store the privacy intersection information with the maximum number of elements in the hash table. At this time, the time complexity is n+m, thereby reducing the comparison time of the data and quickly obtaining the intersection of the first privacy intersection information and the second privacy intersection information. Similarly, the intersection object adopts the hash table intersection algorithm to quickly obtain the intersection of the first privacy intersection information and the second privacy intersection information. The hash table intersection algorithm is an existing algorithm, which is not described in detail here.
[0102] It can be seen from the above that the privacy intersection method decrypts the encrypted second privacy intersection information by using the private key corresponding to the first identity number of the client and the encrypted second encryption and decryption key of the intersection object, obtains the second privacy intersection information, verifies the second privacy intersection information by using the zero-knowledge proof technology, obtains the correct second privacy intersection information, and then calculates the intersection of the first privacy intersection information of the client and the correct second privacy intersection information by using the hash table intersection algorithm, thereby solving the problems of high calculation complexity and high communication cost of the existing privacy intersection method and the problem of inability to confirm whether the participants are fraudulent, effectively reducing the calculation complexity and communication cost during the privacy intersection, and identifying whether the participants (intersection objects) submit false privacy intersection information, thereby improving the data transmission efficiency of the privacy intersection.
[0103] Please refer to Figure 2 , Figure 2 Another privacy intersection method based on SM9 and zero-knowledge proof provided by the embodiment of the application is applied to a key management system and includes the following steps.
[0104] In step A1, in response to a privacy intersection request initiated by a plurality of clients, identity numbers of users corresponding to the plurality of clients are obtained.
[0105] In step A2, a private key corresponding to the identity number is generated, and the private key and a preset SM9 key management parameter are sent to the corresponding client.
[0106] In step A3, after the plurality of clients obtain the intersection of the preset first privacy intersection information and the correct second privacy intersection information, it is determined that the privacy intersection is completed.
[0107] The privacy intersection method sends the private key corresponding to the identity number of the client and the preset SM9 key management parameter to the corresponding client, so that the corresponding client completes the privacy intersection, effectively reduces the calculation complexity and communication cost during the privacy intersection, and identifies whether the participants (intersection objects) submit false privacy intersection information, thereby improving the data transmission efficiency of the privacy intersection.
[0108] Specifically, in step A1, in response to a privacy intersection request initiated by a plurality of clients, identity numbers of users corresponding to the plurality of clients (such as the first identity number and the second identity number in the above embodiment) are obtained.
[0109] Specifically, in step A2, a private key corresponding to the identity number is generated, and the private key is sent to the corresponding client, and a preset SM9 key management parameter is sent to all clients participating in the privacy intersection (clients involved in the privacy intersection request).
[0110] Specifically, in step A3, after the plurality of clients obtain the intersection of the preset first privacy intersection information and the correct second privacy intersection information, the user clicks the privacy intersection completion button (virtual button) on the corresponding client, and based on this, the key management system determines that the privacy intersection is completed this time, and ends the privacy intersection this time.
[0111] From the above, the privacy intersection method solves the problems of high computational complexity and high communication cost of the existing privacy intersection method and the problem of being unable to confirm whether the participants are fraudulent, effectively reduces the computational complexity and communication cost during privacy intersection, and can identify whether the participants (intersection objects) submit false privacy intersection information, thereby improving the data transmission efficiency of privacy intersection.
[0112] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The described device embodiments are only schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, or a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0113] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units. They can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0114] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0115] In this article, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations.
[0116] The above merely provides an example of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A privacy intersection method based on SM9 and zero-knowledge proof, characterized in that, The application is applied to a client to perform privacy intersection on a client seeking intersection, comprising: Based on a privacy intersection request between the client and a seeking intersection object, a first identity number of the client is sent to a key management system; After receiving a private key corresponding to the first identity number and a preset SM9 key management parameter sent by the key management system, a first encryption and decryption key and a first public key are generated based on the preset SM9 key management parameter and a second identity number of the seeking intersection object, a first privacy intersection information is encrypted using the first encryption and decryption key, and the first encryption and decryption key is encrypted using the first public key to obtain encrypted first privacy intersection information and encrypted first encryption and decryption key; The encrypted first privacy intersection information and the encrypted first encryption and decryption key are sent to the seeking intersection object; After receiving encrypted second privacy intersection information and encrypted second encryption and decryption key of the seeking intersection object sent by the seeking intersection object, the encrypted second privacy intersection information of the seeking intersection object is decrypted using the private key and the encrypted second encryption and decryption key of the seeking intersection object to obtain second privacy intersection information of the seeking intersection object; The second privacy intersection information of the seeking intersection object is verified through zero-knowledge proof technology to obtain correct second privacy intersection information; The preset first privacy intersection information and the correct second privacy intersection information are compared using a hash table intersection algorithm to obtain an intersection of the preset first privacy intersection information and the correct second privacy intersection information.
2. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 1, characterized in that, The preset SM9 key management parameter comprises a master public key, an elliptic curve parameter, a pairing function, a hash function and a system security parameter.
3. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 1, characterized in that, Based on the preset SM9 key management parameter and the second identity number of the seeking intersection object, a first encryption and decryption key and a first public key are generated, the first privacy intersection information is encrypted using the first encryption and decryption key, and the first encryption and decryption key is encrypted using the first public key to obtain encrypted first privacy intersection information and encrypted first encryption and decryption key, comprising: Based on the preset SM9 key management parameter, a first encryption and decryption key is generated in combination with an SM4 algorithm; According to the preset SM9 key management parameter and the second identity number of the seeking intersection object, a first public key is generated; The first privacy intersection information is encrypted using the first encryption and decryption key to obtain encrypted first privacy intersection information; The first encryption and decryption key is encrypted using the first public key to obtain encrypted first encryption and decryption key.
4. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 3, characterized in that, The first privacy intersection information is encrypted using the first encryption and decryption key to obtain encrypted first privacy intersection information, comprising: The digest value of each data in the preset first privacy intersection information is calculated through a preset digest algorithm to obtain the digest data corresponding to the preset first privacy intersection information; The digest data is encrypted using the first encryption and decryption key to obtain encrypted first privacy intersection information.
5. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 1, characterized in that, Decrypt the encrypted second privacy intersection information of the intersection object by using the private key and the encrypted second decryption and encryption key of the intersection object to obtain the second privacy intersection information of the intersection object, comprising: Decrypt the encrypted second decryption and encryption key of the intersection object according to the private key to obtain the second decryption and encryption key of the intersection object; Decrypt the encrypted second privacy intersection information of the intersection object based on the second decryption and encryption key of the intersection object to obtain the second privacy intersection information of the intersection object.
6. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 1, characterized in that, Verify the second privacy intersection information of the intersection object by zero-knowledge proof technology to obtain the correct second privacy intersection information, comprising: Generate a second random number challenge value and send the second random number challenge value to the intersection object; Receive the second public parameter, the second characteristic polynomial and the second random polynomial generated by the intersection object based on the second random number challenge value and the second privacy intersection information; Verify the second privacy intersection information of the intersection object by the zero-knowledge proof technology according to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial to obtain the correct second privacy intersection information.
7. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 6, characterized in that, The second public parameter comprises a second prime number, a second multiplicative group constructed with the second prime number as the order, and two generators randomly extracted from the second multiplicative group.
8. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 7, characterized in that, Verify the second privacy intersection information of the intersection object by the zero-knowledge proof technology according to the second public parameter, the second random number challenge value, the second characteristic polynomial and the second random polynomial to obtain the correct second privacy intersection information, comprising: Input the second random number challenge value into the second characteristic polynomial and the second random polynomial respectively to obtain a first calculation value and a second calculation value; Substitute the first calculation value and the second calculation value into the two generators in the second multiplicative group respectively to obtain a first generator value and a second generator value; Verify the second privacy intersection information of the intersection object based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number to obtain the correct second privacy intersection information.
9. The privacy intersection method based on SM9 and zero-knowledge proof according to claim 8, characterized in that, Verify the second privacy intersection information of the intersection object based on the size relationship between the remainder of the first generator value and the second generator value and the second prime number to obtain the correct second privacy intersection information, comprising: Calculate the remainder of the first generator value and the second generator value; Determine whether the remainder is equal to the second prime number; if yes, determine that the second privacy intersection information of the intersection object is real data to obtain the correct second privacy intersection information; if not, determine that the second privacy intersection information of the intersection object is false data and re-perform the privacy intersection.
10. A privacy intersection method based on SM9 and zero-knowledge proof, characterized in that, Applied to a key management system to realize privacy intersection between clients through the privacy intersection method based on SM9 and zero-knowledge proof of any one of claims 1-9, comprising: In response to a plurality of client-initiated privacy intersection requests, obtain the identity numbers of the users corresponding to the plurality of clients; Generate a private key corresponding to the identity number and send the private key and a preset SM9 key management parameter to the corresponding client; Through zero-knowledge proof technology, the plurality of clients verify the second privacy intersection information of the intersection object, obtain correct second privacy intersection information, and compare the preset first privacy intersection information and the correct second privacy intersection information using a hash table intersection algorithm to obtain the intersection of the preset first privacy intersection information and the correct second privacy intersection information, and determine that the privacy intersection is completed.
Citation Information
Patent Citations
Private data intersection solving method and device, computer equipment and storage medium
CN113225186A