CN114866312A - Common data determination method and device for protecting data privacy - Google Patents

Common data determination method and device for protecting data privacy Download PDF

Info

Publication number
CN114866312A
CN114866312A CN202210467587.1A CN202210467587A CN114866312A CN 114866312 A CN114866312 A CN 114866312A CN 202210467587 A CN202210467587 A CN 202210467587A CN 114866312 A CN114866312 A CN 114866312A
Authority
CN
China
Prior art keywords
party
hash value
value set
common
parties
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210467587.1A
Other languages
Chinese (zh)
Other versions
CN114866312B (en
Inventor
张雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210467587.1A priority Critical patent/CN114866312B/en
Priority claimed from CN202210467587.1A external-priority patent/CN114866312B/en
Publication of CN114866312A publication Critical patent/CN114866312A/en
Application granted granted Critical
Publication of CN114866312B publication Critical patent/CN114866312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the specification provides a common data determining method and device for protecting data privacy, and the method comprises the following steps: the method comprises the following steps that an intermediate party respectively obtains respective encrypted data from a first party and a second party, wherein the encrypted data are obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party; decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party; comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties; encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party; and respectively transmitting the common hash value set ciphertexts corresponding to the parties so that the parties determine common data between the parties.

Description

Common data determination method and device for protecting data privacy
Technical Field
The present disclosure relates to the field of privacy protection technologies, and in particular, to a method and an apparatus for determining common data for protecting data privacy.
Background
The privacy set decision-making algorithm is generally used for data alignment in longitudinal federal machine learning or friend discovery in social software through an address book. At present, there are many privacy set intersection algorithms, for example, in order to ensure privacy, a participant who performs intersection calculation on a privacy data set finds out, and a multiparty security calculation technology such as careless transmission, an encryption circuit, homomorphic encryption and the like is adopted to find out the intersection of the privacy data between the participants, that is, common data. In such methods, additional communication is required between the participants in the calculation process (i.e., the intersection process), increasing the calculation and communication costs.
Therefore, it is desirable to provide an improved scheme for protecting the security of the private data of each party and reducing the amount of calculation in the process of privacy deal by multi-party combination.
Disclosure of Invention
One or more embodiments of the present specification provide a common data determination method and apparatus for protecting data privacy, so as to reduce the amount of calculation in a common data determination process while protecting the security of private data.
According to a first aspect, there is provided a common data determination method for protecting data privacy, the method performed by an intermediary party, comprising:
respectively acquiring respective encrypted data from a first party and a second party, wherein the encrypted data is obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party;
decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party;
comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties;
encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party;
and respectively transmitting the common hash value set ciphertexts corresponding to the parties so that the parties determine common data between the parties.
In an implementation manner, the predetermined hash operation is obtained by pre-negotiation between the first party and the second party.
In one embodiment, the method further comprises:
respectively generating corresponding target keys for each party by using a preset key generation algorithm;
and respectively sending the target keys corresponding to the parties.
In one implementation, the preset key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
In an implementation manner, in a case that the preset key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different.
According to a second aspect, there is provided a method of common data determination for protecting data privacy, the method being performed by a first party, a second party and an intermediary party, the method comprising:
the first party and the second party respectively encrypt the hash value set held by the first party and the second party by using respective target keys to obtain corresponding encrypted data and send the corresponding encrypted data to the intermediate party, wherein the hash value set is obtained by each party performing preset hash operation on each private data held by each party;
the intermediate party acquires encrypted data sent by each party; decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party; comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties; encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party; respectively sending the common hash value set ciphertexts corresponding to each party;
and the first party and the second party determine the common data between the two parties based on the received common hash value set ciphertext.
In an implementation manner, the predetermined hash operation is obtained by pre-negotiation between the first party and the second party.
In one embodiment, the method further comprises:
the intermediate party generates corresponding target keys aiming at each party by using a preset key generation algorithm;
and respectively sending the target keys corresponding to the parties.
In one possible implementation, the preset key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
In an implementation manner, in the case that the preset key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different.
In one embodiment, the determining the common data between the two parties includes:
the first party and the second party respectively decrypt the received common hash value set ciphertext by using respective target keys to obtain a common hash value set plaintext; and determining the common data between the two parties by using the common hash value set plaintext and the hash values corresponding to the private data held by the common hash value set plaintext.
According to a third aspect, there is provided a common data determination apparatus for protecting data privacy, the apparatus being deployed at an intermediary party, comprising:
the acquisition module is configured to acquire respective encrypted data from a first party and a second party respectively, wherein the encrypted data is obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party;
the decryption module is configured to decrypt the encrypted data of each party to obtain a plaintext of the hash value set of each party;
the comparison determining module is configured to compare the plain texts of the hash value sets of the two parties and determine a common hash value set of the plain texts of the hash value sets of the two parties;
the encryption module is configured to encrypt the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party;
and the first sending module is configured to send the common hash value set ciphertexts corresponding to the parties respectively so that the parties determine common data between the parties.
According to a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
According to a fifth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and the processor, when executing the executable code, implements the method of the first aspect.
According to the method and the device provided by the embodiment of the specification, the first party and the second party firstly carry out preset hash operation on respective private data to obtain corresponding hash values, encrypt respective hash value sets, obtain encrypted data and then send the encrypted data to the middle party, the middle party decrypts the encrypted data of each party to determine the shared hash value sets of the two parties on the basis of the hash value sets of the parties in plaintext, and then the shared hash value sets are encrypted by using target keys of the parties and then sent to the parties, so that the parties determine the shared data between the two parties. The data are encrypted and transmitted between the first party and the second party and the intermediate party, so that the leakage of the private data in the transmission process can be avoided, the intermediate party can only obtain the hash value of the private data of each party, the private data cleartext of each party can not be obtained, and the shared data can be determined on the basis of the hash value cleartext, so that the privacy of the private data can be guaranteed, meanwhile, the calculation and communication costs in the shared data determination process are reduced, the intermediate party does not need the support of a special environment, and the equipment cost is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic diagram of a framework for implementing one embodiment disclosed herein;
fig. 2 is a schematic flowchart of a common data determination method for protecting data privacy according to an embodiment;
fig. 3 is a schematic flowchart of a common data determination method for protecting data privacy according to an embodiment;
fig. 4 is a schematic block diagram of a common data determining apparatus for protecting data privacy according to an embodiment.
Detailed Description
The technical solutions of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
The embodiment of the specification discloses a method and a device for determining common data for protecting data privacy, and firstly introduces application scenarios and technical concepts of the method, and specifically comprises the following steps:
in order to ensure the privacy of the private data of each participant in the privacy set intersection scenario, the participants generally adopt a multi-party secure computing technology such as careless transmission, an encryption circuit, homomorphic encryption, etc. to obtain the intersection of the private data therebetween, i.e. common data. In the above method, each participant needs to perform additional communication in the intersection solving process, which increases the calculation cost and the communication cost.
In view of this, the inventor proposes a common data determination method for protecting data privacy, and fig. 1 shows a schematic implementation scenario according to an embodiment disclosed in this specification. In this implementation scenario, participants A, B and C are schematically shown, each of which may be embodied as a device, platform, server, or cluster of devices having computing, processing capabilities. The participators A and B respectively have privacy data needing intersection calculation, and respectively form a first privacy data set X (N) and a second privacy data set Y (M), and the two parties hope to determine the common data of the two parties, namely the intersection between the first privacy data set and the second privacy data set, on the premise of ensuring the privacy of the privacy data of the two parties.
To this end, according to the embodiments of the present specification, in order to perform secure private data rendezvous operation, an initial preparation phase is first performed between the parties a and B and the intermediate party C to prepare for a specific process of a subsequent private set rendezvous operation.
The initial preparation phase may include that the participant a and the participant B respectively determine the privacy data sets that need to perform the secure privacy set commitment operation, the participant a determines the first privacy data set x (n) thereof, and the participant B determines the second privacy data set y (m) thereof. Wherein the first private data set X (N) comprises a plurality of private data X i The second privacy data set Y (M) includes a plurality of pieces of privacy data Y j . In one case, each piece of privacy data can be a data identifier, and the data identifier can be an identifier of a user (such as a UID, a mobile phone number and the like) or an identifier of an article (such as an article serial number and the like).
And then, the participator A and the participator B respectively carry out preset hash operation on each private data in the private data sets held by the participator A and the participator B to obtain a hash value of each private data so as to obtain a hash value set of each participator.
Subsequently, the middle party C distributes the encryption keys (1) to the participants a and B, specifically, may generate the target keys corresponding to the participants a and B, respectively, and send the target keys corresponding to the participants a and B, respectively. Accordingly, parties a and B encrypt their hash value sets (2) with their respective target keys, resulting in respective encrypted data. Thereafter, parties a and B send respective encrypted data to intermediary C (3).
The middle party C obtains the encrypted data of each party (i.e., the first encrypted data of the party a and the second encrypted data of the party B), decrypts the encrypted data of each party (4), and specifically decrypts the first encrypted data and the second encrypted data respectively to obtain a first hash value set plaintext and a second hash value set plaintext. Next, the intermediate party C finds an intersection (5) for the plaintext of the hash value sets of the parties, specifically, compares the plaintext of the first hash value set with the plaintext of the second hash value set, and determines a common hash value set between the participating parties a and B. Then, the middle party C encrypts and solves intersection results (6) by using the target keys of all parties, and sends ciphertext for solving the intersection results to all parties (7), specifically, encrypts the common hash value set by using the target key of the participating party A, and sends the ciphertext of the common hash value set obtained by encryption to the participating party A; and encrypting the common hash value set by using the target key of the participant B, and sending the encrypted common hash value set ciphertext to the participant B.
As shown in fig. 1, each party determines a common data set (8) for both parties, and in particular, party a determines common data (i.e., an intersection) between the first private data set and the second private data set based on the common hash value set ciphertext it receives. Party B determines common data between the first and second private data sets based on the common set of hash values ciphertext it receives.
In the process, data are encrypted and transmitted between the participators A and B and the intermediate party C, so that the leakage of private data in the transmission process can be avoided, the intermediate party C can only obtain the hash value of the private data of each party and cannot obtain the plaintext of the private data of each party, the intermediate party C determines the shared data on the basis of the plaintext of the hash value, the privacy of the private data can be guaranteed, meanwhile, the calculation and communication costs in the shared data determination process are reduced, the intermediate party does not need the support of a special environment, and the equipment cost is saved.
The common data determination method for protecting data privacy provided in the present specification is explained in detail below with reference to specific embodiments.
FIG. 2 shows a flow diagram of a method for common data determination to protect data privacy in one embodiment of the present description. The method is performed by an intermediary party, which may be implemented by any device, apparatus, platform, cluster of apparatuses, etc. having computing, processing capabilities. In determining the common data, as shown in fig. 2, the method includes the following steps S210-S250:
in step S210: the intermediate party C obtains respective encrypted data from the first party a (party a) and the second party B (party B), respectively. The encrypted data is obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party. Each piece of private data in the private data sets of the parties can be a data identifier, which can be an identifier of a user (e.g., UID, mobile phone number, etc.) or an identifier of an article (e.g., article serial number, etc.).
In one embodiment, to ensure the privacy of the private data of the first party a and the second party B, the predetermined hash operation is obtained by the first party a and the second party B through pre-negotiation, that is, the intermediate party C cannot know the predetermined hash operation.
In one embodiment, the target key held by each of the first party a and the second party B may be that generated by the intermediary C during the initial preparation phase and sent to the first party a and the second party B, respectively. In one case, before step S210, the middle party C may further generate target keys of each party, specifically, the middle party C generates their corresponding target keys for each party respectively by using a preset key generation algorithm; and respectively sending the target keys corresponding to the parties.
In one embodiment, the preset key generation algorithm may be a symmetric key generation algorithm or an asymmetric key generation algorithm. The symmetric key generation algorithm may include, but is not limited to, an AES (Advanced Encryption Standard) algorithm, a DES (Data Encryption Standard) algorithm, and the like. The asymmetric key generation algorithm may include, but is not limited to, the RSA algorithm.
In one embodiment, in order to secure the private data sets of the first party a and the second party B, it is required to ensure that the plaintext of the private data of each of the first party a and the second party B cannot obtain the plaintext of the private data of the first party a or the second party B except for the plaintext of the private data of each of the first party a and the second party B, where there is a case where the plaintext of the private data of the second party B cannot be obtained by the first party a and the plaintext of the private data of the first party a cannot be obtained by the second party B. Accordingly, when the preset key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different, that is, the target key KeyA held by the first party a and the target key KeyB held by the second party B are different.
In one case, when the preset key generation algorithm is a symmetric key generation algorithm, the first party a and the second party B may generate their target keys respectively and then send the generated target keys to the intermediate party C, so that the intermediate party C may obtain the target keys KeyA and KeyB of the first party a and the second party B, respectively.
Subsequently, the intermediate party C, after acquiring the respective encrypted data from the first party and the second party, respectively, at step S220: and decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party. In an embodiment, in the case that the target keys held by the first party a and the second party B are keys generated based on a symmetric key generation algorithm, the intermediate party C may decrypt, by using the target key KeyA of the first party a, encrypted data acquired from the first party a to obtain corresponding first hash value set plaintext; and decrypting the encrypted data acquired from the second party B by using the target key KeyB of the second party B to obtain a corresponding second hash value set plaintext.
In another embodiment, in the case that the target key held by each of the first party a and the second party B is a key generated based on an asymmetric key generation algorithm, the target key held by the first party a and the second party B may be a target public key PK of the middle party C, and a target private key SK corresponding to the target public key PK is privately held by the middle party C. Correspondingly, after the middle party C respectively obtains the respective encrypted data from the first party a and the second party B, the target private key SK can be used to respectively decrypt the encrypted data obtained from the first party a and the second party B to obtain the hash value set plaintext of each party, i.e. the first hash value set plaintext of the first party a and the second hash value set plaintext of the second party B.
Next, in step S230, the intermediary party C compares the plain texts of the hash value sets of both parties, and determines a common hash value set of the plain texts of the hash value sets of both parties. The intermediate party C may compare the plain texts of the hash value sets of the two parties through various comparison manners, and may compare each hash value in the plain text of the first hash value set of the first party a with each hash value in the plain text of the second hash value set of the second party B, respectively, to determine a common hash value between the two parties, so as to form a common plain text of the hash value sets.
In one implementation, to reduce the amount of computation in the comparison process, the intermediate party C first performs ascending sorting on the hash value set plaintext of each party to obtain an ascending hash value set of the party, where the first party a corresponds to the first ascending hash value set [ h (X) 1 ),h(X 2 ),……h(X N )]The second party B corresponds to a second set of ascending hash values [ h (Y) 1 ),h(Y 2 ),……h(Y M )]Wherein, h (X) i ) Representing private data X i Hash value of h (Y) j ) Representing private data Y j The hash value of (1). Then, with any party as a target, for example, with the first party a as a target, the first hash value h (X) at the head in the first ascending hash value set of the first party a 1 ) From top to bottom (from h (Y) of the second set of ascending hash values with the second party B 1 ) Start) of the first hash value set, wherein no less than the first hash value h (X) occurs in the second ascending hash value set 1 ) The comparison may be stopped when the hash value is equal to (1); and, if the first hash value h (X) 1 ) Greater than the first n hash values in the second set of ascending hash values, e.g., the first hash value h (X) 1 ) Greater than the first 5 hash values in the second ascending hash value set (i.e., h (Y) 1 ),h(Y 2 ),h(Y 3 ),h(Y 4 ) And h (Y) 5 ) H (Y) of the second set of ascending hash values) 6 ) Not less than the first hash value h (X) 1 ) The first n hash values (i.e., the first 5 hash values) are deleted from the second ascending hash value set to obtain a third ascending hash value set.
The second hash value h (X) at the last bit in the first ascending hash value set N ) From bottom to top (from h (Y) with hash values in the third set of ascending hash values M ) Begin) to be compared, wherein no more than the second hash value h (X) occurs in the third set of ascending hash values N ) Stopping the comparison when the hash value is equal to the hash value; and, if the second hash value h (X) N ) Less than the last m hash values of the third set of ascending hash values, e.g. the second hash value h (X) N ) Less than the last 10 hashes of the third ascending hash value setValue (i.e. from h (Y) M-9 ) To h (Y) M ) Deleting m hash values from the third ascending hash value set to obtain a fourth ascending hash value set [ h (Y) 6 ),h(Y 7 ),h(Y 8 )……h(Y M-10 )]。
The first set of ascending hash values h (X) is then set 1 ),h(X 2 ),……h(X N )]And a fourth set of ascending hash values [ h (Y) ] 6 ),h(Y 7 ),h(Y 8 )……h(Y M-10 )]Comparing the hash values to determine a common hash value set. This may result in h (X) in the first set of ascending hash values 2 ) To h (X) N ) Without the need to re-associate the first n hash values (e.g., h (Y)) of the second set of ascending hash values, respectively 1 ),h(Y 2 ),h(Y 3 ),h(Y 4 ) And h (Y) 5 ) Are compared and h (X) in the first set of ascending hash values is made 1 ) To h (X) N-1 ) Without the need to match the last m hash values in the second set of ascending hash values, respectively (e.g., h (Y) M-9 ) To h (Y) M ) To reduce the amount of data compared to some extent.
After determining the common data set of the plain texts of the private data sets of both parties, in step S240, the intermediate party C encrypts the common hash value set by using the target keys of each party, respectively, to obtain the common hash value set ciphertext corresponding to each party. Specifically, the common hash value set is encrypted by using a target key of the first party A to obtain a common hash value set ciphertext corresponding to the first party A; and encrypting the common hash value set by using the target key of the second party B to obtain a common hash value set ciphertext corresponding to the second party B.
In step S250, the intermediate party C transmits the common hash value set ciphertexts corresponding to the parties respectively, so that the parties determine common data between the parties. In this step, the intermediate party C sends the common hash value set ciphertext corresponding to the first party a, and sends the common hash value set ciphertext corresponding to the second party B to the first party a.
Subsequently, when the target keys held by the first party a and the second party B are symmetric keys, the first party a and the second party B decrypt the received common hash value set ciphertext respectively by using the target keys KeyA and KeyB held by the first party a and the second party B, and obtain the common hash value set plaintext between the two parties. The first party A and the second party B respectively determine shared data between the two parties from the private data in the private data sets held by the first party A and the second party B based on the hash value set plaintext.
It can be understood that the first party a has each private data X therein as a result of performing the hash calculation on each private data in the first private data set by using the preset hash processing before i The correspondence (referred to as a first correspondence) between the plaintext and the hash value thereof, the second party B has therein each private data Y by performing the hash calculation on each private data in the second private data set previously by using the preset hash processing previously j The correspondence between the plaintext and its hash value (referred to as the second correspondence). Correspondingly, taking the first party a as an example, the first party a may determine the common data between the two parties directly from the first private data set based on the first correspondence and the plaintext of the common hash value set. The process of determining the common data by the second party B may refer to the above-mentioned manner of determining the common data by the first party a, and is not described herein again.
In the case where the target key held by each of the first party a and the second party B is the asymmetric key PK, it can be understood that the first party a has each piece of private data X by previously encrypting the hash value of each piece of private data in the first private data set by PK i Has a corresponding relationship between the plain text of the hash value and the ciphertext (referred to as a third corresponding relationship), and the first party a has a first corresponding relationship between each piece of the plain text of the private data in the first private data set and the hash value thereof.
The second party B has the pieces of private data Y because the hash values of the pieces of private data in the second private data set were previously encrypted with PK j And the second party B has a second correspondence between each piece of the private data plaintext in the second private data set and its hash value.
Accordingly, taking the first party a as an example, the first party a may determine the common data between the first party a and the second party B based on the received ciphertext of each common hash value in the ciphertext of the common hash value set, and the third corresponding relationship and the first corresponding relationship. The process of determining the common data by the second party B can be referred to the process of determining the common data by the first party a, and is not described herein again.
In the embodiment, data are encrypted and transmitted between the first party and the second party and between the first party and the intermediate party, leakage of private data in the transmission process can be avoided, the intermediate party can only obtain the hash value of the private data of each party and cannot obtain the private data plaintext of each party, the intermediate party determines the shared data on the basis of the hash value plaintext, privacy of the private data can be guaranteed, meanwhile, the calculation and communication costs in the shared data determination process are reduced, the intermediate party does not need support of a special environment, and equipment cost is saved.
Corresponding to the first party and the second party, neither of the first party and the second party can obtain the plain text and the hash value of the private data of the other party, and accordingly, the situation that the plain text of the private data is recovered in a traversal mode based on the preset hash processing and the hash value of the other party when any one of the first party and the second party is a malicious third party can be avoided, and the safety of the private data of each party is better ensured.
The foregoing describes certain embodiments of the present specification, and other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily have to be in the particular order shown or in sequential order to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Corresponding to the above method embodiment, this specification embodiment provides a common data determination method for protecting data privacy, as shown in fig. 3, where the method is performed by a first party a310, a second party B320, and an intermediary party C330, and the method includes:
the first party a310 and the second party B320 respectively encrypt the hash value sets held by themselves by using respective target keys to obtain corresponding encrypted data, and send the corresponding encrypted data to the intermediate party C330, wherein the hash value sets are obtained by each party performing preset hash operation on each private data held by each party;
the middle party C330, obtaining the encrypted data sent by each party; decrypting the encrypted data of each party to obtain a plaintext of a hash value set of each party; comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties; encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party; respectively sending the common hash value set ciphertexts corresponding to each party;
the first party a310 and the second party B320 determine common data between the two parties based on the received common hash value set ciphertext.
In an implementation manner, the predetermined hash operation is obtained by pre-negotiation between the first party and the second party.
In one embodiment, the method further comprises:
the middle party C330 generates corresponding target keys for each party by using a preset key generation algorithm;
and respectively sending the target keys corresponding to the parties.
In one possible implementation, the preset key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
In an implementation manner, in the case that the preset key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different.
In one embodiment, the determining the common data between the two parties includes:
the first party A310 and the second party B320 respectively utilize respective target keys to decrypt the received common hash value set ciphertext to obtain a common hash value set plaintext; and determining the shared data between the two parties by using the common hash value set plaintext and the hash values corresponding to the private data held by the common hash value set plaintext.
Corresponding to the above method embodiment, this specification embodiment provides a shared data determining apparatus 400 for protecting data privacy, where the apparatus is deployed at an intermediary party, and a schematic block diagram of the apparatus is shown in fig. 4, and includes:
an obtaining module 410 configured to obtain respective encrypted data from a first party and a second party, wherein the encrypted data is obtained by each party encrypting a hash value set held by each party by using its respective target key, and the hash value set is obtained by each party performing a predetermined hash operation on each private data held by each party;
the decryption module 420 is configured to decrypt the encrypted data of each party to obtain a plaintext of the hash value set of each party;
a comparison determining module 430 configured to compare the plaintext hash value sets of the two parties and determine a common hash value set of the plaintext hash value sets of the two parties;
the encryption module 440 is configured to encrypt the common hash value set by using the target keys of the parties respectively to obtain common hash value set ciphertexts corresponding to the parties;
the first sending module 450 is configured to send the common hash value set ciphertexts corresponding to the parties respectively, so that the parties determine common data between the parties.
In an implementation manner, the predetermined hash operation is obtained by pre-negotiation between the first party and the second party.
In one embodiment, the apparatus further comprises:
a generating module (not shown in the figure) configured to generate a target key corresponding to each party by using a preset key generating algorithm;
and a second sending module (not shown in the figure) configured to send the target keys corresponding to the parties respectively.
In one implementation, the preset key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
In an implementation manner, in the case that the preset key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different.
The above device embodiments correspond to the method embodiments, and specific descriptions may refer to descriptions of the method embodiments, which are not repeated herein. The device embodiment is obtained based on the corresponding method embodiment, has the same technical effect as the corresponding method embodiment, and for the specific description, reference may be made to the corresponding method embodiment.
The present specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the common data determination method for protecting data privacy provided in the specification.
The embodiment of the specification further provides a computing device, which comprises a memory and a processor, wherein the memory stores executable codes, and the processor executes the executable codes to realize the common data determination method for protecting data privacy provided by the specification.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the storage medium and the computing device embodiments, since they are substantially similar to the method embodiments, they are described relatively simply, and reference may be made to some descriptions of the method embodiments for relevant points.
Those skilled in the art will recognize that the functionality described in embodiments of the invention may be implemented in hardware, software, firmware, or any combination thereof, in one or more of the examples described above. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments further describe the objects, technical solutions and advantages of the embodiments of the present invention in detail. It should be understood that the above description is only exemplary of the embodiments of the present invention, and is not intended to limit the scope of the present invention, and any modification, equivalent replacement, or improvement made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (13)

1. A common data determination method to protect data privacy, the method performed by an intermediary, comprising:
respectively acquiring respective encrypted data from a first party and a second party, wherein the encrypted data is obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party;
decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party;
comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties;
encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party;
and respectively transmitting the common hash value set ciphertexts corresponding to the parties so that the parties determine common data between the parties.
2. The method of claim 1, wherein the predetermined hash operation is pre-negotiated between the first party and the second party.
3. The method of claim 1, further comprising:
respectively generating corresponding target keys for each party by using a preset key generation algorithm;
and respectively sending the target keys corresponding to the parties.
4. The method of claim 3, wherein the pre-key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
5. The method of claim 4, wherein in case that the pre-set key generation algorithm is a symmetric key generation algorithm, target keys of the parties are different.
6. A method of common data determination to protect data privacy, the method performed by a first party, a second party and an intermediary party, the method comprising:
the first party and the second party respectively encrypt the hash value set held by the first party and the second party by using respective target keys to obtain corresponding encrypted data and send the corresponding encrypted data to the intermediate party, wherein the hash value set is obtained by each party performing preset hash operation on each private data held by each party;
the intermediate party acquires encrypted data sent by each party; decrypting the encrypted data of each party to obtain the plaintext of the hash value set of each party; comparing the plain texts of the hash value sets of the two parties, and determining a common hash value set of the plain texts of the hash value sets of the two parties; encrypting the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party; respectively sending the common hash value set ciphertexts corresponding to each party;
and the first party and the second party determine the common data between the two parties based on the received common hash value set ciphertext.
7. The method of claim 6, wherein the predetermined hash operation is pre-negotiated by the first party and the second party according to the method of claim 1.
8. The method of claim 6, further comprising:
respectively generating corresponding target keys for each party by using a preset key generation algorithm;
and respectively sending the target keys corresponding to the parties.
9. The method of claim 8, wherein the pre-key generation algorithm is a symmetric key generation algorithm or an asymmetric key generation algorithm.
10. The method as claimed in claim 9, wherein in the case where the pre-set key generation algorithm is a symmetric key generation algorithm, the target keys of the parties are different.
11. The method of claim 10, wherein the determining common data between the two parties comprises:
the first party and the second party respectively decrypt the received common hash value set ciphertext by using respective target keys to obtain a common hash value set plaintext; and determining the shared data between the two parties by using the common hash value set plaintext and the hash values corresponding to the private data held by the common hash value set plaintext.
12. A mutual data determination apparatus to protect data privacy, the apparatus deployed at an intermediary, comprising:
the acquisition module is configured to acquire respective encrypted data from a first party and a second party respectively, wherein the encrypted data is obtained by encrypting a hash value set held by each party by using a respective target key of each party, and the hash value set is obtained by performing preset hash operation on each private data held by each party;
the decryption module is configured to decrypt the encrypted data of each party to obtain the plaintext of the hash value set of each party;
the comparison determining module is configured to compare the plain texts of the hash value sets of the two parties and determine a common hash value set of the plain texts of the hash value sets of the two parties;
the encryption module is configured to encrypt the common hash value set by using the target keys of each party to obtain a common hash value set ciphertext corresponding to each party;
and the first sending module is configured to send the common hash value set ciphertexts corresponding to the parties respectively so that the parties determine common data between the parties.
13. A computing device comprising a memory and a processor, wherein the memory has stored therein executable code that when executed by the processor implements the method of any of claims 1-5.
CN202210467587.1A 2022-04-24 Shared data determining method and device for protecting data privacy Active CN114866312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210467587.1A CN114866312B (en) 2022-04-24 Shared data determining method and device for protecting data privacy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210467587.1A CN114866312B (en) 2022-04-24 Shared data determining method and device for protecting data privacy

Publications (2)

Publication Number Publication Date
CN114866312A true CN114866312A (en) 2022-08-05
CN114866312B CN114866312B (en) 2024-07-12

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116757558A (en) * 2023-08-16 2023-09-15 山东嘉隆新能源股份有限公司 Alcohol refining process quality prediction method and system based on data mining

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE202015104128U1 (en) * 2015-08-06 2015-11-11 CompuGroup Medical AG Data Access System
CN109710898A (en) * 2018-12-07 2019-05-03 网智天元科技集团股份有限公司 Duplicate checking method, apparatus, electronic equipment and the storage medium of text
CN109905720A (en) * 2019-02-26 2019-06-18 北京工业大学 Name the buffer replacing method based on video on-demand system under data network
CN112100680A (en) * 2020-11-16 2020-12-18 支付宝(杭州)信息技术有限公司 Multi-platform data processing method and device for protecting privacy
CN113556225A (en) * 2021-07-07 2021-10-26 深圳前海新心数字科技有限公司 Efficient PSI (program specific information) method based on Hash and key exchange
CN113672619A (en) * 2021-08-17 2021-11-19 天津南大通用数据技术股份有限公司 Method for segmenting data more uniformly according to hash rule
CN113901425A (en) * 2021-09-16 2022-01-07 医渡云(北京)技术有限公司 Method, device, storage medium and equipment for solving intersection safely by multiple parties
CN114021198A (en) * 2021-12-29 2022-02-08 支付宝(杭州)信息技术有限公司 Method and device for determining common data for protecting data privacy
CN114329527A (en) * 2021-12-17 2022-04-12 阿里巴巴(中国)有限公司 Intersection data acquisition method, equipment and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE202015104128U1 (en) * 2015-08-06 2015-11-11 CompuGroup Medical AG Data Access System
CN109710898A (en) * 2018-12-07 2019-05-03 网智天元科技集团股份有限公司 Duplicate checking method, apparatus, electronic equipment and the storage medium of text
CN109905720A (en) * 2019-02-26 2019-06-18 北京工业大学 Name the buffer replacing method based on video on-demand system under data network
CN112100680A (en) * 2020-11-16 2020-12-18 支付宝(杭州)信息技术有限公司 Multi-platform data processing method and device for protecting privacy
CN113556225A (en) * 2021-07-07 2021-10-26 深圳前海新心数字科技有限公司 Efficient PSI (program specific information) method based on Hash and key exchange
CN113672619A (en) * 2021-08-17 2021-11-19 天津南大通用数据技术股份有限公司 Method for segmenting data more uniformly according to hash rule
CN113901425A (en) * 2021-09-16 2022-01-07 医渡云(北京)技术有限公司 Method, device, storage medium and equipment for solving intersection safely by multiple parties
CN114329527A (en) * 2021-12-17 2022-04-12 阿里巴巴(中国)有限公司 Intersection data acquisition method, equipment and system
CN114021198A (en) * 2021-12-29 2022-02-08 支付宝(杭州)信息技术有限公司 Method and device for determining common data for protecting data privacy

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
景旭;李冰冰;何东健;: "跨隐私数据库加密数据等值连接共享协议", 西安交通大学学报, no. 08 *
景旭;李冰冰;何东健;: "跨隐私数据库加密数据等值连接共享协议", 西安交通大学学报, no. 08, 10 August 2012 (2012-08-10) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116757558A (en) * 2023-08-16 2023-09-15 山东嘉隆新能源股份有限公司 Alcohol refining process quality prediction method and system based on data mining
CN116757558B (en) * 2023-08-16 2023-11-17 山东嘉隆新能源股份有限公司 Alcohol refining process quality prediction method and system based on data mining

Similar Documents

Publication Publication Date Title
CN107196763B (en) SM2 algorithm collaborative signature and decryption method, device and system
CN109309569B (en) SM2 algorithm-based collaborative signature method and device and storage medium
US10178090B2 (en) System and methods for protecting keys using garbled circuits
CN108199835B (en) Multi-party combined private key decryption method
US10205713B2 (en) Private and mutually authenticated key exchange
CN110224812B (en) Method and equipment for communication between electronic signature mobile client and collaboration server based on multi-party security calculation
US20160119120A1 (en) Method and apparatus for public-key encrypted communication
CN112287377A (en) Model training method based on federal learning, computer equipment and storage medium
CN111130803A (en) Method, system and device for digital signature
US9130744B1 (en) Sending an encrypted key pair and a secret shared by two devices to a trusted intermediary
US11368312B2 (en) Signature generation and verification system
KR20210139344A (en) Methods and devices for performing data-driven activities
CN113765662B (en) Signature and decryption method and system based on SM2 algorithm
CN113239403A (en) Data sharing method and device
CN114547668A (en) Secret trace query method and device based on country secret and index confusion
CN115001681A (en) Key recovery method, device, system, storage medium and electronic device
CN114117406A (en) Data processing method, device, equipment and storage medium
US10700870B2 (en) Signature generation and verification system
CN115001719B (en) Private data processing system, method, device, computer equipment and storage medium
CN110401524A (en) A kind of collaboration generation method and system comprising secret number by homomorphic cryptography
US20230188330A1 (en) System and method for identity-based key agreement for secure communication
CN115412246A (en) Method, device, equipment and storage medium for inadvertent transmission
KR102304831B1 (en) Encryption systems and method using permutaion group based cryptographic techniques
CN114866312A (en) Common data determination method and device for protecting data privacy
CN114866312B (en) Shared data determining method and device for protecting data privacy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant