Condition selection method and device based on secure multi-party computing

By using confusion circuits and encryption and decryption processing in secure multi-party computation, the implementation process of condition selection is simplified, the problems of low efficiency and high complexity in the existing technology are solved, and the efficiency of condition selection and communication efficiency are improved.

CN118784339APending Publication Date: 2024-10-15ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411029798.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing secure multi-party computation technology has low efficiency and high complexity when implementing condition selection, especially when generating and decrypting obfuscated truth tables, which requires a large number of steps, resulting in increased implementation complexity.

Method used

By introducing obfuscation circuits in secure multi-party computation, participants can obtain possible values ​​of conditional selection parameters and corresponding obfuscation labels, and achieve conditional selection results through encryption and decryption processing, reducing the need to generate and decrypt truth tables, using a small number of encryption and decryption steps.

Benefits of technology

It improves the implementation efficiency of secure multi-party calculation condition selection, reduces complexity, simplifies the process, reduces the amount of data transmission, and improves communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784339A_ABST
    Figure CN118784339A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a condition selection method and device based on secure multi-party computing. The method and device are applied to a first participant participating in secure multi-party computing. The calculation process of the secure multi-party calculation comprises a calculation sub-process of condition selection; the method comprises the steps that condition selection results corresponding to all possible values of condition selection parameters used for indicating the true and false conditions of target conditions are acquired, and confusion labels corresponding to all the condition selection results are generated; taking the confusion label corresponding to each possible value as a secret key, and encrypting the confusion label corresponding to the condition selection result under each possible value; the encryption result is sent to a second participant participating in the security multi-party calculation, the second participant obtains a confusion label corresponding to the actual value of the condition selection parameter in the calculation sub-process, the confusion label corresponding to the actual value serves as a secret key, the encryption result is decrypted, and the encrypted result is obtained. And obtaining a condition selection result corresponding to the calculation sub-process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present application relate to the technical field of secure multi-party computing, and in particular, to a conditional selection method and device based on secure multi-party computing. Background Art

[0002] Secure Multi-Party Computation (SMPC) is a cryptographic protocol and technology that allows multiple parties to jointly compute a function without revealing their input data and obtain the correct result. The result of the calculation is made public to one or more of the multiple parties. A typical application of secure multi-party computing is joint statistical analysis and machine learning of multi-party data under privacy protection, which means that each party can calculate the joint statistical results and machine learning results based on the data of each party without revealing their input data. The function of secure multi-party computing can be a statistical operation function or a machine learning algorithm.

[0003] The core idea of ​​conditional selection is to make choices or decisions based on certain conditions. Conditional selection based on secure multi-party computation usually means that each participant jointly determines an output value without revealing their input data. This output value depends on the specific conditions satisfied by the input data of all participants. How to implement conditional selection based on secure multi-party computation has become a hot topic. Summary of the invention

[0004] One or more embodiments of the present application provide the following technical solutions:

[0005] The present application provides a condition selection method based on secure multi-party computing, which is applied to a first participant participating in secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for condition selection based on a target condition; the method includes:

[0006] Obtaining condition selection results corresponding to each possible value of the condition selection parameter, and generating a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsity of the target condition;

[0007] Obtaining obfuscation labels corresponding to each possible value of the conditional selection parameter;

[0008] Taking each possible value of the conditional selection parameter as a target possible value, and taking the conditional selection result corresponding to the target possible value as a target conditional selection result, and taking the obfuscation label corresponding to the target possible value as a key, encrypting the obfuscation label corresponding to the target conditional selection result;

[0009] The encrypted obfuscation labels corresponding to the various condition selection results are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to the various condition selection results, and determines the condition selection results corresponding to the obfuscation labels successfully obtained by decryption as the condition selection results corresponding to the calculation sub-process.

[0010] The present application also provides a condition selection method based on secure multi-party computing, which is applied to a second participant participating in secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for condition selection based on a target condition; the method includes:

[0011] receiving encrypted obfuscation labels corresponding to various condition selection results sent by a first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to various condition selection results, and, after obtaining the obfuscation labels corresponding to various possible values ​​of the condition selection parameters, taking various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions;

[0012] Obtaining an obfuscation label corresponding to an actual value of the conditional selection parameter in the calculation sub-process;

[0013] Using the obfuscation label corresponding to the actual value as a key, decrypting the encrypted obfuscation label corresponding to each condition selection result;

[0014] The condition selection result corresponding to the obfuscation label obtained by successful decryption is determined as the condition selection result corresponding to the calculation sub-process.

[0015] The present application also provides a condition selection device based on secure multi-party computing, which is applied to a first participant participating in secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for condition selection based on a target condition; the device includes:

[0016] A generation module, which obtains condition selection results corresponding to each possible value of the condition selection parameter, and generates a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsehood of the target condition;

[0017] An acquisition module is used to acquire obfuscation labels corresponding to possible values ​​of the conditional selection parameter;

[0018] an encryption module, taking each possible value of the condition selection parameter as a target possible value, and taking the condition selection result corresponding to the target possible value as a target condition selection result, and using the obfuscation label corresponding to the target possible value as a key to encrypt the obfuscation label corresponding to the target condition selection result;

[0019] The sending module sends the encrypted obfuscation labels corresponding to each condition selection result to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to each condition selection result, and determines the condition selection result corresponding to the obfuscation labels successfully decrypted as the condition selection result corresponding to the calculation sub-process.

[0020] The present application also provides a condition selection device based on secure multi-party computing, which is applied to a second participant participating in secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for condition selection based on a target condition; the device includes:

[0021] A receiving module receives the encrypted obfuscation labels corresponding to the various condition selection results sent by the first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to the various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to the various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to the various condition selection results, and, after obtaining the obfuscation labels corresponding to the various possible values ​​of the condition selection parameters, taking the various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions;

[0022] An acquisition module, which acquires an obfuscation label corresponding to an actual value of the conditional selection parameter in the calculation sub-process;

[0023] A decryption module, using the obfuscation label corresponding to the actual value as a key, and decrypting the encrypted obfuscation label corresponding to each condition selection result;

[0024] The determination module determines the condition selection result corresponding to the obfuscation label obtained by successful decryption as the condition selection result corresponding to the calculation sub-process.

[0025] The present application also provides an electronic device, comprising:

[0026] processor;

[0027] a memory for storing processor-executable instructions;

[0028] The processor implements the steps of any of the above methods by running the executable instructions.

[0029] The present application also provides a computer-readable storage medium having computer instructions stored thereon, which implement the steps of any of the above methods when executed by a processor.

[0030] In the above technical solution, the first participant participating in the secure multi-party computation can, for the condition selection parameter used to indicate the truth or falsity of the target condition, obtain the condition selection results corresponding to each possible value of the condition selection parameter and generate a confusion label corresponding to each condition selection result, and obtain the confusion label corresponding to each possible value of the condition selection parameter, so that each possible value of the condition selection parameter can be used as the target possible value, and the condition selection result corresponding to the target possible value can be used as the target condition selection result, and the confusion label corresponding to the target condition selection result is used as a key to encrypt the confusion label corresponding to the target condition selection result, thereby obtaining the encrypted confusion label corresponding to each condition selection result; subsequently, the first participant can send the encrypted confusion label corresponding to each condition selection result to the second participant participating in the secure multi-party computation, and the second participant obtains the confusion label corresponding to the actual value of the condition selection parameter, and uses the confusion label corresponding to the actual value as a key to decrypt the encrypted confusion label corresponding to each condition selection result, and the condition selection result corresponding to the confusion label successfully obtained by decryption is the result of the condition selection implemented based on the secure multi-party computation.

[0031] By adopting the above method, the conditional selection based on secure multi-party computing implemented by using an obfuscated circuit is optimized. It is no longer necessary to generate multiple obfuscated truth tables, nor is it necessary to perform decryption based on each obfuscated truth table. Instead, the conditional selection based on secure multi-party computing is implemented through a small number of encryption and decryption steps. Therefore, the implementation efficiency of the conditional selection based on secure multi-party computing can be improved, and the implementation complexity can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The following is a description of the accompanying drawings required for describing the exemplary embodiments, wherein:

[0033] Figure 1 It is a schematic diagram of a gate circuit shown in an exemplary embodiment of the present application.

[0034] Figure 2 It is a schematic diagram of another gate circuit shown in an exemplary embodiment of the present application.

[0035] Figure 3 It is a schematic diagram of a secure multi-party computing system shown in an exemplary embodiment of the present application.

[0036] Figure 4 It is a flowchart of a conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0037] Figure 5 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0038] Figure 6 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0039] Figure 7 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0040] Figure 8 It is a structural schematic diagram of a device shown in an exemplary embodiment of the present application.

[0041] Fig. 9 It is a block diagram of a condition selection device based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0042] Fig.10 It is a block diagram of another condition selection device based on secure multi-party computing shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0043] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent 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 the present application. On the contrary, they are only examples consistent with some aspects of one or more embodiments of the present application.

[0044] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this application. In some other embodiments, the steps included in the method may be more or less than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this application may also be combined into a single step for description in other embodiments.

[0045] Secure multi-party computation is a cryptographic protocol and technology that allows multiple parties to jointly calculate a function and obtain the correct result without revealing their respective input data. The calculation result is made public to one or more of the multiple parties.

[0046] Garbled Circuit is an important protocol and technology in the field of secure multi-party computing. It implements secure multi-party computing by simulating ASIC integrated circuits with computers. Any given computing task can be implemented using an ASIC integrated circuit designed for it, that is, multiple logic gates (such as AND gates, XOR gates, etc.) are connected according to the operation logic to form a gate circuit, and the gate circuit is used to perform operations. The garbled circuit algorithm refers to representing the computing task as a gate circuit and encrypting each line of the logic gate (including input lines and output lines). The encrypted gate circuit is called a garbled circuit. Finally, secure multi-party computing is achieved by executing the operation of the garbled circuit.

[0047] For example, suppose the computation task is to find the value of s, s = a∧b∧d, where ∧ represents and, then the computation task can be expressed as follows Figure 1 The gate circuit shown in the figure includes two AND gates, the input lines of AND gate 1 are a and b, the output line is c, and the input lines of AND gate 2 are c and d, and the output line is s. Each line of the two AND gates is encrypted, and the encrypted gate circuit can be used as a confusion circuit corresponding to the computing task, and finally secure multi-party computing is realized by executing the operation of the confusion circuit.

[0048] In the obfuscated circuit algorithm, there are two parties involved in the secure multi-party computation, namely the obfuscated circuit generator and the obfuscated circuit executor. The obfuscated circuit generator can generate obfuscated circuits, and the obfuscated circuit executor can execute the operations of obfuscated circuits.

[0049] Specifically, when generating an obfuscated circuit, the obfuscated circuit generator can first represent the computing task as a gate circuit. Since the operation logic of the logic gate can be represented by a truth table (the truth table of a logic gate shows the corresponding value of the output line of the logic gate when the input line of the logic gate takes any value), it is possible to encrypt each line of the logic gate by generating a corresponding obfuscated truth table for each logic gate in the gate circuit, thereby generating an obfuscated circuit corresponding to the computing task.

[0050] As Figure 1 Taking the gate circuit shown in the figure as an example, the truth table of AND gate 1 in the gate circuit is shown in Table 1 below:

[0051] Table 1

[0052]

[0053]

[0054] By encrypting each line of AND gate 1, the real value of each line of AND gate 1 can be hidden during the operation of the gate circuit. The truth table of the encrypted AND gate 1 is shown in Table 2 below:

[0055] Table 2

[0056]

[0057] In Table 2, It indicates the ciphertext obtained by encrypting a when the value of a is 0. It indicates the ciphertext obtained by encrypting a when the value of a is 1. It indicates the ciphertext obtained by encrypting b when b is 0. It indicates the ciphertext obtained by encrypting b when b is 1. It indicates the ciphertext obtained by encrypting c when the value of c is 0. It represents the ciphertext obtained by encrypting c when c is 1. The ciphertext at this time can be called a confusion label, that is, is the confusion label corresponding to the value of a 0, is the confusion label corresponding to the value 1 of a, is the confusion label corresponding to the value of b 0, is the confusion label corresponding to the value 1 of b, is the confusion label corresponding to the value of c 0, is the confusion label corresponding to the value of c 1.

[0058] Furthermore, for each row in the truth table shown in Table 2 above, the obfuscated labels of the two input lines can be used as keys to encrypt the obfuscated labels of the output lines, thereby obtaining an obfuscated truth table as shown in Table 3 below:

[0059] Table 3

[0060]

[0061] In Table 3, Indicates that and As a key pair The encrypted ciphertext is Indicates that and As a key pair The encrypted ciphertext is Indicates that and As a key pair The encrypted ciphertext is Indicates that and As a key pair The encrypted ciphertext.

[0062] Furthermore, the order of all rows in the obfuscated truth table shown in Table 3 above can be disrupted to obtain an obfuscated truth table with disrupted row order. The finally obtained obfuscated truth table can be used as Figure 1 The gate circuit shown contains the aliased truth table corresponding to gate 1.

[0063] From the above confusion truth table, we can see that after obtaining a confusion label corresponding to a ( or ) and a confusion label corresponding to b ( or ), the obfuscation label corresponding to a and the obfuscation label corresponding to b are used as keys to try to decrypt the ciphertext of each row in the obfuscation truth table. Only the ciphertext of one row in the obfuscation truth table can be successfully decrypted to obtain an obfuscation label corresponding to c. That is, for a logic gate, the mapping from input to output of the logic gate is realized through the obfuscation truth table corresponding to the logic gate, and in this process, the real values ​​of the input line and the output line will not be revealed.

[0064] After generating the obfuscated circuit, the obfuscated circuit generator can send the obfuscated circuit (i.e., the obfuscated truth table corresponding to each logic gate in the AND circuit) to the obfuscated circuit executor so that the obfuscated circuit executor can perform the operation of the obfuscated circuit. When the obfuscated circuit executor performs the operation of the obfuscated circuit, it essentially sequentially uses the obfuscated truth table corresponding to each logic gate in the AND circuit, and uses the obfuscated label corresponding to the real value of the input line as the key to try to decrypt the ciphertext of each row in the obfuscated truth table. The obfuscated label obtained by successfully decrypting a row of ciphertext is the obfuscated label corresponding to the real value of the output line.

[0065] As Figure 1 Taking the gate circuit shown as an example, the obfuscation circuit generator can send the obfuscation label A corresponding to the value of a, the obfuscation label B corresponding to the value of b, and the obfuscation label D corresponding to the value of d to the obfuscation circuit executor; the obfuscation circuit executor can firstly use the obfuscation label A and the obfuscation label B as keys based on the obfuscation truth table 1 corresponding to the AND gate 1 to try to decrypt the ciphertext of each row in the obfuscation truth table 1, and the obfuscation label obtained by successfully decrypting a row of ciphertext is the obfuscation label C corresponding to the value of c, and then use the obfuscation label C and the obfuscation label D as keys based on the obfuscation truth table 2 corresponding to the AND gate 2 to try to decrypt the ciphertext of each row in the obfuscation truth table 2, and the obfuscation label obtained by successfully decrypting a row of ciphertext is the obfuscation label S corresponding to the value of s. In this way, the secure multi-party computation for the computational task of "finding the value of s, s = a∧b∧d, where ∧ represents AND" is realized.

[0066] Finally, the obfuscated circuit executor can send the obfuscation label corresponding to the true value of the final output line to the obfuscated circuit generator, and the obfuscated circuit generator can translate the obfuscation label back to the corresponding original plaintext, which is the true value of the final output line, that is, the final calculation result of this secure multi-party computation.

[0067] In the entire obfuscated circuit algorithm, the obfuscated circuit generator does not know the input data of the obfuscated circuit executor. Although the obfuscated circuit executor knows the obfuscated label corresponding to the input data of the obfuscated circuit generator, it does not know the input data of the obfuscated circuit generator. The data of both parties are protected.

[0068] The core idea of ​​conditional selection is to make choices or decisions based on certain conditions.

[0069] In programming, conditional selection is a basic structure used to determine the execution path of a program based on specific conditions. It allows the program to execute different code blocks in different situations. It mainly includes the following forms: if-else statement and if-elif-else statement. Among them, if-else statement is used to test a condition, execute a block of code when the condition is true (True), and execute another block of code when the condition is false (False); if-elif-else statement is used to handle multiple conditional branches, elif is the abbreviation of else if, there can be multiple, used to test additional conditions.

[0070] Take the following code as an example:

[0071]

[0072] The above code means that z = X when u>v, and z = Y when u≤v. If u>v is regarded as a condition, then z = X when the condition is true, and z = Y when the condition is false.

[0073] Let a=(u>v), then a=1 means the condition u>v is true, and a=0 means the condition u>v is false. That is, when a=1, z=X, and when a=0, z=Y. In this case, the above code can be converted into a function as shown below:

[0074]

[0075] Conditional selection based on secure multi-party computation means that multiple participants jointly calculate the above function without revealing their input data to determine an output value. This output value depends on the specific conditions satisfied by the input data of all participants, and the result of the calculation is disclosed to one or more of the multiple participants. In the above example, X, Y and a are input data (usually, X and Y are the input data of one participant in the secure multi-party computation, and a is the input data of another participant in the secure multi-party computation), z is the output, when the condition u>v is true, that is, the value of a is 1, the value of z is X, and when the condition u>v is false, that is, the value of a is 0, the value of z is Y.

[0076] In practical applications, a can be called a conditional selection parameter, the possible values ​​of which include 0 and 1, and X and Y can be called conditional selection results, where X is the conditional selection result corresponding to a value of 1, and Y is the conditional selection result corresponding to a value of 0. That is, in a secure multi-party computation process that implements conditional selection, if the actual value of a is 1, the conditional selection result corresponding to the computation process is z=X, and if the actual value of a is 0, the conditional selection result corresponding to the computation process is z=Y.

[0077] When using a garbled circuit to implement conditional selection based on secure multi-party computation, take the following function as an example:

[0078]

[0079] The value of z can be regarded as a computing task. The function can be further transformed into z = a∧(X⊕Y)⊕Y, where ∧ represents AND and ⊕ represents XOR. In this case, the computing task can be expressed as Figure 2 The gate circuit shown in the figure includes two XOR gates and one AND gate, the input lines of XOR gate 1 are X and Y, and the output line is m, the input lines of AND gate 2 are a and m, and the output line is n, and the input lines of XOR gate 3 are n and Y, and the output is z. The two XOR gates and each line of the AND gate are encrypted, and the encrypted gate circuit can be used as a confusion circuit corresponding to the computing task, and finally the conditional selection based on secure multi-party computing is realized by executing the operation of the confusion circuit.

[0080] At this time, the obfuscated circuit generator needs to generate obfuscated truth table 1 corresponding to XOR gate 1, obfuscated truth table 2 corresponding to AND gate 2, and obfuscated truth table 3 corresponding to XOR gate 3, and send obfuscated truth table 1, obfuscated truth table 2, and obfuscated truth table 3 to the obfuscated circuit executor, so that the obfuscated circuit executor can execute the operation of the obfuscated circuit. The obfuscated circuit generator can send the obfuscated label A corresponding to the actual value of a in the secure multi-party computing process selected by the implementation condition, the obfuscated label X corresponding to the value of X, and the obfuscated label Y corresponding to the value of Y to the obfuscated circuit executor; the obfuscated circuit executor can first use the obfuscated label X and the obfuscated label Y as keys based on the obfuscated truth table 1 corresponding to XOR gate 1 in the order of operations indicated by the gate circuit, and try to decrypt each row of the ciphertext in the obfuscated truth table 1. The obfuscated label obtained by successfully decrypting a row of ciphertext is the one corresponding to the value of m. Obfuscation label M, then based on the obfuscation truth table 2 corresponding to AND gate 2, using obfuscation label A and obfuscation label M as keys, try to decrypt the ciphertext of each row in obfuscation truth table 2, and the obfuscation label obtained by successfully decrypting a row of ciphertext is the obfuscation label N corresponding to the true value of n, and finally based on the obfuscation truth table 3 corresponding to XOR gate 3, using obfuscation label N and obfuscation label Y as keys, try to decrypt the ciphertext of each row in obfuscation truth table 3, and the obfuscation label obtained by successfully decrypting a row of ciphertext is the obfuscation label Z corresponding to the true value of z. In this way, the conditional selection based on secure multi-party computation in this example is realized.

[0081] From the above content, it can be seen that the method of using obfuscation circuits to implement conditional selection based on secure multi-party computing requires generating a corresponding obfuscated truth table for each logic gate in the gate circuit corresponding to the computing task, and based on each obfuscated truth table, it is necessary to use the obfuscated label corresponding to the true value of the input line as a key to try to decrypt the ciphertext of each row in the obfuscated truth table to successfully decrypt the obfuscated label corresponding to the true value of the output line. Therefore, the implementation efficiency of conditional selection based on secure multi-party computing is low and the implementation complexity is high.

[0082] The present application aims to provide a technical solution for conditional selection based on secure multi-party computing, so as to improve the implementation efficiency of conditional selection based on secure multi-party computing and reduce the high implementation complexity. In this technical solution, the first participant participating in the secure multi-party computation can, for the condition selection parameter used to indicate the truth or falsity of the target condition, obtain the condition selection results corresponding to each possible value of the condition selection parameter and generate a confusion label corresponding to each condition selection result, and obtain the confusion label corresponding to each possible value of the condition selection parameter, so that each possible value of the condition selection parameter can be used as the target possible value, and the condition selection result corresponding to the target possible value can be used as the target condition selection result, and the confusion label corresponding to the target condition selection result is used as a key to encrypt the confusion label corresponding to the target condition selection result, thereby obtaining the encrypted confusion label corresponding to each condition selection result; subsequently, the first participant can send the encrypted confusion label corresponding to each condition selection result to the second participant participating in the secure multi-party computation, and the second participant obtains the confusion label corresponding to the actual value of the condition selection parameter, and uses the confusion label corresponding to the actual value as a key to decrypt the encrypted confusion label corresponding to each condition selection result, and the condition selection result corresponding to the confusion label successfully obtained by decryption is the result of the condition selection implemented based on the secure multi-party computation.

[0083] By adopting the above method, the conditional selection based on secure multi-party computing implemented by using an obfuscated circuit is optimized. It is no longer necessary to generate multiple obfuscated truth tables, nor is it necessary to perform decryption based on each obfuscated truth table. Instead, the conditional selection based on secure multi-party computing is implemented through a small number of encryption and decryption steps. Therefore, the implementation efficiency of the conditional selection based on secure multi-party computing can be improved, and the implementation complexity can be reduced.

[0084] Please refer to Figure 3 , Figure 3 It is a schematic diagram of a secure multi-party computing system shown in an exemplary embodiment of the present application.

[0085] like Figure 3As shown, the secure multi-party computing system may include a network 30 and several computing devices, such as a computing device 31 , a computing device 32 , etc. These computing devices may interact with each other through the network 30 .

[0086] The computing device may be a server including an independent physical host, or a server cluster consisting of multiple independent physical hosts; or, the computing device may be a virtual server or cloud server carried by a host cluster. Alternatively, the computing device may be a tablet computer, a laptop computer, a desktop computer, a PC (Personal Computer), a PDA (Personal Digital Assistants), or other electronic devices with certain computing capabilities.

[0087] It should be noted that each computing device in the above secure multi-party computing system may correspond to each participant participating in the secure multi-party computing.

[0088] Please refer to Figure 4 , Figure 4 It is a flowchart of a conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0089] In this embodiment, the condition selection method based on secure multi-party computing can be applied to a participant (which can be called the first participant, which can be the obfuscated circuit generator as described above) participating in secure multi-party computing. At this time, the calculation process of the secure multi-party computing can include a calculation sub-process for condition selection based on a specific condition (which can be called a target condition).

[0090] like Figure 4 As shown, the above-mentioned condition selection method based on secure multi-party computing may include the following steps:

[0091] Step 402: Acquire condition selection results corresponding to each possible value of the condition selection parameter, and generate a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsity of the target condition.

[0092] In this embodiment, the condition selection parameter can be used to indicate the truth or falsity of the target condition. On the one hand, the first participant can obtain the condition selection results corresponding to each possible value of the condition selection parameter and generate a confusion label corresponding to each condition selection result.

[0093] Specifically, for a condition selection result, the condition selection result can be encrypted; for example, a random number can be generated, and the random number can be used as a key to encrypt the condition selection result, and the ciphertext obtained by the encryption process can be used as the generated obfuscation label corresponding to the condition selection result. Alternatively, a random number can be generated, and the random number can be used as the generated obfuscation label corresponding to the condition selection result.

[0094] In practical applications, the condition selection results corresponding to each possible value of the above condition selection parameter may be the data held by the above first participant itself.

[0095] Take the following code as an example:

[0096] if(u>v)

[0097] z=X

[0098] else

[0099] z=Y

[0100] Let a = (u>v), then a can be called a conditional selection parameter, which is used to indicate the truth or falsehood of the condition u>v, and the possible values ​​of the conditional selection parameter include 0 and 1, and X and Y can be called conditional selection results, where X is the conditional selection result corresponding to the value of a of 1, and Y is the conditional selection result corresponding to the value of a of 0. In this case, a confusion label L (z = X) corresponding to the conditional selection result X can be generated, and a confusion label L (z = Y) corresponding to the conditional selection result Y can be generated.

[0101] If the above target condition contains multiple sub-conditions, the bits used to indicate the truth or falsehood of each sub-condition can be concatenated to form a condition selection parameter. For example, assuming that a is a condition selection parameter used to indicate the truth or falsehood of sub-conditions u>v and p>q, then a=11 indicates that sub-conditions u>v and p>q are both true, a=10 indicates that sub-conditions u>v are true and sub-conditions p>q are false, a=01 indicates that sub-conditions u>v are false and sub-conditions p>q are true, and a=00 indicates that sub-conditions u>v and p>q are both false, that is, the possible values ​​of the condition selection parameter include 11, 10, 01 and 00.

[0102] In some embodiments, the above conditional selection result may be data including at least one bit.

[0103] Continuing with the above example, assuming that the condition selection result X=1, or the condition selection result X=0, the condition selection result is data including one bit. Alternatively, assuming that the condition selection result X=110, the condition selection result is data including three bits.

[0104] When generating confusion labels corresponding to each condition selection result, specifically, confusion labels corresponding to each possible value of each bit in the condition selection result can be generated, so that the value of each bit in each condition selection result can be replaced with the corresponding confusion label to generate confusion labels corresponding to each condition selection result.

[0105] Continuing with the above example, assuming that the conditional selection result X and the conditional selection result Y are both data including three bits (the 0th bit, the 1st bit and the 2nd bit from the lowest bit to the highest bit), since the possible values ​​of each bit include 0 and 1, a confusion label L(z[0]=1) corresponding to the value 1 of the 0th bit in the conditional selection result, a confusion label L(z[0]=0) corresponding to the value 0 of the 0th bit in the conditional selection result, a confusion label L(z[1]=1) corresponding to the value 1 of the 1st bit in the conditional selection result, a confusion label L(z[1]=0) corresponding to the value 0 of the 1st bit in the conditional selection result, a confusion label L(z[1]=0) corresponding to the value 1 of the 1st bit in the conditional selection result, a confusion label L(z[2]=1) corresponding to the value 1 of the 2nd bit in the conditional selection result, and a confusion label L(z[2]=0) corresponding to the value 0 of the 2nd bit in the conditional selection result can be generated. Furthermore, assuming that the conditional selection result X=110, the value 0 of the 0th bit in the conditional selection result can be replaced by the corresponding confusion label L(z[0]=0), the value 1 of the 1st bit in the conditional selection result can be replaced by the corresponding confusion label L(z[1]=1), and the value 1 of the 2nd bit in the conditional selection result can be replaced by the corresponding confusion label L(z[2]=1). The final generated confusion label corresponding to the conditional selection result X can be L(z[2]=1)L(z[1]=1)L(z[0]=0).

[0106] It should be noted that the step of generating confusion labels corresponding to possible values ​​of each bit in the conditional selection result can be performed in advance, and the step of replacing the value of each bit in each conditional selection result with the corresponding confusion label to generate confusion labels corresponding to each conditional selection result can be performed after the value of each conditional selection result is determined.

[0107] In some embodiments, when generating obfuscation labels corresponding to possible values ​​of each bit in the conditional selection result, the obfuscation labels corresponding to possible values ​​of each bit in the conditional selection result can be generated based on the FreeXOR algorithm for the obfuscation circuit.

[0108] For a bit in the conditional selection result, the possible values ​​of the bit include 0 and 1. After applying the FreeXOR algorithm for the obfuscation circuit, the obfuscation label corresponding to the value 1 generated for the bit = the obfuscation label corresponding to the value 0 generated for the bit ⊕Δ, where ⊕ represents XOR, and Δ represents a bit string randomly generated by the obfuscation circuit generator, which is kept secret from the obfuscation circuit executor.

[0109] It should be noted that the obfuscated labels generated based on the FreeXOR algorithm for obfuscated circuits enable the obfuscated labels of two input data to be directly XORed to obtain the obfuscated labels of the output data, which makes it easier to use the generated obfuscated labels for subsequent processing.

[0110] Step 404: Obtain obfuscation labels corresponding to each possible value of the conditional selection parameter.

[0111] In this embodiment, on the other hand, the first participant may obtain confusion labels corresponding to each possible value of the conditional selection parameter.

[0112] Specifically, for a possible value of the conditional selection parameter, the possible value may be encrypted; for example, a random number may be generated, and the random number may be used as a key to encrypt the possible value, and the ciphertext obtained by the encryption process may be used as the generated obfuscation label corresponding to the possible value. Alternatively, a random number may be generated, and the random number may be used as the generated obfuscation label corresponding to the possible value.

[0113] Continuing with the above example, since the possible values ​​of the conditional selection parameter a include 0 and 1, the confusion labels corresponding to the possible values ​​of the conditional selection parameter may include a confusion label L(a=1) corresponding to the value 1 of a, and a confusion label L(a=0) corresponding to the value 0 of a.

[0114] Step 406: each possible value of the conditional selection parameter is used as a target possible value, and the conditional selection result corresponding to the target possible value is used as a target conditional selection result, and the obfuscation label corresponding to the target possible value is used as a key to encrypt the obfuscation label corresponding to the target conditional selection result.

[0115] In this embodiment, when the first participant generates obfuscation labels corresponding to each condition selection result and obtains obfuscation labels corresponding to each possible value of the condition selection parameter, each possible value of the condition selection parameter can be used as a target possible value, and the condition selection result corresponding to the target possible value can be used as a target condition selection result, and the obfuscation label corresponding to the target possible value can be used as a key to encrypt the obfuscation label corresponding to the target condition selection result. In this way, the encrypted obfuscation labels corresponding to each condition selection result can be obtained.

[0116] That is, for each possible value of the above-mentioned conditional selection parameter, and the conditional selection result corresponding to this possible value of the conditional selection parameter, the obfuscation label corresponding to this possible value of the conditional selection parameter can be used as a key to encrypt the conditional selection result.

[0117] Continuing with the above example, when a confusion label L(z=X) corresponding to the conditional selection result X and a confusion label L(z=Y) corresponding to the conditional selection result Y are generated, and a confusion label L(a=1) corresponding to the value of a of 1 and a confusion label L(a=0) corresponding to the value of a of 0 are obtained, since X is the conditional selection result corresponding to the value of a of 1 and Y is the conditional selection result corresponding to the value of a of 0, the confusion label L(a=1) can be used as a key to encrypt the confusion label L(z=X), and the confusion label L(a=0) can be used as a key to encrypt the confusion label L(z=Y).

[0118] Step 408: The encrypted obfuscation labels corresponding to the various condition selection results are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the computation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to the various condition selection results, and determines the condition selection results corresponding to the obfuscation labels successfully decrypted as the condition selection results corresponding to the computation sub-process.

[0119] In this embodiment, the first participant may send the encrypted obfuscation labels corresponding to the results of each condition selection to another participant (referred to as the second participant, which may be the obfuscation circuit executor as described above) participating in the secure multi-party computation.

[0120] On the one hand, the second party can receive the encrypted confusion labels corresponding to each condition selection result sent by the first party, and on the other hand, can obtain the confusion labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process of condition selection based on the target condition.

[0121] In practical applications, the obfuscation label corresponding to the actual value of the above-mentioned conditional selection parameter in the above-mentioned calculation sub-process may be an intermediate calculation result in the calculation process of the above-mentioned secure multi-party computing, that is, the obfuscation label corresponding to the actual value of the conditional selection parameter in the calculation sub-process may be the calculation result of the upstream calculation sub-process corresponding to the calculation sub-process in the calculation process of the secure multi-party computing.

[0122] When the second participant receives the encrypted obfuscation labels corresponding to the various condition selection results and obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, the second participant can use the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process as a key to attempt to decrypt the encrypted obfuscation labels corresponding to the various condition selection results. At this time, only the obfuscation label corresponding to one condition selection result can be successfully decrypted, and the condition selection result corresponding to the obfuscation label successfully decrypted can be used as the condition selection result corresponding to the calculation sub-process.

[0123] Continuing with the above example, assuming that the actual value of the conditional selection parameter a in the calculation sub-process for conditional selection based on the condition u>v is 1 (that is, the condition u>v is true at this time), then since the obfuscation label corresponding to the value 1 of a is L(a=1), the obfuscation label L(a=1) can be used as a key to try to decrypt the encrypted obfuscation label L(z=X) and the encrypted obfuscation label L(z=Y). Because the encrypted obfuscation label L(z=X) is obtained by encrypting the obfuscation label L(z=X) using the obfuscation label L(a=1) as a key, the encrypted obfuscation label L(z=X) is decrypted using the obfuscation label L(a=1) as a key, and the obfuscation label L(z=X) can be successfully decrypted to obtain the obfuscation label L(z=X) for decryption. Because the encrypted obfuscation label L(z=Y) is obtained by encrypting the obfuscation label L(z=Y) using the obfuscation label L(a=0) as the key, decryption of the encrypted obfuscation label L(z=Y) using the obfuscation label L(a=1) as the key will fail. Therefore, the condition selection result corresponding to this calculation sub-process is z=X.

[0124] In practical applications, the algorithm used in the encryption process in step 406 should correspond to the algorithm used in the decryption process in step 408, and both should belong to the same cryptographic algorithm.

[0125] Please Figure 4 Based on the embodiment shown, reference Figure 5 , Figure 5 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0126] In this embodiment, the above-mentioned conditional selection method based on secure multi-party computing can be applied to the second participant as described above.

[0127] like Figure 5 As shown, the above-mentioned condition selection method based on secure multi-party computing may include the following steps:

[0128] Step 502: receiving the encrypted obfuscation labels corresponding to the various condition selection results sent by the first participant participating in the secure multi-party computation; wherein, the encrypted obfuscation labels corresponding to the various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to the various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to the various condition selection results, and, after obtaining the obfuscation labels corresponding to the various possible values ​​of the condition selection parameters, taking the various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions.

[0129] Step 504: Obtain the obfuscation label corresponding to the actual value of the conditional selection parameter in the calculation sub-process.

[0130] Step 506: Using the obfuscation label corresponding to the actual value as a key, the encrypted obfuscation label corresponding to each condition selection result is decrypted.

[0131] Step 508: Determine the condition selection result corresponding to the obfuscation label obtained by successful decryption as the condition selection result corresponding to the calculation sub-process.

[0132] The specific implementation of steps 502 to 508 may refer to the aforementioned steps 402 to 408, and this application will not repeat them here.

[0133] In the technical solution provided in the above embodiment, the first participant participating in the secure multi-party computation can, for the condition selection parameter used to indicate the truth or falsity of the target condition, obtain the condition selection results corresponding to each possible value of the condition selection parameter and generate a confusion label corresponding to each condition selection result, and obtain the confusion label corresponding to each possible value of the condition selection parameter, so that each possible value of the condition selection parameter can be used as the target possible value, and the condition selection result corresponding to the target possible value can be used as the target condition selection result, and the confusion label corresponding to the target condition selection result is used as a key to encrypt the confusion label corresponding to the target condition selection result, thereby obtaining the encrypted confusion label corresponding to each condition selection result; subsequently, the first participant can send the encrypted confusion label corresponding to each condition selection result to the second participant participating in the secure multi-party computation, and the second participant obtains the confusion label corresponding to the actual value of the condition selection parameter, and uses the confusion label corresponding to the actual value as a key to decrypt the encrypted confusion label corresponding to each condition selection result, and the condition selection result corresponding to the confusion label successfully obtained by decryption is the result of the condition selection implemented based on the secure multi-party computation.

[0134] By adopting the above method, the conditional selection based on secure multi-party computing implemented by using an obfuscated circuit is optimized. It is no longer necessary to generate multiple obfuscated truth tables, nor is it necessary to perform decryption based on each obfuscated truth table. Instead, the conditional selection based on secure multi-party computing is implemented through a small number of encryption and decryption steps. Therefore, the implementation efficiency of the conditional selection based on secure multi-party computing can be improved, and the implementation complexity can be reduced.

[0135] Please Figure 4 Based on the embodiment shown, reference Figure 6 , Figure 6 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0136] In this embodiment, the above-mentioned conditional selection method based on secure multi-party computing can be applied to the first participant as described above.

[0137] like Figure 6 As shown, the above-mentioned condition selection method based on secure multi-party computing may include the following steps:

[0138] Step 602: Obtain conditional selection results corresponding to each possible value of the conditional selection parameter.

[0139] The specific implementation of step 602 may refer to the aforementioned step 402, and this application will not go into details here.

[0140] Step 604: randomly selecting a condition selection result to be optimized from the condition selection results corresponding to each possible value of the condition selection parameter.

[0141] In this embodiment, when the first participant obtains the condition selection results corresponding to each possible value of the condition selection parameter, it can randomly select a condition selection result from these condition selection results as the condition selection result to be optimized.

[0142] Continuing with the above example, the condition selection result X is the condition selection result corresponding to the value 1 of the condition selection parameter a, and the condition selection result Y is the condition selection result corresponding to the value 0 of the condition selection parameter a. One condition selection result can be randomly selected from the condition selection result X and the condition selection result Y as the condition selection result to be optimized.

[0143] Step 606: Using the possible value corresponding to the selection result of the condition to be optimized as a key, decrypting the preset data, and determining the decryption result as the obfuscation label corresponding to the selection result of the condition to be optimized.

[0144] In this embodiment, for the above-mentioned condition selection results to be optimized, the above-mentioned first participant can use the possible values ​​of the above-mentioned condition selection parameters corresponding to the condition selection results to be optimized as keys, decrypt the preset data, obtain the decrypted results, and determine the decrypted results as the obfuscation label corresponding to the condition selection results to be optimized.

[0145] It should be noted that the above-mentioned preset data may be special data agreed upon by the above-mentioned first participant and the second participant as mentioned above, for example: an all-0 bit string.

[0146] Continuing with the above example, assuming that the randomly selected condition selection result to be optimized is X, since the value of the condition selection parameter a corresponding to the condition selection result X is 1, the obfuscation label L (a=1) corresponding to the value 1 of a can be used as a key to decrypt the above preset data to obtain a decryption result, and the decryption result is determined as the obfuscation label corresponding to the condition selection result X.

[0147] Step 608: Generate, based on the obfuscation label corresponding to the condition selection result to be optimized, obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized.

[0148] In this embodiment, the first participant may further generate confusion labels corresponding to each condition selection result other than the condition selection result to be optimized based on the confusion label corresponding to the condition selection result to be optimized.

[0149] In some embodiments, the above conditional selection result may be data including at least one bit.

[0150] In this case, the decrypted result as the obfuscation label corresponding to the condition selection result to be optimized can be split into obfuscation labels corresponding to respective bits in the condition selection result to be optimized.

[0151] Continuing with the above example, assuming that both the condition selection result X and the condition selection result Y are data including three bits (the 0th bit, the 1st bit and the 2nd bit from low to high), and the randomly selected condition selection result to be optimized is X, then the above decryption result as the confusion label corresponding to the condition selection result X can be expressed as L(X[2])L(X[1])L(X[0]), where L(X[0]) is the confusion label corresponding to the 0th bit in the condition selection result X, L(X[1]) is the confusion label corresponding to the 1st bit in the condition selection result X, and L(X[2]) is the confusion label corresponding to the 2nd bit in the condition selection result X.

[0152] When generating confusion labels corresponding to the condition selection results other than the condition selection result to be optimized based on the confusion labels corresponding to the condition selection result to be optimized, it can be specifically determined whether the value of the bit (which may be called the first bit) in the condition selection result to be optimized is the same as the value of the bit (which may be called the second bit) in the condition selection results other than the condition selection result to be optimized that is in the same position as the first bit.

[0153] If the value of the first bit is the same as the value of the second bit, the value of the second bit in each condition selection result except the condition selection result to be optimized can be replaced with the confusion label corresponding to the first bit in the confusion label corresponding to the condition selection result to be optimized, so as to generate confusion labels corresponding to each condition selection result except the condition selection result to be optimized.

[0154] If the value of the first bit is different from the value of the second bit, the value of the second bit in each condition selection result except the condition selection result to be optimized can be replaced with the generated confusion label corresponding to the value of the second bit, so as to generate confusion labels corresponding to each condition selection result except the condition selection result to be optimized.

[0155] Continuing with the above example, assuming that the conditional selection result X=110, the confusion label corresponding to the conditional selection result X can be expressed as L(X[2]=1)L(X[1]=1)L(X[0]=0). Further, assuming that the conditional selection result Y is 101, since only the value of the second bit in the conditional selection result Y and the conditional selection result X is the same, a confusion label L(Y[0]=1) corresponding to the value 1 of the 0th bit in the conditional selection result Y can be generated, and the value 1 of the 0th bit in the conditional selection result Y is replaced with the corresponding confusion label L(Y[0]=1), and a confusion label L(Y[1]=0) corresponding to the value 0 of the 1st bit in the conditional selection result Y is generated, and the value 0 of the 1st bit in the conditional selection result Y is replaced with the corresponding confusion label L(Y[1]=0), and the value 1 of the second bit in the conditional selection result Y is replaced with the corresponding confusion label L(X[2]=1). The final generated confusion label corresponding to the conditional selection result Y can be L(X[2]=1)L(Y[1]=0)L(Y[0]=1).

[0156] It should be noted that the step of generating the confusion labels corresponding to the above-mentioned condition selection results to be optimized can be performed in advance, and the step of generating the confusion labels corresponding to the condition selection results other than the condition selection results to be optimized according to the confusion labels corresponding to the condition selection results to be optimized can be performed after the values ​​of the condition selection results are determined.

[0157] In some embodiments, if the value of the first bit is different from the value of the second bit, based on the FreeXOR algorithm for the obfuscation circuit, according to the obfuscation label corresponding to the first bit in the obfuscation label corresponding to the above-mentioned condition selection result to be optimized, a obfuscation label corresponding to the second bit in each condition selection result other than the condition selection result to be optimized can be generated, and the value of the second bit in each condition selection result other than the condition selection result to be optimized is replaced with the corresponding obfuscation label to generate an obfuscation label corresponding to each condition selection result other than the condition selection result to be optimized.

[0158] Continuing with the above example, for the generated obfuscation label L(Y[0]=1) corresponding to the value 1 of the 0th bit in the conditional selection result Y, (L(Y[0]=1))=(L(X[0]=0))⊕Δ, where ⊕ represents XOR, and Δ represents a bit string randomly generated by the obfuscation circuit generator, which is kept secret from the obfuscation circuit executor. Similarly, for the generated obfuscation label L(Y[1]=0) corresponding to the value 0 of the 1st bit in the conditional selection result Y, (L(Y[1]=0)))=(L(X[1]=1))⊕Δ.

[0159] Step 610: Obtain obfuscation labels corresponding to each possible value of the conditional selection parameter.

[0160] Step 612: Each possible value of the conditional selection parameter is used as a target possible value, and the conditional selection result corresponding to the target possible value is used as a target conditional selection result, and the obfuscation label corresponding to the target possible value is used as a key to encrypt the obfuscation label corresponding to the target conditional selection result.

[0161] The specific implementation of steps 610 to 612 may refer to the aforementioned steps 404 to 406, and this application will not go into details here.

[0162] In practical applications, the algorithm used in the decryption process in step 606 should correspond to the algorithm used in the encryption process in step 612, and both should belong to the same cryptographic algorithm.

[0163] It should be noted that, since the obfuscation label corresponding to the selection result of the condition to be optimized is the decrypted result obtained by decrypting the above preset data, if the obfuscation label corresponding to the selection result of the condition to be optimized is encrypted, the encrypted obfuscation label corresponding to the selection result of the condition to be optimized is the preset data. Therefore, at this time, it is no longer necessary to perform the step of encrypting the obfuscation label corresponding to the selection result of the condition to be optimized, but the preset data can be directly regarded as the encrypted obfuscation label corresponding to the selection result of the condition to be optimized.

[0164] Step 614: Send the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation label corresponding to the actual value of the condition selection parameter in the calculation sub-process, and uses the obfuscation label corresponding to the actual value as a key to decrypt the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized, and determines the condition selection result corresponding to the obfuscation label successfully decrypted as the condition selection result corresponding to the calculation sub-process.

[0165] In this embodiment, since the above-mentioned preset data is special data agreed upon by the above-mentioned first participant and the above-mentioned second participant, the first participant may no longer send the preset data as an encrypted confusion label corresponding to the above-mentioned condition selection result to be optimized to the second participant, but only send the encrypted confusion labels corresponding to each condition selection result except the condition selection result to be optimized to the second participant.

[0166] On the one hand, the second party can receive the encrypted confusion labels corresponding to each condition selection result except the condition selection result to be optimized sent by the first party, and on the other hand, can obtain the confusion labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process of condition selection based on the target condition.

[0167] In practical applications, the obfuscation label corresponding to the actual value of the above-mentioned conditional selection parameter in the above-mentioned calculation sub-process may be an intermediate calculation result in the calculation process of the above-mentioned secure multi-party computing, that is, the obfuscation label corresponding to the actual value of the conditional selection parameter in the calculation sub-process may be the calculation result of the upstream calculation sub-process corresponding to the calculation sub-process in the calculation process of the secure multi-party computing.

[0168] When the second participant receives the encrypted obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized, and obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, the second participant can use the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process as a key, and attempt to decrypt the encrypted obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized, and attempt to decrypt the preset data. At this time, only the obfuscation label corresponding to one condition selection result can be successfully decrypted, and the condition selection result corresponding to the obfuscation label obtained by successful decryption can be used as the condition selection result corresponding to the calculation sub-process.

[0169] In practical applications, the algorithm used in the encryption process in step 612 should correspond to the algorithm used in the decryption process in step 614, and both should belong to the same cryptographic algorithm. That is, the algorithm used in the decryption process in step 606 is the same as the algorithm used in the decryption process in step 614.

[0170] Please Figure 6 Based on the embodiment shown, reference Figure 7 , Figure 7 It is a flowchart of another conditional selection method based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0171] In this embodiment, the above-mentioned conditional selection method based on secure multi-party computing can be applied to the second participant as described above.

[0172] like Figure 7 As shown, the above-mentioned condition selection method based on secure multi-party computing may include the following steps:

[0173] Step 702: receiving the encrypted obfuscation labels corresponding to the various condition selection results except the condition selection result to be optimized, which are sent by the first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to the various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to the various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to the various condition selection results, and, after obtaining the obfuscation labels corresponding to the various possible values ​​of the condition selection parameters, taking the various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to perform encryption of the condition selection results corresponding to the target condition selection results. The obfuscation label corresponding to the result is obtained by encrypting the obfuscation label corresponding to the result; the condition selection parameter is used to indicate the truth or falsity of the target condition; the generated obfuscation label corresponding to each condition selection result includes the obfuscation label corresponding to the condition selection result to be optimized, and the obfuscation label corresponding to each condition selection result other than the condition selection result to be optimized, which is generated according to the obfuscation label corresponding to the condition selection result to be optimized; the condition selection result to be optimized is a condition selection result randomly selected from the condition selection results corresponding to each possible value of the condition selection parameter; the obfuscation label corresponding to the condition selection result to be optimized is a decryption result obtained by decrypting the preset data using the possible value of the condition selection parameter corresponding to the condition selection result to be optimized as a key.

[0174] Step 704: Obtain an obfuscation label corresponding to the actual value of the conditional selection parameter in the calculation sub-process.

[0175] Step 706: Using the obfuscation label corresponding to the actual value as a key, the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized are respectively decrypted.

[0176] Step 708: Determine the conditional selection result corresponding to the obfuscation label obtained by successful decryption as the conditional selection result corresponding to the calculation sub-process.

[0177] The specific implementation of steps 702 to 708 may refer to the aforementioned steps 602 to 614, and this application will not go into details here.

[0178] In the technical solution provided in the above embodiment, the conditional selection based on secure multi-party computing implemented using an obfuscation circuit is optimized, and it is no longer necessary to generate multiple obfuscated truth tables, nor is it necessary to perform decryption based on each obfuscated truth table. Instead, the conditional selection based on secure multi-party computing is implemented through a small number of encryption and decryption steps, thereby improving the implementation efficiency of the conditional selection based on secure multi-party computing and reducing the implementation complexity. In addition, since the above-mentioned first participant no longer needs to send the above-mentioned preset data as an encrypted obfuscation label corresponding to the above-mentioned conditional selection result to be optimized to the above-mentioned second participant, but only sends the encrypted obfuscation labels corresponding to each conditional selection result except the conditional selection result to be optimized to the second participant, the amount of data transmission between the first participant and the second participant can be reduced, thereby improving communication efficiency.

[0179] Corresponding to the aforementioned method embodiments, the present application also provides device embodiments.

[0180] Please refer to Figure 8 , Figure 8 It is a structural diagram of a device shown in an exemplary embodiment of the present application. At the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808 and a non-volatile memory 810, and of course may also include other required hardware. One or more embodiments of the present application can be implemented based on software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into the memory 808 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present application do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic module, but can also be hardware or logic devices.

[0181] Please refer to Fig. 9 , Fig. 9 It is a block diagram of a condition selection device based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0182] The above-mentioned condition selection device based on secure multi-party computing can be applied to Figure 8 The device shown in the figure is used to implement the technical solution of the present application. The device is applied to the first participant participating in the secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for conditional selection based on the target condition; the device includes:

[0183] A generation module 902 is used to obtain condition selection results corresponding to each possible value of the condition selection parameter, and generate a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsehood of the target condition;

[0184] An acquisition module 904 is configured to acquire obfuscation labels corresponding to each possible value of the conditional selection parameter;

[0185] The encryption module 906 uses each possible value of the condition selection parameter as a target possible value, and uses the condition selection result corresponding to the target possible value as a target condition selection result, and uses the obfuscation label corresponding to the target possible value as a key to encrypt the obfuscation label corresponding to the target condition selection result;

[0186] The sending module 908 sends the encrypted obfuscation labels corresponding to each condition selection result to the second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to each condition selection result, and determines the condition selection result corresponding to the obfuscation labels successfully obtained by decryption as the condition selection result corresponding to the calculation sub-process.

[0187] In some embodiments, the conditional selection result is data including at least one bit;

[0188] The generating of obfuscation labels corresponding to the selection results of each condition includes:

[0189] Generate a confusion label corresponding to each possible value of each bit in the conditional selection result;

[0190] The value of each bit in each condition selection result is replaced with the corresponding obfuscation label to generate an obfuscation label corresponding to each condition selection result.

[0191] In some embodiments, generating a confusion label corresponding to each possible value of each bit in the conditional selection result includes:

[0192] Based on the FreeXOR algorithm for the obfuscation circuit, an obfuscation label corresponding to each possible value of each bit in the conditional selection result is generated.

[0193] In some embodiments, generating obfuscation labels corresponding to the results of each condition selection includes:

[0194] Randomly selecting a condition selection result to be optimized from the condition selection results corresponding to each possible value of the condition selection parameter;

[0195] Using the possible values ​​of the condition selection parameter corresponding to the condition selection result to be optimized as a key, decrypting the preset data, and determining the decryption result as the obfuscation label corresponding to the condition selection result to be optimized;

[0196] According to the confusion label corresponding to the condition selection result to be optimized, generating confusion labels corresponding to each condition selection result other than the condition selection result to be optimized;

[0197] The encrypted obfuscation labels corresponding to the condition selection results are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the computation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to the condition selection results, and determines the condition selection results corresponding to the obfuscation labels successfully obtained by decryption as the condition selection results corresponding to the computation sub-process, including:

[0198] The encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation label corresponding to the actual value of the condition selection parameter in the calculation sub-process, and uses the obfuscation label corresponding to the actual value as a key to decrypt the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized, and determines the condition selection result corresponding to the obfuscation label successfully decrypted as the condition selection result corresponding to the calculation sub-process.

[0199] In some embodiments, the conditional selection result is data including at least one bit;

[0200] The generating, according to the confusion label corresponding to the condition selection result to be optimized, confusion labels corresponding to each condition selection result other than the condition selection result to be optimized comprises:

[0201] Determine whether the value of the first bit in the condition selection result to be optimized is the same as the value of the second bit in each condition selection result other than the condition selection result to be optimized and having the same position as the first bit;

[0202] If the value of the first bit is the same as the value of the second bit, the value of the second bit in each condition selection result except the condition selection result to be optimized is replaced by the confusion label corresponding to the first bit in the confusion label corresponding to the condition selection result to be optimized, so as to generate confusion labels corresponding to each condition selection result except the condition selection result to be optimized.

[0203] In some embodiments, generating, according to the confusion label corresponding to the condition selection result to be optimized, confusion labels corresponding to each condition selection result other than the condition selection result to be optimized, further includes:

[0204] If the value of the first bit is different from the value of the second bit, generating, based on the FreeXOR algorithm for the obfuscation circuit, obfuscation labels corresponding to the first bit in the obfuscation labels corresponding to the condition selection result to be optimized, obfuscation labels corresponding to the second bit in each condition selection result other than the condition selection result to be optimized;

[0205] The value of the second bit in each condition selection result except the condition selection result to be optimized is replaced with a corresponding confusion label to generate a confusion label corresponding to each condition selection result except the condition selection result to be optimized.

[0206] Please refer to Fig.10 , Fig.10 It is a block diagram of another condition selection device based on secure multi-party computing shown in an exemplary embodiment of the present application.

[0207] The above-mentioned condition selection device based on secure multi-party computing can be applied to Figure 8 The device shown in the figure is used to implement the technical solution of the present application. The device is applied to the second participant participating in the secure multi-party computing; the calculation process of the secure multi-party computing includes a calculation sub-process for conditional selection based on the target condition; the device includes:

[0208] The receiving module 1002 receives the encrypted obfuscation labels corresponding to the various condition selection results sent by the first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to the various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to the various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to the various condition selection results, and, after obtaining the obfuscation labels corresponding to the various possible values ​​of the condition selection parameters, taking the various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions;

[0209] An acquisition module 1004 is used to acquire an obfuscation label corresponding to an actual value of the conditional selection parameter in the calculation sub-process;

[0210] A decryption module 1006, using the obfuscation label corresponding to the actual value as a key, decrypts the encrypted obfuscation label corresponding to each condition selection result;

[0211] The determination module 1008 determines the condition selection result corresponding to the obfuscation label obtained by successful decryption as the condition selection result corresponding to the calculation sub-process.

[0212] In some embodiments, the generated obfuscation labels corresponding to the various condition selection results include obfuscation labels corresponding to the condition selection results to be optimized, and obfuscation labels corresponding to various condition selection results other than the condition selection results to be optimized, generated based on the obfuscation labels corresponding to the condition selection results to be optimized; the condition selection results to be optimized are condition selection results randomly selected from the condition selection results corresponding to various possible values ​​of the condition selection parameters; the obfuscation labels corresponding to the condition selection results to be optimized are decryption results obtained by decrypting the preset data using the possible values ​​of the condition selection parameters corresponding to the condition selection results to be optimized as keys;

[0213] The receiving the encrypted obfuscation labels corresponding to the condition selection results sent by the first participant participating in the secure multi-party computation includes:

[0214] Receiving encrypted obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized, sent by a first participant participating in the secure multi-party computation;

[0215] The method of using the obfuscation label corresponding to the actual value as a key to decrypt the encrypted obfuscation labels corresponding to the selection results of each condition includes:

[0216] The obfuscation label corresponding to the actual value is used as a key to decrypt the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized.

[0217] For the device embodiment, it basically corresponds to the method embodiment, so the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the technical solution of the present application.

[0218] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0219] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0220] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0221] Computer-readable media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0222] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0223] The above specific embodiments of the present application are described. Other embodiments are within the scope of the present application. In some cases, the actions or steps recorded in the present application can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0224] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings. The term "and / or" refers to and includes any or all possible combinations of one or more associated listed items.

[0225] The description of the terms "one embodiment", "some embodiments", "example", "specific example" or "an implementation method" etc. used in one or more embodiments of the present application means that the specific features or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present application. The schematic description of these terms is not necessarily for the same embodiment. Moreover, the specific features or characteristics described can be combined in a suitable manner in one or more embodiments of the present application. In addition, different embodiments and specific features or characteristics in different embodiments can be combined without contradicting each other.

[0226] 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 the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".

[0227] The above description is merely a preferred embodiment of one or more embodiments of the present application and is not intended to limit one or more embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application shall be included in the scope of protection of one or more embodiments of the present application.

[0228] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims

1. A conditional selection method based on secure multi-party computing, applied to the first party participating in secure multi-party computing ; The computing process of the secure multi-party computing includes a computing sub-process for conditional selection based on a target condition; the method includes: Obtaining condition selection results corresponding to each possible value of the condition selection parameter, and generating a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsity of the target condition; Obtaining obfuscation labels corresponding to each possible value of the conditional selection parameter; Taking each possible value of the conditional selection parameter as a target possible value, and taking the conditional selection result corresponding to the target possible value as a target conditional selection result, and taking the obfuscation label corresponding to the target possible value as a key, encrypting the obfuscation label corresponding to the target conditional selection result; The encrypted obfuscation labels corresponding to the various condition selection results are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to the various condition selection results, and determines the condition selection results corresponding to the obfuscation labels successfully obtained by decryption as the condition selection results corresponding to the calculation sub-process.

2. The method according to claim 1, wherein the conditional selection result is data containing at least one bit; The generating of obfuscation labels corresponding to the selection results of each condition includes: Generate a confusion label corresponding to each possible value of each bit in the conditional selection result; The value of each bit in each condition selection result is replaced with the corresponding obfuscation label to generate an obfuscation label corresponding to each condition selection result.

3. The method according to claim 2, wherein generating a confusion label corresponding to each possible value of each bit in the conditional selection result, include: Based on the FreeXOR algorithm for the obfuscation circuit, an obfuscation label corresponding to each possible value of each bit in the conditional selection result is generated.

4. The method according to claim 1, wherein generating a confusion label corresponding to each condition selection result, include: Randomly selecting a condition selection result to be optimized from the condition selection results corresponding to each possible value of the condition selection parameter; Using the possible values ​​of the condition selection parameter corresponding to the condition selection result to be optimized as a key, decrypting the preset data, and determining the decryption result as the obfuscated label corresponding to the condition selection result to be optimized; According to the confusion label corresponding to the condition selection result to be optimized, generating confusion labels corresponding to each condition selection result other than the condition selection result to be optimized; The encrypted obfuscation labels corresponding to the condition selection results are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the computation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to the condition selection results, and determines the condition selection results corresponding to the obfuscation labels successfully obtained by decryption as the condition selection results corresponding to the computation sub-process, including: The encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized are sent to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation label corresponding to the actual value of the condition selection parameter in the calculation sub-process, and uses the obfuscation label corresponding to the actual value as a key to decrypt the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized, and determines the condition selection result corresponding to the obfuscation label successfully decrypted as the condition selection result corresponding to the calculation sub-process.

5. The method according to claim 4, wherein the conditional selection result is data containing at least one bit; generating, according to the obfuscation label corresponding to the condition selection result to be optimized, obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized, include: Determine whether the value of the first bit in the condition selection result to be optimized is the same as the value of the second bit in each condition selection result other than the condition selection result to be optimized and having the same position as the first bit; If the value of the first bit is the same as the value of the second bit, the value of the second bit in each condition selection result except the condition selection result to be optimized is replaced by the confusion label corresponding to the first bit in the confusion label corresponding to the condition selection result to be optimized, so as to generate confusion labels corresponding to each condition selection result except the condition selection result to be optimized.

6. The method according to claim 5, further comprising: include: If the value of the first bit is different from the value of the second bit, generating, based on the FreeXOR algorithm for the obfuscation circuit, obfuscation labels corresponding to the first bit in the obfuscation labels corresponding to the condition selection result to be optimized, obfuscation labels corresponding to the second bit in each condition selection result other than the condition selection result to be optimized; The value of the second bit in each condition selection result except the condition selection result to be optimized is replaced with a corresponding confusion label to generate a confusion label corresponding to each condition selection result except the condition selection result to be optimized.

7. A conditional selection method based on secure multi-party computing, applied to the second party participating in secure multi-party computing ; The computing process of the secure multi-party computing includes a computing sub-process for conditional selection based on target conditions; The method comprises: receiving encrypted obfuscation labels corresponding to various condition selection results sent by a first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to various condition selection results, and, after obtaining the obfuscation labels corresponding to various possible values ​​of the condition selection parameters, taking various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions; Obtaining an obfuscation label corresponding to an actual value of the conditional selection parameter in the calculation sub-process; Using the obfuscation label corresponding to the actual value as a key, decrypting the encrypted obfuscation label corresponding to each condition selection result; The condition selection result corresponding to the obfuscation label obtained by successful decryption is determined as the condition selection result corresponding to the calculation sub-process.

8. According to the method of claim 7, the generated obfuscation labels corresponding to the various condition selection results include the obfuscation labels corresponding to the condition selection result to be optimized, and the obfuscation labels corresponding to various condition selection results other than the condition selection result to be optimized generated based on the obfuscation labels corresponding to the condition selection result to be optimized ; The condition selection result to be optimized is a condition selection result randomly selected from the condition selection results corresponding to each possible value of the condition selection parameter; The obfuscation label corresponding to the condition selection result to be optimized is a decryption result obtained by decrypting the preset data using the possible values ​​of the condition selection parameter corresponding to the condition selection result to be optimized as a key; The receiving the encrypted obfuscation labels corresponding to the condition selection results sent by the first participant participating in the secure multi-party computation includes: Receiving encrypted obfuscation labels corresponding to each condition selection result other than the condition selection result to be optimized, sent by a first participant participating in the secure multi-party computation; The method of using the obfuscation label corresponding to the actual value as a key to decrypt the encrypted obfuscation labels corresponding to the selection results of each condition includes: The obfuscation label corresponding to the actual value is used as a key to decrypt the preset data and the encrypted obfuscation labels corresponding to each condition selection result except the condition selection result to be optimized.

9. A condition selection device based on secure multi-party computing, applied to the first participant participating in secure multi-party computing ; The computing process of the secure multi-party computing includes a computing sub-process for conditional selection based on target conditions; The device comprises: A generation module, which obtains condition selection results corresponding to each possible value of the condition selection parameter, and generates a confusion label corresponding to each condition selection result; wherein the condition selection parameter is used to indicate the truth or falsehood of the target condition; An acquisition module, which acquires obfuscation labels corresponding to each possible value of the conditional selection parameter; an encryption module, taking each possible value of the condition selection parameter as a target possible value, and taking the condition selection result corresponding to the target possible value as a target condition selection result, and using the obfuscation label corresponding to the target possible value as a key to encrypt the obfuscation label corresponding to the target condition selection result; The sending module sends the encrypted obfuscation labels corresponding to each condition selection result to a second participant participating in the secure multi-party computation, and the second participant obtains the obfuscation labels corresponding to the actual values ​​of the condition selection parameters in the calculation sub-process, and uses the obfuscation labels corresponding to the actual values ​​as keys to decrypt the encrypted obfuscation labels corresponding to each condition selection result, and determines the condition selection result corresponding to the obfuscation labels successfully decrypted as the condition selection result corresponding to the calculation sub-process.

10. A condition selection device based on secure multi-party computing, applied to a second participant participating in secure multi-party computing ; The computing process of the secure multi-party computing includes a computing sub-process for conditional selection based on target conditions; The device comprises: A receiving module receives the encrypted obfuscation labels corresponding to the various condition selection results sent by the first participant participating in the secure multi-party computation; wherein the encrypted obfuscation labels corresponding to the various condition selection results are generated by the first participant after obtaining the condition selection results corresponding to the various possible values ​​of the condition selection parameters and generating the obfuscation labels corresponding to the various condition selection results, and, after obtaining the obfuscation labels corresponding to the various possible values ​​of the condition selection parameters, taking the various possible values ​​of the condition selection parameters as target possible values, and taking the condition selection results corresponding to the target possible values ​​as target condition selection results, and using the obfuscation labels corresponding to the target possible values ​​as keys to encrypt the obfuscation labels corresponding to the target condition selection results; the condition selection parameters are used to indicate the truth or falsity of the target conditions; An acquisition module, which acquires an obfuscation label corresponding to an actual value of the conditional selection parameter in the calculation sub-process; A decryption module, using the obfuscation label corresponding to the actual value as a key, and decrypting the encrypted obfuscation label corresponding to each condition selection result; The determination module determines the condition selection result corresponding to the obfuscation label obtained by successful decryption as the condition selection result corresponding to the calculation sub-process.

11. An electronic device, include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 8 by running the executable instructions.

12. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions are executed by a processor to implement the method according to any one of claims 1 to 8.