Data tuple generation method, device, medium and equipment for secure computing
By performing two random and inadvertent transmissions of R-OT protocols in multi-party security calculations to generate data tuple shards, the problems of low efficiency and high data leakage risk in the prior art are solved, and efficient and secure data tuple generation is achieved.
Patent Information
- Application Number
- CN202410116119.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-01-26
AI Technical Summary
The prior art is inefficient in the process of generating data tuples in multi-party security computing and relies on third parties, increasing the risk of data leakage and resource consumption.
Through two random and inadvertent transmissions of R-OT protocols, the two participants obtain pseudo-random number pairs respectively, and generate data tuple-groups for secure calculations based on these pseudo-random number pairs, thereby automatically generating data tuples and simplifying interaction Process and reduce risks.
Improves the business processing efficiency of secure computing, simplifies the data interaction process, reduces the risk of data tuple leakage, and saves resources.
Smart Images

Figure CN117932677B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multi-party secure computing, and in particular, to a method, apparatus, medium and device for generating a data tuple for secure computing. Background Art
[0002] Secure multi-party computing is also called multi-party secure computing. Multiple parties can jointly calculate the result of a function without disclosing the input data of each party in the function. The result of the calculation is made public to one or more of the parties. Typical applications of secure multi-party computing include joint statistical analysis of multi-party data with privacy protection, machine learning, etc. The function here is a statistical operation function, a machine learning algorithm, etc.
[0003] In order to protect the data privacy of all parties in the multi-party computing process, a variety of secure computing protocols have been proposed, which are suitable for different secure computing scenarios. Most secure computing protocols require pre-generation of data tuples for use in the secure computing process. Therefore, how to efficiently and securely generate data tuples for secure computing is crucial to improving the business processing efficiency and security of multi-party secure computing. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a method for generating a data tuple for secure computing, the method being applied to a first participant, the first participant being one of two participants in the secure computing, the method comprising:
[0006] By executing the random oblivious transfer (R-OT) protocol twice with the second party, respectively obtaining a first pseudo-random number pair and a second pseudo-random number pair, wherein the second party is the other of the two parties;
[0007] Based on the first pseudo-random number pair and the second pseudo-random number pair, a first tuple fragment of a data tuple for secure computing is generated, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols.
[0008] In a second aspect, the present disclosure provides a data tuple generation device for secure computing, the device being applied to a first participant, the first participant being one of two participants in the secure computing, the device comprising:
[0009] A protocol execution module, configured to obtain a first pseudo-random number pair and a second pseudo-random number pair respectively by executing a random oblivious transfer (R-OT) protocol twice with a second participant, wherein the second participant is the other of the two participants;
[0010] A tuple fragmentation generation module is used to generate a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols.
[0011] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the data tuple generation method for secure computing provided in the first aspect of the present disclosure.
[0012] In a fourth aspect, the present disclosure provides an electronic device, including:
[0013] a storage device having a computer program stored thereon;
[0014] A processing device is used to execute the computer program in the storage device to implement the steps of the data tuple generation method for secure computing provided in the first aspect of the present disclosure.
[0015] In the above technical solution, the two participants in the secure computing obtain two pseudo-random number pairs respectively by jointly executing the random oblivious transmission R-OT protocol twice; afterwards, both parties can generate tuple fragments of the data tuple used for secure computing based on the two pseudo-random number pairs obtained respectively, thereby obtaining the data tuple used for secure computing. In this way, the two participants can generate data tuples for secure computing by jointly executing the R-OT protocol twice, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the two participants can generate data tuples for secure computing through interaction without the help of a third party, which simplifies the data interaction process, makes the data tuple generation autonomous and controllable, reduces the risk of data tuple leakage, and can achieve the effect of saving resources.
[0016] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0018] Figure 1 The present invention is a flowchart of a method for generating a data tuple for secure computing according to an exemplary embodiment.
[0019] Figure 2 It is a block diagram of a data tuple generating device for secure computing according to another exemplary embodiment.
[0020] Figure 3 is a schematic structural diagram of an electronic device according to another exemplary embodiment. DETAILED DESCRIPTION
[0021] Before introducing the specific embodiments of the present disclosure, the specific application scenarios of multi-party secure computing and the terms involved in the present disclosure are first introduced and explained.
[0022] In practical applications, for the purpose of privacy protection, multi-party secure computing algorithms are usually black box algorithms, and the data transmission behavior between the computing nodes equipped with multi-party secure computing algorithms is opaque. As discussed in the background technology, typical applications of multi-party secure computing include machine learning, among which multi-party secure computing technology can be used to protect privacy data during the reasoning and training stages of machine learning, mainly involving the protection of model parameters and the protection of the data of each participant during the training process.
[0023] At present, common privacy-preserving machine learning solutions based on secure multi-party computing include: privacy-preserving machine learning protocols based on obfuscated circuits, oblivious transmission and other technologies, and executing two-party secure multi-party computing protocols to complete nonlinear operation calculations such as activation functions. Based on secret sharing technology, multiple parties are allowed to participate in machine learning network model training or prediction, and the process will not reveal data or model information.
[0024] In addition to the above application areas, multi-party secure computing can also be applied to privacy-protected network security detection, joint statistical analysis of privacy-protected multi-party data, spam cleaning and filtering of encrypted emails, advertising conversion and other fields.
[0025] Ring: refers to a set that defines two operations, addition and multiplication, and forms a commutative group for addition, a semigroup for multiplication for elements other than 0, and multiplication satisfies the distributive law for addition.
[0026] The ring of addition and multiplication is defined above, where addition is defined as integer addition modulo (mod) N, and multiplication is defined as integer multiplication mod N, where N is an integer greater than 1.
[0027] The Random Oblivious Transfer (R-OT) protocol is participated by two parties, in which the input messages of both parties are empty, that is, neither party inputs any message. After the two parties jointly execute the R-OT protocol, both parties can obtain two pseudo-random numbers (i.e., pseudo-random number pairs), one of which can obtain the two pseudo-random numbers i and c, and the other can obtain the two pseudo-random numbers w0 and w1, where c = w i , c, w0 and w1 all belong to the N-power space of 2, that is, c, w0, i belongs to the modulo 2 space, that is,
[0028] Secret Sharing is also called secret splitting or secret sharing. Its basic principle is to split a secret (such as a key, private data, etc.) into multiple shares and give them to different data parties for safekeeping. Only when parties exceeding a threshold number merge their shards can the secret be restored; Shares obtained from parties less than the threshold number cannot restore any information of the secret. In multi-party secure computing, the threshold number is usually the same as the number of participants, and the shares into which the secret is split can also be called shards.
[0029] Secret sharing is an important means in the process of multi-party secure computing. Several commonly used forms of secret sharing in multi-party secure computing include arithmetic sharing, Boolean sharing, and Yao's sharing. The following takes sharing secret data x as an example to describe various sharing methods.
[0030] Arithmetic sharing is also called sum sharing. In a two-party secure computation, an integer x is divided into two pieces x=x L +x R Modulo 2 N The shared form (translated to [0, 2 N -1] interval) is distributed and stored in two parties, that is, X is stored in two parties in a shared form in ring A, (N>1), so that one party does not know x R , the other party does not know x L , neither party can obtain the complete form of x, x R and x Lis the arithmetic share (Arithmetic Shares) or A-Shares of x. Further, two parties can be expanded to multiple parties, such as x = x1 + x2 + ... + x d Assuming N = 64, a single shard of x in a single participant can be represented by a 64-byte binary number. The way to split a data x into and share forms is, for example: randomly generate (d-1) 2 64 The values in the (e.g., randomly generated 64-byte binary numbers) are taken as (d-1) fragments, which are recorded as x1, x2, ..., x d-1 , and pair 2 64 (Translate to [0, 2 64 -1] interval) as another slice, such as x d =x-x1-x2-…-x d-1 .
[0031] Boolean sharing is a secret sharing method that performs XOR operations on bits. For example, still taking two participants as an example, assume that x is a one-bit data (valued at 0 or 1), and x0⊕x1 is used to form a Boolean sharing form between the two participants. x0 and x1 are two Boolean slices (Bool Shares) or B-Shares of x in the two participants, both of which are 0 or 1. That is, x is stored in the two parties in a shared form in ring B. Represents an XOR operation. A single participant does not know the shards held by another participant, so it cannot infer the data x.
[0032] Yao's sharing is a sharing method related to garbled circuits. This disclosure does not involve this sharing method and will not be described in detail here.
[0033] Among them, in secure two-party computation, the A-shares form is more suitable for arithmetic operations, such as addition, multiplication, etc., while the B-shares form is more suitable for logical operations, such as AND, OR, etc. However, sometimes mixed operations are performed on A-shares and B-shares.
[0034] For example, when calculating the expression if (x>y) then k else 0, we will first calculate h=(x>y), the result of which is a B-shares, and then calculate h*k.
[0035] However, when calculating h*k, h is B-Shares and k is A-Shares, and the two cannot be directly multiplied.
[0036] For example, when performing select k.key, max(h.value) from k join h group by k.key, k.key will be one-hot encoded, that is, each row of k.key is converted into an m-dimensional vector (m is the number of possible values of k.key), only one of the m dimensions of the vector is 1, and the rest are 0, and then each dimension of the one-hot encoding is multiplied by h.value. The multiplication here is also a multiplication of B-shares and A-shares.
[0037] To calculate the multiplication of B-shares and A-shares, the usual approach is to use the Boolean to Arithmetic Sharing (B2A) conversion to convert B-shares into A-shares, and then multiply them by A-shares.
[0038] However, B2A conversion usually has huge communication and computational overhead, as shown in Table 1 below:
[0039] Table 1 Cost of multiplying B-shares and A-shares
[0040]
[0041] Since B2A conversion usually has huge communication and computational overhead, the inventors propose a computational security protocol that can directly multiply B-shares and A-shares to save the communication and computational overhead of B2A conversion. The secure computation protocol requires pre-generating data tuples for use in the secure computation process.
[0042] In view of this, the present disclosure provides a method, apparatus, medium and device for generating a data tuple for secure computing.
[0043] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0044] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0045] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0046] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0047] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0048] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0049] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0050] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0051] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0052] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0053] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0054] Figure 1 FIG. 1 is a flow chart of a method for generating a data tuple for secure computing according to an exemplary embodiment. Figure 1 As shown, the above data tuple generation method may include the following S101 and S102.
[0055] In S101, the random oblivious transfer (R-OT) protocol is performed twice with the second party to obtain a first pseudo-random number pair and a second pseudo-random number pair respectively.
[0056] In the present disclosure, the above method is applied to the first participant, the first participant is one of the two participants in the secure computing, and the second participant is the other of the two participants, that is, the above data tuple generation method can be applied to any of the two participants.
[0057] For example, the two participants include participant A and participant B. The first participant is reference party A, and the second participant is participant B, or the first participant is reference party B, and the second participant is participant A.
[0058] In S102 , a first tuple fragment of a data tuple for secure computing is generated based on the first pseudo-random number pair and the second pseudo-random number pair.
[0059] In the present disclosure, a data tuple for secure computing includes a first tuple fragment and a second tuple fragment, wherein the first tuple fragment is generated by a first participant based on a first pseudo-random number pair and a second pseudo-random number pair, and the second tuple fragment is generated by a second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained when the second participant executes the R-OT protocol twice.
[0060] In the above technical solution, the two participants in the secure computing obtain two pseudo-random number pairs respectively by jointly executing the random oblivious transmission R-OT protocol twice; afterwards, both parties can generate tuple fragments of the data tuple used for secure computing based on the two pseudo-random number pairs obtained respectively, thereby obtaining the data tuple used for secure computing. In this way, the two participants can generate data tuples for secure computing by jointly executing the R-OT protocol twice, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the two participants can generate data tuples for secure computing through interaction without the help of a third party, which simplifies the data interaction process, makes the data tuple generation autonomous and controllable, reduces the risk of data tuple leakage, and can achieve the effect of saving resources.
[0061] In one embodiment, the above-mentioned secure calculation can be used for two participants to collaboratively calculate the product of the first data and the second data, the first data is in an arithmetic sharing form between the two participants, and the second data is in a Boolean sharing form between the two participants. The first pseudo-random number pair includes a first pseudo-random number b0 and a second pseudo-random number u0, the second pseudo-random number pair includes a third pseudo-random number a0 and a fourth pseudo-random number v0, the third pseudo-random number pair includes a fifth pseudo-random number a1 and a sixth pseudo-random number u1, and the fourth pseudo-random number pair includes a seventh pseudo-random number b1 and an eighth pseudo-random number v1.
[0062] In the present disclosure, secure computing is used for two parties to collaboratively compute the product of first data and second data, the first data being in an arithmetic shared form between the two parties, and the second data being in a Boolean shared form between the two parties. It is understandable that the first data and the second data in the present disclosure may be any data that is not convenient for disclosure, and may include but is not limited to data representing user personal information, trade secrets, model parameters of a neural network model, and the like. The multi-party secure computing method provided in the embodiments of the present disclosure may be applied to ciphertext multiplication operations in tasks such as data calculation, cleaning, analysis, model training, storage, and database query based on ciphertext.
[0063] The first participant holds a first arithmetic slice k0 of the first data k and a first Boolean slice h0 of the second data h, and the second participant holds a second arithmetic slice k1 of the first data k and a second Boolean slice h1 of the second data h; And N>1.
[0064] In addition, the first pseudo-random number pair and the third pseudo-random number pair are obtained by executing the R-OT protocol once, and the second pseudo-random number pair and the fourth pseudo-random number pair are obtained by executing the R-OT protocol another time.
[0065] In one embodiment, when the first participant and the second participant jointly perform R-OT for the first time, the first participant obtains a first pseudo-random number pair, namely, a first pseudo-random number b0 and a second pseudo-random number u0, and the second participant obtains a third pseudo-random number pair, namely, a fifth pseudo-random number a1 and a sixth pseudo-random number u1, wherein the four pseudo-random numbers obtained by both parties satisfy the relationship f(b0, a1) = u0 + u1. When the first participant and the second participant jointly perform R-OT for the second time, the first participant obtains a second pseudo-random number pair, namely, a third pseudo-random number a0 and a fourth pseudo-random number v0, and the second participant obtains a fourth pseudo-random number pair, namely, a seventh pseudo-random number b1 and an eighth pseudo-random number v1, wherein the four pseudo-random numbers obtained by both parties satisfy the relationship f(b1, a0) = v0 + v1.
[0066] The function f(b,a) is used to represent the expression if(b)then a else 0. That is, if b=1, then f(b,a)=a, if b=0, then f(b,a)=0, that is, f(b,a)=a if b=1else 0.
[0067] Among them, b0, b1 and b belong to the modulo 2 space, and a, u0, a0, v0, a1, u1 and v1 all belong to the N-th power space of modulo 2, that is, the value range of a, u0, a0, v0, a1, u1 and v1 is [0, 2 N -1], that is, b0, a,u0,a0,v0,a1,u1, That is, the values of b0 and b1 are 0 or 1.
[0068] In another embodiment, when the first participant and the second participant jointly perform R-OT for the first time, the first participant obtains the second pseudo-random number pair, namely the third pseudo-random number a0 and the fourth pseudo-random number v0, and the second participant obtains the fourth pseudo-random number pair, namely the seventh pseudo-random number b1 and the eighth pseudo-random number v1, wherein the four pseudo-random numbers obtained by both parties satisfy the relationship f(b1, a0) = v0 + v1. When the first participant and the second participant jointly perform R-OT for the second time, the first participant obtains the first pseudo-random number pair, namely the first pseudo-random number b0 and the second pseudo-random number u0, and the second participant obtains the third pseudo-random number pair, namely the fifth pseudo-random number a1 and the sixth pseudo-random number u1, wherein the four pseudo-random numbers obtained by both parties satisfy the relationship f(b0, a1) = u0 + u1.
[0069] The following is a detailed description of the specific implementation of generating the first tuple fragment of the data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair in S102. Specifically, it can be achieved by the following steps (s1) to (s3):
[0070] Step (s1): Determine a first numerical value based on the first pseudo-random number and the third pseudo-random number.
[0071] Specifically, if the first pseudo-random number is 0, the third pseudo-random number is determined as the first value; if the first pseudo-random number is 1, the opposite of the third pseudo-random number is determined as the first value.
[0072] For example, the first value may be determined according to the first pseudo-random number and the third pseudo-random number by the following equation (1):
[0073]
[0074] in, is the first value.
[0075] Step (s2): Determine a second numerical value based on the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first numerical value.
[0076] For example, the second value may be determined according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value by the following equation (2):
[0077]
[0078] Here, y0 is the second value.
[0079] Step (s3): using the first pseudo-random number, the first numerical value and the second numerical value as elements, generating a first tuple fragment of a data tuple for secure computing.
[0080] After obtaining the first value and the second value, the first participant can use the first pseudo-random number, the first value and the second value as elements to generate a first tuple fragment of the data tuple for secure computing, that is, the first tuple fragment is
[0081] At the same time, the second participant can generate a second tuple fragment of the data tuple for secure computing based on the third pseudo-random number pair and the fourth pseudo-random number pair. Specifically, this can be achieved by the following steps (t1) to (t3):
[0082] Step (t1): Determine a third value based on the fifth pseudo-random number and the seventh pseudo-random number.
[0083] For example, the third value may be determined according to the fifth pseudo-random number and the seventh pseudo-random number by the following equation (3):
[0084]
[0085] in, is the third value.
[0086] Step (t2): Determine a fourth value based on the sixth pseudo-random number, the seventh pseudo-random number, the eighth pseudo-random number and the third value.
[0087] For example, the fourth value may be determined according to the sixth pseudo-random number, the seventh pseudo-random number, the eighth pseudo-random number and the third value by the following equation (4):
[0088]
[0089] , y1 is the fourth value.
[0090] Step (t3): using the seventh pseudo-random number, the third numerical value, and the fourth numerical value as elements, to generate a second tuple fragment of the data tuple for secure computing.
[0091] After obtaining the third value and the fourth value, the second participant can use the seventh pseudo-random number, the third value and the fourth value as elements to generate a second tuple fragment of the data tuple for secure computing, that is, the second tuple fragment is
[0092] The first tuple is split into and the second tuple is sliced as Constructing a data tuple for secure computing, wherein the data tuple is a Boolean-arithmetic-arithmetic triple (i.e., BA2A triple), wherein each element in the data tuple satisfies the relationship
[0093] After the first party and the second party jointly execute R-OT once, the first party obtains the first pseudo-random number b0 and the second pseudo-random number u0, and the second party obtains the fifth pseudo-random number a1 and the sixth pseudo-random number u1. These four pseudo-random numbers constitute a semi-Boolean-arithmetic-arithmetic triple (i.e., Half BA2A triple), where each element in the Half BA2A triple satisfies the relationship f(b0,a1)=u0+u1.
[0094] Similarly, after the first party and the second party jointly perform another R-OT, the first party obtains the third pseudo-random number a0 and the fourth pseudo-random number v0, and the second party obtains the seventh pseudo-random number b1 and the eighth pseudo-random number v1. These four pseudo-random numbers constitute another semi-Boolean-arithmetic-arithmetic triple (i.e., Half BA2A triple), where each element in the Half BA2Atriple satisfies the relationship f(b0,a1)=u0+u1.
[0095] In this way, two parties can obtain two tuple fragments, namely two Half BA2A triples, by jointly executing the R-OT protocol twice. Afterwards, the data tuple used for secure computing, namely BA2A triple, can be obtained based on these two Half BA2A triples.
[0096] Among them, the above agreement (i.e. ) is correct, which is guaranteed by the following equation:
[0097]
[0098] in, thus,
[0099] In addition, the above method may further include the following steps:
[0100] A first intermediate result is generated based on the first tuple slice, the first arithmetic slice of the first data held by the first party, and the first Boolean slice of the second data held by the first party.
[0101] Specifically, this can be achieved through the following steps (d1) to (d4):
[0102] Step (d1): Generate first masked data based on the first tuple fragment, the first arithmetic fragment of the first data held by the first participant, and the first Boolean fragment of the second data held by the first participant, and generate second masked data based on the first tuple fragment and the first Boolean fragment.
[0103] Step (d2): sending the first masked data and the second masked data to the second party.
[0104] Step (d3): receiving the third masked data and the fourth masked data sent by the second participant.
[0105] In the present disclosure, the third masked data is generated based on the second tuple slice, the second arithmetic slice of the first data held by the second party, and the second Boolean slice of the second data held by the second party, and the fourth masked data is generated based on the second tuple slice and the second Boolean slice.
[0106] The second participant generates third masked data based on the second tuple fragment, the second arithmetic fragment of the first data held by itself, and the second Boolean fragment of the second data held by itself, and generates fourth masked data based on the second tuple fragment and the second Boolean fragment; then, the third masked data and the fourth masked data are sent to the above-mentioned first participant; the first participant receives the third masked data and the fourth masked data.
[0107] Step (d4): Generate a first intermediate result based on the first Boolean slice, the second masked data, the third masked data, the fourth masked data and the first tuple slice.
[0108] At the same time, the second participant generates a second intermediate result based on the second Boolean slice, the first masked data, the second masked data, the fourth masked data and the second tuple slice. Afterwards, the two participants can share the intermediate results generated by each of them, and aggregate and merge the intermediate results generated by the two parties to obtain the final calculation result (i.e., the product of the first data and the second data).
[0109] The first participant masks the data slices it holds and shares them with the second participant. In this way, the two participants can directly multiply the first data and the second data through only one round of masked data exchange. The first masked data and the third masked data are both N bits, the second masked data and the fourth masked data are both 1 bit, and the online communication volume is (2N+2) bits.
[0110] It should be noted that the above step (d3) can be performed before the above step (d2), can be performed after the above step (d2), or can be performed simultaneously with the above step (d2), and the present disclosure does not make any specific limitation.
[0111] In the above technical solution, when calculating the product of first data in the form of arithmetic sharing between two participants and second data in the form of Boolean sharing between the two participants, the two participants can realize the direct multiplication calculation of the first data and the second data through a round of masked data exchange without converting the Boolean sharing into arithmetic sharing, thereby eliminating the communication volume of the two participants in the conversion between Boolean sharing and arithmetic sharing, which can greatly reduce the data communication volume for calculating the product of Boolean sharing and arithmetic sharing, and improve the business processing efficiency of secure computing.
[0112] The following is a detailed description of the specific implementation method of generating the first masked data according to the first tuple slice, the first arithmetic slice of the first data held by the first participant, and the first Boolean slice of the second data held by the first participant in the above step (d1). Specifically, it can be achieved by the following steps (11) and (12):
[0113] Step (11): Use the first numerical value to perform masking processing on the first arithmetic slice to obtain fifth masked data.
[0114] For example, the first numerical value may be used to perform masking processing on the first arithmetic slice by using the following equation (5) to obtain fifth masked data:
[0115]
[0116] Here, δa0 is the fifth mask data.
[0117] Step (12): Generate first mask data according to the fifth mask data and the first Boolean slice.
[0118] For example, the first mask data may be generated according to the fifth mask data and the first Boolean slice by the following equation (6):
[0119]
[0120] Wherein, C1 is the first mask data.
[0121] The specific implementation method of generating the second masked data according to the first tuple fragment and the first Boolean fragment in the above step (d1) is described in detail below: Specifically, the first Boolean fragment is masked using the first pseudo-random number to obtain the second masked data.
[0122] For example, the first pseudo-random number can be used to mask the first Boolean slice using the following equation (7) to obtain the second masked data:
[0123]
[0124] Wherein, δh0 is the second masking data.
[0125] The following is a detailed description of a specific implementation method for the second participant to generate the third masked data based on the second tuple slice, the second arithmetic slice of the first data held by the second participant, and the second Boolean slice of the second data held by the second participant. Specifically, it can be achieved by the following steps (21) and (22):
[0126] Step (21): Use the third value to perform masking processing on the second arithmetic slice to obtain sixth masked data.
[0127] For example, the third value may be used to perform masking processing on the second arithmetic slice by the following equation (8) to obtain sixth masked data:
[0128]
[0129] Among them, δa1 is the sixth mask data.
[0130] Step (22): Generate third masked data according to the sixth masked data and the second Boolean slice.
[0131] For example, the third mask data may be generated according to the sixth mask data and the second Boolean slice by the following equation (9):
[0132]
[0133] Wherein, C2 is the third mask data.
[0134] The specific implementation of generating the fourth masked data according to the second tuple slice and the second Boolean slice is described in detail below. Specifically, the second Boolean slice can be masked using the seventh pseudo-random number to obtain the fourth masked data.
[0135] For example, the seventh pseudo-random number can be used to mask the second Boolean slice using the following equation (10) to obtain fourth masked data:
[0136]
[0137] Wherein, δh1 is the fourth mask data.
[0138] The following is a detailed description of a specific implementation method of generating the first intermediate result based on the first Boolean slice, the second masked data, the third masked data, the fourth masked data, and the first tuple slice in the above step (d4). Specifically, the first intermediate result can be generated based on the first value, the third value, the first Boolean slice, the second masked data, the third masked data, the fourth masked data, and the fifth masked data.
[0139] For example, based on the first numerical value, the third numerical value, the first Boolean slice, the second mask data, the third mask data, the fourth mask data and the fifth mask data, a first intermediate result is generated by the following equation (11):
[0140]
[0141] Among them, r0 is the first intermediate result;
[0142] The following is a detailed description of a specific implementation method for the second participant to generate the second intermediate result based on the second Boolean slice, the first masked data, the second masked data, the fourth masked data, and the second tuple slice. Specifically, the second participant can generate the second intermediate result based on the third value, the fourth value, the second Boolean slice, the first masked data, the second masked data, the fourth masked data, and the sixth masked data.
[0143] For example, the second party may generate a second intermediate result through the following equation (12) based on the third value, the fourth value, the second Boolean slice, the first mask data, the second mask data, the fourth mask data, and the sixth mask data:
[0144]
[0145] Among them, r1 is the second intermediate result.
[0146] After the two parameters obtain the first intermediate result and the second intermediate result, the two can be added to reach the final calculation result (i.e., the product of the first data and the second data). Specifically, the above method can also include the following two steps:
[0147] Obtaining a second intermediate result generated by the second party, wherein the second intermediate result is generated based on the second tuple slice, the second arithmetic slice of the first data held by the second party, and the second Boolean slice of the second data held by the second party;
[0148] A sum of the first intermediate result and the second intermediate result is determined as a product of the first data and the second data.
[0149] In addition to being executed by the first participant, the above steps can also be executed by other electronic devices other than the above two participants. In this case, the other electronic device obtains the first intermediate result and the second intermediate result from the two participants respectively, and then determines the sum of the two as the product of the first data and the second data.
[0150] The correctness of the above protocol (i.e., first intermediate result + second intermediate result = first data * second data) is guaranteed by the following equation:
[0151]
[0152] in,
[0153] In one implementation, the first data may be a query field in a Structured Query Language (SQL) statement, and the second data may be a query condition in the SQL statement.
[0154] For example, the above data processing method can be executed when the following SQL statement is run:
[0155] select sum(a)from table1 where b;
[0156] In another embodiment, in the field of machine learning, to calculate RELU(a), b=DRELU(a)=(a>0) may be calculated first, and then f(b,a) may be calculated.
[0157] Figure 2 2 is a block diagram of a data tuple generation device for secure computing according to another exemplary embodiment. The device 200 is applied to a first participant, which is one of the two participants in the secure computing, and the device 200 includes:
[0158] A protocol execution module 201 is used to obtain a first pseudo-random number pair and a second pseudo-random number pair respectively by executing a random oblivious transfer (R-OT) protocol twice with a second participant, wherein the second participant is the other of the two participants;
[0159] The tuple fragment generation module 202 is used to generate a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols.
[0160] In the above technical solution, the two participants in the secure computing obtain two pseudo-random number pairs respectively by jointly executing the random oblivious transmission R-OT protocol twice; afterwards, both parties can generate tuple fragments of the data tuple used for secure computing based on the two pseudo-random number pairs obtained respectively, thereby obtaining the data tuple used for secure computing. In this way, the two participants can generate data tuples for secure computing by jointly executing the R-OT protocol twice, which is convenient and fast, and improves the business processing efficiency of secure computing. In addition, the two participants can generate data tuples for secure computing through interaction without the help of a third party, which simplifies the data interaction process, makes the data tuple generation autonomous and controllable, reduces the risk of data tuple leakage, and can achieve the effect of saving resources.
[0161] Optionally, the secure calculation is used for the two participants to collaboratively calculate the product of first data and second data, the first data being in an arithmetic sharing form between the two participants, and the second data being in a Boolean sharing form between the two participants;
[0162] The first pseudo-random number pair includes a first pseudo-random number b0 and a second pseudo-random number u0, the second pseudo-random number pair includes a third pseudo-random number a0 and a fourth pseudo-random number v0, the third pseudo-random number pair includes a fifth pseudo-random number a1 and a sixth pseudo-random number u1, and the fourth pseudo-random number pair includes a seventh pseudo-random number b1 and an eighth pseudo-random number v1, wherein the first pseudo-random number pair and the third pseudo-random number pair are obtained by executing the R-OT protocol once, and the second pseudo-random number pair and the fourth pseudo-random number pair are obtained by executing the R-OT protocol another time, f(b0,a1)=u0+u1, f(b1,a0)=v0+v1, if b=1, then f(b,a)=a, if b=0, then f(b,a)=0, b0, b1 and b belong to the modulo 2 space, and a, u0, a0, v0, a1, u1 and v1 all belong to the Nth power space of modulo 2.
[0163] Optionally, the tuple fragmentation generating module 202 includes:
[0164] A first determining submodule, configured to determine a first value according to the first pseudo-random number and the third pseudo-random number;
[0165] A second determination submodule, configured to determine a second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value;
[0166] A generating submodule is used to generate a first tuple fragment of a data tuple for secure computing using the first pseudo-random number, the first numerical value and the second numerical value as elements.
[0167] Optionally, the second determining submodule is used to determine a second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value by using the following formula:
[0168]
[0169] Wherein, y0 is the second value; is the first value.
[0170] Optionally, the first determination submodule is used to: if the first pseudo-random number is 0, determine the third pseudo-random number as the first value; if the first pseudo-random number is 1, determine the opposite of the third pseudo-random number as the first value.
[0171] Optionally, the device 200 further includes:
[0172] An intermediate result generation module is used to generate a first intermediate result according to the first tuple slice, the first arithmetic slice of the first data held by the first participant, and the first Boolean slice of the second data held by the first participant.
[0173] Optionally, the device 200 further includes:
[0174] an acquisition module, configured to acquire a second intermediate result generated by the second participant, wherein the second intermediate result is generated based on the second tuple slice, a second arithmetic slice of the first data held by the second participant, and a second Boolean slice of the second data held by the second participant;
[0175] A determination module is used to determine the sum of the first intermediate result and the second intermediate result as the product of the first data and the second data.
[0176] The present disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-mentioned method for generating data tuples for secure computing provided by the present disclosure.
[0177] Reference below Figure 3, which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0178] like Figure 3 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0179] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0180] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0181] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0182] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer PR-OTocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0183] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0184] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a first pseudo-random number pair and a second pseudo-random number pair respectively by jointly executing the random oblivious transfer (R-OT) protocol twice with the second participant, wherein the second participant is the other of the two participants; generates a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained when the second participant executes the R-OT protocol twice.
[0185] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0186] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0187] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the module does not limit the module itself in some cases. For example, the acquisition module may also be described as "a module for acquiring the second intermediate result generated by the second participant".
[0188] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0189] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0190] According to one or more embodiments of the present disclosure, Example 1 provides a method for generating a data tuple for secure computing, the method being applied to a first participant, the first participant being one of two participants in the secure computing, the method comprising:
[0191] By executing the random oblivious transfer (R-OT) protocol twice with the second party, respectively obtaining a first pseudo-random number pair and a second pseudo-random number pair, wherein the second party is the other of the two parties;
[0192] Based on the first pseudo-random number pair and the second pseudo-random number pair, a first tuple fragment of a data tuple for secure computing is generated, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols.
[0193] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the secure calculation is used for the two participants to collaboratively calculate the product of first data and second data, the first data being in an arithmetic shared form between the two participants, and the second data being in a Boolean shared form between the two participants;
[0194] The first pseudo-random number pair includes a first pseudo-random number b0 and a second pseudo-random number u0, the second pseudo-random number pair includes a third pseudo-random number a0 and a fourth pseudo-random number v0, the third pseudo-random number pair includes a fifth pseudo-random number a1 and a sixth pseudo-random number u1, and the fourth pseudo-random number pair includes a seventh pseudo-random number b1 and an eighth pseudo-random number v1, wherein the first pseudo-random number pair and the third pseudo-random number pair are obtained by executing the R-OT protocol once, and the second pseudo-random number pair and the fourth pseudo-random number pair are obtained by executing the R-OT protocol another time, f(b0,a1)=u0+u1, f(b1,a0)=v0+v1, if b=1, then f(b,a)=a, if b=0, then f(b,a)=0, b0, b1 and b belong to the modulo 2 space, and a, u0, a0, v0, a1, u1 and v1 all belong to the Nth power space of modulo 2.
[0195] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein generating a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair includes:
[0196] Determine a first value according to the first pseudo-random number and the third pseudo-random number;
[0197] Determine a second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value;
[0198] A first tuple fragment of a data tuple for secure computing is generated using the first pseudo-random number, the first numerical value, and the second numerical value as elements.
[0199] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein determining the second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number, and the first value includes:
[0200] The second value is determined by the following formula according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value:
[0201]
[0202] Wherein, y0 is the second value; is the first value.
[0203] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 3, wherein determining a first value according to the first pseudo-random number and the third pseudo-random number includes:
[0204] If the first pseudo-random number is 0, the third pseudo-random number is determined to be the first value;
[0205] If the first pseudo-random number is 1, the opposite number of the third pseudo-random number is determined as the first value.
[0206] According to one or more embodiments of the present disclosure, Example 6 provides the method of any one of Examples 2-5, wherein the method further includes:
[0207] A first intermediate result is generated according to the first tuple slice, a first arithmetic slice of the first data held by the first party, and a first Boolean slice of the second data held by the first party.
[0208] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein the method further includes:
[0209] Obtaining a second intermediate result generated by the second party, wherein the second intermediate result is generated based on the second tuple slice, a second arithmetic slice of the first data held by the second party, and a second Boolean slice of the second data held by the second party;
[0210] A sum of the first intermediate result and the second intermediate result is determined as a product of the first data and the second data.
[0211] According to one or more embodiments of the present disclosure, Example 8 provides a data tuple generation device for secure computing, the device is applied to a first participant, the first participant is one of two participants in the secure computing, and the device includes:
[0212] A protocol execution module, configured to obtain a first pseudo-random number pair and a second pseudo-random number pair respectively by executing a random oblivious transfer (R-OT) protocol twice with a second participant, wherein the second participant is the other of the two participants;
[0213] A tuple fragmentation generation module is used to generate a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols.
[0214] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-7 when executed by a processing device.
[0215] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.
[0216] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0217] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0218] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A method for generating a data tuple for secure computing, characterized in that: The method is applied to a first participant, the first participant is one of two participants in the secure computation, the secure computation is used for the two participants to collaboratively compute the product of first data and second data, the first data is in an arithmetic sharing form between the two participants, and the second data is in a Boolean sharing form between the two participants, the method comprises: By executing the random oblivious transfer (R-OT) protocol twice with the second party, respectively obtaining a first pseudo-random number pair and a second pseudo-random number pair, wherein the second party is the other of the two parties; Based on the first pseudo-random number pair and the second pseudo-random number pair, generate a first tuple fragment of a data tuple for secure computing, wherein the data tuple includes the first tuple fragment and the second tuple fragment, and the second tuple fragment is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained by the second participant when executing the two R-OT protocols; Among them, the first pseudo-random number pair includes a first pseudo-random number b0 and a second pseudo-random number u0, the second pseudo-random number pair includes a third pseudo-random number a0 and a fourth pseudo-random number v0, the third pseudo-random number pair includes a fifth pseudo-random number a1 and a sixth pseudo-random number u1, and the fourth pseudo-random number pair includes a seventh pseudo-random number b1 and an eighth pseudo-random number v1, wherein the first pseudo-random number pair and the third pseudo-random number pair are obtained by executing the R-OT protocol once, and the second pseudo-random number pair and the fourth pseudo-random number pair are obtained by executing the R-OT protocol another time, f(b0,a1)=u0+u1, f(b1,a0)=v0+v1, if b=1, then f(b,a)=a, if b=0, then f(b,a)=0, b0, b1 and b belong to the modulo 2 space, a, u0, a0, v0, a1, u1 and v1 all belong to the Nth power space of modulo 2.
2. The method according to claim 1, characterized in that The step of generating a first tuple fragment of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair comprises: Determine a first value according to the first pseudo-random number and the third pseudo-random number; Determine a second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value; A first tuple fragment of a data tuple for secure computing is generated using the first pseudo-random number, the first numerical value, and the second numerical value as elements.
3. The method according to claim 2, characterized in that The determining a second value according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value comprises: The second value is determined by the following formula according to the first pseudo-random number, the second pseudo-random number, the fourth pseudo-random number and the first value: Wherein, y0 is the second value; is the first value.
4. The method according to claim 2, characterized in that: The step of determining a first value according to the first pseudo-random number and the third pseudo-random number includes: If the first pseudo-random number is 0, the third pseudo-random number is determined to be the first value; If the first pseudo-random number is 1, the opposite number of the third pseudo-random number is determined as the first value.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: A first intermediate result is generated according to the first tuple slice, a first arithmetic slice of the first data held by the first party, and a first Boolean slice of the second data held by the first party.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining a second intermediate result generated by the second party, wherein the second intermediate result is generated based on the second tuple slice, a second arithmetic slice of the first data held by the second party, and a second Boolean slice of the second data held by the second party; A sum of the first intermediate result and the second intermediate result is determined as a product of the first data and the second data.
7. A data tuple generation device for secure computing, characterized in that: The device is applied to a first participant, the first participant is one of two participants in the secure computation, the secure computation is used for the two participants to collaboratively compute the product of first data and second data, the first data is in an arithmetic sharing form between the two participants, and the second data is in a Boolean sharing form between the two participants, the device comprises: A protocol execution module, configured to obtain a first pseudo-random number pair and a second pseudo-random number pair respectively by executing a random oblivious transfer (R-OT) protocol twice with a second participant, wherein the second participant is the other of the two participants; a tuple fragmentation generation module, configured to generate a first tuple fragmentation of a data tuple for secure computing based on the first pseudo-random number pair and the second pseudo-random number pair, wherein the data tuple includes the first tuple fragmentation and the second tuple fragmentation, and the second tuple fragmentation is generated by the second participant based on a third pseudo-random number pair and a fourth pseudo-random number pair, and the third pseudo-random number pair and the fourth pseudo-random number pair are respectively obtained when the second participant executes the two R-OT protocols; Among them, the first pseudo-random number pair includes a first pseudo-random number b0 and a second pseudo-random number u0, the second pseudo-random number pair includes a third pseudo-random number a0 and a fourth pseudo-random number v0, the third pseudo-random number pair includes a fifth pseudo-random number a1 and a sixth pseudo-random number u1, and the fourth pseudo-random number pair includes a seventh pseudo-random number b1 and an eighth pseudo-random number v1, wherein the first pseudo-random number pair and the third pseudo-random number pair are obtained by executing the R-OT protocol once, and the second pseudo-random number pair and the fourth pseudo-random number pair are obtained by executing the R-OT protocol another time, f(b0,a1)=u0+u1, f(b1,a0)=v0+v1, if b=1, then f(b,a)=a, if b=0, then f(b,a)=0, b0, b1 and b belong to the modulo 2 space, a, u0, a0, v0, a1, u1 and v1 all belong to the Nth power space of modulo 2.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-party joint data processing method and device using trusted third party
CN112800479A
Secure multi-party multiplication method and device, equipment, medium and product
CN115982747A
Cited By
Method, apparatus, medium and device for generating data tuple for secure computation
US12755043B2
