Data processing method, device and computer equipment for protecting privacy
By using homomorphic addition operations in data processing to process multiple first plaintext data, and using their parity to represent the exclusive or OR operation results of service data, the problem of data privacy protection is solved, and the multi-party security computing scenario is realized Privacy protection in.
Patent Information
- Application Number
- CN202210561597.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-05-23
AI Technical Summary
During the data processing process, how to process business data without leaking data privacy, especially in multi-party security computing scenarios, it is difficult for the prior art to effectively protect data privacy.
By obtaining the homomorphic ciphertext data of a plurality of first plaintext data, homomorphic addition operations are performed to obtain the second ciphertext data, the parity of the second plaintext data represents the XOR or OR operation result of the service data, and the difference is Or it can be achieved with privacy protection during the calculation process.
Based on homomorphic addition operations, the XOR or OR operation is implemented, ensuring data privacy protection and avoiding data leakage. It is suitable for business scenarios in the field of multi-party security computing.
Smart Images

Figure CN115085897B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular, to a data processing method, apparatus, and computer device for protecting privacy. Background Art
[0002] In some application scenarios, it is often necessary to process private data to obtain the desired processing results.
[0003] For example, the data provider holds business data, and the service provider holds a prediction model. The data provider and the service provider need to collaboratively process the business data to obtain a prediction result of the prediction model for the business data.
[0004] In the process of data processing, the protection and security of data privacy become issues worthy of attention. Summary of the invention
[0005] The embodiments of this specification provide a data processing method, apparatus and computer device for protecting privacy, so as to process business data without leaking data privacy. The technical solution of the embodiments of this specification is as follows.
[0006] A first aspect of the embodiments of this specification provides a data processing method for protecting privacy, which is applied to the field of multi-party secure computing, including:
[0007] Acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data include homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0008] Homomorphically add multiple first ciphertext data to obtain second ciphertext data, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the parity of the second plaintext data is used to represent the XOR operation result of the multiple business data.
[0009] A second aspect of the embodiments of this specification provides a data processing method for protecting privacy, which is applied to the field of multi-party secure computing, including:
[0010] Acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data include homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0011] Homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data;
[0012] Sending a plurality of masked first ciphertext data to the auxiliary device so that the auxiliary device decrypts the plurality of masked first ciphertext data to obtain a plurality of masked first plaintext data, performing a multiplication operation on the plurality of masked first plaintext data to obtain a multiplication operation result, and performing homomorphic encryption on the multiplication operation result to obtain a homomorphic encryption result;
[0013] Receive the homomorphic encryption result fed back by the auxiliary device;
[0014] According to the homomorphic encryption result and the mask data, second ciphertext data is determined, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the parity of the second plaintext data is used to represent the result of the AND operation of the multiple business data.
[0015] A third aspect of the embodiments of this specification provides a data processing device for protecting privacy, which is applied to the field of multi-party secure computing, including:
[0016] An acquisition unit, configured to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0017] An adding unit is used to homomorphically add multiple first ciphertext data to obtain second ciphertext data, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the parity of the second plaintext data is used to represent the XOR operation result of the multiple business data.
[0018] A fourth aspect of the embodiments of this specification provides a data processing device for protecting privacy, which is applied to the field of multi-party secure computing, including:
[0019] An acquisition unit, configured to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0020] An adding unit, used for homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data;
[0021] a sending unit, configured to send a plurality of masked first ciphertext data to the auxiliary device, so that the auxiliary device decrypts the plurality of masked first ciphertext data to obtain a plurality of masked first plaintext data, performs a multiplication operation on the plurality of masked first plaintext data to obtain a multiplication operation result, and performs homomorphic encryption on the multiplication operation result to obtain a homomorphic encryption result;
[0022] A receiving unit, used for receiving the homomorphic encryption result fed back by the auxiliary device;
[0023] A determination unit is used to determine second ciphertext data based on the homomorphic encryption result and the mask data, wherein the second ciphertext data includes homomorphic ciphertext data of the second plaintext data, and the parity of the second plaintext data is used to represent the result of the AND operation of the multiple business data.
[0024] According to a fifth aspect of the embodiments of this specification, a computer device is provided, including:
[0025] at least one processor;
[0026] A memory storing program instructions, wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the method as described in the first aspect or the second aspect.
[0027] The technical solution provided by the embodiment of this specification utilizes the parity of multiple first plaintext data to represent multiple business data. The second ciphertext data is obtained by performing a homomorphic addition operation on multiple first ciphertext data of the multiple first plaintext data. The second ciphertext data includes homomorphic ciphertext data of the second plaintext data. The parity of the second plaintext data is used to represent the XOR operation result or the AND operation result of the multiple business data. In this way, the XOR operation or the AND operation can be implemented based on the homomorphic addition operation. In the process of the XOR operation or the AND operation, the business data will not be leaked, and privacy protection is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 This is a schematic diagram of the structure of the data processing system in the embodiment of this specification;
[0030] Figure 2 Schematic diagram of the process of XOR operation in the embodiment of this specification;
[0031] Figure 3 Schematic diagram of an XOR operation process in an embodiment of this specification;
[0032] Figure 4 A schematic diagram of the flow chart of the AND operation in the embodiment of this specification;
[0033] Figure 5 A schematic diagram of the operation process in the embodiment of this specification;
[0034] Figure 6A flowchart of a data processing method in an embodiment of this specification;
[0035] Figure 7 A flowchart of a data processing method in an embodiment of this specification;
[0036] Figure 8 This is a schematic diagram of the structure of a data processing device in an embodiment of this specification;
[0037] Fig. 9 This is a schematic diagram of the structure of a data processing device in an embodiment of this specification;
[0038] Fig.10 Schematic diagram of the structure of a computer device in an embodiment of this specification. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0040] In the field of multi-party secure computing, multi-party secure computing based on homomorphic encryption can be applied to a variety of business scenarios, such as medical scenarios, model training scenarios, risk prediction scenarios, etc. For example, one business scenario may include: a group of people want to calculate the average salary, but everyone does not want others to know their salary. For another example, another business scenario may include: two competitive millionaires meet, they want to compare who is richer, but do not want to disclose their wealth information.
[0041] Homomorphic encryption is an encryption algorithm for implementing multi-party secure computing. It allows the ciphertext data to be directly operated to obtain a result that is still encrypted, and the result obtained by decrypting it is the same as the result of the same operation on the plaintext data. Homomorphic encryption algorithms can include semi-homomorphic encryption algorithms (PHE, Partially Homomorphic Encryption) and fully homomorphic encryption algorithms (FHE, Fully Homomorphic Encryption).
[0042] Semi-homomorphic encryption algorithms can support homomorphic addition operations or homomorphic multiplication operations. As a result, semi-homomorphic encryption algorithms are applicable to fewer computing scenarios. For example, for a semi-homomorphic encryption algorithm that supports homomorphic addition operations, the following operations can be supported in actual applications: addition of homomorphic ciphertext data and homomorphic ciphertext data, addition of homomorphic ciphertext data and plaintext data, and multiplication of homomorphic ciphertext data and plaintext data. However, the following operation is not supported: multiplication of homomorphic ciphertext data and homomorphic ciphertext data.
[0043] Fully homomorphic encryption algorithms can support both homomorphic addition and homomorphic multiplication operations. However, compared with semi-homomorphic encryption algorithms, the encryption process of fully homomorphic encryption algorithms is slower and less efficient. In addition, for homomorphic multiplication operations, as the number of operations increases, the fully homomorphic encryption algorithm will rapidly increase the noise in the ciphertext data, drowning out the original information, making it impossible to decrypt correctly. In other words, for homomorphic multiplication operations, the number of operations supported by fully homomorphic encryption algorithms is limited.
[0044] Logical operations are often used in specific business scenarios. Considering that any type of logical operation can be converted into a combination of XOR and / or AND operations, if XOR and AND operations can be implemented based on homomorphic addition operations, any type of logical operation can be implemented based on homomorphic addition operations. In addition, for homomorphic addition operations, both semi-homomorphic encryption algorithms and fully homomorphic encryption algorithms can support a large number of operations.
[0045] To do this, see Figure 1 The embodiments of this specification provide a data processing system for protecting privacy.
[0046] The data processing system may include a data party device, a service party device and a result party device. The data party device, the service party device and the result party device may be computer devices with data processing capabilities. The computer device may be a personal computer, a laptop computer, a cellular phone, a smart phone, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a server or a combination of any of these devices. The data party device, the service party device and the result party device may be different computer devices. Alternatively, a plurality of the data party device, the service party device and the result party device may also be integrated into one computer device. For example, the result party device and the data party device may be integrated into one computer device.
[0047] The data party device may be established by the data party. The data party is used to provide private data. The service party device may be established by the service party. The service party is used to provide computing services. The result party device may be established by the result party. The result party is used to obtain the computing results of the private data. The data party, the service party and the result party may be different organizations. Alternatively, multiple of the data party, the service party and the result party may be the same organization. The organization may include financial institutions, government agencies, big data companies, cloud computing vendors that provide computing services, etc.
[0048] The data processing system may also include other devices. For example, the data processing system may also include an auxiliary device. The auxiliary device may be a computer device with data processing capabilities. The auxiliary device is used to assist the service-side device in performing calculations. The auxiliary device, the data-side device, and the result-side device may be different computer devices. Alternatively, multiple of the auxiliary device, the data-side device, and the result-side device may be integrated into one computer device. For example, the auxiliary device and the data-side device may be integrated into one computer device.
[0049] In some embodiments, the number of data party devices may be one or more. The one or more data party devices may hold multiple privacy data. Each data party device may specifically hold one or more privacy data. For example, the number of data party devices may be one. The one data party device may hold multiple privacy data. For another example, the number of data party devices may be multiple. Each data party device may hold one or more privacy data.
[0050] The private data may include business data such as user data, product data, transaction data, and behavior data. The user data may include age, gender, occupation, etc. The product data may include product category, review data, etc. The transaction data may include transaction amount, transaction channel, etc. The behavior data may include transaction behavior data, payment behavior data, etc. In practical applications, the private data may be text data, image data, video data, or audio data, etc.
[0051] In some embodiments, for the security of private data, the data party device cannot send plaintext private data to the outside. To this end, for each private data, the data party device can determine one or more first plaintext data; and can use a homomorphic encryption algorithm to encrypt the one or more first plaintext data to obtain one or more first ciphertext data.
[0052] The number of the first plaintext data may be greater than or equal to the number of bits of the privacy data. The number of bits of the privacy data may be the number of bits in the privacy data. In some scenario examples, the multiple privacy data may have the same number of bits. The number of the first plaintext data may be equal to the number of bits. In other scenario examples, the multiple privacy data may have different numbers of bits. For each privacy data, the data party device may compare the number of bits of the privacy data with the target number of bits; if the number of bits of the privacy data is less than the target number of bits, the number of bits of the privacy data may be padded to the target number of bits; if the number of bits of the privacy data is equal to the target number of bits, the number of bits of the privacy data may be kept unchanged. In this way, the number of the first plaintext data may be equal to the target number of bits. The target number of bits may be the maximum number of bits of each privacy data. Alternatively, the target number of bits may also be greater than the maximum number. The target number of bits may be determined by the one or more data party devices through negotiation. Alternatively, the target number of bits may also be an empirical value. Padding the number of bits of the privacy data to the target number of bits may include: padding the high bits of the privacy data with zeros.
[0053] The first plaintext data has a corresponding relationship with the bit positions of the privacy data. The parity of the first plaintext data can be used to represent the bit value on the bit position. If the bit value on the bit position is 0, the first plaintext data can be an even number. If the bit value on the bit position is 1, the first plaintext data can be an odd number. In practical applications, the first plaintext data can be the bit value on the bit position. Alternatively, the first plaintext data can also be other values, such as a random number.
[0054] The homomorphic encryption algorithm may include an additive homomorphic encryption algorithm. The additive homomorphic encryption algorithm may be an encryption algorithm that supports homomorphic addition operations. Specifically, the additive homomorphic encryption algorithm may include a semi-homomorphic encryption algorithm and a fully homomorphic encryption algorithm. Considering that the semi-homomorphic encryption algorithm has a higher encryption efficiency, the additive homomorphic encryption algorithm is preferably a semi-homomorphic encryption algorithm.
[0055] In some embodiments, a data party device may send first ciphertext data to a service party device. The service party device may receive multiple first ciphertext data sent by one or more data party devices; and may determine one or more ciphertext sets based on the received first ciphertext data. The ciphertext set may include multiple first ciphertext data. The number of first ciphertext data in the ciphertext set may be equal to the number of private data. Multiple first ciphertext data in the ciphertext set may correspond to the same bit of multiple private data. The first ciphertext data in different ciphertext sets may correspond to different bits.
[0056] The first ciphertext data is obtained by encrypting the first plaintext data, and the first plaintext data has a corresponding relationship with the bit position of the privacy data. So that the first ciphertext data has a corresponding relationship with the bit position of the privacy data. The service party device can determine the ciphertext set according to the corresponding relationship between the first ciphertext data and the bit position. Among them, the service party device can obtain the corresponding relationship between the first ciphertext data and the bit position by negotiating with the data party device. Alternatively, the service party device can also receive the corresponding relationship input by the user. In addition, it can be understood that the first ciphertext data has a corresponding relationship with the bit position of the privacy data. Multiple first ciphertext data in the ciphertext set can correspond to the same bit position. So that the ciphertext set has a corresponding relationship with the bit position.
[0057] In some embodiments, see Figure 2 . The multiple private data can be used to perform an XOR operation. Specifically, for each ciphertext set, the service-side device can homomorphically add multiple first ciphertext data in the ciphertext set to obtain second ciphertext data; the second ciphertext data can be sent to the result-side device. The result-side device can receive the second ciphertext data; the second ciphertext data can be decrypted to obtain second plaintext data; and the intermediate XOR operation results of the multiple private data on specific bits can be determined based on the parity of the second plaintext data. Among them, the specific bit position may include the bit position corresponding to the ciphertext set. The parity of the second plaintext data can be used to represent the intermediate XOR operation result. If the second plaintext data is an even number, the intermediate XOR operation result is 0. If the second plaintext data is an odd number, the intermediate XOR operation result is 1.
[0058] In some embodiments, the number of private data bits may be one. The number of ciphertext sets may be one. A second plaintext data may be obtained according to the one ciphertext set. The result-side device may determine an intermediate XOR operation result according to the parity of the one second plaintext data as the final XOR operation result of the multiple private data.
[0059] Alternatively, the number of bits of the privacy data may be multiple. The number of ciphertext sets may be multiple. Multiple second plaintext data may be obtained based on the multiple ciphertext sets. The result party device may determine multiple intermediate XOR operation results based on the parity of the multiple second plaintext data; and may construct the final XOR operation results of the multiple privacy data based on the multiple intermediate XOR operation results. Specifically, the ciphertext set has a corresponding relationship with the bit. The intermediate XOR operation results obtained according to the ciphertext set have a corresponding relationship with the bit. The result party device may construct the final XOR operation result of the multiple privacy data using the multiple intermediate XOR operation results based on the corresponding relationship between the intermediate XOR operation results and the bit.
[0060] The final XOR operation result may include a business result. In practical applications, the business result may include commodity sales, risk assessment value, judgment result (eg, whether the judgment value is in a set), etc.
[0061] See also Figure 3 The following is an example scenario of XOR operation.
[0062] The data processing system may include a data party device and a service party device. The data party device may hold private data 3 and private data 5. The private data 3 and the private data 5 are used for performing an XOR operation.
[0063] The private data 3 can be represented as a binary string 0011. For the private data 3, the data party device can determine four first plaintext data, namely A1, A2, A3 and A4; and can use a homomorphic encryption algorithm to encrypt the four first plaintext data, namely A1, A2, A3 and A4, to obtain four first ciphertext data, namely [A1], [A2], [A3] and [A4]. Among them, the first plaintext data A1 corresponds to the first bit of the binary string 0011. If the bit value of the first bit of the binary string 0011 is 1, the first plaintext data A1 is an odd number, for example, it can be 99. The first plaintext data A2 corresponds to the second bit of the binary string 0011. If the bit value of the second bit of the binary string 0011 is 1, the first plaintext data A2 is an odd number, for example, it can be 97. The first plaintext data A3 corresponds to the third bit of the binary string 0011. The bit value of the third bit of the binary string 0011 is 0, and the first plaintext data A3 is an even number, for example, 100. The first plaintext data A4 corresponds to the fourth bit of the binary string 0011. The bit value of the fourth bit of the binary string 0011 is 0, and the first plaintext data A4 is an even number, for example, 200.
[0064] The private data 5 can be represented as a binary string 0101. For the private data 5, the data party device can determine four first plaintext data, namely B1, B2, B3 and B4; and can use a homomorphic encryption algorithm to encrypt the four first plaintext data, namely B1, B2, B3 and B4, to obtain four first ciphertext data, namely [B1], [B2], [B3] and [B4]. Among them, the first plaintext data B1 corresponds to the first bit of the binary string 0101. If the bit value of the first bit of the binary string 0101 is 1, the first plaintext data B1 is an odd number, for example, 95. The first plaintext data B2 corresponds to the second bit of the binary string 0101. If the bit value of the second bit of the binary string 0101 is 0, the first plaintext data B2 is an even number, for example, 300. The first plaintext data B3 corresponds to the third bit of the binary string 0101. The bit value of the third bit of the binary string 0101 is 1, and the first plaintext data B3 is an odd number, for example, 301. The first plaintext data B4 corresponds to the fourth bit of the binary string 0101. The bit value of the fourth bit of the binary string 0101 is 0, and the first plaintext data B4 is an even number, for example, 400.
[0065] The data party device may send eight first ciphertext data, namely, [A1], [A2], [A3], [A4], [B1], [B2], [B3], and [B4], to the service party device. The service party device may receive eight first ciphertext data, namely, [A1], [A2], [A3], [A4], [B1], [B2], [B3], and [B4]; and may determine four ciphertext sets, namely, {[A1], [B1]}, {[A2], [B2]}, {[A3], [B3]}, and {[A4], [B4]}, based on the received first ciphertext data.
[0066] For the ciphertext set {[A1], [B1]}, the service device may homomorphically add the first ciphertext data [A1] and the first ciphertext data [B1] in the ciphertext set {[A1], [B1]} to obtain the second ciphertext data [A1+B1]=[A1]+[B1]. Similarly, for the ciphertext set {[A2], [B2]}, the service device may homomorphically add the first ciphertext data [A2] and the first ciphertext data [B2] in the ciphertext set {[A2], [B2]} to obtain the second ciphertext data [A2+B2]=[A2]+[B2]. Similarly, for the ciphertext set {[A3], [B3]}, the service device may homomorphically add the first ciphertext data [A3] and the first ciphertext data [B3] in the ciphertext set {[A3], [B3]} to obtain the second ciphertext data [A3+B3]=[A3]+[B3]. Similarly, for the ciphertext set {[A4], [B4]}, the service device may homomorphically add the first ciphertext data [A4] and the first ciphertext data [B4] in the ciphertext set {[A4], [B4]} to obtain the second ciphertext data [A4+B4]=[A4]+[B4].
[0067] The service party device can send four second ciphertext data, namely [A1+B1], [A2+B2], [A3+B3], and [A4+B4], to the data party device. The data party device can receive four second ciphertext data, namely [A1+B1], [A2+B2], [A3+B3], and [A4+B4]; and can decrypt the four second ciphertext data, namely [A1+B1], [A2+B2], [A3+B3], and [A4+B4], respectively, to obtain four second plaintext data, namely A1+B1, A2+B2, A3+B3, and A4+B4.
[0068] The first plaintext data A1 is an odd number, and the first plaintext data B1 is an odd number, then the second plaintext data A1+B1 is an even number. According to the parity of the second plaintext data A1+B1, the data party device can determine the intermediate XOR operation result S1 of the private data 3 and the private data on the first bit. The intermediate XOR operation result S1 is a value of 0. The first plaintext data A2 is an odd number, and the first plaintext data B2 is an even number, then the second plaintext data A2+B2 is an odd number. According to the parity of the second plaintext data A2+B2, the data party device can determine the intermediate XOR operation result S2 of the private data 3 and the private data on the second bit. The intermediate XOR operation result S2 is a value of 1. The first plaintext data A3 is an even number, and the first plaintext data B3 is an odd number, then the second plaintext data A3+B3 is an odd number. According to the parity of the second plaintext data A3+B3, the data party device can determine the intermediate XOR operation result S3 of the private data 3 and the private data on the third bit. The intermediate XOR operation result S3 is a value of 1. The first plaintext data A4 is an even number, the first plaintext data B4 is an even number, and the second plaintext data A4+B4 is an even number. According to the parity of the second plaintext data A4+B4, the data party device can determine the intermediate XOR operation result S4 of the private data 3 and the private data at the fourth bit. The intermediate XOR operation result S4 is a value of 0.
[0069] The data party device can construct a binary string 0110 according to the intermediate XOR operation result S1, the intermediate XOR operation result S2, the intermediate XOR operation result S3, and the intermediate XOR operation result S4. The binary string 0110 can be the final XOR operation result of the private data 3 and the private data 5. That is, the final XOR operation result can be the value 6.
[0070] In some other embodiments, see Figure 4. The multiple private data can be used for AND operation. Specifically, for each ciphertext set, the service-side device can generate a random number as mask data; the mask data can be homomorphically added to the multiple first ciphertext data in the ciphertext set to obtain multiple masked first ciphertext data; the multiple masked first ciphertext data can be sent to the auxiliary device. The auxiliary device can receive multiple masked first ciphertext data; the multiple masked first ciphertext data can be decrypted to obtain multiple masked first plaintext data; the multiple masked first plaintext data can be multiplied to obtain a multiplication result; the multiplication result can be encrypted using a homomorphic encryption algorithm to obtain a homomorphic encryption result; the homomorphic encryption result can be fed back to the service-side device. The service-side device can receive the homomorphic encryption result; the second ciphertext data can be determined based on the homomorphic encryption result and the mask data; the second ciphertext data can be sent to the result-side device. The result-side device can receive the second ciphertext data; the second ciphertext data can be decrypted to obtain the second plaintext data; the intermediate AND operation results of the multiple private data on specific bits can be determined based on the parity of the second plaintext data. The specific bit position may include a bit position corresponding to the ciphertext set. The parity of the second plaintext data may be used to represent the intermediate AND operation result. If the second plaintext data is an even number, the intermediate AND operation result is 0. If the second plaintext data is an odd number, the intermediate AND operation result is 1.
[0071] In some embodiments, the number of private data bits may be one. The number of ciphertext sets may be one. A second plaintext data may be obtained according to the one ciphertext set. The result-side device may determine an intermediate AND operation result according to the parity of the one second plaintext data as the final AND operation result of the plurality of private data.
[0072] Alternatively, the number of bits of the privacy data may be multiple. The number of ciphertext sets may be multiple. Multiple second plaintext data may be obtained based on the multiple ciphertext sets. The result party device may determine multiple intermediate AND operation results based on the parity of the multiple second plaintext data; and may construct the final AND operation results of the multiple privacy data based on the multiple intermediate AND operation results. Specifically, the ciphertext set has a corresponding relationship with the bit. The intermediate AND operation results obtained based on the ciphertext set have a corresponding relationship with the bit. The result party device may construct the final AND operation results of the multiple privacy data using the multiple intermediate AND operation results based on the corresponding relationship between the intermediate AND operation results and the bit.
[0073] The final AND operation result may include a business result. In practical applications, the business result may include commodity sales, risk assessment value, judgment result (eg, whether the judgment value is in the set), etc.
[0074] See also Figure 5 The following is an example of a scenario using AND operations.
[0075] The data processing system may include a data party device and a service party device. The data party device may hold private data 3 and private data 5. The private data 3 and the private data 5 are used for performing an AND operation.
[0076] The private data 3 can be represented as a binary string 0011. For the private data 3, the data party device can determine four first plaintext data, namely A1, A2, A3 and A4; and can use a homomorphic encryption algorithm to encrypt the four first plaintext data, namely A1, A2, A3 and A4, to obtain four first ciphertext data, namely [A1], [A2], [A3] and [A4]. Among them, the first plaintext data A1 corresponds to the first bit of the binary string 0011. If the bit value of the first bit of the binary string 0011 is 1, the first plaintext data A1 is an odd number, for example, it can be 99. The first plaintext data A2 corresponds to the second bit of the binary string 0011. If the bit value of the second bit of the binary string 0011 is 1, the first plaintext data A2 is an odd number, for example, it can be 97. The first plaintext data A3 corresponds to the third bit of the binary string 0011. The bit value of the third bit of the binary string 0011 is 0, and the first plaintext data A3 is an even number, for example, 100. The first plaintext data A4 corresponds to the fourth bit of the binary string 0011. The bit value of the fourth bit of the binary string 0011 is 0, and the first plaintext data A4 is an even number, for example, 200.
[0077] The private data 5 can be represented as a binary string 0101. For the private data 5, the data party device can determine four first plaintext data, namely B1, B2, B3 and B4; and can use a homomorphic encryption algorithm to encrypt the four first plaintext data, namely B1, B2, B3 and B4, to obtain four first ciphertext data, namely [B1], [B2], [B3] and [B4]. Among them, the first plaintext data B1 corresponds to the first bit of the binary string 0101. If the bit value of the first bit of the binary string 0101 is 1, the first plaintext data B1 is an odd number, for example, 95. The first plaintext data B2 corresponds to the second bit of the binary string 0101. If the bit value of the second bit of the binary string 0101 is 0, the first plaintext data B2 is an even number, for example, 300. The first plaintext data B3 corresponds to the third bit of the binary string 0101. The bit value of the third bit of the binary string 0101 is 1, and the first plaintext data B3 is an odd number, for example, 301. The first plaintext data B4 corresponds to the fourth bit of the binary string 0101. The bit value of the fourth bit of the binary string 0101 is 0, and the first plaintext data B4 is an even number, for example, 400.
[0078] The data party device may send eight first ciphertext data, namely, [A1], [A2], [A3], [A4], [B1], [B2], [B3], and [B4], to the service party device. The service party device may receive eight first ciphertext data, namely, [A1], [A2], [A3], [A4], [B1], [B2], [B3], and [B4]; and may determine four ciphertext sets, namely, {[A1], [B1]}, {[A2], [B2]}, {[A3], [B3]}, and {[A4], [B4]}, based on the received first ciphertext data.
[0079] For the ciphertext set {[A1], [B1]}, the service party device can generate a random number R1 as mask data; the mask data R1 can be homomorphically added to the first ciphertext data [A1] and the first ciphertext data [B1] respectively to obtain the masked first ciphertext data [A1+R1]=[A1]+R1 and the masked first ciphertext data [B1+R1]=[B1]+R1; the masked first ciphertext data [A1+R1] and the masked first ciphertext data [B1+R1] can be sent to the data party device. The data party device can receive the masked first ciphertext data [A1+R1] and the masked first ciphertext data [B1+R1]; can decrypt the masked first ciphertext data [A1+R1] and the masked first ciphertext data [B1+R1] to obtain the masked first plaintext data A1+R1 and the masked first plaintext data B1+R1; can multiply the masked first plaintext data A1+R1 and the masked first plaintext data B1+R1 to obtain the multiplication result (A1+R1)×(B1+R1); can use a homomorphic encryption algorithm to encrypt the multiplication result (A1+R1)×(B1+R1) to obtain the homomorphic encryption result [(A1+R1)×(B1+R1)]; can feedback the homomorphic encryption result [(A1+R1)×(B1+R1)] to the service party device. The service-side device can receive the homomorphic encryption result [(A1+R1)×(B1+R1)]; the second ciphertext data can be determined based on the homomorphic encryption result [(A1+R1)×(B1+R1)] and the mask data R1. In practical applications, if the mask data R1 is an even number, the service-side device can use the encryption result [(A1+R1)×(B1+R1)] as the second ciphertext data. If the mask data R1 is an odd number, the service-side device can calculate [C]=[(A1+R1)×(B1+R1)]+[A1]+[B1]+1 as the second ciphertext data. Here, assuming that the mask data R1 is an even number, the service-side device can obtain the second ciphertext data [(A1+R1)×(B1+R1)]. Similarly, for the ciphertext set {[A2], [B2]}, the service-side device can obtain the second ciphertext data [(A2+R2)×(B2+R2)], where R2 is the mask data generated by the service-side device. Similarly, for the ciphertext set {[A3], [B3]}, the service-side device can obtain the second ciphertext data [(A3+R3)×(B3+R3)], where R3 is the mask data generated by the service-side device. Similarly, for the ciphertext set {[A4], [B4]}, the service-side device can obtain the second ciphertext data [(A4+R4)×(B4+R4)], where R4 is the mask data generated by the service-side device.
[0080] The service party device can send four second ciphertext data, namely, [(A1+R1)×(B1+R1)], [(A2+R2)×(B2+R2)], [(A3+R3)×(B3+R3)], and [(A4+R4)×(B4+R4)] to the data party device. The data party device can receive four second ciphertext data, namely, [(A1+R1)×(B1+R1)], [(A2+R2)×(B2+R2)], [(A3+R3)×(B3+R3)], and [(A4+R4)×(B4+R4)]; and can decrypt the four second ciphertext data, namely, [(A1+R1)×(B1+R1)], [(A2+R2)×(B2+R2)], [(A3+R3)×(B3+R3)], and [(A4+R4)×(B4+R4)], respectively, to obtain four second plaintext data, namely, (A1+R1)×(B1+R1), (A2+R2)×(B2+R2), (A3+R3)×(B3+R3), and (A4+R4)×(B4+R4).
[0081] The second plaintext data (A1+R1)×(B1+R1) is an odd number. According to the parity of the second plaintext data (A1+R1)×(B1+R1), the data party device can determine the intermediate AND operation result T1 of the private data 3 and the private data on the first bit. The intermediate AND operation result T1 can be a value of 1. The second plaintext data (A2+R2)×(B2+R2) is an even number. According to the parity of the second plaintext data (A2+R2)×(B2+R2), the data party device can determine the intermediate AND operation result T2 of the private data 3 and the private data on the second bit. The intermediate AND operation result T2 can be a value of 0. The second plaintext data (A3+R3)×(B3+R3) is an even number. According to the parity of the second plaintext data (A3+R3)×(B3+R3), the data party device can determine the intermediate AND operation result T3 of the private data 3 and the private data on the third bit. The intermediate AND operation result T3 may be a value of 0. The second plaintext data (A4+R4)×(B4+R4) is an even number. According to the parity of the second plaintext data (A4+R4)×(B4+R4), the data party device may determine the intermediate AND operation result T4 of the private data 3 and the private data at the fourth bit. The intermediate AND operation result T4 may be a value of 0.
[0082] The data party device can construct a binary string 0001 according to the intermediate AND operation result T1, the intermediate AND operation result T2, the intermediate AND operation result T3, and the intermediate AND operation result T4. The binary string 0001 can be the final AND operation result of the private data 3 and the private data 5. That is, the final AND operation result can be a value 1.
[0083] In some other embodiments, the multiple privacy data may be used to perform a first logical operation. The first logical operation may include any type of logical operation. For example, the first logical operation may include a comparison operation. The first logical operation may be converted into a second logical operation. The second logical operation may include an XOR operation, an AND operation, and any combination thereof. For example, the first logical operation may be converted into a Reed-Muller form of logical operation. The Reed-Muller form of logical operation may include an XOR operation and / or an AND operation. In this way, the final operation result of the second logical operation may be obtained based on the XOR operation process and / or the AND operation process in the aforementioned embodiment as the final operation result of the first logical operation. Thus, it can be achieved that the operation result of any type of logical operation is obtained based on the homomorphic addition operation, without being limited by the number of operations.
[0084] The embodiments of this specification provide a data processing method for protecting privacy. The method can be applied to the field of multi-party secure computing. The method can be applied to a service-side device. Figure 6 The method may include the following steps.
[0085] Step S10: Acquire a plurality of first ciphertext data.
[0086] In some embodiments, the plurality of first ciphertext data may include homomorphic ciphertext data of a plurality of first plaintext data.
[0087] The first ciphertext data may be obtained according to a homomorphic encryption algorithm. For example, the first ciphertext data may include: an encryption result after the first plaintext data is encrypted by a homomorphic encryption algorithm. For another example, the first ciphertext data may also include: a result after a specific logical operation is performed on the encryption result obtained after the first plaintext data is encrypted by a homomorphic encryption algorithm. The specific logical operation includes but is not limited to an XOR operation, an AND operation, and the like. The homomorphic encryption algorithm may include an additive homomorphic encryption algorithm. The additive homomorphic encryption algorithm may include a semi-homomorphic encryption algorithm and a fully homomorphic encryption algorithm. Considering that the encryption efficiency of the semi-homomorphic encryption algorithm is higher, the additive homomorphic encryption algorithm is preferably a semi-homomorphic encryption algorithm.
[0088] The parity of the multiple first plaintext data can be used to represent multiple business data. Specifically, if the business data is a first value, the corresponding first plaintext data can be an even number. If the business data is a second value, the corresponding first plaintext data can be an odd number. The first plaintext data can be business data. Alternatively, the first plaintext data can also be other values, such as a random number. The first value can include 0, and the second value can include 1. Of course, 0 and 1 here are only examples, and in actual applications, the first value and the second value can also be other values.
[0089] The multiple business data may be used to perform an XOR operation. The multiple business data may include multiple bit values. The multiple bit values may include bit values of multiple privacy data at the same bit position. For example, the multiple business data may include a bit value of 1 at the first bit position of privacy data 3, and a bit value of 1 at the first bit position of privacy data 5.
[0090] In some embodiments, the data party device may send multiple first ciphertext data to the service party device. The service party device may receive the multiple first ciphertext data. For example, for the multiple business data, the data party device may determine multiple first plaintext data; may use a homomorphic encryption algorithm to encrypt the multiple first plaintext data to obtain multiple first ciphertext data; and may send the multiple first ciphertext data to the service party device. The service party device may receive multiple first ciphertext data.
[0091] Alternatively, the service-side device may also obtain a calculation result by performing a specific logic operation, and the calculation result may be used as the first ciphertext data. The specific logic operation includes but is not limited to an XOR operation, an AND operation, etc. For example, the service-side device may obtain multiple calculation results by performing multiple specific operations, and the multiple calculation results may be used as multiple first ciphertext data.
[0092] Step S12: Homomorphically add multiple first ciphertext data to obtain second ciphertext data.
[0093] In some embodiments, the first ciphertext data supports homomorphic addition operations. The service party device can homomorphically add the multiple first ciphertext data to obtain second ciphertext data. The second ciphertext data can be homomorphic ciphertext data of the second plaintext data. The parity of the second plaintext data is used to represent the XOR operation results of the multiple business data. Specifically, if the second plaintext data is an even number, the XOR operation result is the first result. If the second plaintext data is an odd number, the XOR operation result is the second result. The first result can be 0, and the second result can be 1. Of course, 0 and 1 here are only examples. In actual applications, the first result and the second result can also be other values.
[0094] In some embodiments, the service-side device may send the second ciphertext data to the result-side device. The result-side device may receive the second ciphertext data; may decrypt the second ciphertext data to obtain the second plaintext data; and may determine the XOR operation result of the multiple business data according to the parity of the second plaintext data. Of course, the service-side device may not send the second ciphertext data to the outside, but continue to operate on the second ciphertext data.
[0095] The data processing method of the embodiment of this specification uses the parity of multiple first plaintext data to represent multiple business data. The second ciphertext data is obtained by performing a homomorphic addition operation on multiple first ciphertext data of the multiple first plaintext data. The second ciphertext data includes homomorphic ciphertext data of the second plaintext data. The parity of the second plaintext data is used to represent the XOR operation result of the multiple business data. In this way, the XOR operation can be implemented based on the homomorphic addition operation. Moreover, during the XOR operation, the business data will not be leaked, thereby achieving privacy protection.
[0096] The present specification also provides another data processing method for protecting privacy. The method can be applied to the field of multi-party secure computing. The method can be executed by a service-side device. Figure 7 The method may include the following steps.
[0097] Step S20: Acquire a plurality of first ciphertext data.
[0098] In some embodiments, the plurality of first ciphertext data may include homomorphic ciphertext data of a plurality of first plaintext data. The parity of the plurality of first plaintext data is used to represent a plurality of business data. The plurality of business data is used to perform an AND operation. For the first ciphertext data, the first plaintext data, and the business data, reference may be made to the relevant description in step S10.
[0099] Step S22: homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data.
[0100] In some embodiments, the first ciphertext data supports homomorphic addition operations. The service-side device may homomorphically add the mask data to the multiple first ciphertext data to obtain multiple masked first ciphertext data. For example, the multiple first ciphertext data may include first ciphertext data [A1] and first ciphertext data [B1]. The mask data R1 may be homomorphically added to the first ciphertext data [A1] and the first ciphertext data [B1] respectively to obtain masked first ciphertext data [A1+R1]=[A1]+R1 and masked first ciphertext data [B1+R1]=[B1]+R1. The mask data is used to mask the first ciphertext data and / or the first plaintext data. The mask data may be a random number, or may be other values. The mask data may be generated by the service-side device. Alternatively, the mask data may also be generated and sent by other devices to the service-side device.
[0101] Step S24: sending a plurality of masked first ciphertext data to the auxiliary device.
[0102] In some embodiments, the AND operation is a nonlinear operation. The service-side device needs to use an auxiliary device to implement the AND operation. Specifically, the service-side device can send multiple masked first ciphertext data to the auxiliary device. The auxiliary device can receive multiple masked first ciphertext data; can decrypt the multiple masked first ciphertext data to obtain multiple masked first plaintext data; can perform multiplication operations on the multiple masked first plaintext data to obtain multiplication results; can perform homomorphic encryption on the multiplication results to obtain homomorphic encryption results; can feedback the homomorphic encryption results to the service-side device.
[0103] The first ciphertext data supports homomorphic addition operations. Adding the mask data to the first ciphertext data is consistent with adding the mask data to the first plaintext data and then encrypting the addition result. Therefore, by decrypting the masked first ciphertext data, the masked first plaintext data can be obtained. The masked first plaintext data may include the addition result of the mask data and the first plaintext data. For example, the masked first ciphertext data may include [A1+R1]=[A1]+R1. By decrypting the masked first ciphertext data [A1+R1], the masked first plaintext data A1+R1 can be obtained.
[0104] The auxiliary device may multiply the plurality of masked first plaintext data to obtain a multiplication result. Alternatively, the bit value at the lowest bit of the data may indicate the parity of the data. For example, if the bit value at the lowest bit is 0, it indicates that the data is an even number. If the bit value at the lowest bit is 1, it indicates that the data is an odd number. In order to reduce the amount of calculation, the auxiliary device may obtain the plurality of bit values at the lowest bit of each masked first plaintext data; and the plurality of obtained bit values may be multiplied to obtain a multiplication result.
[0105] The auxiliary device may use a homomorphic encryption algorithm to homomorphically encrypt the multiplication result. The homomorphic encryption algorithm may include an additive homomorphic encryption algorithm. The additive homomorphic encryption algorithm may include a semi-homomorphic encryption algorithm and a fully homomorphic encryption algorithm. Considering that the semi-homomorphic encryption algorithm has a higher encryption efficiency, the additive homomorphic encryption algorithm is preferably a semi-homomorphic encryption algorithm.
[0106] The service device may negotiate with the auxiliary device, so that the auxiliary device can decrypt the masked first ciphertext data sent by the service device to obtain the masked first plaintext data. A negotiation method may include, for example, the service device sending a key to the auxiliary device, and the auxiliary device decrypting the masked first ciphertext data using the key.
[0107] Step S26: Receive the homomorphic encryption result fed back by the auxiliary device.
[0108] Step S28: Determine the second ciphertext data according to the homomorphic encryption result and the mask data.
[0109] In some embodiments, the service party device may determine the second ciphertext data according to the homomorphic encryption result and the parity of the mask data. If the mask data is an even number, the service party device may determine the homomorphic encryption result as the second ciphertext data. If the mask data is an odd number, the service party device may calculate the second ciphertext data according to the homomorphic encryption result and the plurality of first ciphertext data. Specifically, the service party device may homomorphically add the homomorphic encryption result, the plurality of first ciphertext data, and the value 1 to obtain the second ciphertext data. The second ciphertext data may be the homomorphic ciphertext data of the second plaintext data. The parity of the second plaintext data is used to represent the AND operation result of the plurality of business data. Specifically, if the second plaintext data is an even number, the AND operation result is the first result. If the second plaintext data is an odd number, the AND operation result is the second result. The first result may be 0, and the second result may be 1. Of course, 0 and 1 here are only examples, and in practical applications, the first result and the second result may also be other values.
[0110] In some embodiments, the service-side device may send the second ciphertext data to the result-side device. The result-side device may receive the second ciphertext data; may decrypt the second ciphertext data to obtain the second plaintext data; and may determine the AND operation result of the plurality of business data according to the parity of the second plaintext data. Of course, the service-side device may not send the second ciphertext data, but continue to operate on the second ciphertext data.
[0111] The data processing method of the embodiment of this specification uses the parity of multiple first plaintext data to represent multiple business data. The second ciphertext data is obtained by performing a homomorphic addition operation on multiple first ciphertext data of the multiple first plaintext data. The second ciphertext data includes homomorphic ciphertext data of the second plaintext data. The parity of the second plaintext data is used to represent the result of the AND operation of the multiple business data. In this way, the AND operation can be implemented based on the homomorphic addition operation. Moreover, during the AND operation, the business data will not be leaked, thereby achieving privacy protection.
[0112] The embodiment of this specification also provides a data processing device for protecting privacy. The device can be applied to the field of multi-party secure computing. The device can be set in a service party device. Figure 8 , the device may include the following units.
[0113] An acquisition unit 30 is used to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0114] The adding unit 32 is used to homomorphically add multiple first ciphertext data to obtain second ciphertext data, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the parity of the second plaintext data is used to represent the XOR operation result of the multiple business data.
[0115] The present specification also provides another data processing device for protecting privacy. The device can be applied to the field of multi-party secure computing. The device can be set in a service-side device. Fig. 9 , the device may include the following units.
[0116] An acquisition unit 40 is used to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, and the parity of the plurality of first plaintext data is used to represent a plurality of business data;
[0117] An adding unit 42, used for homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data;
[0118] The sending unit 44 is used to send a plurality of masked first ciphertext data to the auxiliary device, so that the auxiliary device decrypts the plurality of masked first ciphertext data to obtain a plurality of masked first plaintext data, performs a multiplication operation on the plurality of masked first plaintext data to obtain a multiplication operation result, and performs homomorphic encryption on the multiplication operation result to obtain a homomorphic encryption result;
[0119] A receiving unit 46, configured to receive a homomorphic encryption result fed back by an auxiliary device;
[0120] The determination unit 48 is used to determine the second ciphertext data according to the homomorphic encryption result and the mask data, wherein the second ciphertext data includes the homomorphic ciphertext data of the second plaintext data, and the parity of the second plaintext data is used to represent the result of the AND operation of the multiple business data.
[0121] An embodiment of the computer device of the present specification is introduced below. Fig.10 Schematic diagram of the hardware structure of the computer device in this embodiment. Fig.10 As shown, the computer device may include one or more (only one is shown in the figure) processors, memory and transmission modules. Of course, it can be understood by those skilled in the art that Fig.10 The hardware structure shown is only for illustration and does not limit the hardware structure of the above-mentioned computer device. In practice, the computer device may also include Fig.10 More or fewer component units as shown; or, Fig.10 Different configurations are shown.
[0122] The memory may include a high-speed random access memory; or, it may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory or other non-volatile solid-state memory. Of course, the memory may also include a remotely set network memory. The memory may be used to store program instructions or modules of application software, such as the instructions in this manual. Figure 6 or Figure 7 The program instructions or modules of the corresponding embodiment.
[0123] The processor may be implemented in any suitable manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The processor may read and execute program instructions or modules in the memory.
[0124] The transmission module can be used for transmitting data via a network, for example, via a network such as the Internet, an intranet, a local area network, a mobile communication network, etc.
[0125] This specification also provides an embodiment of a computer storage medium. The computer storage medium includes but is not limited to a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), a memory card, etc. The computer storage medium stores computer program instructions. When the computer program instructions are executed, the following are achieved: Figure 6 or Figure 7 The program instructions or modules of the corresponding embodiment.
[0126] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, computer equipment embodiment, and computer storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In addition, it is understandable that after reading this specification document, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.
[0127] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0128] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, 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.
[0129] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the present specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0130] This specification can be used in many general or special computer system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.
[0131] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0132] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A data processing method for protecting privacy, applied in the field of multi-party secure computing, comprising: The service-side device obtains a plurality of first ciphertext data, the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, the plurality of first plaintext data is determined according to a plurality of business data, the parity of the plurality of first plaintext data is used to represent the plurality of business data, the plurality of business data includes a bit value of a plurality of privacy data at the same bit position, the homomorphic ciphertext data is obtained according to an additive homomorphic encryption algorithm, and the additive homomorphic encryption algorithm is a semi-homomorphic encryption algorithm; Homomorphically add multiple first ciphertext data to obtain second ciphertext data, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the second plaintext data is obtained by decrypting the second ciphertext data. The parity of the second plaintext data is used to represent the XOR operation result of the multiple business data.
2. According to the method described in claim 1, if the first plaintext data is an odd number, it indicates that the business data is a first value; if the first plaintext data is an even number, it indicates that the business data is a second value; if the second plaintext data is an odd number, it indicates that the XOR operation result is a first result; if the second plaintext data is an even number, it indicates that the XOR operation result is a second result.
3. The method according to claim 1, further comprising: The second ciphertext data is sent to the result-side device so that the result-side device decrypts the second ciphertext data to obtain second plaintext data, and determines the XOR operation result of the multiple business data according to the parity of the second plaintext data.
4. A data processing method for protecting privacy, applied in the field of multi-party secure computing, comprising: The service-side device obtains a plurality of first ciphertext data, the plurality of first ciphertext data includes homomorphic ciphertext data of a plurality of first plaintext data, the plurality of first plaintext data is determined according to a plurality of business data, the parity of the plurality of first plaintext data is used to represent the plurality of business data, the plurality of business data includes a bit value of a plurality of privacy data at the same bit position, the homomorphic ciphertext data is obtained according to an additive homomorphic encryption algorithm, and the additive homomorphic encryption algorithm is a semi-homomorphic encryption algorithm; Homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data; Sending a plurality of masked first ciphertext data to the auxiliary device so that the auxiliary device decrypts the plurality of masked first ciphertext data to obtain a plurality of masked first plaintext data, performing a multiplication operation on the plurality of masked first plaintext data to obtain a multiplication operation result, and performing homomorphic encryption on the multiplication operation result to obtain a homomorphic encryption result; Receive the homomorphic encryption result fed back by the auxiliary device; According to the homomorphic encryption result and the parity of the mask data, second ciphertext data is determined, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, and the second plaintext data is obtained by decrypting the second ciphertext data. The parity of the second plaintext data is used to represent the result of the AND operation of the multiple business data.
5. According to the method described in claim 4, if the first plaintext data is an odd number, it indicates that the business data is a first value; if the first plaintext data is an even number, it indicates that the business data is a second value; if the second plaintext data is an odd number, it indicates that the result of the AND operation is a first result; if the second plaintext data is an even number, it indicates that the result of the AND operation is a second result.
6. The method according to claim 4, wherein performing a multiplication operation on the plurality of masked first plaintext data comprises: Multiplying the plurality of masked first plaintext data to obtain a multiplication result; Alternatively, multiple bit values of the lowest bit position of each masked first plaintext data are obtained, and the obtained multiple bit values are multiplied to obtain a multiplication result.
7. The method according to claim 4, wherein determining the second ciphertext data comprises: If the mask data is an even number, the homomorphic encryption result is determined as the second ciphertext data; or, If the mask data is an odd number, the second ciphertext data is calculated according to the homomorphic encryption result and the multiple first ciphertext data.
8. The method according to claim 7, wherein the calculating the second ciphertext data comprises: The homomorphic encryption result, multiple first ciphertext data, and the value 1 are homomorphically added to obtain the second ciphertext data.
9. The method according to claim 4, further comprising: The second ciphertext data is sent to the result-side device so that the result-side device decrypts the second ciphertext data to obtain second plaintext data, and determines the AND operation result of the multiple business data according to the parity of the second plaintext data.
10. A data processing device for protecting privacy, applied in the field of multi-party secure computing, the device is arranged in a service-side device, and the device comprises: an acquisition unit, configured to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data include homomorphic ciphertext data of a plurality of first plaintext data, the plurality of first plaintext data are determined according to a plurality of business data, the parity of the plurality of first plaintext data is used to represent a plurality of business data, the plurality of business data include bit values of a plurality of privacy data at the same bit position, and the homomorphic ciphertext data are obtained according to an additive homomorphic encryption algorithm, and the additive homomorphic encryption algorithm is a semi-homomorphic encryption algorithm; An adding unit is used to homomorphically add multiple first ciphertext data to obtain second ciphertext data, where the second ciphertext data includes homomorphic ciphertext data of second plaintext data, where the second plaintext data is obtained by decrypting the second ciphertext data, and the parity of the second plaintext data is used to represent the XOR operation result of the multiple business data.
11. A data processing device for protecting privacy, applied in the field of multi-party secure computing, the device is arranged in a service-side device, and the device comprises: an acquisition unit, configured to acquire a plurality of first ciphertext data, wherein the plurality of first ciphertext data include homomorphic ciphertext data of a plurality of first plaintext data, the plurality of first plaintext data are determined according to a plurality of business data, the parity of the plurality of first plaintext data is used to represent a plurality of business data, the plurality of business data include bit values of a plurality of privacy data at the same bit position, and the homomorphic ciphertext data are obtained according to an additive homomorphic encryption algorithm, and the additive homomorphic encryption algorithm is a semi-homomorphic encryption algorithm; An adding unit, used for homomorphically adding the mask data to the plurality of first ciphertext data to obtain a plurality of masked first ciphertext data; a sending unit, configured to send a plurality of masked first ciphertext data to the auxiliary device, so that the auxiliary device decrypts the plurality of masked first ciphertext data to obtain a plurality of masked first plaintext data, performs a multiplication operation on the plurality of masked first plaintext data to obtain a multiplication operation result, and performs homomorphic encryption on the multiplication operation result to obtain a homomorphic encryption result; A receiving unit, used for receiving the homomorphic encryption result fed back by the auxiliary device; A determination unit is used to determine second ciphertext data according to a homomorphic encryption result and the parity of mask data, wherein the second ciphertext data includes homomorphic ciphertext data of second plaintext data, the second plaintext data is obtained by decrypting the second ciphertext data, and the parity of the second plaintext data is used to represent the result of an AND operation of the multiple business data.
12. A computer device comprising: at least one processor; A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 9.
