Privacy computation method, system, device, storage medium and program product
By employing a digital secret sharing algorithm to truncate and encrypt numerical values in privacy computing, the problem of high communication overhead in fixed-point decimal multiplication is solved, thus improving the efficiency of privacy computing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2024-08-16
- Publication Date
- 2026-04-24
AI Technical Summary
Existing privacy computing schemes suffer from performance issues, and the efficiency of privacy computing needs to be improved, especially in fixed-point decimal multiplication operations where the communication overhead is significant.
The digital secret sharing algorithm is used to split the value into parts held by different participants. The data is truncated and encrypted using fixed-point decimal multiplication, which reduces the data length during communication and avoids the transmission of meaningless data.
It effectively reduces the amount of communication data transmitted and improves the efficiency and performance of privacy computing, especially in fixed-point decimal multiplication.
Smart Images

Figure CN119089494B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of privacy and security technology, and in particular to a privacy computing method, system, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] With the rapid development of the internet, data subjects are accumulating increasingly large amounts of data and hope to combine data from other data subjects to enrich the value of their data from multiple dimensions. However, data differs from conventional goods; it can be easily copied and transferred arbitrarily. To protect data privacy, technologies such as secure multi-party computation, differential privacy, and homomorphic encryption are typically employed, allowing multiple parties to perform privacy-preserving computations while protecting their own data from leakage. However, current privacy-preserving computation solutions still have performance issues, and their efficiency needs improvement. Summary of the Invention
[0003] In view of the above, this specification provides one or more embodiments of a privacy computing method, system, electronic device, computer-readable storage medium, and computer program product.
[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0005] According to a first aspect of one or more embodiments of this specification, a privacy-preserving computation method is proposed for performing privacy-preserving fixed-point decimal multiplication on a first numerical value and a second numerical value; the first numerical value is split into a first part held by a first participant in the privacy protection and a second part held by a second participant in the privacy protection based on a digital secret sharing algorithm; the second numerical value is split into a third part held by the first participant and a fourth part held by the second participant based on the digital secret sharing algorithm; the data length of the first numerical value and the second numerical value is a first data length;
[0006] The method is applied to the electronic device corresponding to the first participating party, and the method includes:
[0007] A multiplication operation is performed on the first part of the first value held by the first participant and the third part of the second value to obtain the first slice of the result of the multiplication operation of the first value and the second value.
[0008] Based on the preset decimal point position in the fixed-point decimal multiplication operation, the decimal part of the first slice of the multiplication result is truncated;
[0009] The first fragment of the truncated multiplication result is encrypted using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length.
[0010] The first encryption result is sent to the second participant, and the second encryption result obtained after performing fixed-point decimal multiplication is received from the second participant; the data length of the second encryption result is less than the data length of the first data.
[0011] The first encryption result and the second encryption result are combined to obtain a portion of the fixed-point decimal multiplication result held by the first participant, as indicated by the digital secret sharing algorithm.
[0012] According to a second aspect of the embodiments of this specification, a privacy computing system is provided, including an electronic device corresponding to a first participant and an electronic device corresponding to a second participant; wherein, the privacy computing system is used to perform privacy-preserving fixed-point decimal multiplication on a first value and a second value; the first value is split into a first part held by the first participant participating in the privacy protection and a second part held by the second participant participating in the privacy protection based on a digital secret sharing algorithm; the second value is split into a third part held by the first participant and a fourth part held by the second participant based on the digital secret sharing algorithm; the data length of the first value and the second value is a first data length;
[0013] The electronic device corresponding to the first participant is used to perform a multiplication operation based on a first part of the first value held by the first participant and a third part of the second value to obtain a first slice of the multiplication result of the first value and the second value; the decimal part of the first slice of the multiplication result is truncated based on a preset decimal point position in the fixed-point decimal multiplication operation; the truncated first slice of the multiplication result is encrypted using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length; and the first encrypted result is sent to the second participant.
[0014] The electronic device corresponding to the second participant is used to perform a multiplication operation based on the second part of the first value held by the second participant and the fourth part of the second value to obtain a second slice of the multiplication result of the first value and the second value; the decimal part of the second slice of the multiplication result is truncated based on the preset decimal point position in the fixed-point decimal multiplication operation; the truncated second slice of the multiplication result is encrypted using the digital secret sharing algorithm to obtain a second encrypted result; the data length of the second encrypted result is less than the first data length; and the second encrypted result is sent to the first participant.
[0015] The electronic device corresponding to the first participant is also used to receive the second encryption result sent by the second participant, and to perform combined processing based on the first encryption result and the second encryption result to obtain a portion of the fixed-point decimal multiplication result held by the first participant as indicated by the digital secret sharing algorithm;
[0016] The electronic device corresponding to the second participant is also used to receive the first encryption result sent by the first participant, and to perform combined processing based on the first encryption result and the second encryption result to obtain another part of the fixed-point decimal multiplication result held by the second participant as indicated by the digital secret sharing algorithm.
[0017] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising:
[0018] processor;
[0019] Memory used to store processor-executable instructions;
[0020] Wherein, when the processor executes the executable instructions, it is used to implement the method described in the first aspect.
[0021] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0022] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0023] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:
[0024] In the embodiments of this specification, during the privacy-preserving fixed-point decimal multiplication of the first and second values, the first participant performs truncation after obtaining the first slice of the multiplication result of the first and second values, and does not perform padding after truncation, so that the first encrypted result transmitted during communication is less than the first data length. Similarly, the second encrypted result obtained and to be transmitted by the second participant in a similar manner is also less than the first data length, thereby effectively reducing the amount of communication transmission and thus improving communication efficiency and privacy computing efficiency.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the structure of a privacy computing system provided in an exemplary embodiment.
[0027] Figure 2 This is a timing diagram between a first participant and a second participant provided in an exemplary embodiment.
[0028] Figure 3 This is another timing diagram between the first participating method and the second participating party provided in an exemplary embodiment.
[0029] Figure 4 This is an exemplary embodiment of a convolutional layer and activation layer structure in a neural network model.
[0030] Figure 5 This is a flowchart of a privacy computing method provided in an exemplary embodiment.
[0031] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0033] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0034] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0035] The technical terms used in this specification are explained here:
[0036] 1. Secure Multi-Party Computation (MPC): This refers to computation that allows participants to perform calculations without exposing their private inputs, in the absence of a trusted third party. While ensuring the privacy and data security of each participant, multiple parties collaboratively compute a function or perform a computational task, and each party only obtains the results relevant to its own computation, receiving no other information.
[0037] 2. Secret sharing: This refers to breaking down a secret to be shared into multiple secret fragments. Each participant holds a part of the secret. One or a few participants cannot reconstruct the shared secret value. Only when a sufficient number of secret fragments are combined can the original secret information be reconstructed.
[0038] For example, for arithmetic secret sharing algorithms, there are two sharing schemes:
[0039] (1) [ ]-sharing, for secret values Participants hold satisfy ; , n≥2。
[0040] (2) -sharing, for secret values Announcement ,and use -sharing; that is, shared by n participants. Furthermore, each participating party holds its own shares that are not publicly disclosed. ,; , n≥2.
[0041] The Boolean secret sharing algorithm is similar to the arithmetic secret sharing algorithm, but the difference lies in the fact that the Boolean secret sharing algorithm uses logical operations for computation, and the secret value can only be either 0 or 1. Specifically, the XOR operation in a Boolean circuit is equivalent to the addition operation in an arithmetic circuit, and the AND operation in a Boolean circuit is equivalent to the multiplication operation in an arithmetic circuit. Digital circuits are used to perform arithmetic operations, such as addition and multiplication, and can convert linear functions into digital circuits for computation. Boolean circuits, on the other hand, process data through logical operations, such as AND, OR, and NOT; and can convert nonlinear functions into Boolean circuits for computation.
[0042] In related technologies, to protect data privacy, techniques such as secure multi-party computation, differential privacy, and homomorphic encryption are commonly used, allowing multiple parties to perform privacy-preserving computations while protecting their own data from leakage. For example, in scenarios involving secure multi-party computation using secret sharing of fixed-point decimals, multiplication operations require communication to complete the multiplication of encrypted data, and the overhead of communication significantly impacts computational efficiency.
[0043] Fixed-point decimal multiplication involves multiplying two fixed-point numbers. Unlike floating-point arithmetic, the decimal point in fixed-point arithmetic is in a fixed position. Fixed-point decimals are typically represented as integers; for example, an 8-bit fixed-point decimal might actually represent an integer between -128 and 127. Before multiplication, the number of bits in the fixed-point numbers involved in the operation needs to be determined, as well as whether they are signed or unsigned. The multiplication is performed as regular integer multiplication, but the result needs to be adjusted according to the format of the fixed-point number. In the multiplication result, the decimal point is usually in a fixed position; for example, a 16-bit fixed-point decimal multiplication result might require shifting the decimal point left or right to fit the 16-bit format.
[0044] In implementing the embodiments of this specification, the inventors discovered that, for example, when multiplying two 64-bit fixed-point decimals (e.g., the decimal part is 16 bits long), the resulting multiplication result has a 32-bit decimal part. Therefore, it is necessary to truncate the decimal part of the multiplication result, maintaining a 16-bit decimal part, and then padding it according to the sign bit (i.e., sign extension) to make the multiplication result 64 bits. In encrypted computation, multiplication requires communication to complete the multiplication of encrypted data. This process typically involves transmitting 64 bits of data, which may have been padded and include some meaningless data. Therefore, the following optimization is considered: during multiplication communication, meaningless data content is not transmitted, thereby reducing communication volume and improving the efficiency of privacy computation.
[0045] Please see Figure 1 This specification provides a privacy computing system, which includes an electronic device 10 (hereinafter referred to as "first participant 10") corresponding to a first participant and an electronic device 20 (hereinafter referred to as "second participant 20") corresponding to a second participant. The first participant 10 and the second participant 20 can communicate with each other based on relevant privacy protection technologies (such as unintentional transmission protocol, differential privacy or homomorphic encryption).
[0046] The electronic device 10 corresponding to the first participant and the electronic device 20 corresponding to the second participant can be devices with computing capabilities, including but not limited to independent physical servers, server clusters consisting of multiple physical servers, cloud servers, personal computers, laptops, cellular phones, camera phones, smartphones, personal digital assistants, media players, navigation devices, email sending and receiving devices, game consoles, tablet computers, wearable devices, or any combination of these devices.
[0047] This privacy-preserving computation system is used at least to perform privacy-preserving fixed-point decimal multiplication on a first value and a second value. The first value is split into a first part held by a first participant in the privacy protection process and a second part held by a second participant in the privacy protection process, based on a digital secret sharing algorithm. The second value is split into a third part held by the first participant and a fourth part held by the second participant, based on the digital secret sharing algorithm. The data length of the first value and the second value is a first data length, and the data length of the decimal parts of the first value and the second value is a second data length, which is shorter than the first data length.
[0048] Please see Figure 2The timing diagram shown illustrates that the first participant 10 performs a multiplication operation based on the first part of the first value and the third part of the second value held by the first participant 10, obtaining a first slice (201) of the multiplication result of the first value and the second value; then, based on the preset decimal point position in the fixed-point decimal multiplication operation, the decimal part of the first slice of the multiplication result is truncated (202); the truncated first slice of the multiplication result is encrypted using a digital secret sharing algorithm to obtain a first encrypted result (203); wherein the data lengths of both the truncated first slice of the multiplication result and the first encrypted result are less than the first data length; the first encrypted result is then sent to the second participant 20 (204). This embodiment achieves the transmission of only meaningful data after truncation, without needing to maintain the data length of the first encrypted result equal to the first data length, thereby reducing communication volume and improving communication efficiency and privacy computing efficiency.
[0049] The electronic device corresponding to the second participant 20 is used to perform a multiplication operation based on the second part of the first value and the fourth part of the second value held by the second participant 20, to obtain a second fragment (205) of the result of the multiplication operation of the first value and the second value; the decimal part of the second fragment of the result of the multiplication operation is truncated based on the preset decimal point position in the fixed-point decimal multiplication operation (206); the truncated second fragment of the result of the multiplication operation is encrypted using a digital secret sharing algorithm to obtain a second encrypted result (207); wherein the data length of the second fragment of the result of the multiplication operation after truncation and the data length of the second encrypted result are less than the first data length; the second encrypted result is sent to the first participant 10 (208). In this embodiment, only meaningful data after truncation is transmitted, without having to keep the data length of the second encrypted result equal to the first data length, which helps to reduce the amount of communication and improve communication efficiency and privacy computing efficiency.
[0050] The electronic device corresponding to the first participant 10 is also used to receive the second encryption result sent by the second participant 20, and to perform combined processing based on the first encryption result and the second encryption result to obtain a portion (209) of the fixed-point decimal multiplication result held by the first participant 10 as indicated by the digital secret sharing algorithm.
[0051] The electronic device corresponding to the second participant 20 is also used to receive the first encryption result sent by the first participant 10, and to perform combined processing based on the first encryption result and the second encryption result to obtain another part (210) of the fixed-point decimal multiplication result held by the second participant 20 as indicated by the digital secret sharing algorithm.
[0052] In this embodiment, a portion of the fixed-point decimal multiplication result held by the first participant 10 and another portion of the fixed-point decimal multiplication result held by the second participant 20 are both valid data representing the fixed-point decimal multiplication result. If the fixed-point decimal multiplication operation is to be continued, the sign of these two can be extended (i.e., padded) according to actual needs. This embodiment does not impose any restrictions on this.
[0053] In this embodiment, when performing privacy-preserving fixed-point decimal multiplication in the manner described above, no padding operation is performed after truncation, so that the data length of the first encrypted result and the second encrypted result transmitted during communication is less than the first data length, thereby effectively reducing the amount of communication transmission and thus improving communication efficiency and privacy computing efficiency.
[0054] For example, the digital secret sharing algorithm is based on the above. Let's take sharing as an example:
[0055] The first part of the first value includes a first digital secret fragment held solely by the first participant 10, the second part of the first value includes a second digital secret fragment held solely by the second participant 20, and both the first part and the second part of the first value also include a first public value jointly held by the first participant 10 and the second participant 20.
[0056] The third part of the second value includes a third digital secret fragment held solely by the first participant 10, the fourth part of the second value includes a fourth digital secret fragment held solely by the second participant 20, and both the third and fourth parts of the second value also include a second public value jointly held by the first participant 10 and the second participant 20.
[0057] First participant 10 and second participant 20 can obtain a first multiplicative integral piece held by first participant 10 and a second multiplicative integral piece held by second participant 20 without disclosing the first, second, third, and fourth digital secret pieces, based on a preset multiplicative triple generation protocol (setupMULT protocol). The first multiplicative integral piece is part of the product between the first combination result and the second combination result; the second multiplicative integral piece is the other part of the product between the first combination result and the second combination result; the first combination result is the result of combining the first and second digital secret pieces, and the second combination result is the result of combining the third and fourth digital secret pieces.
[0058] After obtaining the first multiplicative slice, the first participant 10 can perform multiplication operations based on the first part of the first value, the third part of the second value, and the first multiplicative slice. For example, the first participant 10 can obtain the first product between the first common value, the second common value, and the first multiplication coefficient; the second product between the first common value and the third digital secret slice; and the third product between the second common value and the first digital secret slice. The first slice is obtained by subtracting the second and third products from the sum of the first product and the first multiplicative slice.
[0059] Similarly, after obtaining the second multiplicative integral slice, the second participant 20 can perform multiplication operations based on the second part of the first value, the fourth part of the second value, and the second multiplicative integral slice held by the second participant 20. For example, the second participant 20 can obtain the fourth product between the first common value, the second common value, and the second multiplication coefficient, the fifth product between the first common value and the fourth digital secret slice, and the sixth product between the second common value and the second digital secret slice; by subtracting the fifth and sixth products from the sum of the fourth product and the second multiplicative integral slice, the second slice of the result of the multiplication operation of the first value and the second value is obtained.
[0060] After obtaining the first slice of the result of the multiplication of the first and second values, the first participant 10 can truncate the decimal part of the first slice of the multiplication result based on the preset decimal point position in the fixed-point decimal multiplication operation.
[0061] Similarly, after obtaining the second slice of the result of the multiplication of the first and second values, the second participant 20 can truncate the decimal part of the second slice of the result of the multiplication operation based on the preset decimal point position in the fixed-point decimal multiplication operation.
[0062] The length of the decimal parts of the first and second values is the second data length, which is less than the first data length. Before truncation, the length of the decimal parts of the first and second slices of the multiplication result is the sum of the lengths of the decimal parts of the first and second values, which is twice the second data length. According to the rules of fixed-point decimal multiplication, an arithmetic right shift operation can be performed on the first and second slices of the multiplication result to achieve truncation, so that the length of the decimal parts of the truncated first and second slices is the second data length.
[0063] Next, the first participant 10 can determine the third data length based on the difference between the first data length and the second data length, and randomly generate a fifth digital secret fragment within the data range of the third data length; based on the sum of the first fragment and the fifth digital secret fragment of the truncated multiplication result, the first encryption result is obtained and sent to the second participant 20; wherein, the data length of the first fragment of the truncated multiplication result and the first encryption result are both the third data length, reducing the amount of data transmission.
[0064] Similarly, the second participant 20 can determine the third data length based on the difference between the first and second data lengths, and randomly generate a sixth digital secret fragment within the data range of the third data length; based on the sum of the second fragment and the sixth digital secret fragment after truncation of the multiplication operation, a second encryption result is obtained and sent to the first participant 10; wherein, the data length of the second fragment after truncation of the multiplication operation and the data length of the second encryption result are both the third data length, reducing the amount of data transmission.
[0065] After receiving the second encryption result, the first participant 10 can obtain a portion of the fixed-point decimal multiplication result held by the first participant 10, as indicated by the digital secret sharing algorithm, based on the first and second encryption results. This portion of the fixed-point decimal multiplication result held by the first participant 10 includes a third common value and a fifth digital secret fragment. The third common value is the sum of the first and second encryption results.
[0066] Similarly, after receiving the first encryption result, the second participant 20 can obtain another part of the fixed-point decimal multiplication result held by the second participant 20, as indicated by the digital secret sharing algorithm, based on the first and second encryption results. This other part of the fixed-point decimal multiplication result held by the second participant 20 includes a third public value and a sixth secret fragment. The third public value is the sum of the first and second encryption results.
[0067] For example, suppose the first value Second value ,in, , Indicates the first participant, 10. Indicates the second participant, 20. Indicates the first common value. This represents the first digital secret fragment. This represents the second digital secret fragment. Indicates the second common value. This represents the third digital secret fragment. This represents the fourth digital secret fragment.
[0068] To calculate Output shared values .in, This represents the third common value in the results of fixed-point decimal multiplication. This indicates that the fifth digital secret fragment held by the first participant, 10, This indicates that the sixth digital secret fragment is held by the second participant, 20.
[0069] The participants calculate the shared value in the following form: . express and The combined result, express and The combined result, express and The combined result. Because of... The value should not be made public, so it needs to be calculated first. of -sharing, that is Then you can calculate it. of -sharing, that is .
[0070] Phase 1:
[0071] (1) To , Generate random ; This represents the fifth digital secret fragment. This represents the sixth digital secret fragment.
[0072] (2) Input via setupMULT protocol and generate ; This represents the first multiplication integral slice. This represents the second-multiplication integral slice.
[0073] Phase Two:
[0074] (1) To , Calculate the following and send it to : Among them, the first participant The corresponding first multiplication coefficient i The value is 0, the second participant. The corresponding second multiplication coefficient i =1, This represents the product between the first common value and the second common value.
[0075] (2) Each participant calculates ; This represents the first encryption result. This indicates the second encryption result.
[0076] Assume the data lengths of the first and second values are... The decimal part is a fixed-point fraction with a length of 1. Position, with For example, superscript express The data length is defined, and the superscripts for other data have similar meanings; and a "truncation" operation is defined, using... To represent the defined "truncation" operation, the input is... Bits of data, output reduced to Bit: This makes the truncated output actually become Each bit contains only valid information. Therefore, privacy-preserving fixed-point decimal multiplication can be represented as follows:
[0077] Phase 1:
[0078] (1) To , Generate random ,in yes A ring of digits. That is, the first participant, 10, is in... Randomly generated within the ring range of digit integers. The second participant, 20, Randomly generated within the ring range of digit integers. .
[0079] (2) By using the setupMULT protocol, based on and generate Thus, the first participant 10 obtains The second participant, 20, received The generated and The data length is Bit.
[0080] Phase Two:
[0081] (1) To , Calculate the following and send it to : ;in, This represents one of the slices (e.g., the first participant) from the result of the multiplication operation that yielded the first and second values. Get the first slice, second participant After obtaining the second fragment, its fractional part is truncated to obtain a data length of [length missing]. Fragmentation of the result of bitwise multiplication;
[0082] (2) Each participant in On-ring computation .
[0083] In this embodiment, due to the actual transmission Only the valid data in The bit excludes invalid data during transmission, so only valid data is transmitted. Bits are transmitted, thus the communication is obtained. Reducing the amount of [something] can lower communication overhead.
[0084] The setupMULT protocol is used to generate [the data] during the preprocessing stage. At that time, it can also be generated directly. This way, we don't need to truncate this part in the second stage and can directly perform the calculation, which also helps to reduce the amount of data transmission and calculation.
[0085] In some embodiments, the privacy-preserving computation method provided in this specification is further used to perform a privacy-preserving nonlinear operation on the obtained fixed-point decimal multiplication result after performing a privacy-preserving fixed-point decimal multiplication operation on the first and second values. Since the nonlinear operation cannot be directly performed under secret sharing, it can be performed bitwise by converting it to a Boolean circuit.
[0086] Please see Figure 3 As shown in the timing diagram, after obtaining a portion of the result of the fixed-point decimal multiplication operation, the first participant 10 can convert a portion of the result of the fixed-point decimal multiplication operation held by the first participant 10 from digital secret sharing to Boolean secret sharing to obtain the first Boolean secret slice (301); then, using the Boolean circuit indicated by the nonlinear operation, a nonlinear operation is performed on the first Boolean secret slice to obtain one slice of the nonlinear operation result (302).
[0087] Similarly, after obtaining another part of the result of the fixed-point decimal multiplication operation, the second participant 20 can convert the other part of the result of the fixed-point decimal multiplication operation held by the second participant 20 from digital secret sharing to Boolean secret sharing to obtain the second Boolean secret slice (303); then, using the Boolean circuit indicated by the nonlinear operation, a nonlinear operation is performed on the second Boolean secret slice to obtain another slice of the nonlinear operation result (304).
[0088] The process of the first participant 10 obtaining the first Boolean secret fragment and the process of the second participant 20 obtaining the second Boolean secret fragment require communication between the two parties to transmit relevant data. The following is an illustrative example of the conversion process from digital secret sharing to Boolean secret sharing:
[0089] The first participant 10 can perform a conversion operation on a portion of the fixed-point decimal multiplication result held by the first participant 10 to obtain a first intermediate result. The portion of the fixed-point decimal multiplication result held by the first participant 10 includes a third common value jointly held by the first participant 10 and the second participant 20, and a fifth digital secret fragment held solely by the first participant 10. In obtaining the first intermediate result, the first participant 10 can determine a first conversion coefficient corresponding to the first participant 10. Then, the difference between the product of the third common value and the first conversion coefficient and the fifth digital secret fragment is determined as the first intermediate result.
[0090] The second participant 20 can perform a conversion operation on another part of the fixed-point decimal multiplication result to obtain a second intermediate result. The other part of the fixed-point decimal multiplication result held by the second participant 20 includes a third common value jointly held by the first participant 10 and the second participant 20, and a sixth digital secret fragment held solely by the second participant 20. In obtaining the second intermediate result, the second participant 20 can determine a second conversion coefficient corresponding to the second participant 20. Then, the difference between the product of the third common value and the second conversion coefficient and the sixth digital secret fragment is determined as the second intermediate result.
[0091] For example, there is a digital sharing ,for , Local computing ; where the first conversion coefficient corresponds to the first participant 10. i The second conversion coefficient is 0, corresponding to the second participant 20. i =1; where, This indicates the first intermediate result. Indicates the second intermediate result. Indicates the third common value. This represents the fifth digital secret fragment. This represents the sixth secret fragment.
[0092] After obtaining the first intermediate result, the first participant 10 can use the Boolean secret sharing algorithm to split the first intermediate result into a first intermediate fragment and a second intermediate fragment, and transmit the second intermediate fragment to the second participant 20. The first intermediate fragment is held by the first participant 10 alone and is not disclosed to the public, thus achieving privacy protection.
[0093] Similarly, after obtaining the second intermediate result, the second participant 20 can use the Boolean secret sharing algorithm to split the second intermediate result into a third intermediate fragment and a fourth intermediate fragment. The third intermediate fragment is transmitted to the first participant 10, while the fourth intermediate fragment is held by the second participant 20 alone and is not disclosed to the public, thus achieving privacy protection.
[0094] After receiving the third intermediate fragment, the first participant 10 can use a full adder to perform Boolean addition on the first and third intermediate fragments to obtain the first Boolean secret fragment.
[0095] Similarly, after receiving the second intermediate fragment, the second participant 20 can use a full adder to perform Boolean addition on the second and fourth intermediate fragments to obtain the second Boolean secret fragment. The specific process of performing Boolean addition using a full adder can be found in the descriptions in related technologies, and will not be repeated here.
[0096] For example, suppose the data lengths of the first and second values are... The decimal part has digits and a length of 1. Bit.
[0097] In the first phase, The second intermediate result is generated according to the above formula. The Boolean secret sharing algorithm is used to split the second intermediate result into a third and a fourth intermediate fragment, and the third intermediate fragment is then transmitted and shared with [other entities]. The data lengths of the two slices resulting from the multiplication operation described above are both... The data lengths of the first and second intermediate results obtained by the conversion and calculation according to the above formula are also... Boolean shared data also reduced The total amount of data transmitted has decreased This effectively reduces communication volume during the conversion from digital secret sharing to Boolean secret sharing.
[0098] In the second stage: Calculate the first intermediate result according to the above formula. The Boolean secret sharing algorithm is used to split the first intermediate result into a first intermediate fragment and a second intermediate fragment, and the second intermediate fragment is transmitted to... ,Then The first and third intermediate fragments are processed locally using a full adder to generate the first Boolean secret fragment. Similarly, A full adder is used to process the second and fourth intermediate fragments to generate the second Boolean secret fragment. Clearly, this reduces the communication overhead. .
[0099] The following is an illustrative example of the nonlinear operation process:
[0100] For example, let's take nonlinear operations, including calculating the ReLU function, as an example: The ReLU function is expressed as follows: In Boolean circuits, it takes the form of: ,in, INV It is an inverter circuit. It is a symbolic circuit; the value of the ReLU function can be calculated using Boolean circuits. x This represents either the first Boolean secret partition or the second Boolean secret partition.
[0101] For example, the first participant 10 can use the sign circuit in the Boolean circuit to obtain the sign bit of the first Boolean secret segment; use the invert circuit in the Boolean circuit to invert the sign bit of the first Boolean secret segment; and perform the following operation bit by bit on the first Boolean secret segment until all valid bits of the first Boolean secret segment have been traversed: use the XOR circuit in the Boolean circuit to perform the XOR operation on the inverted sign bit and the first valid bit of the first Boolean secret segment. j Perform an XOR operation on the values of the nth significant bits to obtain the nth... j The nonlinear operation value of each effective bit; where, j Greater than 0 and j The data length is less than the first Boolean secret slice; finally, based on the nonlinear operation values corresponding to all the significant bits in the first Boolean secret slice, the first ReLU function slice is obtained. Since the data length of the first Boolean secret slice is the third data length, which is less than the first data length, the number of significant bits in the first Boolean secret slice that need to be traversed is reduced, thus reducing the amount of computation and improving computational efficiency.
[0102] Similarly, the second participant 20 can use the sign circuit in the Boolean circuit to obtain the sign bit of the second Boolean secret segment; use the invert circuit in the Boolean circuit to invert the sign bit of the second Boolean secret segment; and perform the following operation bit by bit on the second Boolean secret segment until all valid bits of the second Boolean secret segment have been traversed: use the XOR circuit in the Boolean circuit to perform the operation on the inverted sign bit and the second Boolean secret segment... j Perform an XOR operation on the values of the nth significant bits to obtain the nth... j The nonlinear operation value of each effective bit; where, j Greater than 0 and j The data length is less than the second Boolean secret slice. Finally, based on the nonlinear operation values corresponding to all the significant bits in the second Boolean secret slice, the second ReLU function slice is obtained. Since the data length of the second Boolean secret slice is the third data length, which is less than the first data length, the number of significant bits in the second Boolean secret slice that need to be traversed is reduced, thus reducing the amount of computation and improving computational efficiency.
[0103] For example, let's take nonlinear operations, including the calculation of a binary function, as an illustration: Define a binary function f(x) such that positive numbers return 1 and negative numbers return 0 (assuming 0 returns 0). In Boolean circuits, it has the form f(x) = INV(sign(x)), where INV is the inverting circuit and sign is the sign circuit. The value of the binary function can be calculated through Boolean circuits, and x represents either the first Boolean secret slice or the second Boolean secret slice.
[0104] Other activation functions can also be used to approximate circuit calculations in a similar way, which will not be elaborated here.
[0105] In some embodiments, the data length of one slice of the nonlinear operation result obtained by the first participant 10 and the data length of another slice of the nonlinear operation result obtained by the second participant 20 are both third data lengths and are Boolean shared values. If they are to continue participating in multiplication operations, they need to be converted from Boolean secret sharing to digital secret sharing and sign extension needs to be performed. Sign extension is a concept in computer organization principles, which involves expanding a smaller data word length to a larger data word length while keeping the original value and sign unchanged. During the extension process, the newly added bits will copy the highest bit (sign bit) of the original value. This is because signed integers in computers usually use two's complement representation, where the highest bit is used to represent the sign, 0 for positive numbers and 1 for negative numbers. For example, if an 8-bit signed integer is represented in two's complement as 1111 0101, it represents a negative number. If this number is extended to 16 bits, then the sign bit (1 in this example) needs to be copied to all the newly added bits to ensure that the extended value remains unchanged. Therefore, the extended value will be 1111 1111 1111 0101.
[0106] For example, after obtaining one of the slices of the nonlinear operation result, the first participant 10 can perform sign expansion based on the value of the sign bit in one of the slices of the nonlinear operation result, so that the data length of one of the slices of the nonlinear operation result after sign expansion changes from the third data length to the first data length; then, one of the slices of the nonlinear operation result after sign expansion is converted from Boolean secret sharing to digital secret sharing to obtain the first conversion result, which can continue to participate in the next privacy-protected fixed-point decimal multiplication operation process.
[0107] For example, when performing sign extension, the first participant 10 may determine the number of valid bits to be filled in one of the slices of the nonlinear operation result based on the difference between the first data length and the third data length; determine the filling value of the valid bits to be filled based on the value of the sign bit in one of the slices of the nonlinear operation result; and perform sign extension on one of the slices of the nonlinear operation result based on the number of valid bits to be filled and the filling value of the valid bits to be filled.
[0108] Similarly, after obtaining another slice of the nonlinear operation result, the second participant 20 can perform sign expansion based on the value of the sign bit in the other slice of the nonlinear operation result, so that the data length of the other slice of the nonlinear operation result after sign expansion changes from the third data length to the first data length; the other slice of the nonlinear operation result after sign expansion is converted from Boolean secret sharing to digital secret sharing to obtain the second conversion result, which can continue to participate in the next privacy-protected fixed-point decimal multiplication operation process.
[0109] The process of converting a Boolean secret share to a digital secret share is illustrated with an example: First, consider sharing a single bit of Boolean secret value. This involves a conversion operation to transform a value into an arithmetic secret shared value. For a 1-bit value... Boolean sharing ,remember for The arithmetic value in bit form, represented by the Boolean secret sharing algorithm, is as follows: . This represents the XOR operation, which is equivalent to addition in the digital secret sharing algorithm. The fourth public value is jointly held by the first participant 10 and the second participant 20. It is split into two secret fragments in a Boolean secret sharing manner, which are held separately by the first participant 10 and the second participant 20 respectively.
[0110] In the first stage, generation of -sharing, for example, the first participant 10 holds the seventh secret shard. The second participant, 20, holds the eighth secret fragment. .
[0111] In the second phase, for calculate ;in, This represents the Boolean value of one of the valid bits in any slice of the result of a nonlinear operation. That is, part of the fourth common value; then each participant calculates based on their own share and the share they receive. .
[0112] For any slice of the nonlinear operation result, the Boolean values on all valid bits can be converted in the manner described above to obtain the numerical values on all valid bits of any slice of the nonlinear operation result.
[0113] The first participant 10 can perform the above calculation process for each valid bit in one of the slices of the nonlinear operation result after sign expansion, thereby obtaining the first conversion result; similarly, the second participant 20 can perform the above calculation process for each valid bit in another slice of the nonlinear operation result after sign expansion, thereby obtaining the second conversion result.
[0114] For example, the privacy-preserving computation system described in this specification can be applied to machine learning scenarios based on secure multi-party computation. Secure multi-party computation-based machine learning focuses on training and inferring data using machine learning models while protecting user privacy, aiming to ensure the privacy of training data and the model is protected. Each participant divides their input secret into multiple shares and randomly distributes these shares to other participants. Each participant performs computation on their local computer using their assigned secret share. Participants communicate with each other, exchanging necessary intermediate computation results to advance the entire computation process. Each participant only receives their secret share and cannot know the actual data possessed by other participants, thus protecting privacy.
[0115] For example, in a medical setting, multiple hospitals may possess medical image data of different patients, but are unable to directly share this data due to privacy regulations. In such cases, multi-party secure computation machine learning methods can be used to collaboratively train a model for image diagnosis without exposing patient privacy.
[0116] For example, in a financial risk assessment scenario, multiple banks may want to collaborate on developing a risk assessment model but are unwilling to share sensitive customer financial information. By using machine learning methods based on secure multi-party computation, the banks can jointly train the risk assessment model while protecting customer data privacy.
[0117] For example, in intelligent transportation scenarios, traffic management departments in different cities want to collaborate to improve traffic flow and reduce congestion, but also need to protect the privacy of vehicles and drivers. By using machine learning methods with secure multi-party computation, cities can jointly analyze vehicle location data, predict traffic flow, and propose optimized traffic solutions.
[0118] For example, in e-commerce scenarios, multiple e-commerce platforms collaborate to build a personalized recommendation system to improve user experience, but they cannot directly share user purchase history and preference data. Through multi-party secure computation machine learning methods, the platforms can jointly train the recommendation model, thereby achieving personalized recommendations while protecting user privacy.
[0119] In the process of machine learning based on multi-party secure computation, the aforementioned fixed-point decimal multiplication operation of the first participant 10 and the second participant 20 includes fixed-point decimal multiplication operation introduced by the convolutional layer in the neural network model instructed by machine learning; the aforementioned nonlinear operation includes activation function calculation introduced by the activation layer in the neural network model instructed by machine learning.
[0120] For example, please refer to Figure 4 For example, a neural network model will be transformed into a hybrid circuit containing two types of circuits, requiring conversion between digital circuits and Boolean circuits. In machine learning, convolutional layers and activation layers are used alternately; convolutional layers use digital circuits, while activation layers use Boolean circuits. Digital circuits are used to perform arithmetic operations, such as addition and multiplication, and can convert linear functions into digital circuits for computation. Boolean circuits, on the other hand, process logic operations, such as AND, OR, and NOT, and can convert the nonlinear functions of activation layers in machine learning into Boolean circuits for computation.
[0121] With the continuous development of artificial intelligence, machine learning has become one of the most commonly used technologies in many fields. However, machine learning relies on massive amounts of data for training. In the context of big data, both users and service providers face serious privacy issues. Users worry about the leakage of their personal information, while service providers are concerned about the theft of their model data. Therefore, ensuring data privacy during model training and prediction has become a crucial issue.
[0122] Privacy-preserving machine learning employs techniques such as secure multi-party computation, differential privacy, and homomorphic encryption to protect data during machine learning. Consider scenarios using secure multi-party computation, which allows participants to collaboratively compute a function while protecting their own data from leakage. How to ensure data privacy without sacrificing machine learning performance is a worthwhile challenge. However, current privacy-preserving machine learning solutions still suffer from significant performance issues. Therefore, in machine learning scenarios, communication optimization for privacy-preserving machine learning can be implemented based on the privacy computation schemes mentioned in the embodiments of this specification. During vertex decimal multiplication communication in convolutional layers, meaningless data is not transmitted; only truncated meaningful data is sent. Simultaneously, when performing nonlinear operations using Boolean circuits in activation layers, the input data consists only of truncated data, while the output data maintains its normal bit depth, thereby reducing communication and computational load and improving the efficiency of privacy-preserving machine learning. Figure 4 As shown, the input data for the convolutional layer is... On the ring, while the output data is... On a ring, the amount of data that needs to be transmitted and the amount of data that needs to be performed on nonlinear operations are both reduced, which helps to improve the efficiency of machine learning.
[0123] The evaluation and optimization process, during the communication phase, involves all... The communication overhead of bit multiplication is reduced to Bits, reduced communication volume .exist In this case, communication volume was reduced by 25%. The number of AND gates in the activation layer was also reduced; for example, ReLU gates could be reduced. AND gate operation.
[0124] The output of the fixed-point decimal multiplication in the convolutional layer after optimization is in On the ring, while the multiplication calculation in the convolutional layer is on On the ring, the output of the optimized multiplication can be transformed into Boolean sharing and the activation function is calculated by the Boolean circuit of the activation layer. Group Boolean sharing, padded with sign extension Group Boolean sharing and then conversion to Once on the ring, fixed-point decimal multiplication can then be performed in the next convolutional layer.
[0125] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.
[0126] Please see Figure 5 This specification also provides a privacy-preserving computation method for performing privacy-preserving fixed-point decimal multiplication on a first value and a second value. The first value is split into a first part held by a first participant in the privacy protection scheme and a second part held by a second participant in the privacy protection scheme, based on a digital secret sharing algorithm. The second value is split into a third part held by the first participant and a fourth part held by the second participant, based on the digital secret sharing algorithm. The data length of the first value and the second value is a first data length. The method is applied to an electronic device corresponding to the first participant, and the method includes:
[0127] In S501, a multiplication operation is performed based on the first part of the first value held by the first participant and the third part of the second value to obtain the first slice of the result of the multiplication operation of the first value and the second value.
[0128] In S502, the decimal part of the first slice of the multiplication result is truncated based on the preset decimal point position in the fixed-point decimal multiplication operation.
[0129] In S503, the first fragment of the truncated multiplication result is encrypted using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length.
[0130] In S504, the first encryption result is sent to the second participant, and the second encryption result obtained after performing fixed-point decimal multiplication is received from the second participant; the data length of the second encryption result is less than the data length of the first data.
[0131] In S505, the first encryption result and the second encryption result are combined to obtain a portion of the fixed-point decimal multiplication result held by the first participant, as indicated by the digital secret sharing algorithm.
[0132] In one implementation, the fixed-point decimal multiplication operation includes fixed-point decimal multiplication operations introduced by the convolutional layer in the neural network model indicated by the machine learning during the process of machine learning based on multi-party secure computation by the first and second participants.
[0133] In one implementation, the first portion of the first value includes a first digital secret fragment held solely by the first participant, and the second portion of the first value includes a second digital secret fragment held solely by the second participant.
[0134] The third part of the second value includes a third digital secret fragment held solely by the first participant, and the fourth part of the second value includes a fourth digital secret fragment held solely by the second participant.
[0135] The multiplication operation based on the first part of the first value held by the first participant and the third part of the second value includes:
[0136] Based on a preset multiplication triple generation protocol, without disclosing the first, second, third, and fourth digital secret fragments, a first multiplicative fragment held by the first participant is obtained; the first multiplicative fragment is a part of the product between the first combination result and the second combination result; the first combination result is the result of combining the first and second digital secret fragments, and the second combination result is the result of combining the third and fourth digital secret fragments;
[0137] Multiplication is performed based on the first part of the first value held by the first participant, the third part of the second value, and the first multiplicative slice.
[0138] In one implementation, both the first part and the second part of the first value further include a first common value jointly held by the first participant and the second participant;
[0139] The third and fourth parts of the second value also include a second common value jointly held by the first participant and the second participant;
[0140] The multiplication operation based on the first part of the first value held by the first participant, the third part of the second value, and the first multiplicative slice includes:
[0141] Obtain the first product between the first common value, the second common value and the first multiplication coefficient, the second product between the first common value and the third digital secret fragment, and the third product between the second common value and the first digital secret fragment;
[0142] Subtracting the second product and the third product from the sum of the first product and the first multiplication slice, we obtain the first slice of the multiplication result of the first value and the second value.
[0143] In one implementation, the data length of the decimal part of the first value and the second value is the second data length, and the second data length is less than the first data length.
[0144] The encryption process of the first fragment of the truncated multiplication result using the digital secret sharing algorithm includes:
[0145] The third data length is determined based on the difference between the first data length and the second data length, and a fifth digital secret fragment is randomly generated within the data range of the third data length;
[0146] The first encryption result is obtained by summing the first fragment of the truncated multiplication result and the fifth digital secret fragment; wherein the data length of the first fragment of the truncated multiplication result and the first encryption result are both the third data length.
[0147] In one implementation, a portion of the fixed-point decimal multiplication result held by the first participant, indicated by the digital secret sharing algorithm, includes a third public value and the fifth digital secret fragment; wherein the third public value includes the sum of the first encryption result and the second encryption result.
[0148] In one implementation, the privacy computation method is further used to perform a privacy-preserving nonlinear operation on the obtained fixed-point decimal multiplication result after performing a privacy-preserving fixed-point decimal multiplication operation on the first and second values.
[0149] The method further includes:
[0150] A portion of the fixed-point decimal multiplication result held by the first participant is converted from digital secret sharing to Boolean secret sharing to obtain the first Boolean secret fragment;
[0151] Using the Boolean circuit indicated by the nonlinear operation, a nonlinear operation is performed on the first Boolean secret slice to obtain one slice of the nonlinear operation result.
[0152] In one implementation, the nonlinear operation includes the calculation of an activation function introduced by the activation layer in the neural network model indicated by the machine learning during the process of the first and second participants performing machine learning based on multi-party secure computation.
[0153] In one implementation, converting a portion of the fixed-point decimal multiplication result held by the first participant from digital secret sharing to Boolean secret sharing includes:
[0154] A portion of the fixed-point decimal multiplication result held by the first participant is converted to obtain a first intermediate result;
[0155] The first intermediate result is split into a first intermediate fragment and a second intermediate fragment using the Boolean secret sharing algorithm, and the second intermediate fragment is transmitted to the second participant.
[0156] Receive the third intermediate fragment transmitted by the second participant; the third intermediate fragment is obtained by the second participant by splitting the second intermediate result into the third intermediate fragment and the fourth intermediate fragment based on the Boolean secret sharing algorithm; the second intermediate result is obtained by the second participant by performing a conversion operation on another part of the fixed-point decimal multiplication result held by the second participant.
[0157] A full adder is used to perform Boolean addition on the first intermediate slice and the third intermediate slice to obtain the first Boolean secret slice.
[0158] In one implementation, a portion of the fixed-point decimal multiplication result held by the first participant includes a third common value jointly held by the first participant and the second participant, and a fifth digital secret fragment held solely by the first participant.
[0159] The step of performing a conversion operation on a portion of the fixed-point decimal multiplication result held by the first participant to obtain a first intermediate result includes:
[0160] Determine the first conversion coefficient corresponding to the first participant;
[0161] The difference between the product of the third common value and the first conversion coefficient and the fifth digital secret fragment is determined as the first intermediate result.
[0162] In one implementation, the nonlinear operation includes calculating the ReLU function;
[0163] The step of using the Boolean circuit based on the privacy-preserving nonlinear operation instruction to perform a nonlinear operation on the first Boolean secret slice to obtain one slice of the nonlinear operation result includes:
[0164] The sign bit of the first Boolean secret slice is obtained using the sign circuit in the Boolean circuit;
[0165] The sign bit of the first Boolean secret segment is inverted using the inverting circuit in the Boolean circuit.
[0166] Perform the following operation bit by bit on the first Boolean secret slice until all valid bits in the first Boolean secret slice have been traversed: use the XOR circuit in the Boolean circuit to perform an XOR operation on the inverted sign bit and the value of the j-th valid bit in the first Boolean secret slice to obtain the nonlinear operation value of the j-th valid bit; where j is greater than 0 and j is less than the data length of the first Boolean secret slice;
[0167] Based on the nonlinear operation values corresponding to all valid bits in the first Boolean secret slice, the first ReLU function slice is obtained.
[0168] In one implementation, the data length of the decimal part of the first value and the second value is the second data length, which is less than the first data length; the data length of one of the slices of the nonlinear operation result is the third data length, which is the difference between the first data length and the second data length.
[0169] The method further includes:
[0170] Sign extension is performed based on the value of the sign bit in one of the slices of the nonlinear operation result, so that the data length of one of the slices of the nonlinear operation result after sign extension is changed from the third data length to the first data length;
[0171] One of the fragments of the nonlinear operation result after sign expansion is converted from Boolean secret sharing to digital secret sharing to obtain a first conversion result, which can continue to participate in the next privacy-preserving fixed-point decimal multiplication operation process.
[0172] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.
[0173] In some embodiments, this specification also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor implements the method described in any one of the above embodiments by executing the executable instructions.
[0174] For example, Figure 6 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 6 At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, memory 608, and non-volatile memory 610, and may also include other hardware required for different scenarios. One or more embodiments of this specification can be implemented in software, for example, the processor 602 can read the corresponding computer program from the non-volatile memory 610 into the memory. 6 Then run it in 08. Of course, in addition to the software implementation, one or more embodiments in this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0175] This specification also provides a privacy computing device for performing privacy-preserving fixed-point decimal multiplication on a first value and a second value; the first value is split into a first part held by a first participant in the privacy protection and a second part held by a second participant in the privacy protection based on a digital secret sharing algorithm; the second value is split into a third part held by the first participant and a fourth part held by the second participant based on the digital secret sharing algorithm; the data length of the first value and the second value is a first data length;
[0176] The device is applied to the first participating party, such as... Figure 6 The electronic device shown includes:
[0177] The multiplication module is used to perform multiplication operations based on the first part of the first value held by the first participant and the third part of the second value to obtain the first slice of the multiplication result of the first value and the second value.
[0178] The truncation module is used to truncate the decimal part of the first slice of the multiplication result based on the preset decimal point position in the fixed-point decimal multiplication operation.
[0179] An encryption module is used to encrypt the first fragment of the truncated multiplication result using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length.
[0180] The communication module is used to send the first encryption result to the second participant and to receive the second encryption result sent by the second participant after performing fixed-point decimal multiplication; the data length of the second encryption result is less than the data length of the first data.
[0181] The combination processing module is used to perform combination processing based on the first encryption result and the second encryption result to obtain a portion of the fixed-point decimal multiplication result held by the first participant as indicated by the digital secret sharing algorithm.
[0182] In some embodiments, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the method as described in any of the preceding embodiments.
[0183] For example, computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0184] In some embodiments, this specification also provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method as described in any of the preceding embodiments.
[0185] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0186] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."
[0187] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the scope of protection of one or more embodiments of this specification.
Claims
1. A privacy-preserving computation method for performing privacy-preserving fixed-point decimal multiplication on a first value and a second value; wherein the first value is split into a first part held by a first party participating in the privacy protection and a second part held by a second party participating in the privacy protection based on a digital secret sharing algorithm; and the second value is split into a third part held by the first party and a fourth part held by the second party based on the digital secret sharing algorithm. The data length of the first value and the second value is the first data length; The method is applied to the electronic device corresponding to the first participating party, and the method includes: A multiplication operation is performed on the first part of the first value held by the first participant and the third part of the second value to obtain the first slice of the result of the multiplication operation of the first value and the second value. Based on the preset decimal point position in the fixed-point decimal multiplication operation, the decimal part of the first slice of the multiplication result is truncated; The first fragment of the truncated multiplication result is encrypted using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length. The first encryption result is sent to the second participant, and the second encryption result obtained after performing fixed-point decimal multiplication is received from the second participant; the data length of the second encryption result is less than the data length of the first data. The first encryption result and the second encryption result are combined to obtain a portion of the fixed-point decimal multiplication result held by the first participant, as indicated by the digital secret sharing algorithm.
2. The method according to claim 1, wherein the fixed-point decimal multiplication operation includes the fixed-point decimal multiplication operation introduced by the convolutional layer in the neural network model indicated by the machine learning during the process of the first participant and the second participant performing machine learning based on multi-party secure computation.
3. The method according to claim 1, wherein the first portion of the first value includes a first digital secret fragment held solely by the first participant, and the second portion of the first value includes a second digital secret fragment held solely by the second participant; The third part of the second value includes a third digital secret fragment held solely by the first participant, and the fourth part of the second value includes a fourth digital secret fragment held solely by the second participant. The multiplication operation based on the first part of the first value held by the first participant and the third part of the second value includes: Based on a preset multiplication triple generation protocol, without disclosing the first, second, third, and fourth digital secret fragments, a first multiplicative fragment held by the first participant is obtained; the first multiplicative fragment is a part of the product between the first combination result and the second combination result; the first combination result is the result of combining the first and second digital secret fragments, and the second combination result is the result of combining the third and fourth digital secret fragments; Multiplication is performed based on the first part of the first value held by the first participant, the third part of the second value, and the first multiplicative slice.
4. The method according to claim 3, wherein both the first part and the second part of the first value further include a first common value jointly held by the first participant and the second participant; The third and fourth parts of the second value also include a second common value jointly held by the first participant and the second participant; The multiplication operation based on the first part of the first value held by the first participant, the third part of the second value, and the first multiplicative slice includes: Obtain the first product between the first common value, the second common value and the first multiplication coefficient, the second product between the first common value and the third digital secret fragment, and the third product between the second common value and the first digital secret fragment; Subtracting the second product and the third product from the sum of the first product and the first multiplication slice, we obtain the first slice of the multiplication result of the first value and the second value.
5. The method according to claim 1, wherein the data length of the decimal part of the first value and the second value is the second data length, and the second data length is less than the first data length; The encryption process of the first fragment of the truncated multiplication result using the digital secret sharing algorithm includes: The third data length is determined based on the difference between the first data length and the second data length, and a fifth digital secret fragment is randomly generated within the data range of the third data length; The first encryption result is obtained by summing the first fragment of the truncated multiplication result and the fifth digital secret fragment; wherein the data length of the first fragment of the truncated multiplication result and the first encryption result are both the third data length.
6. The method according to claim 5, wherein a portion of the fixed-point decimal multiplication result held by the first participant, indicated by the digital secret sharing algorithm, includes a third common value and the fifth digital secret fragment; wherein, The third public value includes the sum of the first encryption result and the second encryption result.
7. The method according to claim 1, wherein the privacy computation method is further configured to perform a privacy-preserving nonlinear operation on the obtained fixed-point decimal multiplication result after performing privacy-preserving fixed-point decimal multiplication on the first value and the second value; The method further includes: A portion of the fixed-point decimal multiplication result held by the first participant is converted from digital secret sharing to Boolean secret sharing to obtain the first Boolean secret fragment; Using the Boolean circuit indicated by the nonlinear operation, a nonlinear operation is performed on the first Boolean secret slice to obtain one slice of the nonlinear operation result.
8. The method according to claim 7, wherein the nonlinear operation includes the calculation of an activation function introduced by the activation layer in the neural network model indicated by the machine learning during the process of the first participant and the second participant performing machine learning based on multi-party secure computation.
9. The method according to claim 7, wherein converting a portion of the fixed-point decimal multiplication result held by the first participant from digital secret sharing to Boolean secret sharing comprises: A portion of the fixed-point decimal multiplication result held by the first participant is converted to obtain a first intermediate result; The first intermediate result is split into a first intermediate fragment and a second intermediate fragment using the Boolean secret sharing algorithm, and the second intermediate fragment is transmitted to the second participant. Receive the third intermediate fragment transmitted by the second participant; The third intermediate slice is obtained by the second participant splitting the second intermediate result into the third intermediate slice and the fourth intermediate slice based on the Boolean secret sharing algorithm. The second intermediate result is obtained by the second participant performing a conversion operation on another part of the fixed-point decimal multiplication result held by the second participant. A full adder is used to perform Boolean addition on the first intermediate slice and the third intermediate slice to obtain the first Boolean secret slice.
10. The method according to claim 9, wherein a portion of the fixed-point decimal multiplication result held by the first participant includes a third common value jointly held by the first participant and the second participant, and a fifth digital secret fragment held solely by the first participant; The step of performing a conversion operation on a portion of the fixed-point decimal multiplication result held by the first participant to obtain a first intermediate result includes: Determine the first conversion coefficient corresponding to the first participant; The difference between the product of the third common value and the first conversion coefficient and the fifth digital secret fragment is determined as the first intermediate result.
11. The method according to claim 7 or 8, wherein the nonlinear operation includes calculating the ReLU function; The step of using the Boolean circuit based on the privacy-preserving nonlinear operation instruction to perform a nonlinear operation on the first Boolean secret slice to obtain one slice of the nonlinear operation result includes: The sign bit of the first Boolean secret slice is obtained using the sign circuit in the Boolean circuit; The sign bit of the first Boolean secret segment is inverted using the inverting circuit in the Boolean circuit. Perform the following operation bit by bit on the first Boolean secret slice until all valid bits in the first Boolean secret slice have been traversed: use the XOR circuit in the Boolean circuit to perform the inverted sign bit and the bit in the first Boolean secret slice... j Perform an XOR operation on the values of the nth significant bits to obtain the nth... j The nonlinear operation value of each effective bit; where, j Greater than 0 and j The data length is less than the length of the first Boolean secret segment; Based on the nonlinear operation values corresponding to all valid bits in the first Boolean secret slice, the first ReLU function slice is obtained.
12. The method according to claim 7, wherein the data length of the decimal part of the first value and the second value is the second data length, and the second data length is less than the first data length; the data length of one of the slices of the nonlinear operation result is the third data length, and the third data length is the difference between the first data length and the second data length; The method further includes: Sign extension is performed on the sign bit value of one of the slices of the nonlinear operation result, so that the data length of one of the slices of the nonlinear operation result after sign extension is changed from the third data length to the first data length. One of the fragments of the nonlinear operation result after sign expansion is converted from Boolean secret sharing to digital secret sharing to obtain a first conversion result, which can continue to participate in the next privacy-preserving fixed-point decimal multiplication operation process.
13. A privacy computing system, comprising an electronic device corresponding to a first participant and an electronic device corresponding to a second participant; wherein, The privacy computing system is used to perform privacy-preserving fixed-point decimal multiplication on a first value and a second value; the first value is split into a first part held by a first participant in the privacy protection and a second part held by a second participant in the privacy protection based on a digital secret sharing algorithm; the second value is split into a third part held by the first participant and a fourth part held by the second participant based on the digital secret sharing algorithm; the data length of the first value and the second value is a first data length; The electronic device corresponding to the first participant is used to perform a multiplication operation based on the first part of the first value held by the first participant and the third part of the second value to obtain the first slice of the multiplication result of the first value and the second value. Based on the preset decimal point position in the fixed-point decimal multiplication operation, the decimal part of the first slice of the multiplication result is truncated; The first fragment of the truncated multiplication result is encrypted using the digital secret sharing algorithm to obtain a first encrypted result; the data length of the first encrypted result is less than the first data length. Send the first encryption result to the second participant; The electronic device corresponding to the second participant is used to perform a multiplication operation based on the second part of the first value and the fourth part of the second value held by the second participant to obtain a second slice of the multiplication result of the first value and the second value; and to truncate the decimal part of the second slice of the multiplication result based on the preset decimal point position in the fixed-point decimal multiplication operation. The second fragment of the truncated multiplication result is encrypted using the digital secret sharing algorithm to obtain a second encrypted result; the data length of the second encrypted result is less than the first data length. The second encryption result is sent to the first participant; The electronic device corresponding to the first participant is also used to receive the second encryption result sent by the second participant, and to perform combined processing based on the first encryption result and the second encryption result to obtain a portion of the fixed-point decimal multiplication result held by the first participant as indicated by the digital secret sharing algorithm; The electronic device corresponding to the second participant is also used to receive the first encryption result sent by the first participant, and to perform combined processing based on the first encryption result and the second encryption result to obtain another part of the fixed-point decimal multiplication result held by the second participant as indicated by the digital secret sharing algorithm.
14. An electronic device comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1 to 12 by executing the executable instructions.
15. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1 to 12.
16. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Execution method of multi-party multiplication calculation and secure multi-party calculation system
CN118171310A