CN112822201B - Privacy-protecting difference data determination method, device, equipment and system - Google Patents
Privacy-protecting difference data determination method, device, equipment and system Download PDFInfo
- Publication number
- CN112822201B CN112822201B CN202110087022.6A CN202110087022A CN112822201B CN 112822201 B CN112822201 B CN 112822201B CN 202110087022 A CN202110087022 A CN 202110087022A CN 112822201 B CN112822201 B CN 112822201B
- Authority
- CN
- China
- Prior art keywords
- data
- encryption
- difference
- primary
- encrypted
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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/0478—Network 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 applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The present specification provides a method, an apparatus, a device and a system for determining difference data for privacy protection, wherein two parties respectively holding different data encrypt the data held by themselves once, and then one party sends the encrypted data to the other party for secondary encryption, and the other party adds a disorder means when encrypting the data of the other party for secondary encryption, so that the other party cannot obtain the plaintext of the difference data and the plaintext of the intersection data based on the positions of the data even after obtaining the difference data of the encrypted data of the two parties. The party not scrambled can know the plaintext of the difference data based on the encrypted set of difference data sent by the other party and the own data set. The plaintext of the obtained difference data is only data having a difference between the data held by the plaintext itself and the data held by the partner, and the data value of the difference data in the data held by the partner cannot be known.
Description
Technical Field
The present specification belongs to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a system for determining difference data for protecting privacy.
Background
As computer technology has developed, data becomes more important, and different users may have different data, but some scenarios may require two or even more parties to analyze the data together. In which, querying data with difference from data of multiple parties may have important applications in some scenarios, such as: the method comprises the steps of finding out customers with inconsistent filling personal information in common customers of two parties so as to identify potential risk customers (such as fraud customers and money laundering customers who steal identification numbers of other people), and finding out customers with different identification card numbers in the same customers of the two parties and the same mobile phone numbers so as to identify potential risk customers. However, the data of each party may relate to privacy of different aspects of the user, and each party does not want the own data to be exposed, and how to query the data with difference in the data of each party under the condition that the data of each party is not exposed is an important problem in the field.
Disclosure of Invention
An embodiment of the present specification aims to provide a method, an apparatus, a device, and a system for determining privacy-protecting difference data, which are used for determining the difference data and ensuring security in a process of determining the privacy-protecting difference data.
In a first aspect, an embodiment of the present specification provides a privacy-protecting difference data determination method, which is applied to a first system in which a first data set is stored, and includes:
encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
sending the first data primary encryption set to a second system, so that the second system uses a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
decrypting the data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a difference data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key;
sending the encrypted set of difference data to the second system such that the second system obtains a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
In a second aspect, the present specification provides a privacy-preserving difference data determination method, which is applied to a second system having a second data set stored therein, and includes:
encrypting the data in the second data set by using a second key to obtain a first-level encryption set of second data;
sending the second data primary encryption set to a first system; a first data set is stored in the first system;
carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
sending the first data secondary encryption set to the first system, so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
receiving a difference data encryption set sent by the first system, and determining a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
In a third aspect, the present specification provides a privacy-preserving difference data determination apparatus, applied to a first system in which a first data set is stored, the apparatus including:
the first data primary encryption module is used for encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
the first data secondary encryption module is used for sending the first data primary encryption set to a second system so that the second system can use a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
the first data decryption module is used for decrypting data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
the difference data determining module is used for determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a difference data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key;
a difference data decryption module, configured to send the encrypted set of difference data to the second system, so that the second system obtains a plaintext set of difference data of the first data set and the second data set based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
In a fourth aspect, the present specification provides a privacy-preserving difference data determination apparatus, applied to a second system in which a second data set is stored, the apparatus including:
the first data level encryption module is used for encrypting the data in the first data set by using a first key to obtain a first data level encryption set;
the second data encryption sending module is used for sending the second data primary encryption set to the first system; a first data set is stored in the first system;
the first data disorder encryption module is used for carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
the data sending module is used for sending the first data secondary encryption set to the first system so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
a difference data plaintext determination module, configured to receive a difference data encryption set sent by the first system, and determine a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second primary data encryption set and the first secondary data decryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
In a fifth aspect, an embodiment of the present specification provides a privacy-preserving difference data determining apparatus, including at least one processor and a memory for storing processor-executable instructions, where the processor executes the instructions to implement the privacy-preserving difference data determining method according to the first aspect or the second method.
In a sixth aspect, an embodiment of the present specification provides a differential data determination system for protecting privacy, including: the system comprises a first system and a second system, wherein a first data set is stored in the first system, and a second data set is stored in the second system; wherein the first system comprises at least one processor and a memory for storing processor-executable instructions, and the processor executes the instructions to implement the method of the first aspect;
the second system comprises at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the method of the second aspect.
According to the privacy-protecting differential data determining method, the device, the equipment and the system, after two parties respectively holding different data encrypt the data held by the parties for the first time, one party sends the encrypted data to the other party for the second-level encryption, and the other party adds a disorder means when encrypting the data of the other party for the second-level encryption, so that the other party cannot obtain the plaintext of the differential data and the plaintext of the intersection data based on the positions of the data even after obtaining the differential data of the encrypted data of the two parties. The party not scrambled can know the plaintext of the difference data based on the encrypted set of difference data sent by the other party and the own data set. The plaintext of the obtained difference data is only data having a difference between the data held by the plaintext itself and the data held by the partner, and the data value of the difference data in the data held by the partner cannot be known. The method and the device realize that the data with difference between two parties can be obtained without exposing any plaintext data, ensure the safety of the data and lay a data foundation for the subsequent data analysis and processing.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a privacy preserving difference data determination method provided by an embodiment of the present specification;
FIG. 2 is a schematic flow chart diagram illustrating a method for determining difference data for privacy protection in accordance with yet another embodiment of the present disclosure;
FIG. 3 is a data flow diagram of a privacy preserving difference data determination in an example scenario herein;
FIG. 4 is a block diagram of an embodiment of a privacy preserving difference data determining apparatus provided herein;
FIG. 5 is a block diagram of another embodiment of a privacy preserving difference data determining apparatus provided herein;
fig. 6 is a block diagram of a hardware configuration of a privacy-preserving difference data determination server in one embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
With the development of computer internet technology, data analysis becomes more and more important, and the scenes of data analysis by cooperation of multiple parties are more and more. Generally, in the multi-party cooperation process, people do not want own data to be leaked so as to ensure the safety of own data. The embodiment of the present specification provides a method for determining differential data for privacy protection, which may be applied to two data holders that respectively possess different data. The difference data in the embodiments of the present specification is completely different from simple data, and the difference data may be understood as data having the same contents in part but different contents in part, such as: if data 1 and data 2 are both composed of two parts: the data identification and the data content, if the data identifications of the data 1 and the data 2 are the same, but the data contents are different, the data 1 and the data 2 can be considered as data with difference. For another example: party a has a set S1= { < xi, ui > }, party B has a set S2= { < yi, vi > }, and the set of difference data of party a and party B can be expressed as: s3= { xj | < xj, uj > in S1 and < yk, vk > in S2, and xj = = yk and uj! = vk }. Of course, if one of the data is available, the other does not have: party a has data 1, but party B does not have data 1, then data 1 cannot be considered differential data.
Fig. 1 is a schematic flowchart of an embodiment of a privacy-preserving difference data determination method provided in an embodiment of the present specification. Although the present specification provides the method steps or apparatus structures as shown in the following examples or figures, more or less steps or modules may be included in the method or apparatus structures based on conventional or non-inventive efforts. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution order of the steps or the block structure of the apparatus is not limited to the execution order or the block structure shown in the embodiments or the drawings of the present specification. When the described method or module structure is applied to a device, a server or an end product in practice, the method or module structure according to the embodiment or the figures may be executed sequentially or in parallel (for example, in a parallel processor or multi-thread processing environment, or even in an implementation environment including distributed processing and server clustering).
In an embodiment of the present specification, there may be two systems, that is, a first system and a second system, where different data sets, that is, a first data set and a second data set, are stored in the first system and the second system, respectively. In a specific embodiment, as shown in fig. 1, in an embodiment of the privacy-protecting difference data determining method provided in this specification, the method may be applied to a first system, where the first system may be understood as a system on a data side that owns a first data set, the first system stores the first data set, and the first system may be a computer, a tablet, a server, and the like, where the method may include the following steps:
and 102, encrypting the data in the first data set by using a first key to obtain a first data primary encryption set.
In a specific implementation process, the first system may generate a first key, which is a key for encrypting data, in advance, and a generation method of the key is not specifically limited in this embodiment of the present specification. When it is necessary to work with other data parties to obtain difference data in the two data parties, the first system may encrypt data in a first data set owned by the first system by using the first key, that is, encrypt each data in the first data set by using the first key, and use each encrypted data set as a first data primary encryption set.
104, sending the first data primary encryption set to a second system, so that the second system uses a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second set of data is stored within the second system.
In a specific implementation process, the first system encrypts the first data set owned by the first system to obtain a first data primary encryption set, and can send the obtained first data primary encryption set to the second system, and the second system encrypts the data owned by the first system in a secondary manner. The second system may also generate a second key, which is a key used for data encryption, in advance, and the general second key is different from the first key. After receiving the first data primary encryption set sent by the first system, the second system can perform out-of-order encryption on the data in the received first data primary encryption set by using a second key generated by the second system, so as to obtain a first data secondary encryption set. In some embodiments of this specification, the second system may first scramble the received data in the first data primary encryption set, and then encrypt the scrambled data to obtain the first data secondary encryption set. Or, the second system may encrypt the data in the received first data primary encryption set first, and then scramble the encrypted data to obtain the first data secondary encryption set. After the second system obtains the second-level encrypted set of the first data through encryption, the obtained second-level encrypted set of the first data can be sent to the first system.
And 106, decrypting the data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set.
In a specific implementation process, after the second system performs out-of-order encryption on the first data primary encryption set sent by the first system, the second system may send the encrypted first data secondary encryption set to the first system. After receiving the second-level encryption set of the first data sent by the second system, the first system may decrypt the data in the received second-level encryption set of the first data by using the key for encrypting the first data set, that is, the first key, to obtain the second-level decryption set of the first data.
It should be noted that, in the embodiment of the present specification, the data encryption is performed by using an interchangeable deterministic encryption algorithm, the deterministic encryption may be understood as that the same ciphertext is obtained from each encryption of the same plaintext, the interchangeable encryption may be understood as that the two encryptions are performed by using two different keys k1 and k2, the encryption result is not changed by using different key sequences, and the decryption sequence may be the same as or different from the encryption sequence during decryption. An interchangeable deterministic encryption algorithm that meets the requirements can be selected according to actual needs, such as: DH (Diffie-Hellman key exchange) algorithm or RSA algorithm, etc., the DH algorithm can make two parties create a key through the insecure channel under the condition of no advance information of the other party, the key can be used as a symmetric key to encrypt the communication content in the subsequent communication, and the RSA algorithm can use different encryption keys and decryption keys. Based on the alternative deterministic encryption algorithm, the first system can decrypt the data in the first data secondary encryption set encrypted by the second system by using the own first key. The decrypted second-level decrypted set of the first data is actually only the first-level encryption of the data in the first data set held by the first system by the second system, but the second system cannot obtain the first authenticated data because the encrypted data is sent to the second system by the first system. Moreover, when the second system encrypts the data sent by the first system, out-of-order encryption is used, so that even after decryption, the first system obtains a first data secondary decryption set with a data order in the first data set that is inconsistent, that is, the first system cannot know the plaintext of each data in the first data secondary decryption set, and when subsequently determining the difference data, cannot know the plaintext of the intersection of the data with the second system, and further cannot obtain which data the second system has, thereby ensuring the security of the data of the second system.
Step 108, determining data which is different from the first data secondary decryption set in the received second data primary encryption set, and obtaining a difference data encryption set; and the second data primary encryption set is sent by the second system after encrypting the data in the second data set by using the second key.
In a specific implementation process, the first system may receive the second primary encrypted data set sent by the second system, and decrypt the first secondary encrypted data set sent by the second system, so that the first system has a piece of re-encrypted data of the first data set and the second data set, and the encryption methods are the same. In the embodiment of the present specification, an interchangeable deterministic encryption algorithm is selected to encrypt the first data set and the second data set respectively, the encryption sequence does not change the encryption result, and the ciphertexts obtained by encrypting the same data are the same, so that if the encrypted data after encryption are different, the original data are also different. The first system compares the received data in the first-level data encryption set with the data in the second-level data decryption set, so as to determine the data in the first-level data encryption set, which is different from the data in the first-level data decryption set, and obtain a difference data encryption set, wherein the difference data in the set is re-encrypted data of the difference data in the first data set and the second data set.
Referring to the description of the above embodiment, the difference data in this embodiment may be understood as data with a part of contents different from the same part of contents, and it may be determined whether data with a part of contents being the same but a part of contents being different exists in the two sets by comparing data in the second primary data encryption set with data in the first secondary data decryption set. The determined difference data is ciphertext data obtained by encrypting data in the first data set and the second data set, and the determined difference data can be used as a difference data encryption set. In the embodiments of the present specification, data that is different from the first data secondary decryption key in the second data primary encryption set is determined, and therefore, the data in the difference data encryption set can be actually understood as part of the data screened out from the second data primary encryption set.
In some embodiments of the present specification, each data in the first data set and the second data set comprises a data identity and a data content; the determining data in the received second data primary encryption set that is different from the first data secondary decryption set includes:
and querying data which has the same data identification and different data contents in the second data primary encryption set and the first data secondary decryption set, and adding the queried data pair into the differential data encryption set.
In a specific implementation process, in this embodiment of the present specification, data having the same data identifier but different data content may be queried, and of course, data having the same data content but different data identifier may also be queried. When data which are different from data in the first data secondary decryption set exist in the second data primary encryption set, the data which are the same in data identification and different in data content in the first data secondary decryption set in the second data primary encryption set can be inquired, and the inquired data are stored in the different data encryption set. For example: the second data primary encryption set comprises 3 data A1, B1 and C1, wherein the data identifier of A1 is ID1, the data content is L1, the data identifier of B1 is ID2, the data content is L2, the data identifier of C1 is ID3, and the data content is L3. The first data secondary decryption set comprises 4 data A2, B2, C2 and D2, wherein the data identifier of A2 is ID1, the data content is L1, the data identifier of B2 is ID2, the data content is L2, the data identifier of C2 is ID3, the data content is L5, the data identifier of D2 is ID4, and the data content is L4. By comparing the second data primary encryption set with the first data secondary decryption set, it is known that the data identifications of the data C1 and the data C2 are both ID3 and the data contents are different, and based on this, it is determined that the difference data between the second data primary encryption set and the first data secondary decryption set is the data C1 (data identification = ID3, data contents = L3).
In practical application, the data identifier and the data content of the data can be set according to practical needs, such as: if users with the same mobile phone number but different identification numbers need to be screened out, the mobile phone number can be used as a data identifier, and the identification number can be used as data content; if the users with the same identification number but different user personal information need to be screened out, the identification number can be used as a data identifier, and the user personal information can be used as data content. By reasonably setting the data identification and the data content, the method provided by the embodiment of the specification can be used for quickly screening out the data with difference, and ensuring that both sides do not reveal respective real data, thereby ensuring the safety of the data.
In a specific implementation process, when the second system performs secondary encryption on data in the first data set of the first system, out-of-order encryption is used, so that the order of the data in the first data secondary encryption set is inconsistent with the order of the data in the first data set, and although the order of the data in the second data secondary encryption set is not disturbed, the data in the second data secondary encryption set is ciphertext data after data in the second system is encrypted, and the first system cannot know the plaintext of the data. Therefore, even if the first system obtains the difference data in the first data secondary decrypted set and the second data primary encrypted set, the obtained difference data cannot be decrypted, that is, the plaintext of the difference data cannot be obtained. Meanwhile, the first system cannot obtain the plaintext of the intersection with the data of the second system, and further cannot confirm which data the second system has, so that the security of the data of the second system is ensured. After obtaining the difference data encryption set, the first system may send the obtained difference data encryption set to the second system, because the second data set held by the second system is not in disorder in the encryption process, and what the first system screens out is data that is different from the first data secondary decryption set in the second data primary encryption set, that is, the data in the difference data encryption set is actually part of the data in the second data secondary encryption set. After the second system receives the difference data encryption set sent by the first system, the plaintext of the data in the difference data encryption set can be obtained by comparing the data in the difference data encryption set with the data in the second data set owned by the second system, namely the difference data plaintext set, and the difference data plaintext set can represent the data with difference in the first data set and the second data set.
When the second system determines the differential data plaintext set, the second system may compare the position, that is, the sequence, of each data in the differential data encrypted set sent by the first system in the set with the position of the data in the second data set, so as to determine the plaintext of the data with the difference. For example: when the first system determines the differential data encryption set, the data without the difference in the second data secondary encryption set can be set to be null, so that the ordering of the data in the differential data encryption set is not changed, or the original ordering of the differential data in the set can be marked in the differential data encryption set, so that the second system can quickly determine the plaintext of the differential data. Or the second system directly decrypts the data in the received difference data encryption set, so as to obtain the plaintext of the data in the difference data encryption set. Of course, the second system may also obtain the plaintext of the difference data in other manners, and the embodiments of the present specification are not particularly limited. The obtained difference data can be used for subsequent data analysis such as: risk analysis, account theft analysis, and the like.
In some embodiments of the present specification, each data in the first data set and the second data set comprises a data identity and a data content; the sending the encrypted set of difference data to the second system comprises:
and sending the data identification or the data identification hash value in the differential data encryption set or the position of the data in the differential data encryption set in the second data primary encryption set to the second system.
In a specific implementation process, when the first system sends the difference data encryption set to the second system, the first system may obtain a data identifier of data in the difference data encryption set or perform hash calculation on the obtained data identifier, to obtain a hash value of the data identifier of the difference data, and send the obtained data identifier or data identifier hash value of the difference data to the second system, and the second system may obtain corresponding data content based on the hash value represented by the data identifier or data, such as: and decrypting the received data identifier or the data identifier hash value by using the second key to obtain a plaintext of the data identifier, and comparing the plaintext with the data in the second data set to obtain the plaintext of the data content of the difference data. The data identification is convenient to be small, and the data transmission size can be reduced by only sending the data identification, so that the data transmission flow is saved.
Or, when the first system sends the difference data encryption set to the second system, the first system may also obtain the position of the data in the difference data encryption set in the second data primary encryption set and send the position to the second system, and the second system may also quickly obtain the plaintext of the difference data based on the position of the data.
For example: the second data set is S2= { a, b, c, d }, and the second system performs primary encryption on S2 to obtain a second data primary encryption set Y1{ a1, b1, c1, d1}. The difference data encryption set obtained by the first system based on the second data primary encryption set and the first data secondary decryption set may represent P = { a1, d1}, and the first system may obtain only the data identifier of a1, d1 as P1= { a1', d1' } and send the data identifier to the second system, or send the hash value obtained by performing hash calculation on the data in P1 to the second system. Alternatively, the first system may obtain the original location of the data within P in Y1, such as: bits 1 and 4, positions 1 and 4 of the difference data in Y1 are sent to the second system.
Further, in some embodiments of the present description, the received first data level encrypted set includes: the second system performs hash calculation on the data in the second data primary encryption set to obtain a data identification hash value and a data content hash value of each data;
determining data in the received second primary data encryption set that is different from the first secondary data decryption set, including:
calculating the data identification hash value and the data content hash value of each data in the first data secondary encryption set;
and inquiring data which has the same data identification hash value and different data content hash values in the second data primary encryption set and the first data secondary decryption set, and adding the inquired data pairs into the differential data encryption set.
In a specific implementation process, when the second system sends the encrypted first-level encrypted set of second data to the first system, the second system may choose to directly send the encrypted data to the first system, or choose to perform hash calculation on the encrypted data, and send the encrypted data after the hash calculation to the first system. When determining the difference data, the first system may perform hash calculation on the data in the decrypted first data secondary decryption set, and then compare the hash value of the data in the hash calculation data set with the hash value of the data in the second data primary encryption set sent by the second system. And screening out data which have the same data identification hash value and different data content hash values in the second data primary encryption set and the first data secondary decryption set as difference data to obtain a difference data encryption set. After the Hash calculation is carried out on the data after the first-stage encryption set of the second data, the data can be compressed, and the data transmission flow is reduced.
In the method for determining differential data for protecting privacy provided by the embodiments of the present specification, after two parties respectively holding different data encrypt their own data once, one of the parties sends the encrypted data to the other party for secondary encryption, and the other party adds a disordering means when performing secondary encryption on the data of the other party, so that the other party cannot obtain the plaintext of the differential data and the plaintext of the intersection data based on the positions of the data even after obtaining the differential data of the encrypted data of the two parties. The party not scrambled can know the plaintext of the difference data based on the encrypted set of difference data sent by the other party and the own data set. The plaintext of the obtained difference data is only data having a difference between the data held by the plaintext itself and the data held by the partner, and the data value of the difference data in the data held by the partner cannot be known. The method and the device realize that the data with difference between two parties can be obtained without exposing any plaintext data, ensure the safety of the data and lay a data foundation for the subsequent data analysis and processing.
In some embodiments of the present description, the method further comprises:
receiving the difference data plaintext set sent by the second system, wherein the difference data plaintext set comprises data identification plaintext of difference data; wherein the difference data plaintext set is obtained by the second system based on a data identification or a data identification hash value in the difference data encryption set or a location of data within the difference data encryption set in the second data-level encryption set.
In a specific implementation process, after receiving the data identifier or the data identifier hash value of the data in the differential data encryption set sent by the first system, the second system may decrypt the data identifier or the data identifier hash value by using its own second key, so as to obtain the plaintext of the differential data. If the position of the data in the difference data encryption set received by the second system in the second data primary encryption set is the same as the position of the data in the second data primary encryption set, the received position can be compared with the data in the second data set, and the plaintext of the data at the position can be obtained. The plaintext of the difference data obtained by the second system can comprise the plaintext of the data identification and can also comprise the plaintext of the data content, and the second system can send the plaintext of the data identification of the difference data to the first system as the plaintext of the difference data Wen Jige, so that the first system can know which data in the data held by the first system have problems based on the comparison between the obtained data identification with the first data set held by the first system, but cannot know the corresponding data content of the data identification in the second system. The difference data obtained by the second system is also data which is different from the first system in the held data, and the data content of the difference data in the first system cannot be obtained, so that the difference data is obtained on the premise of ensuring that the data of the two systems are not exposed.
On the basis of the foregoing embodiments, in some embodiments of the present specification, each data in the first data set and the second data set includes a data identifier and a data content, and when encrypting data in the first data set, the second data set, and the first data primary encryption set, the data identifier and the data content of each data in the set are encrypted respectively.
In a specific implementation process, the data in the embodiment of the present specification includes two partial data identifiers and data contents, and the data identifiers and the data contents may be specifically set according to actual needs, and the embodiment of the present specification is not specifically limited. In the embodiment of the present specification, when data is encrypted, data identifiers and data contents of the data may be encrypted respectively, so that neither the data identifiers nor the data contents are exposed. Of course, the key for encrypting the data identifier and the data content may be the same or different, and may be specifically set according to actual needs. If the same key is selected to encrypt the data identifier and the data content, one less key can be saved, and the memory occupation is reduced. If different keys are selected to encrypt the data identification and the data content, even if one key is cracked, the safety of the other part of data can be ensured, and the safety of the data is ensured.
For example: the first system may generate two first keys k1 and k3, encrypt the data identifier in the first data set using k1, and encrypt the data content in the first data set using k3. Similarly, the second system may also generate two second keys k2 and k4, encrypt the data identifiers in the second data set and the first data primary encryption set using k2, and encrypt the data contents in the second data set and the first data primary encryption set using k4.
By splitting the data, the data identification and the data content are encrypted respectively, so that the data with difference in the data can be inquired without exposing any part of the data.
In still other embodiments of the present specification, the encrypting the data identifier and the data content of each data in the set separately includes:
and embedding the data identifier of each data in the set into the data content, and encrypting the data identifier of each data in the set and the data content embedded with the data identifier respectively.
In a specific implementation process, when the data identifier and the data content of the data are encrypted respectively, the data identifier may be embedded in the data content, for example: the data identification is added to the data content to serve as new data content, and the new data content embedded with the data identification is encrypted, so that the data content corresponding to different data identifications can be guaranteed to be different, the data with different data identifications and the same data content are prevented from being exposed, and the safety of the data is guaranteed. Such as: the A party and the B party respectively have different sets of user data, the data identification in the data sets is a mobile phone number, the data content is a city, and different data identifications may correspond to the same data content. In the process of determining the difference data, one party can obtain the secondary encryption results of the data of the other party and the other party, and the number of users in the same city can be counted by comparing the two secondary encryption results, such as: and counting the number of users in Hangzhou city. In the embodiment of the specification, the data identification is embedded into the data content, that is, the mobile phone numbers are embedded into the cities, so that it can be ensured that the cities corresponding to the users with different mobile phone numbers are also different, and the number of the users in one city cannot be counted, thereby ensuring the safety of the data.
The above embodiment is a process executed by the first system in the query determination process of the difference data, and the embodiment of the present specification further provides a method for determining the difference data for protecting privacy in the query determination process of the difference data by the second system. Fig. 2 is a schematic flowchart of a privacy-preserving difference data determination method in another embodiment of the present disclosure, where the method is applied to a second system, where the second system may be understood as a system having a different data set from the first system, and the second system may be a computer, a tablet, a server, or a like terminal, and the method may include the following steps:
and 202, encrypting the data in the second data set by using a second key to obtain a second data primary encryption set.
In a specific implementation process, the first system and the second system in the embodiment of this specification may generate a key for data encryption, and the method for generating the key may refer to the description of the above embodiment. After the first system and the second system generate the keys, the data held by the first system and the data held by the second system can be encrypted by using the keys. Such as: the first system encrypts each data in the first data set by using a first key generated by the first system, the encrypted data set serves as a first data primary encryption set, and the second system can encrypt the data in the second data set by using a second key generated by the second system to obtain a second data primary encryption set.
In a specific implementation process, the second system may encrypt the own held data set to obtain a first-level encrypted set of second data, and then may send the first-level encrypted set of second data to the first system.
In some embodiments of the present description, sending the second data level encrypted set to the first system comprises:
calculating the data identification hash value and the data content hash value of each data in the second data primary encryption set;
and adding the calculated data identification hash value and data content hash value into the second primary data encryption set, and sending the second primary data encryption set to the first system, so that the first system determines the difference data encryption set based on the data identification hash value and the data content hash value of each data in the second primary data encryption set and the first secondary data decryption set.
In a specific implementation process, when the second system sends the encrypted first-level encrypted set of second data to the first system, the second system may choose to directly send the encrypted data to the first system, or choose to perform hash calculation on the encrypted data, and send the encrypted data after the hash calculation to the first system. Such as: the data identifier and the data content in the first-level data encryption set can be respectively subjected to hash calculation to obtain a data identifier hash value and a data content hash value, and the set of the data identifier hash value and the data content hash value is sent to the first system as the first-level data encryption set. When determining the difference data, the first system may perform hash calculation on the data in the decrypted first data secondary decryption set, and then compare the hash value of the data in the hash calculation data set with the hash value of the data in the second data primary encryption set sent by the second system. And screening out data which have the same data identification hash value and different data content hash values in the second data primary encryption set and the first data secondary decryption set as difference data to obtain a difference data encryption set. After the Hash calculation is carried out on the data after the first-stage encryption set of the second data, the data can be compressed, and the data transmission flow is reduced.
In a specific implementation process, the first system encrypts the first data set owned by the first system to obtain a first data primary encryption set, and may send the obtained first data primary encryption set to the second system. After receiving the first data primary encryption set sent by the first system, the second system can perform out-of-order encryption on the data in the received first data primary encryption set by using a second key generated by the second system, so as to obtain a first data secondary encryption set. The sequence of the data in the first data secondary encryption set after the out-of-order encryption is different from the sequence of the data in the first data primary encryption set before the encryption.
In some embodiments of this specification, the performing, by using the second key, out-of-order encryption on data in a first data primary encryption set sent by the first system to obtain a first data secondary encryption set includes:
encrypting the received data in the first data primary encryption set by using the second key, and scrambling the sequence of the data in the encrypted first data encryption set to obtain a first data secondary encryption set;
or, scrambling the sequence of the received data in the first data primary encryption set, and encrypting the data in the first data primary encryption set after the scrambling sequence by using the second key to obtain the first data secondary encryption set.
In a specific implementation process, the second system may first scramble a sequence of the received data in the first data primary encryption set, and then encrypt the scrambled sequence of data to obtain the first data secondary encryption set. Or, the second system may encrypt the data in the received first data primary encryption set first, and then scramble the encrypted data to obtain the first data secondary encryption set in a disordered order. After the first data primary encryption set sent by the first system is subjected to out-of-order encryption, even if the first system obtains the difference data encryption set by comparing the first data secondary encryption set with the second data secondary encryption set, the plaintext of the difference data cannot be directly obtained, and the data in the second system cannot be exposed.
And step 208, sending the first data secondary encryption set to the first system, so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set.
In a specific implementation process, after the second system obtains the second-level encryption set of the first data through encryption, the obtained second-level encryption set of the first data may be sent to the first system. In the embodiments of the present disclosure, the data encryption uses an interchangeable deterministic encryption algorithm, where the meaning of the interchangeable deterministic encryption algorithm refers to the descriptions of the above embodiments and is not described herein again.
When the second system sends the encrypted first-level encryption set of the second data to the first system, the second system can choose to directly send the encrypted data to the first system, and can also choose to perform hash calculation on the encrypted data and send the encrypted data after the hash calculation to the first system. When determining the difference data, the first system may perform hash calculation on the data in the decrypted first data secondary decryption set, and then compare the hash value of the data in the hash calculation data set with the hash value of the data in the second data primary encryption set sent by the second system. And screening out data which have the same data identification hash value and different data content hash values in the second data primary encryption set and the first data secondary decryption set as difference data to obtain a difference data encryption set. After the Hash calculation is carried out on the data after the first-stage encryption set of the second data, the data can be compressed, and the data transmission flow is reduced.
The meaning of the difference data and the method for determining the data in the difference data encryption set may refer to the descriptions of the above embodiments, and are not described herein again.
In a specific implementation process, when the second system performs secondary encryption on data in the first data set of the first system, out-of-order encryption is used, so that the order of the data in the first data secondary encryption set is inconsistent with the order of the data in the first data set, while the data in the second data secondary encryption set is not in the out-of-order, but the data in the second data secondary encryption set is ciphertext data encrypted by the data in the second system, and the first system cannot know the plaintext of the data. Therefore, even if the first system obtains the difference data in the first data secondary decrypted set and the second data primary encrypted set, the obtained difference data cannot be decrypted, that is, the plaintext of the difference data cannot be obtained. Meanwhile, the first system cannot obtain the plaintext of the intersection of the data of the second system and the plaintext of the data of the second system, so that the data owned by the second system cannot be confirmed, and the safety of the data of the second system is ensured. After obtaining the difference data encryption set, the first system may send the obtained difference data encryption set to the second system, because the second data set held by the second system is not in disorder in the encryption process, and what the first system screens out is data that is different from the first data secondary decryption set in the second data primary encryption set, that is, the data in the difference data encryption set is actually part of the data in the second data secondary encryption set. After the second system receives the difference data encryption set sent by the first system, the plaintext of the data in the difference data encryption set can be obtained by comparing the data in the difference data encryption set with the data in the second data set held by the second system, namely the difference data plaintext set, and the difference data plaintext set can represent the data with difference in the first data set and the second data set.
When the second system determines the differential data plaintext set, the second system may compare the position, i.e., the order, of each data in the differential data encrypted set sent by the first system in the set with the position of the data in the second data set, so as to determine the plaintext of the data with the difference. For example: when the first system determines the differential data encryption set, the data without the difference in the second data secondary encryption set can be set to be null, so that the ordering of the data in the differential data encryption set is not changed, or the original ordering of the differential data in the set can be marked in the differential data encryption set, so that the second system can quickly determine the plaintext of the differential data. Or the second system directly decrypts the data in the received difference data encryption set, so as to obtain the plaintext of the data in the difference data encryption set. Of course, the second system may also obtain the plaintext of the difference data in other manners, and the embodiments of the present specification are not particularly limited. The obtained difference data can be used for subsequent data analysis such as: risk analysis, account theft analysis, and the like.
In some embodiments of the present description, said determining a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data comprises:
decrypting the data in the differential data encryption set by using the second key to obtain a differential data plaintext set;
or, based on the position of the data in the difference data encryption set in the second data primary encryption set and the position of the data in the second data set, obtaining the difference data plaintext set;
and sending the data identification in the difference plaintext set to the first system. In a specific implementation, the differential data encryption set sent by the first system to the second system may actually be understood as a part of data in the second primary data encryption set, where the second primary data encryption set is obtained by encrypting the second data set owned by the second system. The second system can directly decrypt the data in the set by using the second key after obtaining the encrypted set of the difference data, so that the plaintext of the difference data in the set can be obtained, and the plaintext set of the difference data is further obtained. If the difference data encryption set sent by the first system is the position of the difference data in the second data primary encryption set, the second system can directly compare the data in the difference data encryption set with the data in the second data set, and then the plaintext of the difference data at the corresponding position can be obtained. The plaintext set of difference data obtained by the second system may include the plaintext of the data identifier and may also include the plaintext of the data content, and when the second system sends the plaintext of the difference data to the first system, the second system may choose to send the plaintext of the data identifier of the difference data to the first system. Such as: the second system can acquire the data identification of the data in the difference data plaintext set and send the data identification to the first system, so that the first system can acquire which data in the data held by the first system have problems based on the comparison between the acquired data identification with the first data set held by the first system, and the data content corresponding to the data identification in the second system cannot be acquired. The difference data acquired by the second system is also data different from the first system in the held data, and the data content of the difference data in the first system cannot be acquired, so that the difference data is acquired on the premise that the data of both systems are not exposed.
In the method for determining differential data for protecting privacy provided by the embodiments of the present specification, after two parties respectively holding different data encrypt their own data once, one of the parties sends the encrypted data to the other party for secondary encryption, and the other party adds a disordering means when performing secondary encryption on the data of the other party, so that the other party cannot obtain the plaintext of the differential data and the plaintext of the intersection data based on the positions of the data even after obtaining the differential data of the encrypted data of the two parties. The party not scrambled can know the plaintext of the difference data based on the encrypted set of difference data sent by the other party and the own data set. The plaintext of the obtained difference data is only data having a difference between the data held by the plaintext itself and the data held by the partner, and the data value of the difference data in the data held by the partner cannot be known. The method and the device realize that the data with difference between two parties can be obtained without exposing any plaintext data, ensure the safety of the data and lay a data foundation for the subsequent data analysis and processing.
In some embodiments of the present specification, each data in the first data set and the second data set includes a data identifier and a data content, and when data in the first data set, the second data set, and the first data-level encryption set is encrypted, the data identifier and the data content of each data in the set are encrypted respectively.
In a specific implementation process, the data in the embodiment of the present specification includes two partial data identifiers and data contents, and the data identifiers and the data contents may be specifically set according to actual needs, and the embodiment of the present specification is not specifically limited. In the embodiment of the present specification, when data is encrypted, data identifiers and data contents of the data may be encrypted respectively, so that neither the data identifiers nor the data contents are exposed. Of course, the key for encrypting the data identifier and the data content may be the same or different, and may be specifically set according to actual needs. If the same key is selected to encrypt the data identifier and the data content, one less key can be saved, and the memory occupation is reduced. If different keys are selected to encrypt the data identification and the data content, even if one key is cracked, the safety of the other part of data can be ensured, and the safety of the data is ensured.
In some embodiments of the present specification, the encrypting the data identifier and the data content of each data in the set separately includes:
and embedding the data identifier of each data in the set into the data content, and encrypting the data identifier of each data in the set and the data content embedded with the data identifier respectively.
When the data identifier and the data content of the data are encrypted respectively, the data identifier may be embedded in the data content, such as: the data identification is added into the data content to serve as new data content, and the new data content embedded with the data identification is encrypted, so that the data content corresponding to different data identifications is ensured to be different, the data with different data identifications and the same data content is prevented from being exposed, and the safety of the data is ensured. Such as: the A party and the B party respectively have different sets of user data, the data identification in the data sets is a mobile phone number, the data content is a city, and different data identifications may correspond to the same data content. In the process of determining the difference data, one party can obtain the secondary encryption results of the data of the other party and the other party, and the number of users in the same city can be counted by comparing the two secondary encryption results, such as: and counting the number of users in Hangzhou city. In the embodiment of the specification, the data identification is embedded into the data content, that is, the mobile phone numbers are embedded into the cities, so that it can be ensured that the cities corresponding to the users with different mobile phone numbers are also different, and the number of the users in one city cannot be counted, thereby ensuring the safety of the data.
The sequence of the steps in the above embodiments may be adjusted according to actual needs, and the embodiments in this specification are not limited specifically.
Fig. 3 is a data flow diagram of determining difference data for privacy protection in an example scenario of this specification, and the following specifically describes the determination process of difference data in this embodiment with reference to fig. 3:
first, the encryption algorithm used in the embodiments of the present specification is an interchangeable deterministic encryption algorithm, and specifically, may be a DH algorithm or an RSA algorithm, or the like. As shown in fig. 3, the data holder has two parties a and B, the data set held by the party a, i.e., the first data set, is S1= { < x1, u1>, < x2, u2>, > say }, and the data set held by the party B, i.e., the second data set, is S2= { < y1, v1>, < y2, v2> }, where x1, x2, …, xi and y1, y2, …, yi may represent data identifiers of data in the set, and u1, u2, …, ui and v1, v2, …, vi may represent data contents of the data in the set. The determination process of the difference data in the embodiments of the present specification is as follows:
1a) Party a generates keys k1 and k3. Where k1 and k3 may be equal or different, where k1 may be used to encrypt the data identifier and k3 may be used to encrypt the data content.
1b) Party B generates keys k2 and k4. Where k2 and k4 may be equal or different, where k2 may be used to encrypt the data identifier and k4 may be used to encrypt the data content.
2a) And the party A encrypts the data in the data set S1 by using the secret key of the party A to obtain a ciphertext data set, namely a first data primary encryption set X1. As shown in fig. 3, the encryption method may encrypt the data identifier xi of the data in S1 by using k1, and encrypt the data content ui of the data in S1 by using k3.
2b) And the party B encrypts the data in the data set S2 by using the key to obtain a ciphertext data set, namely a first-level encryption set of second data, which is Y1. As shown in fig. 3, the encryption method may encrypt the data identifier yi of the data in S2 using k2, and encrypt the data content vi of the data in S2 using k4.
3a) And the party A sends the X1 to the party B.
3b) And the B party sends the hash value of each data in the Y1 or the Y1 to the A party.
4) And the party B uses the secret key thereof to carry out disorder encryption on each element of the X1 to obtain a ciphertext sequence, namely the first data secondary encryption set is X2. As shown in FIG. 3, the encryption method may use k2 to identify E for data in X1 k1 (xi) Encrypting the data content E of the data in X1 by using k4 k3 (ui) encryption is performed.
5) And the party B sends the X2 to the party A.
6) And the party A decrypts each element of the X2 by using the secret key thereof to obtain a set, namely a first data secondary solution dense set, which is X3. As shown in fig. 3, the decryption method corresponds to the encryption method, the data id can be decrypted by using k1, and the data content can be decrypted by k3. Because the adopted deterministic encryption algorithm can be alternated, the encryption and decryption sequence does not affect the result, and the party A is ready for X2= shuffle<E k2 (E k1 (xi)),E k4 (E k3 (ui))>During decryption, the obtained X3 is a great face<E k2 (xi),E k4 (ui)>}. shuffle may represent out-of-order or shuffle.
7) And A, obtaining a difference data encryption set which is a set of elements with differences between Y1 and X3. The description of the above embodiments can be referred to for the solving method of the difference data encryption set, and details are not repeated here.
8) And the party A sends the difference element set to the party B. As shown in FIG. 3, party A may send party B a corresponding set of ciphertext tokens for the difference element in Y1{ E } k2 (yi) } or a set of ciphertext-tagged hash values h (E) k2 (yi)) } or a set of positions of the difference element in Y1.
9) And the B party obtains a difference data plaintext set based on the content sent by the A party, the difference data plaintext set can comprise a data identification plaintext of the difference data and a data content plaintext, and the B party can send the data identification plaintext of the difference data to the A party.
It is noted that steps 1 a) -4 a), step 5 and steps 1 b) -4 b) may be performed in parallel.
Furthermore, it may happen that the data identifications are different, but the data contents are the same, i.e. ui = uj but xi! And = xj, since deterministic encryption is adopted for secure intersection, E (ui) and E (uj) are equal, and the other party can judge that the data portions of the two elements are equal. Before the protocol is carried out, the data content part can be embedded into the data identifier by the two parties respectively, so that different data represent different ciphertexts of the corresponding data content, and the safety of the data is further ensured.
It should be noted that, based on the method provided by the embodiments of the present specification, appropriate modifications may be made to implement the determination of the difference data of the multi-party data.
In the method for determining privacy-preserving differential data in the embodiment of the present description, by improving a secure Intersection Set Intersection (PSI) protocol, an out-of-order encryption means (i.e., step 4 in fig. 3) is added to hide a data identifier Intersection list, and data matching between two parties is also performed by using the PSI protocol, so that the data identifier Intersection is not exposed, but a data identifier list with unmatched data content can be obtained, thereby ensuring data security and laying a data foundation for data analysis.
In the present specification, each embodiment of the method is 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. Reference is made to the description of the method embodiments in part.
Based on the above method for determining differential data for protecting privacy, one or more embodiments of the present specification further provide a device for determining differential data for protecting privacy. The apparatus may include apparatus (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in embodiments of the present specification in conjunction with hardware where necessary to implement the methods. Based on the same innovative conception, embodiments of the present specification provide an apparatus as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, reference may be made to the implementation of the foregoing method for the specific apparatus in the embodiment of the present specification, and repeated descriptions are omitted. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Specifically, fig. 4 is a schematic block diagram of an embodiment of a privacy-preserving difference data determining apparatus provided in this specification, which may be applied to a first system in the foregoing embodiment, where the first system stores a first data set, as shown in fig. 4, and the privacy-preserving difference data determining apparatus provided in this specification may include:
a first data primary encryption module 41, configured to encrypt data in the first data set with a first key to obtain a first data primary encryption set;
the first data secondary encryption module 42 is configured to send the first data primary encryption set to a second system, so that the second system performs out-of-order encryption on the first data primary encryption set by using a second key to obtain a first data secondary encryption set; a second data set is stored in the second system;
a first data decryption module 43, configured to decrypt, using the first key, data in the first data secondary encryption set sent by the second system, to obtain a first data secondary decryption set;
the difference data determining module 44 is configured to determine data, which is different from the first data secondary decryption set, in the received second data primary encryption set to obtain a difference data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key;
a difference data decryption module 45, configured to send the encrypted set of difference data to the second system, so that the second system obtains a plaintext set of difference data of the first data set and the second data set based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
Fig. 5 is a schematic block diagram of another embodiment of the privacy-preserving difference data determining apparatus provided in this specification, which may be applied to a second system in the foregoing embodiment, where the second system stores a second data set, and as shown in fig. 5, the privacy-preserving difference data determining apparatus provided in this specification may include:
a second data primary encryption module 51, configured to encrypt data in the second data set by using a second key to obtain a second data primary encryption set;
a second data encryption sending module 52, configured to send the second primary encrypted set of data to the first system; a first data set is stored in the first system;
the first data out-of-order encryption module 53 is configured to perform out-of-order encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
a data sending module 54, configured to send the first secondary data encryption set to the first system, so that the first system decrypts the first secondary data encryption set by using the first key to obtain a first secondary data decryption set;
a difference data plaintext determination module 55, configured to receive a difference data encrypted set sent by the first system, and determine a difference data plaintext set of the first data set and the second data set based on the difference data encrypted set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
In the differential data determination device for protecting privacy provided by the embodiments of the present specification, after two parties respectively holding different data encrypt their own data once, one of the parties sends their encrypted data to the other party for secondary encryption, and the other party adds a disordering means when performing secondary encryption on the data of the other party, so that the other party cannot obtain the plaintext of the differential data and the plaintext of the intersection data based on the positions of the data even after obtaining the differential data of the encrypted data of the two parties. The party not scrambled can know the plaintext of the difference data based on the encrypted set of difference data sent by the other party and the own data set. The plaintext of the obtained difference data is only data having a difference between the data held by the plaintext itself and the data held by the partner, and the data value of the difference data in the data held by the partner cannot be known. The method and the device realize that the data with difference between two parties can be obtained without exposing any plaintext data, ensure the safety of the data and lay a data foundation for the subsequent data analysis and processing.
It should be noted that the above-mentioned apparatus may also include other embodiments according to the description of the corresponding method embodiment. The specific implementation manner may refer to the description of the above corresponding method embodiment, and details are not described herein.
An embodiment of the present specification further provides a difference data determining apparatus for protecting privacy, including: at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the privacy preserving difference data determining method of the above embodiments, such as:
the method is applied to a first system, wherein a first data set is stored in the first system, and the method comprises the following steps:
encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
sending the first data primary encryption set to a second system, so that the second system uses a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
decrypting the data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a difference data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key;
sending the encrypted set of difference data to the second system to cause the second system to obtain a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
Or, the method is applied to a second system, in which a second data set is stored, and the method includes:
encrypting the data in the second data set by using a second key to obtain a first-level encryption set of second data;
sending the second data primary encryption set to a first system; a first data set is stored in the first system;
carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
sending the first data secondary encryption set to the first system, so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
receiving a difference data encryption set sent by the first system, and determining a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
An embodiment of the present specification further provides a system for determining difference data for protecting privacy, including: the system comprises a first system and a second system, wherein a first data set is stored in the first system, and a second data set is stored in the second system; wherein, the first system comprises at least one processor and a memory for storing processor executable instructions, and the processor executes the instructions to implement the method performed by the first system in the above embodiment;
the second system comprises at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the method performed by the second system in the above embodiments.
It should be noted that the above description of the apparatus and system according to the method embodiments may also include other embodiments. The specific implementation manner may refer to the description of the related method embodiment, and details are not described herein.
The privacy-preserving difference data determination device provided by the specification can also be applied to various data analysis and processing systems. The system or server or terminal or device may be a single server, or may include a server cluster, a system (including a distributed system), software (applications), actual operating devices, logical gate devices, quantum computers, etc. using one or more of the methods described herein or one or more embodiments of the system or server or terminal or device, in combination with necessary end devices implementing hardware. The system for checking for discrepancies may comprise at least one processor and a memory storing computer-executable instructions that, when executed by the processor, implement the steps of the method of any one or more of the embodiments described above.
The method embodiments provided by the embodiments of the present specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking the example of the present invention running on a server, fig. 6 is a block diagram of a hardware structure of a privacy-preserving difference data determination server in an embodiment of the present invention, and the computer terminal may be the privacy-preserving difference data determination server or the privacy-preserving difference data determination apparatus in the above-described embodiment. As shown in fig. 6, the server 10 may include one or more (only one shown) processors 100 (the processors 100 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a non-volatile memory 200 for storing data, and a transmission module 300 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration and is not intended to limit the structure of the electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 6, and may also include other processing hardware, such as a database or multi-level cache, a GPU, or have a different configuration than shown in FIG. 6, for example.
The non-volatile memory 200 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the privacy-preserving difference data determination method in the embodiments of the present specification, and the processor 100 executes various functional applications and resource data updates by executing the software programs and modules stored in the non-volatile memory 200. Non-volatile memory 200 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the non-volatile memory 200 may further include memory located remotely from the processor 100, which may be connected to a computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, office-to-network, mobile communication networks, and combinations thereof.
The transmission module 300 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission module 300 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission module 300 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The foregoing description has been directed to specific embodiments of this disclosure. 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 require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The method or apparatus provided in this specification and described in the foregoing embodiments may implement service logic through a computer program and record the service logic on a storage medium, where the storage medium may be read and executed by a computer, and implement the effects of the solutions described in the embodiments of this specification, such as:
the method is applied to a first system, a first data set is stored in the first system, and the method comprises the following steps:
encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
sending the first data primary encryption set to a second system, so that the second system uses a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
decrypting the data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a different data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key;
sending the encrypted set of difference data to the second system such that the second system obtains a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
Or, the method is applied to a second system, and a second data set is stored in the second system, and the method comprises the following steps:
encrypting the data in the second data set by using a second key to obtain a first-level encryption set of second data;
sending the second data primary encryption set to a first system; a first data set is stored in the first system;
carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
sending the first data secondary encryption set to the first system, so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
receiving a difference data encryption set sent by the first system, and determining a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
The storage medium may include a physical device for storing information, and typically, the information is digitized and then stored using an electrical, magnetic, or optical media. The storage medium may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
The privacy-preserving difference data determining method or apparatus provided in the embodiments of the present specification may be implemented in a computer by a processor executing corresponding program instructions, for example, implemented in a PC end using a c + + language of a windows operating system, implemented in a linux system, or implemented in an intelligent terminal using android, iOS system programming languages, implemented in processing logic based on a quantum computer, or the like.
It should be noted that descriptions of the apparatus, the computer storage medium, and the system described above according to the related method embodiments may also include other embodiments, and specific implementations may refer to descriptions of corresponding method embodiments, which are not described in detail herein.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to only the partial description of the method embodiment.
The embodiments of the present description are not limited to what must be consistent with industry communications standards, standard computer resource data updating and data storage rules, or what is described in one or more embodiments of the present description. Certain industry standards, or implementations modified slightly from those described using custom modes or examples, may also achieve the same, equivalent, or similar, or other, contemplated implementations of the above-described examples. The embodiments using the modified or transformed data acquisition, storage, judgment, processing and the like can still fall within the scope of the alternative embodiments of the embodiments in this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development, but the original code before compiling is also written in a specific Programming Language, which is called Hardware Description Language (HDL), and the HDL is not only one kind but many kinds, such as abll (Advanced boot Expression Language), AHDL (alternate hard Description Language), traffic, CUPL (computer universal Programming Language), HDCal (Java hard Description Language), lava, lola, HDL, PALASM, software, rhydl (Hardware Description Language), and vhul-Language (vhyg-Language), which is currently used in the field. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a vehicle human interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although one or more embodiments of the present description provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of sequences, and does not represent a unique order of performance. When the device or the end product in practice executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures (for example, in the environment of parallel processors or multi-thread processing, even in the environment of distributed resource data update). The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. The terms first, second, etc. are used to denote names, but not to denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, which are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or the modules implementing the same functions may be implemented by a combination of a plurality of sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable resource data updating apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable resource data updating apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable resource data update apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable resource data update apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and the relevant points can be referred to only part of the description of the method embodiments. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.
Claims (15)
1. A privacy preserving differential data determination method applied to a first system having a first set of data stored therein, the method comprising:
encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
sending the first data primary encryption set to a second system, so that the second system uses a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
decrypting the data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a different data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key; the encrypted set of difference data comprises: setting data without difference in a second data primary encryption set as a null data set or a set of positions of difference data in the second data primary encryption set; when the data in the first data set, the second data set and the first data primary encryption set are encrypted, the data identification and the data content of each data in the sets are respectively encrypted by using different keys;
sending the encrypted set of difference data to the second system to cause the second system to obtain a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
2. The method of claim 1, each data in the first data set and the second data set comprising a data identity and a data content; the determining that there is data in the received second primary data encryption set that is different from the first secondary data decryption set includes:
and inquiring data which has the same data identification and different data contents in the second data primary encryption set and the first data secondary decryption set, and adding the inquired data pairs into the difference data encryption set.
3. The method of claim 2, wherein the received second level-encrypted set of data comprises: the second system performs hash calculation on the data in the second data primary encryption set to obtain a data identification hash value and a data content hash value of each data;
determining data in the received second primary data encryption set that is different from the first secondary data decryption set, including:
calculating the data identification hash value and the data content hash value of each data in the first data secondary encryption set;
and inquiring data which has the same data identification hash value and different data content hash values in the second data primary encryption set and the first data secondary decryption set, and adding the inquired data pairs into the differential data encryption set.
4. The method of claim 1, each data in the first data set and the second data set comprising a data identity and a data content; the sending the encrypted set of difference data to the second system comprises:
and sending the data identification or the data identification hash value in the differential data encryption set or the position of the data in the differential data encryption set in the second data primary encryption set to the second system.
5. The method of claim 1, wherein separately encrypting the data identity and the data content of each data in the set comprises:
and embedding the data identifier of each data in the set into the data content, and encrypting the data identifier of each data in the set and the data content embedded with the data identifier respectively.
6. The method of claim 4, further comprising:
receiving the difference data plaintext set sent by the second system, wherein the difference data plaintext set comprises data identification plaintext of difference data; wherein the difference data plaintext set is obtained by the second system based on a data identification or a data identification hash value in the difference data encryption set or a location of data within the difference data encryption set in the second data-level encryption set.
7. A privacy preserving differential data determination method applied to a second system having a second set of data stored therein, the method comprising:
encrypting the data in the second data set by using a second key to obtain a first-level encryption set of second data;
sending the second data primary encryption set to a first system; a first data set is stored in the first system;
carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key;
sending the first data secondary encryption set to the first system, so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
receiving a difference data encryption set sent by the first system, and determining a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set; the encrypted set of difference data comprises: setting data without difference in a second data primary encryption set as a null data set or a set of positions of difference data in the second data primary encryption set; when the data in the first data set, the second data set and the first data primary encryption set are encrypted, the data identification and the data content of each data in the sets are respectively encrypted by using different keys;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
8. The method of claim 7, wherein the using the second key to perform out-of-order encryption on data in a first data primary encryption set sent by the first system to obtain a first data secondary encryption set comprises:
encrypting the received data in the first data primary encryption set by using the second key, and scrambling the sequence of the data in the encrypted first data encryption set to obtain a first data secondary encryption set;
or, scrambling the sequence of the received data in the first data primary encryption set, and encrypting the data in the first data primary encryption set after the scrambling sequence by using the second key to obtain the first data secondary encryption set.
9. The method of claim 7, wherein sending the second data-level encrypted set to the first system comprises:
calculating the data identification hash value and the data content hash value of each data in the second data primary encryption set;
and adding the calculated data identification hash value and data content hash value into the second primary data encryption set, and sending the second primary data encryption set to the first system, so that the first system determines the difference data encryption set based on the data identification hash value and the data content hash value of each data in the second primary data encryption set and the first secondary data decryption set.
10. The method of claim 7, the determining a plaintext set of difference data for the first set of data and the second set of data based on the encrypted set of difference data, comprising:
decrypting the data in the differential data encryption set by using the second key to obtain a differential data plaintext set;
or, based on the position of the data in the difference data encryption set in the second data primary encryption set and the position of the data in the second data set, obtaining the difference data plaintext set;
and sending the data identification in the difference plaintext collection to the first system.
11. The method of claim 7, wherein separately encrypting the data identity and the data content of each data in the set comprises:
and embedding the data identifier of each data in the set into the data content, and encrypting the data identifier of each data in the set and the data content embedded with the data identifier respectively.
12. A privacy preserving differential data determining apparatus for use with a first system having a first set of data stored therein, the apparatus comprising:
the first data primary encryption module is used for encrypting the data in the first data set by using a first key to obtain a first data primary encryption set;
the first data secondary encryption module is used for sending the first data primary encryption set to a second system so that the second system can use a second key to carry out-of-order encryption on the first data primary encryption set to obtain a first data secondary encryption set; a second data set is stored in the second system;
the first data decryption module is used for decrypting data in the first data secondary encryption set sent by the second system by using the first key to obtain a first data secondary decryption set;
the difference data determining module is used for determining data which is different from the first data secondary decryption set in the received second data primary encryption set to obtain a difference data encryption set; the second data primary encryption set is sent by the second system after encrypting data in the second data set by using the second key; the encrypted set of difference data comprises: setting data without difference in a second data primary encryption set as a null data set or a set of positions of difference data in the second data primary encryption set; when the data in the first data set, the second data set and the first data primary encryption set are encrypted, the data identification and the data content of each data in the sets are respectively encrypted by using different keys;
a difference data decryption module, configured to send the encrypted set of difference data to the second system, so that the second system obtains a plaintext set of difference data of the first data set and the second data set based on the encrypted set of difference data; wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
13. A privacy preserving difference data determining apparatus for use in a second system having a second set of data stored therein, the apparatus comprising:
the first data level encryption module is used for encrypting the data in the first data set by using a first key to obtain a first data level encryption set;
the second data encryption sending module is used for sending the second data primary encryption set to the first system; a first data set is stored in the first system;
the first data disorder encryption module is used for carrying out disorder encryption on data in a first data primary encryption set sent by the first system by using the second key to obtain a first data secondary encryption set; the first data primary encryption set is obtained by the first system after encrypting data in the first data set by using a first key; when the data in the first data set, the second data set and the first data primary encryption set are encrypted, the data identification and the data content of each data in the sets are respectively encrypted by using different keys;
the data sending module is used for sending the first data secondary encryption set to the first system so that the first system decrypts the first data secondary encryption set by using the first key to obtain a first data secondary decryption set;
a difference data plaintext determination module, configured to receive a difference data encryption set sent by the first system, and determine a difference data plaintext set of the first data set and the second data set based on the difference data encryption set; the difference data encryption set is obtained by the first system based on the second data primary encryption set and the first data secondary decryption set; the encrypted set of difference data comprises: setting data without difference in a second data primary encryption set as a null data set or a set of positions of difference data in the second data primary encryption set;
wherein, the algorithm for encrypting the data adopts an alternative deterministic encryption algorithm.
14. A privacy preserving differential data determining apparatus comprising: at least one processor and a memory for storing processor-executable instructions, the instructions when executed by the processor implementing the method of any of claims 1-6 or 7-11.
15. A privacy preserving differential data determination system, comprising: the system comprises a first system and a second system, wherein a first data set is stored in the first system, and a second data set is stored in the second system; wherein the first system comprises at least one processor and a memory for storing processor-executable instructions, the processor implementing the method of any one of claims 1-6 when executing the instructions;
the second system comprises at least one processor and a memory for storing processor-executable instructions, which when executed by the processor implement the method of any one of claims 7-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110087022.6A CN112822201B (en) | 2021-01-22 | 2021-01-22 | Privacy-protecting difference data determination method, device, equipment and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110087022.6A CN112822201B (en) | 2021-01-22 | 2021-01-22 | Privacy-protecting difference data determination method, device, equipment and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112822201A CN112822201A (en) | 2021-05-18 |
CN112822201B true CN112822201B (en) | 2023-03-24 |
Family
ID=75859066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110087022.6A Active CN112822201B (en) | 2021-01-22 | 2021-01-22 | Privacy-protecting difference data determination method, device, equipment and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112822201B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114003962B (en) * | 2021-12-28 | 2022-04-12 | 支付宝(杭州)信息技术有限公司 | Multi-party data query method and device for protecting data privacy |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10146958B2 (en) * | 2013-03-14 | 2018-12-04 | Mitsubishi Electric Research Laboratories, Inc. | Privacy preserving statistical analysis on distributed databases |
CN111641603B (en) * | 2020-05-15 | 2022-07-01 | 北京青牛技术股份有限公司 | Privacy set intersection data interaction method and system based on homomorphic encryption |
CN111741020B (en) * | 2020-07-31 | 2020-12-22 | 支付宝(杭州)信息技术有限公司 | Public data set determination method, device and system based on data privacy protection |
-
2021
- 2021-01-22 CN CN202110087022.6A patent/CN112822201B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112822201A (en) | 2021-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110895611B (en) | Data query method, device, equipment and system based on privacy information protection | |
CN108600272B (en) | Block chain data processing method, device, processing equipment and system | |
CN108364223B (en) | Data auditing method and device | |
CN107465505B (en) | Key data processing method and device and server | |
US11880831B2 (en) | Encryption system, encryption key wallet and method | |
US8639940B2 (en) | Methods and systems for assigning roles on a token | |
US10484352B2 (en) | Data operations using a proxy encryption key | |
US11290262B2 (en) | Method and devices for communicating securely between devices | |
CN109740384A (en) | Data based on block chain deposit card method and apparatus | |
CN112887297B (en) | Privacy-protecting differential data determining method, device, equipment and system | |
CN111342966B (en) | Data storage method, data recovery method, device and equipment | |
CN109274644A (en) | A kind of data processing method, terminal and watermark server | |
CN109450620A (en) | The method and mobile terminal of security application are shared in a kind of mobile terminal | |
CN113711247A (en) | Data processing method, device and system of machine learning model | |
CN112822201B (en) | Privacy-protecting difference data determination method, device, equipment and system | |
CN114398623A (en) | Method for determining security policy | |
CN116011028B (en) | Electronic signature method, electronic signature device and electronic signature system | |
CN115118486B (en) | Internet of things system, method and device for acquiring data based on blockchain, storage medium and computing device | |
CN113254989B (en) | Fusion method and device of target data and server | |
CN112311536B (en) | Key hierarchical management method and system | |
CN115208630A (en) | Block chain based data acquisition method and system and block chain system | |
EP3406050B1 (en) | Method for safeguarding the confidentiality of the sender's identification of messages transmitted through promiscuous channels | |
EP3598689A1 (en) | Managing central secret keys of a plurality of user devices associated with a single public key | |
CN104504306A (en) | Method and equipment both for encrypting files | |
Philabaum | Enhancing cryptographic systems with ternary-based methodologies and physical unclonable functions |
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 | ||
GR01 | Patent grant |