Secure multi-party computation method and device for trigonometric functions
By splitting trigonometric functions into pieces and calculating intermediate results, the privacy protection problem in secure multi-party computation of trigonometric functions is solved, and efficient trigonometric function computation is achieved.
Patent Information
- Application Number
- CN202210163923.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-02-22
AI Technical Summary
Existing technologies struggle to achieve secure multi-party computation of trigonometric functions, especially while protecting the privacy of participating parties' data.
By splitting the trigonometric function into multiple pieces, and having each participant calculate intermediate results based on their own privacy values and random pieces, and finally calculating their own piece using the shared results and pieces, the privacy values are ensured to be kept confidential.
This technology enables the calculation of target trigonometric function values with only one information exchange between two parties, while protecting privacy data and reducing communication overhead.
Smart Images

Figure CN114462092B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to one or more embodiments in the field of computers, and more particularly to a secure multi-square calculation method and apparatus for trigonometric functions. Background Technology
[0002] Secure multi-party computation (SMPC) refers to the collaborative computation of a function by multiple parties without disclosing the input data of that function held by each participating party. The input data held by each participating party is typically considered private data, but the computation result of the function may be disclosed to designated individuals.
[0003] The aim is to provide a technical solution to achieve secure multi-party computation of trigonometric functions. Summary of the Invention
[0004] This specification provides a secure multi-square calculation method and apparatus for trigonometric functions in one or more embodiments.
[0005] Firstly, a secure multi-party computation method for trigonometric functions is provided, applied to the current participant. The method includes: receiving a first and second slice distributed by a third party, wherein the first slice is generated by splitting a first sine function value calculated based on a target random number, and the second slice is generated by splitting a first cosine function value calculated based on the target random number; calculating intermediate results for the current participant and receiving intermediate results calculated by another participant, wherein the intermediate results of each participant are calculated based on their respective privacy values and random slices, and the sum of the random slices held by each participant is equal to the target random number; calculating a shared result based on the intermediate results of the two participants; and calculating the current participant's own slice based on the shared result, the first slice, and the second slice, wherein the sum of the current participant's own slices is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each participant.
[0006] In one possible implementation, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0007] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0008] In one possible implementation, the method further includes: sending the intermediate result of the current participant to the other participant, enabling the other participant to calculate a shared result based on the respective intermediate results of the two participants, and calculating its own fragment based on the shared result, the first fragment and the second fragment received by the other participant.
[0009] In one possible implementation, the method further includes sending the random shards held by the current participant to a third party, so that the third party generates a target random number based on the random shards held by each of the two participants.
[0010] In one possible implementation, the method further includes receiving random shards generated by a third party for the current participant.
[0011] In one possible implementation, calculating the local shard of the current participant based on the shared result, the first shard, and the second shard includes: calculating a second sine function value and a second cosine function value based on the shared result, and calculating the local shard of the current participant based on the second sine function value, the second cosine function value, the first shard, and the second shard.
[0012] In one possible implementation, the step of calculating the local segment of the current participant based on the second sine function value, the second cosine function value, the first segment, and the second segment specifically includes: when the target trigonometric function is a sine function, calculating a first product between the second sine function value and the second segment, calculating a second product between the second cosine function value and the first segment, and using the sum of the first product and the second product as the local segment of the current participant.
[0013] In one possible implementation, the step of calculating the local segment of the current participant based on the second sine function value, the second cosine function value, the first segment, and the second segment specifically includes: when the target trigonometric function is a cosine function, calculating a third product between the second cosine function value and the second segment, calculating a fourth product between the second sine function value and the first segment, and taking the difference between the third product and the fourth product as the local segment of the current participant.
[0014] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0015] In one possible implementation, the sine function used to calculate the second sine function value and the cosine function used to calculate the second cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0016] Secondly, a secure multi-party computation method for trigonometric functions is provided for application to a third party. The method includes: calculating a first sine function value and a first cosine function value based on a target random number; splitting the first sine function value into two first slices corresponding to two participating parties, and splitting the first cosine function value into two second slices corresponding to the two participating parties; distributing the two first slices and the two second slices to the two participating parties, so that each participating party calculates an intermediate result based on its own privacy value and random slices, calculates a shared result by exchanging intermediate results, and calculates its own slice based on the shared result and the first and second slices it received. The sum of the random slices held by each of the two participating parties is equal to the target random number, and the sum of the self-calculated slices by each of the two participating parties is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each of the two participating parties.
[0017] In one possible implementation, for any current participant among the two participants, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0018] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0019] In one possible implementation, the method further includes receiving random shards held by the two participants respectively, and generating a target random number based on the random shards held by the two participants respectively.
[0020] In one possible implementation, the method further includes distributing two random shards generated for the two participants to the two participants.
[0021] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0022] Thirdly, a secure multi-party computation device for trigonometric functions is provided, deployed on the current participant. The device includes: an interaction processing unit configured to receive a first and a second shard distributed by a third party, wherein the first shard is generated by splitting a first sine function value calculated based on a target random number, and the second shard is generated by splitting a first cosine function value calculated based on the target random number by the third party; a result computation unit configured to compute intermediate results of the current participant; the interaction processing unit is further configured to receive intermediate results computed by another participant, wherein the intermediate results of each participant are calculated based on their respective privacy values and random shards, and the sum of the random shards held by each participant is equal to the target random number; the result computation unit is further configured to compute a shared result based on the intermediate results of the two participants; and a shard computation unit configured to compute the current participant's own shard based on the shared result, the first shard, and the second shard, wherein the sum of the own shards of the two participants is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by the two participants.
[0023] In one possible implementation, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0024] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0025] In one possible implementation, the interaction processing unit is further configured to send the intermediate result of the current participant to the other participant, so that the other participant calculates a shared result based on the intermediate results of the two participants, and calculates its own fragment based on the shared result and the first and second fragments received by the other participant.
[0026] In one possible implementation, the interaction processing unit is further configured to send the random shards held by the current participant to a third party, so that the third party generates a target random number based on the random shards held by each of the two participants.
[0027] In one possible implementation, the interaction processing unit is further configured to receive random shards generated by a third party for the current participant.
[0028] In one possible implementation, the sharding calculation unit is configured to calculate a second sine function value and a second cosine function value based on the shared result, and to calculate the local shard of the current participant based on the second sine function value, the second cosine function value, the first shard, and the second shard.
[0029] In one possible implementation, the sharding calculation unit is specifically configured to: when the target trigonometric function is a sine function, calculate a first product between the second sine function value and the second shard, calculate a second product between the second cosine function value and the first shard, and use the sum of the first product and the second product as the local shard of the current participant; when the target trigonometric function is a cosine function, calculate a third product between the second cosine function value and the second shard, calculate a fourth product between the second sine function value and the first shard, and use the difference between the third product and the fourth product as the local shard of the current participant.
[0030] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function; and / or, the sine function used to calculate the second sine function value and the cosine function used to calculate the second cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0031] Fourthly, a secure multi-party computation device for trigonometric functions is provided, deployed on a third party. The device includes: a function computation unit configured to compute a first sine function value and a first cosine function value based on a target random number; a sharding processing unit configured to split the first sine function value into two first shards corresponding to the two participants, and to split the first cosine function value into two second shards corresponding to the two participants; and an interaction processing unit configured to distribute the two first shards and the two second shards to the two participants, enabling each participant to calculate an intermediate result based on its own privacy value and random shards, calculate a shared result by exchanging intermediate results, and calculate its own shard based on the shared result and the received first and second shards. The sum of the random shards held by each participant is equal to the target random number, and the sum of the self-calculated shards by each participant is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each participant.
[0032] In one possible implementation, for any current participant among the two participants, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0033] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0034] In one possible implementation, the interaction processing unit is configured to receive random shards held by the two participants respectively, and generate a target random number based on the random shards held by the two participants; or, generate two random shards for the two participants and distribute them to the two participants; or, distribute the two random shards it generated for the two participants to the two participants.
[0035] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0036] Fifthly, a computer-readable storage medium is provided having a computer program / instructions stored thereon, wherein when the computer program / instructions are executed in a computing device, the computing device performs the method described in any one of the first or second aspects above.
[0037] In a sixth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores a computer program / instructions, and the processor, when executing the computer program / instructions, implements the method of any one of the first or second aspects.
[0038] The methods and apparatus provided in one or more embodiments of this specification enable secure multi-party computation of trigonometric functions. In the process of performing secure multi-party computation of trigonometric functions, the two parties holding privacy values only need to exchange information once, resulting in low communication overhead. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of a secure multi-party calculation system for trigonometric functions provided in the embodiments of this specification;
[0041] Figure 2 This is one of the flowcharts for a secure multi-square calculation method for trigonometric functions provided in the embodiments of this specification;
[0042] Figure 3 This is the second flowchart of a secure multi-square calculation method for trigonometric functions provided in the embodiments of this specification;
[0043] Figure 4This is one of the schematic diagrams of a secure multi-square calculation device for trigonometric functions provided in the embodiments of this specification;
[0044] Figure 5 This is a second schematic diagram of a secure multi-square calculation device for trigonometric functions provided in the embodiments of this specification. Detailed Implementation
[0045] The various non-limiting embodiments provided in this specification will now be described in detail with reference to the accompanying drawings.
[0046] In some technical scenarios, secure multi-party computation of trigonometric functions may be necessary due to privacy concerns. For example, some analytical functions in a machine learning model may be fitted using Fourier series. Training and using this machine learning model may require secure multi-party computation of the trigonometric functions involved in those analytical functions. For instance, the sigmoid function f(x) fitted using a Fourier series in a machine learning model may be common knowledge between parties L and R, where the sigmoid function f(x) is, for example, [example knowledge]. A, B, C, and q are all constants, and the possible values of x include the fixed-point number D*2. -f Both D and f are integers, and D is located modulo 2. n In a space where n is an integer, T satisfies T|2 n-f , fixed point number D*2 -f It is a fixed-point number x L With fixed-point number x R The sum of fixed-point numbers x L It is the privacy value held by participant L, fixed point x R This is the private value held by participant R. The sigmoid function f(x) involves trigonometric functions. and trigonometric functions Training and using the corresponding machine learning model may require... and Perform secure multi-party computation to ensure the fixed-point number x L It will not be exposed to participant R and the fixed number x R It will not be exposed to participant L.
[0047] This specification provides a secure multi-party computation method for trigonometric functions, enabling secure multi-party computation of trigonometric functions. Furthermore, in implementing secure multi-party computation of trigonometric functions, the two parties holding the privacy values only need to exchange information once, resulting in minimal communication overhead.
[0048] Figure 1This is a schematic diagram of a secure multi-party computation system for trigonometric functions provided in an embodiment of this specification. The secure multi-party computation system includes a system holding a privacy-preserving value x. L Participant L and holder of privacy value x R The participant R also includes a third party that communicates with both participant L and participant R; wherein the aforementioned participant L, participant R and third party can each be implemented as any device, equipment, platform or cluster of devices with computing / processing capabilities.
[0049] The following is combined with Figure 1 The secure multi-party computation system shown describes in detail the secure multi-party computation method for trigonometric functions. In terms of the timing of the various steps involved in the secure multi-party computation method for trigonometric functions, it can be divided into a data preparation phase and an online execution phase. It should be noted that the names of these two phases are only used to logically and temporally delineate the various steps that the secure multi-party computation method for trigonometric functions may include; they are not used to limit the actual transactions executed in each phase. Furthermore, the steps may not be executed sequentially according to their corresponding sequence numbers.
[0050] Figure 2 This diagram illustrates the data preparation phases included in a secure multi-party computation method for trigonometric functions. It can also be represented as a flowchart of a secure multi-party computation method for trigonometric functions performed by a third party. Figure 2 As shown, the methods and steps performed by a third party during the data preparation phase may include, but are not limited to, steps 21 to 25 below.
[0051] Step 21: The third party calculates the first sine function value and the first cosine function value based on the target random number.
[0052] In one possible implementation, for two parties performing a secure multi-party computation, such as party L and party R, party L can obtain a random shard on its own. and its held random shards Send to a third party; participant R can obtain random shards on its own. and its held random shards Send to a third party; the third party can handle random shards. and random sharding Sum the results to obtain the target random number.
[0053] In one possible implementation, the target random number can be obtained by a third party, for example, the third party can generate its own random number and use it as the target random number. Based on this implementation, the third party can also generate random shards for participant L and participant R respectively. and random sharding For example, splitting the target random number to generate random fragments. and random sharding And random sharding Send to participant L, which will then randomly shard the data. Send to participant R.
[0054] The sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value can have the same amplitude, angular velocity, and initial phase as the target trigonometric function to be calculated. In other words, a third party can obtain the function construction information such as the amplitude, angular velocity, and initial phase of the target trigonometric function, construct the sine function for calculating the first sine function value and the cosine function for calculating the first cosine function value based on the function construction information, and then substitute the target random number into the constructed sine and cosine functions to calculate the corresponding first sine function value and first cosine function value.
[0055] The target trigonometric function is the trigonometric function of the example above. or trigonometric functions For example, the amplitude of the target trigonometric function is 1 and the angular velocity is... The initial phase is 0, and a third party can construct a sine function based on the information constructed from these trigonometric functions of the target. Sum and cosine functions By substituting the target random number as the value of variable x into the aforementioned sine and cosine functions, the first sine function value and the first cosine function value can be calculated.
[0056] Step 23: The third party splits the first sine function value into two first segments corresponding to the two participants, and splits the first cosine function value into two second segments corresponding to the two participants.
[0057] The first sine function value u is, for example, split into the first segment corresponding to participant L (denoted as segment u). L ) and the first fragment corresponding to participant R (denoted as fragment u) R The first cosine function value v is, for example, split into a second piece corresponding to the participant L (denoted as piece v). L ) and the second fragment corresponding to participant R (denoted as fragment v) R ). Among them, the fragmented u L and fragmentation u R The sum can be equal to the value of the first sine function u, and the piecewise v L and fragments v R The sum of these values can be equal to the value of the first cosine function, v.
[0058] Step 25: Distribute the two first fragments and the two second fragments to the two participating parties.
[0059] For any current participant among the two parties, during the data preparation phase, it can receive the first and second shards distributed by the third party. Continuing with the example of participant L being the current participant and participant R being the other participant, please refer to... Figure 3 Participant L can perform step 31 as shown below during the data preparation phase, and steps 33 to 39 as shown below during the online execution phase.
[0060] Step 31: Participant L receives the first and second fragments distributed to it from the third party.
[0061] Corresponding to step 25 performed by the third party during the data preparation phase, participant L can receive the fragment u from the third party. L and fragments v L Similar to participant L, participant R can receive fragment u from a third party. R and fragments v R .
[0062] Step 33: Participant L calculates the intermediate results for Participant L.
[0063] The intermediate results of participant L are based on the privacy value x it holds. L and random sharding Calculated, for example, the privacy value x it holds. L and random sharding By subtracting the values, we obtain the intermediate result δx from participant L. L .
[0064] Step 35: Participant L receives the intermediate results calculated by Participant R from Participant R.
[0065] Similar to participant L, participant R's intermediate results can be based on the privacy value x it holds. R and random sharding Calculated, for example, the privacy value x it holds. R and random sharding By subtracting the values, we obtain the intermediate result δx from participant R. R .
[0066] Step 37: Calculate the shared result based on the intermediate results of each participant L and participant R.
[0067] The intermediate result δx of participant L can be used L Intermediate result δx with participant R R The sum, or its deformation, is taken as the common result δx, where it is not difficult to see that the common result δx is essentially equal to
[0068] Step 39: Calculate participant L's own fragment based on the shared result and the first and second fragments received by participant L. In other words, based on the shared result δx and the fragment u... L and fragments v L The local fragment of participant L is calculated. It should be noted that participant R can calculate its local fragment in the same way as participant L, so that the sum of the local fragments calculated by participants L and R is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by participants L and R respectively.
[0069] In one possible implementation, participant L can calculate the second sine function value and the second cosine function value based on the shared result δx, and then, according to the second sine function value, the second cosine function value, and the fragment u received by participant L, L and fragments v L Calculate the local fragment of participant L. Similar to participant L, participant R can calculate the second sine function value and the second cosine function value based on the shared result δx, and then calculate the local fragment u based on the second sine function value, the second cosine function value, and the fragment u received by participant R. R and fragments v R Calculate the local fragment of participant R.
[0070] In a more specific example, when the target trigonometric function is a sine function, the second sine function value can be calculated in relation to the slice v received by participant L. L The first product between them is used to calculate the second cosine function value and the fragment u received by participant L. L The second product between the first and second products is used as the sum of the first and second products to form the current participant's own slice S. L For example, through formulas The self-partition S of participant L is calculated. L Participant R can calculate its own slice S using the same method as participant L. R For example, participant R can use the formula The slice S of participant R is calculated. R Among them, the self-segment S calculated by participant L. L The slice S calculated by participant R R The sum is equal to the privacy value x held by participant L. L Privacy value x held by participant R R The target trigonometric function for summation calculation The function value; more specifically, due to S is obtained through the aforementioned calculations. L and S R As can be seen from the method, S L With SR The sum of them is Based on the transformation of the multiplicative associative law, S is obtained. L With S R The sum of them is Based on the aforementioned examples, it can be seen that (u L +u R Equal to (v L +v R Equal to The total result δx equals Based on this, S can be calculated. L With S R The sum of them equals
[0071] In a more specific example, when the target trigonometric function is a cosine function, the value of the second cosine function can be calculated in relation to the slice v received by participant L. L The third product between them is used to calculate the second sine function value and the fragment u received by participant L. L The fourth product between the third and fourth products is used as the component C of participant L. L For example, through formulas The self-shard C of participant L is calculated. L Participant R can calculate its own slice C using the same method as participant L. R For example, participant R can use the formula The self-participant fragment C of participant R is calculated. R Among them, the self-segment C calculated by participant L. L The slice C calculated by participant R R The sum is equal to the privacy value x held by participant L. L Privacy value x held by participant R R The target trigonometric function for summation calculation The function value; more specifically, due to C obtained from the aforementioned calculation L and C R As can be seen from the method, C L and C R The sum of them is Based on the transformation of the associative law of multiplication, we obtain C. L With C R The sum of them is Based on the aforementioned examples, it can be seen that (u L +u R Equal to (v L +v R Equal to The total result δx equals Based on this, C can be calculated. L With C R The sum of them equals
[0072] Given that the sum of the fragments calculated by each participant L and participant R is equivalent to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each participant L and participant R, the fragments of each participant L and / or participant R can subsequently be provided to a specific participant. This specific participant can then sum the fragments of each participant L and participant R to obtain the function value of the target trigonometric function calculated based on the sum of the privacy values held by each participant L and participant R. This specific participant can be participant L, participant R, a third party, or another participant.
[0073] Based on the same concept as the aforementioned method embodiments, this specification also provides a secure trigonometric function calculation device, deployed on the current participating party. For example... Figure 4 As shown, the device includes: an interaction processing unit 41 configured to receive a first shard and a second shard distributed by a third party, wherein the first shard is generated by splitting a first sine function value calculated based on a target random number, and the second shard is generated by splitting a first cosine function value calculated based on a target random number; a result calculation unit 43 configured to calculate the intermediate result of the current participant; the interaction processing unit 41 is further configured to receive the intermediate result calculated by another participant, wherein the intermediate results of the two participants are calculated based on their respective privacy values and random shards, and the sum of the random shards held by the two participants is equal to the target random number; the result calculation unit 43 is further configured to calculate a shared result based on the intermediate results of the two participants; and a shard calculation unit 45 configured to calculate the local shard of the current participant based on the shared result, the first shard, and the second shard, wherein the sum of the local shards of the two participants is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by the two participants.
[0074] In one possible implementation, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0075] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0076] In one possible implementation, the interaction processing unit 41 is further configured to send the intermediate result of the current participant to another participant, so that the other participant calculates a shared result based on the intermediate results of the two participants, and calculates its own fragment based on the shared result and the first and second fragments received by the other participant.
[0077] In one possible implementation, the interaction processing unit 41 is further configured to send the random shards held by the current participant to a third party, so that the third party generates a target random number based on the random shards held by each of the two participants.
[0078] In one possible implementation, the interaction processing unit 41 is further configured to receive random shards generated by a third party for the current participant.
[0079] In one possible implementation, the sharding calculation unit 45 is configured to calculate a second sine function value and a second cosine function value based on the shared result, and to calculate the local shard of the current participant based on the second sine function value, the second cosine function value, the first shard, and the second shard.
[0080] In one possible implementation, the fragment calculation unit 45 is specifically configured to: when the target trigonometric function is a sine function, calculate a first product between the second sine function value and the second fragment, calculate a second product between the second cosine function value and the first fragment, and use the sum of the first product and the second product as the fragment of the current participant; when the target trigonometric function is a cosine function, calculate a third product between the second cosine function value and the second fragment, calculate a fourth product between the second sine function value and the first fragment, and use the difference between the third product and the fourth product as the fragment of the current participant.
[0081] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function; and / or, the sine function used to calculate the second sine function value and the cosine function used to calculate the second cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0082] Based on the same concept as the aforementioned method embodiments, this specification also provides a secure trigonometric function calculation device, deployed in a third party. For example... Figure 5As shown, the device includes: a function calculation unit 51 configured to calculate a first sine function value and a first cosine function value based on a target random number; a sharding processing unit 53 configured to split the first sine function value into two first shards corresponding to the two participants, and to split the first cosine function value into two second shards corresponding to the two participants; and an interaction processing unit 55 configured to distribute the two first shards and the two second shards to the two participants, so that each participant calculates an intermediate result based on its own privacy value and random shards, calculates a shared result by exchanging intermediate results, and calculates its own shard based on the shared result and the first and second shards it receives. The sum of the random shards held by each participant is equal to the target random number, and the sum of the shards calculated by each participant is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each participant.
[0083] In one possible implementation, for any current participant among the two participants, the intermediate result of the current participant is the difference between the privacy value it holds and the random shard.
[0084] In one possible implementation, the shared result is the sum of the intermediate results of each of the two participants.
[0085] In one possible implementation, the interaction processing unit 55 is configured to receive random shards held by the two participants respectively, and generate a target random number based on the random shards held by the two participants; or, generate two random shards for the two participants and distribute them to the two participants; or, distribute the two random shards it generated for the two participants to the two participants.
[0086] In one possible implementation, the sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
[0087] Those skilled in the art will recognize that, in one or more of the examples above, the functions described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, the computer program corresponding to these functions can be stored in a computer-readable medium or transmitted as one or more instructions / code on a computer-readable medium so that when the computer program corresponding to these functions is executed by a computer, the methods described in any embodiment of this specification can be implemented by the computer.
[0088] This specification also provides a computer-readable storage medium storing a computer program. When the computer program is executed in a computing device, the computing device executes a secure multi-party calculation method for trigonometric functions provided in any embodiment of this specification, performed by a participant L or a third party.
[0089] This specification also provides a computing device in its embodiments, including a memory and a processor. The memory stores executable code, and when the processor executes the executable code, it implements a secure multi-party calculation method for trigonometric functions provided in any embodiment of this specification, which is executed by a participant L or a third party.
[0090] The various embodiments in this specification are described in a progressive manner. Similar or identical parts in each embodiment can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0091] 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.
[0092] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A secure multi-party calculation method for trigonometric functions, applied to the current participants, the method comprising: Receive a first and a second shard distributed by a third party, wherein the first shard is generated by splitting a first sine function value calculated based on a target random number, and the second shard is generated by splitting a first cosine function value calculated based on a target random number; Calculate the intermediate result of the current participant and receive the intermediate result calculated by the other participant, wherein the intermediate result of each participant is calculated based on the privacy value and random shards held by each participant, and the sum of the random shards held by each participant is equal to the target random number. Calculate the shared result based on the intermediate results of each of the two participants; Based on the shared result, the first shard, and the second shard, the local shard of the current participant is calculated, wherein the sum of the local shards of the two participants is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by the two participants.
2. The method according to claim 1, wherein, The intermediate result of the current participant is the difference between its privacy value and the random shard; and / or, the shared result is the sum of the intermediate results of the two participants.
3. The method according to claim 1, further comprising: The intermediate result of the current participant is sent to the other participant, so that the other participant calculates a shared result based on the intermediate results of the two participants, and calculates its own fragment based on the shared result and the first and second fragments received by the other participant.
4. The method according to claim 1, further comprising: Send the random shards held by the current participants to a third party, so that the third party can generate a target random number based on the random shards held by each of the two participants; Alternatively, receive random shards generated by a third party for the current participant.
5. The method according to any one of claims 1-4, wherein, The step of calculating the local shard of the current participant based on the shared result, the first shard, and the second shard includes: calculating a second sine function value and a second cosine function value based on the shared result, and calculating the local shard of the current participant based on the second sine function value, the second cosine function value, the first shard, and the second shard.
6. The method according to claim 5, wherein, The step of calculating the current participant's own slice based on the second sine function value, the second cosine function value, the first slice, and the second slice specifically includes: When the target trigonometric function is a sine function, calculate the first product between the second sine function value and the second piece, calculate the second product between the second cosine function value and the first piece, and use the sum of the first product and the second product as the local piece of the current participant; or, When the target trigonometric function is a cosine function, calculate the third product between the second cosine function value and the second piece, calculate the fourth product between the second sine function value and the first piece, and take the difference between the third product and the fourth product as the local piece of the current participant.
7. The method according to claim 5, wherein, The sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function; and / or, the sine function used to calculate the second sine function value and the cosine function used to calculate the second cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
8. A secure multi-party calculation method for trigonometric functions, applied to a third party, the method comprising: Calculate the first sine function value and the first cosine function value based on the target random number; The first sine function value is split into two first parts corresponding to the two participants, and the first cosine function value is split into two second parts corresponding to the two participants; The two first fragments and the two second fragments are distributed to the two participating parties respectively, so that each of the two participating parties calculates an intermediate result based on its own privacy value and random fragment, calculates a common result by exchanging intermediate results, and calculates its own fragment based on the common result and the first and second fragments it received. The sum of the random fragments held by each of the two participating parties is equal to the target random number, and the sum of the fragments calculated by each of the two participating parties is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each of the two participating parties.
9. The method according to claim 8, wherein, For any current participant among the two participants, the intermediate result of the current participant is the difference between its held privacy value and the random shard; and / or, the shared result is the sum of the intermediate results of each of the two participants.
10. The method according to claim 8, further comprising: Receive the random shards held by each of the two participants, and generate a target random number based on the random shards held by each of the two participants; Alternatively, distribute two random shards generated for the two participants to the two participants.
11. The method according to any one of claims 8-10, wherein, The sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity and initial phase as the target trigonometric function.
12. A secure multi-party computation device for trigonometric functions, deployed among current participants, the device comprising: An interactive processing unit is configured to receive a first and a second fragment distributed by a third party, wherein the first fragment is generated by splitting a first sine function value calculated based on a target random number, and the second fragment is generated by splitting a first cosine function value calculated based on a target random number. The result calculation unit is configured to calculate the intermediate results of the current participant; The interactive processing unit is further configured to receive intermediate results calculated by another participant, wherein the intermediate results of each participant are calculated based on their respective privacy values and random shards, and the sum of the random shards held by each participant is equal to the target random number. The result calculation unit is also configured to calculate a shared result based on the intermediate results of the two participants. The sharding calculation unit is configured to calculate the local shard of the current participant based on the shared result, the first shard, and the second shard, wherein the sum of the local shards of the two participants is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by the two participants.
13. The apparatus according to claim 12, wherein, The intermediate result of the current participant is the difference between its privacy value and the random shard; and / or, the shared result is the sum of the intermediate results of the two participants.
14. The apparatus according to claim 12, wherein, The interaction processing unit is further configured to send the intermediate result of the current participant to the other participant, so that the other participant calculates a common result based on the intermediate results of the two participants, and calculates its own fragment based on the common result and the first and second fragments received by the other participant.
15. The apparatus according to claim 12, wherein, The interaction processing unit is further configured to send the random shards held by the current participant to a third party, so that the third party generates a target random number based on the random shards held by each of the two participants; or, to receive the random shards generated by the third party for the current participant.
16. The apparatus according to any one of claims 12-15, wherein, The sharding calculation unit is configured to calculate a second sine function value and a second cosine function value based on the shared result, and to calculate the local shard of the current participant based on the second sine function value, the second cosine function value, the first shard, and the second shard.
17. The apparatus according to claim 16, wherein, The segmentation calculation unit is specifically configured to: when the target trigonometric function is a sine function, calculate a first product between the second sine function value and the second segment, calculate a second product between the second cosine function value and the first segment, and use the sum of the first product and the second product as the segment of the current participant; when the target trigonometric function is a cosine function, calculate a third product between the second cosine function value and the second segment, calculate a fourth product between the second sine function value and the first segment, and use the difference between the third product and the fourth product as the segment of the current participant.
18. The apparatus according to claim 16, wherein, The sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function; and / or, the sine function used to calculate the second sine function value and the cosine function used to calculate the second cosine function value have the same amplitude, angular velocity, and initial phase as the target trigonometric function.
19. A secure multi-party computation device for trigonometric functions, deployed at a third party, the device comprising: The function calculation unit is configured to calculate the first sine function value and the first cosine function value based on the target random number; The slicing processing unit is configured to split the first sine function value into two first slices corresponding to the two participants, and to split the first cosine function value into two second slices corresponding to the two participants. The interaction processing unit is configured to distribute the two first fragments and the two second fragments to the two participating parties, so that each of the two participating parties calculates an intermediate result based on its own privacy value and random fragments, calculates a shared result by exchanging intermediate results, and calculates its own fragment based on the shared result and the first and second fragments it received. The sum of the random fragments held by each of the two participating parties is equal to the target random number, and the sum of the fragments calculated by each of the two participating parties is equal to the function value of the target trigonometric function calculated based on the sum of the privacy values held by each of the two participating parties.
20. The apparatus according to claim 19, wherein, For any current participant among the two participants, the intermediate result of the current participant is the difference between its held privacy value and the random shard; and / or, the shared result is the sum of the intermediate results of each of the two participants.
21. The apparatus according to claim 19, wherein, The interaction processing unit is configured to receive random shards held by the two participants and generate a target random number based on the random shards held by the two participants; or, generate two random shards for the two participants and distribute them to the two participants. Alternatively, distribute two random shards generated for the two participants to the two participants.
22. The apparatus according to any one of claims 19-21, wherein, The sine function used to calculate the first sine function value and the cosine function used to calculate the first cosine function value have the same amplitude, angular velocity and initial phase as the target trigonometric function.
23. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed in a computing device, the computing device performs the method of any one of claims 1-11.
24. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the method of any one of claims 1-11.
Citation Information
Patent Citations
Privacy protection data processing method, device and equipment and machine learning system
CN112000990A
Multi-party data joint processing method, device and system
CN112000991A