Data encryption transmission method and system based on PSI calculation

By using SRA interchangeable encryption algorithm in PSI technology for multiple rounds of encryption processing, and encrypting storage and backup data in distributed databases, the security and efficiency problems in existing PSI technology are solved, and efficient and secure data privacy protection and intersection calculation are achieved.

CN120012147APending Publication Date: 2025-05-16SHANGHAI XINZHAOYANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411838036.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing PSI technology faces significant security and efficiency problems in practical applications, including insufficient data privacy protection, high computing complexity, and high communication costs.

Method used

The SRA exchangeable encryption algorithm is used to generate a key, encrypt the data elements through primary encryption and secondary encryption, and encrypt and store data in a distributed database, and the data generated during the encryption transmission is regularly backed up.

Benefits of technology

The SRA exchangeable encryption algorithm ensures the consistency and security of encryption and decryption operations. The initial and secondary encryption further strengthens the security of data, realizes secure calculation of data intersections without mediation parties, and improves the effectiveness of data processing and privacy protection level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012147A_ABST
    Figure CN120012147A_ABST
Patent Text Reader

Abstract

The invention discloses a data encryption transmission method and system based on PSI calculation, and relates to the technical field of information security and data encryption, and the method comprises the steps that a participant A and a participant B use an SRA exchangeable encryption algorithm to generate a secret key; defining a data set needing to be encrypted, performing primary encryption on each data element in the data set by using a key to obtain an encrypted value, and sending the encrypted value to the participant A and the participant B for mutual verification; and the participant A and the participant B carry out secondary encryption on the verified encryption value to obtain a double encryption value, and then the double encryption value is sent to the opposite side again for comparison. A secret key is generated by using an SRA exchangeable encryption algorithm, the consistency and security of encryption and decryption operations are ensured, the privacy of data in the transmission process is protected by performing primary encryption on data elements, the security of the data is further enhanced by performing secondary encryption, and the security of the data is improved by utilizing the property of exchangeable encryption. Therefore, the safe calculation of the data intersection is realized under the condition of no parking party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security and data encryption, and in particular to a data encryption transmission method and system based on PSI calculation. Background Art

[0002] With the rapid development of the Internet and big data technology, data privacy protection has gradually become an important issue in the field of information technology. In this context, privacy-preserving set intersection technology, as an effective multi-party secure computing method, has received more and more attention. PSI allows multiple participants to securely calculate the intersection of data sets without leaking their own data, thereby realizing data sharing and cooperative computing. However, traditional PSI schemes usually rely on the participation of mediators, who calculate and return the intersection results after receiving the data from all parties. Although this method solves the data privacy problem to a certain extent, it also introduces new security risks. That is, the security of the mediator becomes the weak link of the entire system. Once the mediator colludes with a participant or is attacked, the data of other participants may be completely leaked. In addition, the mediation scheme also has shortcomings in computing efficiency and communication costs. Especially when processing large-scale data sets, this centralized processing method may become a bottleneck for system performance.

[0003] Existing non-mediator PSI schemes attempt to ensure data privacy while eliminating the reliance on mediators by adopting encryption algorithms and hash functions. Most of these schemes perform poorly in terms of computational complexity and communication overhead, and often require multiple rounds of data exchange and complex encryption operations, resulting in limited system performance and practicality. Although PSI schemes based on traditional encryption algorithms can achieve basic privacy protection, they often face greater challenges when dealing with application scenarios with higher privacy requirements and large-scale data sets. Existing technologies are difficult to strike a balance between ensuring data privacy and improving system performance, and have shortcomings such as inefficiency, risk of privacy leakage, and difficulty in scalability. Summary of the invention

[0004] In view of the problems existing in the above-mentioned existing data encryption transmission method and system based on PSI calculation, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is that the existing PSI technology faces significant security and efficiency problems in practical applications, as well as problems such as insufficient data privacy protection, high computational complexity, and high communication costs in the existing technology.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a data encryption transmission method based on PSI calculation, which comprises:

[0007] Participant A and Party B use the SRA exchangeable encryption algorithm to generate a key;

[0008] Define the data set that needs to be encrypted, use the key to initially encrypt each data element in the data set to obtain the encrypted value, and send the encrypted value to participants A and B for mutual verification;

[0009] Participant A and Participant B re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison;

[0010] Distributed database encryption is used to store data generated during data encryption transmission and perform regular backup.

[0011] As a preferred solution of the data encryption transmission method based on PSI calculation of the present invention, wherein: the participant A and the participant B use the SRA exchangeable encryption algorithm to generate a key, which means that the participant A and the participant B respectively select two large prime numbers p and q, and calculate their product to obtain the modulus n;

[0012] Participant A and Participant B select encryption indexes e1 and e2 respectively;

[0013] According to e1 and e2 selected by Party A and Party B, the corresponding decryption exponents d1 and d2 are calculated by using the extended Euclidean algorithm respectively;

[0014] Participant A and Party B generate their own key pairs respectively. Party A's key pair consists of a public key (n, e1) and a private key (n, d1), and Party B's key pair consists of a public key (n, e2) and a private key (n, d2).

[0015] As a preferred solution of the data encryption transmission method based on PSI calculation of the present invention, wherein: the data set to be encrypted is defined, and each data element in the data set is initially encrypted using a key to obtain an encrypted value, including:

[0016] Define the datasets x and y held by participants A and B that need to be encrypted:

[0017] x={x1,x2,...,x m}

[0018] y={y1,y2,...,y n}

[0019] Among them, x m is the mth data element in the data set x that participant A needs to encrypt, y n The nth data element in the data set y that Party B needs to encrypt;

[0020] Each data element in the data set x and the data set y is encrypted using modular exponentiation using the public key in the key pair generated by the participant A and the participant B, respectively, to obtain the encrypted value of each data element in the data set x and the data set y.

[0021] As a preferred solution of the data encryption transmission method based on PSI calculation of the present invention, wherein: the sending of the encrypted value to the participant A and the participant B for mutual verification means that the participant A sends the encrypted value of each data element in the data set x to the participant B one by one, and the participant B sends the encrypted value of each data element in the data set y to the participant A one by one;

[0022] When Party A and Party B send and receive encrypted values, they use a hash algorithm to calculate the encrypted value to obtain a hash value, and compare the hash value with the hash value calculated by the other party to verify the security of the data.

[0023] As a preferred solution of the data encryption transmission method based on PSI calculation described in the present invention, wherein: the participant A and the participant B re-encrypt the verified encrypted value to obtain a double encrypted value means that the participant A and the participant B re-encrypt the verified encrypted value to obtain a double encrypted value of each data element in the data set x and the data set y.

[0024] As a preferred solution of the data encryption transmission method based on PSI calculation of the present invention, wherein: the sending to the other party for comparison again means that the participant A and the participant B send the obtained double encrypted value of each data element in the data set x and the data set y to the other party again;

[0025] Participant A receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison;

[0026] Participant B receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison;

[0027] According to the property of commutative encryption, Party A compares Encrypte2(Encrypte1(y n )) and Encrypte2(Encrypte1(x m ))'s value;

[0028] If they are the same, then x m and n The values ​​of are equal, which is the intersection;

[0029] If different, then x m and n is a non-intersection;

[0030] Party B compares Encrypte1(Encrypte2(x m )) and Encrypte1(Encrypte2(y n ))'s value;

[0031] If they are the same, then x m and n The values ​​of are equal, which is the intersection;

[0032] If different, then x m and n is a non-intersection;

[0033] The intersection means that the same data element x exists in the two data sets of participant A and participant B. m and n , non-intersection means that in the two data sets of participant A and participant B, x m and n are not the same data elements;

[0034] Through the obtained intersection, Participant A and Participant B identify the data elements common to both parties for data sharing, deduplication and joint analysis while protecting their respective data privacy.

[0035] As a preferred solution of the data encryption transmission method based on PSI calculation described in the present invention, the use of a distributed database to encrypt and store the data generated during the data encryption transmission process and perform regular backup refers to using a distributed database to save the encryption key generated in each step, the initial encryption result, the secondary encryption result and the final intersection judgment result, storing them in different physical and logical locations, using a symmetric encryption algorithm to encrypt and set access rights, and performing regular backup processing.

[0036] Another object of the present invention is to provide a data encryption transmission system based on PSI calculation, which comprises:

[0037] A key generation module, used by Party A and Party B to generate a key using the SRA exchangeable encryption algorithm;

[0038] The initial encryption module is used to define the data set that needs to be encrypted, use the key to perform the initial encryption on each data element in the data set to obtain the encrypted value, and send the encrypted value to participants A and B for mutual verification;

[0039] The secondary encryption module is used for Party A and Party B to re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison;

[0040] The data storage module is used to encrypt and store the data generated during the data transmission process using a distributed database and perform regular backup.

[0041] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of a data encryption transmission method based on PSI calculation when executing the computer program.

[0042] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a data encryption transmission method based on PSI calculation.

[0043] The key terms in this application are explained as follows:

[0044] (1) PSI, or Private Set Intersection (PSI): PSI collaboratively calculates the intersection A∩B of the input sets without disclosing the input information of each participant, thereby protecting their respective complements.

[0045] (2) Commutative Encryption: If an encryption algorithm is commutative, for example, Encryptk2 (Encrypt k1 (x))=Encrypt k1 (Encrypt k2 (x)

[0046] Therefore, it is easy to calculate:

[0047] Decrypt k2 (Decrypt k1 (Encrypt k2 (Encrypt k1 (x))))=Decrypt k2 (Decrypt k1 (Encrypt k1 (Encrypt k2 (x))))=Decrypt k2 (Encrypt k2 (x)) = x

[0048] (3) SRA exchange encryption: SRA (Shamir, Rivest and Adleman) is a classic communication encryption: Assume that Alice and Bob share two large prime numbers p and q, and calculate the same semi-prime number n = pq. Alice generates her encryption key e1 and decryption key d1; Bob generates his encryption key e2 and decryption key d2. Then decryption with d1 and d2 can break away from the encryption order of e1 and e2. This is SRA exchange encryption.

[0049] (4) Hash algorithm: Also known as hash function, hash algorithm, or hash function, it is a method of creating a small digital "fingerprint" from any data. A hash function is an injection that converts a set S into an irreversible set U of fixed length. Its value is generally a combination of numbers and letters. The hash function has an infinite input space but only a limited output space. Commonly used hash algorithms include the MD series and the SHA series. The MD series includes MD2, MD4, MD5, and RIPEMD algorithms, and the SHA series includes SHA0, SHA1, SHA2, and SHA3 algorithms.

[0050] The beneficial effects of the present invention are as follows: The technical solution of the present application provides an exchangeable encryption scheme without a mediator in the PSI calculation: after the two parties perform encryption calculations separately (using the SRA exchangeable encryption key), they exchange the result values; then they encrypt the result values ​​twice (using the SRA exchangeable encryption key) and exchange the result values ​​again; compare the result values ​​after the second encryption to determine whether they are intersections. The present application uses the SRA exchangeable encryption algorithm to generate keys, ensuring the consistency and security of encryption and decryption operations. By initially encrypting the data elements, the privacy of the data during transmission is protected. The second encryption further strengthens the security of the data, and utilizes the properties of exchangeable encryption to achieve secure calculation of data intersections without a mediator. Through this patent, the PSI calculation between the participants in the privacy computing system is completed without the mediator. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0052] Figure 1 The figure is a flowchart of the data encryption transmission method based on PSI calculation.

[0053] Figure 2 Schematic diagram of the process of data encryption transmission.

[0054] Figure 3 This is an example of an implementation of the technical solution of this application.

[0055] Figure 4 Schematic diagram of the principle of the first round of PSI calculation with no hit results.

[0056] Figure 5 This is a schematic diagram of the principle of the second round of PSI calculation with a hit result.

[0057] Figure 6 This is a schematic diagram of the structure of the data encryption transmission system based on PSI calculation. DETAILED DESCRIPTION

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0060] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0061] Example 1

[0062] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and which provides a data encryption transmission method based on PSI calculation. The data encryption transmission method based on PSI calculation includes:

[0063] S1, Party A and Party B use the SRA exchangeable encryption algorithm to generate a key;

[0064] Specifically, the generation of a key by the SRA commutative encryption algorithm by the participant A and the participant B refers to the participant A and the participant B selecting two large prime numbers p and q respectively, and calculating their product to obtain the modulus n;

[0065] Participant A and Participant B select encryption indexes e1 and e2 respectively, the formula is:

[0066] gcd(e1,(p-1)×(q-1))=1

[0067] gcd(e2,(p-1)×(q-1))=1

[0068] Where gcd represents the greatest common divisor, e1 and e2 are encryption exponents selected by Party A and Party B, which are coprime with (p-1)*(q-1) and are used to generate the public key;

[0069] According to e1 and e2 selected by participant A and participant B, the corresponding decryption exponents d1 and d2 are calculated by the extended Euclidean algorithm, respectively, and the formula is:

[0070]

[0071] Where d1 and d2 are the decryption exponents calculated by Party A and Party B respectively, and are used in pairs with e1 and e2 to meet the consistency of encryption and decryption. mod is the abbreviation of modulus operation, which means the operation of taking the remainder after dividing two numbers.

[0072] Participant A and Party B generate their own key pairs respectively. Party A's key pair consists of a public key (n, e1) and a private key (n, d1), and Party B's key pair consists of a public key (n, e2) and a private key (n, d2).

[0073] By using the SRA commutative encryption algorithm, Party A and Party B respectively select large prime numbers for multiplication to obtain the modulus n, and select the encryption exponent to calculate the corresponding decryption exponent using the extended Euclidean algorithm, thereby generating a key pair, ensuring the consistency and security of encryption and decryption. This ensures that the ciphertext maintains symmetry and privacy throughout the entire data transmission and processing process, effectively preventing unauthorized decryption and ensuring the security and integrity of data in communication.

[0074] S2. Define the data set that needs to be encrypted, use the key to initially encrypt each data element in the data set to obtain an encrypted value, and send the encrypted value to participants A and B for mutual verification;

[0075] Specifically, define the data set that needs to be encrypted, use the key to perform the initial encryption on each data element in the data set to obtain the encrypted value including:

[0076] Define the datasets x and y held by participants A and B that need to be encrypted:

[0077] x={x1,x2,...,x m}

[0078] y={y1,y2,...,y n}

[0079] Among them, x mis the mth data element in the data set x that participant A needs to encrypt, y n The nth data element in the data set y that Party B needs to encrypt;

[0080] Using the public keys in the key pairs generated by Party A and Party B, each data element in the data set x and data set y is encrypted using modular exponentiation to obtain the encrypted value of each data element in the data set x and data set y. The formula is:

[0081]

[0082] Among them, Encrypte1(x m ) is the encrypted value of the mth data element in the data set x, Encrypte2(y n ) is the encrypted value of the nth data element in the data set y.

[0083] By using the public key in the key pair generated by participant A and participant B respectively to perform modular exponentiation encryption on each data element in the data set, the privacy and security of the data can be effectively protected. Through the initial encryption, the confidentiality of the data during transmission and processing is ensured to prevent unauthorized access and decryption. At the same time, it lays the foundation for subsequent secure data processing and helps to achieve secure communication in privacy-preserving set intersection calculations.

[0084] Furthermore, sending the encrypted value to the participants A and B for mutual verification means that the participant A sends the encrypted value of each data element in the data set x to the participant B one by one, and the participant B sends the encrypted value of each data element in the data set y to the participant A one by one. In the SRA commutative encryption algorithm, the encrypted encrypted value has symmetry, which means that the encrypted value obtained by encrypting the same data element twice with different keys in different orders is the same, so there is no need to decrypt;

[0085] When Party A and Party B send and receive encrypted values, they use a hash algorithm to calculate the encrypted value to obtain a hash value, and compare the hash value with the hash value calculated by the other party to verify the security of the data.

[0086] By sending encrypted values ​​between Party A and Party B and verifying the encrypted values ​​using a hash algorithm, the integrity and security of the data during transmission can be ensured. Due to the symmetry of the SRA exchangeable encryption algorithm, both parties can verify the consistency of the data without decrypting it. At the same time, by comparing the hash values, the reliability and anti-tampering capabilities of data transmission are further enhanced, thereby effectively protecting the privacy and security of the data.

[0087] S3. Party A and Party B re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison;

[0088] Specifically, Party A and Party B re-encrypt the verified encrypted value to obtain a double encrypted value. Party A and Party B re-encrypt the verified encrypted value to obtain a double encrypted value of each data element in data set x and data set y. The formula is:

[0089]

[0090] Among them, Encrypte1(Encrypte2(y n ) is the double encrypted value of the nth data element in the data set y received by participant A, Encrypte2(Encrypte1(x m ) is the double encrypted value of the mth data element in the data set x received by participant B.

[0091] By re-encrypting the verified encrypted value, Participant A and Participant B respectively generate double encrypted values ​​for each element in the data set. This double encryption mechanism further strengthens the security of the data and ensures that during the entire transmission and processing process, even if the initially encrypted ciphertext is intercepted, it still cannot be decrypted without the pairing of the double encryption key, effectively enhancing the privacy protection of the data, preventing potential man-in-the-middle attacks, and ensuring the absolute security of the data in the privacy-preserving set intersection calculation.

[0092] Furthermore, sending again to the other party for comparison means that the participant A and the participant B send the obtained double encrypted value of each data element in the data set x and the data set y to each other again;

[0093] Participant A receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison;

[0094] Participant B receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison;

[0095] The properties of commutative encryption are:

[0096] Encrypte2(Encrypte1(x m))=Encrypte1(Encrypte2(x m ))

[0097] Encrypte2(Encrypte1(y n ))=Encrypte1(Encrypte2(y n ))

[0098] According to the property of commutative encryption, Party A compares Encrypte2(Encrypte1(y n )) and Encrypte2(Encrypte1(x m ))'s value;

[0099] If they are the same, then x m and n The values ​​of are equal, which is the intersection;

[0100] If different, then x m and n is a non-intersection;

[0101] Party B compares Encrypte1(Encrypte2(x m )) and Encrypte1(Encrypte2(y n ))'s value;

[0102] If they are the same, then x m and n The values ​​of are equal, which is the intersection;

[0103] If different, then x m and n is a non-intersection;

[0104] The intersection means that the same data element x exists in the two data sets of participant A and participant B. m and n , non-intersection means that in the two data sets of participant A and participant B, x m and n are not the same data elements;

[0105] Through the obtained intersection, Participant A and Participant B can find out the data elements that both parties have in common while protecting their respective data privacy, thereby achieving the purpose of data sharing, deduplication and joint analysis.

[0106] By using the properties of commutative encryption, Party A and Party B can safely compare the doubly encrypted data elements without the need for decryption, and accurately determine intersection and non-intersection to ensure data privacy. By performing security checks on the intersection data elements, the confidentiality and integrity of the data during processing are further guaranteed. Party A and Party B integrate the intersection data into a transaction set, providing a safe and reliable foundation for subsequent data analysis and business decision-making, and improving the effectiveness of data processing and the level of privacy protection.

[0107] S4. Use a distributed database to encrypt and store data generated during data encryption transmission and perform regular backup;

[0108] Specifically, using a distributed database to encrypt and store data generated during the data encryption transmission process and performing regular backup means using a distributed database to save the encryption key generated in each step, the initial encryption result, the secondary encryption result, and the final intersection judgment result, storing them in different physical and logical locations, using a symmetric encryption algorithm to encrypt and set control access rights, and performing regular backup processing.

[0109] By adopting distributed database encrypted storage and regular backup, the encryption keys, initial encryption results, secondary encryption results and final intersection judgment results generated during the data encryption transmission process are efficiently protected. Distributed storage is carried out in different physical and logical locations, and symmetric encryption algorithms are used for encryption and access control, ensuring data security, availability and privacy, preventing data loss or unauthorized access, and enhancing system reliability and data recovery capabilities through regular backup.

[0110] Figure 3 The following is an example of an implementation of the technical solution of the present application. Alice holds data X = {x1, x2, x3...xm}, and Bob holds data Y = {y1, y2, y3...yn}. The specific process is as follows:

[0111] ① Alice generates her SRA exchangeable encryption key e1. Bob generates his SRA exchangeable encryption key e2.

[0112] ②Alice encrypts X and calculates Encrypte1(xi). Bob encrypts Y and calculates Encrypte2(yi).

[0113] ③Alice sends Encrypte1(xi) to Bob. Bob sends Encrypte2(yi) to Alice.

[0114] ④Alice performs a second encryption on Encrypte2(yi) to calculate Encrypte1(Encrypte2(yi)). Bob performs a second encryption on Encrypte1(xi) to calculate Encrypte2(Encrypte1(xi)).

[0115] ⑤Alice sends Encrypte1(Encrypte2(yi)) to Bob. Bob sends Encrypte2(Encrypte1(xi)) to Alice.

[0116] ⑥According to the properties of commutative encryption:

[0117] Encrypte1(Encrypte2(yi))=Encrypte2(Encrypte1(yi))

[0118] Alice compares the values ​​of Encrypte2(Encrypte1(yi)) and Encrypte2(Encrypte1(xi)). If they are the same, then the values ​​of xi and yi are equal, and they are the intersection.

[0119] According to the properties of commutative encryption:

[0120] Encrypte2(Encrypte1(xi))=Encrypte1(Encrypte2(xi))

[0121] Bob compares the values ​​of Encrypte1(Encrypte2(xi)) and Encrypte1(Encrypte2(yi)). If they are the same, then the values ​​of xi and yi are equal, and they are intersection sets.

[0122] The following takes a luxury goods merchant and a big data data source as two participating parties as an example to explain in detail the PSI calculation principle in the above implementation example.

[0123] For example, assume that a luxury merchant holds private domain data X = {18300000088, 18300000089}, and the big data source holds data Y = {18300000077, 18300000088, 18300000099}.

[0124] 1. First round of PSI calculation: No hits

[0125] Figure 4 The figure shows the principle diagram of the first round of PSI calculation without a hit result. The detailed process is as follows:

[0126] ① A luxury goods merchant generates her SRA exchangeable encryption key e1. The big data source generates his SRA exchangeable encryption key e2.

[0127] ②A luxury goods merchant encrypts 18300000088 and performs Encrypte1(18300000088). The big data source encrypts 18300000077 and performs Encrypte2(18300000077).

[0128] ③A luxury goods merchant sends Encrypte1(18300000088) to the big data source. The big data source sends Encrypte2(18300000077) to a luxury goods merchant.

[0129] ④ A luxury goods merchant performs secondary encryption calculation on Encrypte2(18300000077): Encrypte1(Encrypte2(18300000077)).

[0130] The big data source performs secondary encryption calculation on Encrypte1(18300000088): Encrypte2(Encrypte1(18300000088)).

[0131] ⑤ A luxury goods merchant sends Encrypte1(Encrypte2(18300000077)) to the big data source. The big data source sends Encrypte2(Encrypte1(18300000088)) to a luxury goods merchant.

[0132] ⑥According to the properties of commutative encryption:

[0133] Encrypte1(Encrypte2(18300000077))=Encrypte2(Encrypte1(18300000077)) A luxury merchant compares the values ​​of Encrypte2(Encrypte1(18300000077)) and Encrypte2(Encrypte1(18300000088)), which are not the same, 18300000088 non-intersection.

[0134] According to the properties of commutative encryption:

[0135] Encrypte2(Encrypte1(18300000088))=Encrypte1(Encrypte2(18300000088))

[0136] The big data source compares the values ​​of Encrypte1(Encrypte2(18300000088)) and Encrypte1(Encrypte2(18300000077)), and they are not the same, 18300000077 is a non-intersection.

[0137] 2. Second round of PSI calculation: hit

[0138] Figure 5 The figure shows the principle diagram of the second round of PSI calculation with a hit result. The detailed process is as follows:

[0139] ① A luxury goods merchant generates her SRA exchangeable encryption key e1. The big data source generates his SRA exchangeable encryption key e2.

[0140] ② A luxury goods merchant performs encryption calculation Encrypte1(18300000088) on X. The big data source performs encryption calculation Encrypte2(18300000088) on Y.

[0141] ③A luxury goods merchant sends Encrypte1(18300000088) to the big data source. The big data source sends Encrypte2(18300000088) to a luxury goods merchant.

[0142] ④ A luxury goods merchant performs secondary encryption calculation on Encrypte2(18300000088): Encrypte1(Encrypte2(18300000088))

[0143] The big data source performs secondary encryption calculation on Encrypte1(18300000088):

[0144] Encrypte2(Encrypte1(18300000088))

[0145] ⑤ A luxury goods merchant sends Encrypte1(Encrypte2(18300000088)) to the big data source. The big data source sends Encrypte2(Encrypte1(18300000088)) to a luxury goods merchant.

[0146] ⑥According to the properties of commutative encryption:

[0147] Encrypte1(Encrypte2(18300000088))=Encrypte2(Encrypte1(18300000088))

[0148] A luxury goods merchant compares the values ​​of Encrypte2(Encrypte1(18300000088)) and Encrypte2(Encrypte1(18300000088)), and the values ​​are the same, 18300000088 is the intersection.

[0149] According to the properties of commutative encryption:

[0150] Encrypte2(Encrypte1(18300000088))=Encrypte1(Encrypte2(18300000088))

[0151] The big data source compares the values ​​of Encrypte1(Encrypte2(18300000088)) and Encrypte1(Encrypte2(18300000088)). The values ​​are the same, and 18300000088 is the intersection.

[0152] Example 2

[0153] Reference Figure 6 , which is the second embodiment of the present invention, and which is different from the previous embodiment, provides a data encryption transmission system based on PSI calculation, including:

[0154] A key generation module, used by Party A and Party B to generate a key using the SRA exchangeable encryption algorithm;

[0155] The initial encryption module is used to define the data set that needs to be encrypted, use the key to perform the initial encryption on each data element in the data set to obtain the encrypted value, and send the encrypted value to participants A and B for mutual verification;

[0156] The secondary encryption module is used for Party A and Party B to re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison;

[0157] The data storage module is used to encrypt and store the data generated during the data transmission process using a distributed database and perform regular backup.

[0158] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0159] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0160] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0161] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0162] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A data encryption transmission method based on PSI calculation, characterized in that: include, Participant A and Party B use the SRA exchangeable encryption algorithm to generate a key; Define the data set that needs to be encrypted, use the key to initially encrypt each data element in the data set to obtain the encrypted value, and send the encrypted value to participants A and B for mutual verification; Participant A and Participant B re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison; Distributed database encryption is used to store data generated during data transmission and perform regular backup.

2. The data encryption transmission method based on PSI calculation as claimed in claim 1, characterized in that: The participant A and the participant B use the SRA exchangeable encryption algorithm to generate a key, which means that the participant A and the participant B respectively select two large prime numbers p and q, and calculate their product to obtain the modulus n; Participant A and Participant B select encryption indexes e1 and e2 respectively; According to e1 and e2 selected by Party A and Party B, the corresponding decryption exponents d1 and d2 are calculated by using the extended Euclidean algorithm respectively; Participant A and Party B generate their own key pairs respectively. Party A's key pair consists of a public key (n, e1) and a private key (n, d1), and Party B's key pair consists of a public key (n, e2) and a private key (n, d2).

3. The data encryption transmission method based on PSI calculation as claimed in claim 2, characterized in that: The definition of the data set to be encrypted, using the key to initially encrypt each data element in the data set to obtain an encrypted value including: Define the datasets x and y held by participants A and B that need to be encrypted: x={x1,x2,...,x m } y={y1,y2,...,y n } Among them, x m is the mth data element in the data set x that participant A needs to encrypt, y n The nth data element in the data set y that Party B needs to encrypt; Each data element in the data set x and the data set y is encrypted using modular exponentiation using the public key in the key pair generated by the participant A and the participant B, respectively, to obtain the encrypted value of each data element in the data set x and the data set y.

4. The data encryption transmission method based on PSI calculation as claimed in claim 3, characterized in that: The sending of the encrypted value to the participant A and the participant B for mutual verification means that the participant A sends the encrypted value of each data element in the data set x to the participant B one by one, and the participant B sends the encrypted value of each data element in the data set y to the participant A one by one; When Party A and Party B send and receive encrypted values, they use a hash algorithm to calculate the encrypted value to obtain a hash value, and compare the hash value with the hash value calculated by the other party to verify the security of the data.

5. The data encryption transmission method based on PSI calculation as claimed in claim 4, characterized in that: The participant A and the participant B re-encrypt the verified encrypted value to obtain a double encrypted value, which means that the participant A and the participant B re-encrypt the verified encrypted value to obtain a double encrypted value of each data element in the data set x and the data set y.

6. The data encryption transmission method based on PSI calculation as claimed in claim 5, characterized in that: The sending again to the other party for comparison means that the participant A and the participant B send the obtained double encrypted value of each data element in the data set x and the data set y to the other party again; Participant A receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison; Participant B receives the double encrypted value Encrypte2(Encrypte1(x m ), and the double encryption value Encrypte1(Encrypte2(y n ) for comparison; According to the property of commutative encryption, Party A compares Encrypte2(Encrypte1(y n )) and Encrypte2(Encrypte1(x m ))'s value; If they are the same, then x m and n The values ​​of are equal, which is the intersection; If different, then x m and n is a non-intersection; Party B compares Encrypte1(Encrypte2(x m )) and Encrypte1(Encrypte2(y n ))'s value; If they are the same, then x m and n The values ​​of are equal, which is the intersection; If different, then x m and n is a non-intersection; The intersection means that the same data element x exists in the two data sets of participant A and participant B. m and n , non-intersection means that in the two data sets of participant A and participant B, x m and n are not the same data elements; Through the obtained intersection, Participant A and Participant B identify the data elements common to both parties for data sharing, deduplication and joint analysis while protecting their respective data privacy.

7. The data encryption transmission method based on PSI calculation as claimed in claim 6, characterized in that: The use of a distributed database to encrypt and store data generated during the data encryption transmission process and perform regular backup refers to using a distributed database to save the encryption key generated in each step, the initial encryption result, the secondary encryption result, and the final intersection judgment result, storing them in different physical and logical locations, encrypting them using a symmetric encryption algorithm and setting control access rights, and performing regular backup processing.

8. A data encryption transmission system based on PSI calculation based on the data encryption transmission method based on PSI calculation according to any one of claims 1 to 7, characterized in that: include, A key generation module, used by Party A and Party B to generate a key using the SRA exchangeable encryption algorithm; The initial encryption module is used to define the data set that needs to be encrypted, use the key to perform the initial encryption on each data element in the data set to obtain the encrypted value, and send the encrypted value to participants A and B for mutual verification; The secondary encryption module is used for Party A and Party B to re-encrypt the verified encrypted value to obtain a double encrypted value and then send it to the other party for comparison; The data storage module is used to encrypt and store the data generated during the data transmission process using a distributed database and perform regular backup.

9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the data encryption transmission method based on PSI calculation described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data encryption transmission method based on PSI calculation described in any one of claims 1 to 7 are implemented.