Multiplication calculation method, device and storage medium in SPDZ series protocols
Patent Information
- Application Number
- CN201911067155.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-04
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2039-11-04
AI Technical Summary
在SPDZ系列协议中,乘法运算规则是定义在两个私有数据之间,这就导致SPDZ系列协议在计算d次乘法时需要迭代调用d-1次乘法计算,这时通信复杂度O(2d),各方的本地计算复杂度为O(3d),从而导致计算效率难以提高
[0035]Those skilled in the art will understand that the objectives and advantages that can be achieved with the present invention are not limited to the specific description above, and the above and other objectives that can be achieved with the present invention will be more clearly understood from the following detailed description.
Smart Images

Figure CN112784315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a multiplication calculation method, device and storage medium in an SPDZ series protocol. Background Art
[0002] The general concept of secure multi-party computation (MPC) is to use n participants P1, P2, ..., P i , ...P n Between them, collaboratively compute a public function f(x1, x2, ..., x i ,...x n ), where x i YesP i This technology has very important applications in the fields of cloud, big data and artificial intelligence. The current research on MPC protocols shows that its security and performance have met the preliminary requirements of industrial products. Among them, the SPDZ series of protocols is one of the famous MPC protocols for arithmetic circuits, including SPDZ, MASCOT, SPDZ2k, etc.
[0003] For MPC protocols for arithmetic circuits, the supported f functions are those related to x1, x2, ..., x i ..., x n Therefore, the main part of MPC protocol design is to define the addition and multiplication rules on the data structure that protects private data. The same is true for the SPDZ series of protocols. In the SPDZ series of protocols, the multiplication rules are defined between two private data, which means that when the SPDZ series of protocols calculates d multiplications, it needs to iteratively call d-1 multiplication calculations. At this time, the communication complexity is O(2 d ), the local computational complexity of each party is O(3 d ), which makes it difficult to improve the computational efficiency.
[0004] How to reduce the complexity of local computations of each party in secure multi-party computation and thus improve efficiency is a problem to be solved. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a multiplication calculation method in an SPDZ series protocol to eliminate or improve one or more defects in the prior art.
[0006] The technical solution of the present invention is as follows:
[0007] According to one aspect of the present invention, a multiplication calculation method in an SPDZ series protocol is provided, the method comprising a preprocessing step and an online calculation step:
[0008] The preprocessing step includes: generating a plurality of multiplication tuples with different numbers of elements for different times of multiple multiplications, wherein the multiplication tuples include a multiplication 3-tuple for 2 multiplications and an extended multiplication tuple for more than 3 multiplications, wherein for the extended multiplication tuple for d multiplications, the elements contained in the extended multiplication tuple include d basic elements and L extended elements, wherein d is an integer and d≥3,
[0009] The generation process of the extended multiplication tuple for d multiplications includes:
[0010] Basic element generation step: randomly select d random numbers as d basic elements, where d ≥ 3;
[0011] The first-level extended element generation step takes two elements from the d basic elements as input, generating a total of level 1 extension elements associated with the respective input element;
[0012] Level l expansion element generation step, based on the generated elements as input to generate l-level expansion elements associated with their respective input elements, where 2≤l≤d-1;
[0013] The online calculation step includes: selecting a multiplication tuple that matches the number of multiplications currently to be performed online, and the participant performs the calculation of the multiple multiplications locally based on the selected multiplication tuple.
[0014] In some embodiments of the present invention, when d=3, the step of generating the level 1 extension element includes: selecting the The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation A level 2 expansion element.
[0015] In some embodiments of the present invention, when d>3, the step of generating the level 1 extension element includes: selecting the The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation 2-level extension elements; respectively, the generated l-1-level extension elements and the l-2-level extension elements other than the extension elements associated with the l-1-level extension elements are used as input, through Π Triple Module Generation A level l extension element.
[0016] In some embodiments of the present invention, the step of each participant performing multiple multiplication calculations locally based on the selected multiplication tuple includes: each participant locally calculates [x1-first basic element], ..., [x l -lth basis element], ..., [x d -dth basic element], and accordingly discloses [s1]=[x1-first basic element], [s l ]=[x l - lth basis element], ..., [s d ]=[x d -dth basis element], where x l represents the lth term in multiple multiplications, s l Represents the ciphertext value corresponding to the lth item; decomposes multiple multiplications into linear operations of ciphertext values and multiplication tuples, thereby obtaining the results of multiple multiplications.
[0017] In some embodiments of the present invention, for the case where d=3, the online calculation step includes:
[0018] Each participant P i Compute locally and make it public
[0019] Each participant P i Compute locally and make it public
[0020] Each participant P i Compute locally and make it public
[0021] Each participant P i Compute locally:
[0022] Among them, a (i) , b (i) 、c (i) A shard of the base element; It is a fragment of the level 1 extension element; is a shard of a level 2 extended element; i = 1, 2, ..., n; n is the number of participants; They are the shards of x1, x2, and x3 respectively; They are s1, s2, and s3 shards respectively.
[0023] In some embodiments of the present invention, for the case where d=4, the online calculation step includes:
[0024] Each participant P i Compute locally and make it public
[0025] Each participant P i Compute locally and make it public
[0026] Each participant P i Compute locally and make it public
[0027] Each participant P i Compute locally and make it public
[0028] Each participant calculates locally:
[0029] Among them, a (i) , b (i) 、c (i) d (i) A shard of the base element; It is a fragment of the level 1 extension element; It is a fragment of the level 2 extended element; is a shard of level 3 extended elements; i = 1, 2, ..., n; n is the number of participants; The shards are x1, x2, x3, and x4 respectively; They are s1, s2, s3, and s4 shards respectively.
[0030] In some embodiments of the present invention, the method further includes the data calculation initiator obtaining multiple multiplication results based on the slices calculated by each participant.
[0031] In some embodiments of the present invention, the multiplication tuple is obtained by each participant by calling UI Triple Module and by Π Triple Module generated.
[0032] In another aspect of the present invention, a multiplication calculation device in an SPDZ series protocol is provided, the device comprising a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and the device implementing the steps of the method described above when the computer instructions are executed by the processor.
[0033] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method described above are implemented.
[0034] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically pointed out in the written description, claims, and drawings.
[0035] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. The components in the drawings are not drawn to scale, but are only for illustrating the principles of the present invention. In order to facilitate the illustration and description of some parts of the present invention, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present invention. In the drawings:
[0037] Figure 1 The flowchart of the multiplication calculation method in the SPDZ series protocol according to an embodiment of the present invention.
[0038] Figure 2 This is a flow chart of generating multiplication multi-component slices according to the number d of multiple multiplications to be calculated by each participant in another embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0040] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0041] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0042] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0043] In the prior art, in order to efficiently and securely complete the function of multi-party collaborative computing, the existing SPDZ series of protocols include two stages: a preprocessing stage and an online stage. The preprocessing stage is independent of the function to be calculated and its input, and prepares data materials for the calculation of the online stage so that the online stage can quickly complete the collaborative function calculation. The preprocessing stage of the SPDZ series of protocols can be implemented through an oblivious transfer protocol or homomorphic encryption, which will not be described in detail here.
[0044] Taking the SPDZ series protocol version against semi-honest adversaries as an example, in order to protect private data The data is not leaked to other parties except the data owner. The SPDZ series of protocols adopts a data structure based on an additive secret sharing scheme:
[0045] [x]=(x (1) , ..., x (i) , ..., x (n) ).
[0046] The brackets "[]" indicate that the elements in the brackets are based on the data sharding structure of addition over a finite field. i Holds random data shard x (i) , in a finite field Upper x=Σ i x (i) (1≤i≤n), n is the number of participants.
[0047] Obviously, it is easy to calculate addition on this data structure: [x+y] = [x] + [y]. However, multiplication is more complicated, and calculating [x·y] requires the assistance of Beaver triples. A Beaver triple refers to ([a], [b], [c]) generated by all parties, where a and b are random numbers, and c satisfies: c = a·b. Participant P i Shard a with [a], [b], [c] (i) , b (i) , c (i) Most of the work in the existing preprocessing stage is to generate a large number of Beaver multiplication triplets (referred to as Beaver triplets or triplets) to meet the needs of secure multiplication calculation in the online stage. In the SPDZ series of protocols, the module for generating Beaver triplets in the preprocessing stage is Π Triple, implemented through an oblivious transfer protocol or homomorphic encryption algorithm. When the Beaver triple ([a], [b], [c]) is successfully generated, the rule for calculating [x·y] is as follows:
[0048] 1) Multiple parties calculate [xa] locally and publish the ciphertext s = xa (each party broadcasts a fragment of the ciphertext s). Although the value of s depends on the private data x, x is hidden by the mask value a, so no information about x is leaked.
[0049] That is, the participant P i Compute x locally (i) -a (i) , and make it public
[0050] 2) Similarly, multiple participants calculate [yb] locally and publicly announce t=yb (each party broadcasts a fragment of t).
[0051] That is, the participant P i Compute y locally (i) -b (i) , and make it public
[0052] 3) Since s and t are public, and each participant P i For the shards holding [a], [b], and [c], the computation of [x·y] performed by these participants can be completed by locally computing [x·y]=s·t+t[a]+s[b]+[c].
[0053] More specifically, each participant P i The shards of [x·y] are calculated. After the calculation is completed, it can be sent to the data demander, such as the calculation initiator, and the initiator obtains [x·y] based on the calculation results of each shard.
[0054] The inventors found that the existing operation rules require multiple iterative calls to multiply when calculating multiple multiplications, which makes the communication and computational complexity of the online stage grow rapidly with the algebraic number of the function to be calculated. When calculating d multiplications, it is necessary to iteratively call (d-1) multiplication calculations. At this time, the communication complexity is O(2 d ), the local computational complexity of each party is O(3 d ), which makes it difficult to further improve the computational efficiency.
[0055] In order to solve the above problems in the prior art, the present invention improves the multiplication operation rules in the SPDZ series of protocols and provides a multiplication operation method for any finite number of private data without loss of generality, that is, multiple multiplications [x1·x2·...·x dThe present invention can use multiplication between any finite number of private data, and by moving the expensive operation in the multiplication operation to the preprocessing stage, the communication complexity of completing d multiplications in the online stage is reduced from O(2 d ) is reduced to d, and the local computational complexity of each party is reduced from O(3 d ) is reduced to O(d2 d ), thereby optimizing the performance of the SPDZ series of protocols in completing secure computing to a great extent. At the same time, the present invention makes very little changes to the SPDZ series of protocols on the basis of achieving performance optimization, so that the cost of executing related changes to the deployed protocols is also very low.
[0056] Figure 1 FIG. 2 is a flow chart of a multiplication calculation method in the SPDZ series protocol according to an embodiment of the present invention. Figure 1 As shown, the method still includes a preprocessing stage S110 and an online calculation stage S120, but the expensive operation in the multiplication operation is moved to the preprocessing stage.
[0057] More specifically, the preprocessing stage or preprocessing step S110 includes: generating a large number of multiplication tuples with different numbers of elements for different times of multiple multiplications. The multiplication tuples include multiplication 3-tuples for 2 multiplications and extended multiplication tuples for more than 3 multiplications.
[0058] Among them, for an extended multiplication tuple used for three or more multiplications (d multiplications, d is an integer and d≥3), the elements it contains include d basic elements and L extended elements, among which, The L extension elements include Level 1 extension elements, Level 2 expansion elements, ..., l-level expansion element, and 1 d-1-level expansion element.
[0059] like Figure 2 As shown, the process of generating a multiplication tuple for d multiplications includes:
[0060] Basic element generation step S210, randomly selecting d random numbers as d basic elements;
[0061] The first-level extended element generation step S220 uses two elements of the d basic elements as inputs to generate a total of level 1 extension elements associated with the respective input element;
[0062] The first-level extended element generation step S230 generates a first-level extended element based on the generated element as input. l-level expansion elements associated with the respective input elements, where 2≤l≤d-1.
[0063] For different l values, the step of generating the l-level extended element is repeated until the d-1-level extended element of the multiplication tuple is generated.
[0064] For example, in the case of d=3, the level 1 extension element generation step S230 may include:
[0065] choose The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation A level 2 expansion element.
[0066] For another example, when d>3, the level 1 extension element generation step S230 may include:
[0067] Select the The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation Level 2 expansion elements;
[0068] The generated level 1-1 extension element and the level 1-2 extension element other than the extension element associated with the level 1-1 extension element are respectively used as input, and the generated level 1-1 extension element and the level 1-2 extension element are respectively used as input, and the level 1-2 extension element and the level 1-1 ... Triple Module Generation A level l extension element.
[0069] Based on a large number of multiplication tuples with different numbers of elements and corresponding to different numbers of multiplications generated in the preprocessing stage, in the linear calculation stage, each participant can select a corresponding multiplication tuple for multiple multiplication calculations.
[0070] Refer to Figure 1 The online calculation stage or online calculation step S120 includes: randomly selecting a multiplication tuple that matches the number of multiplications to be currently calculated online, and the participant performs multiple multiplication calculations locally based on the selected multiplication tuple.
[0071] The step of the participant performing multiple multiplication calculations locally based on the selected multiplication tuple may include:
[0072] (1) Each participant calculates [x1-first basic element] locally, ..., [x l -lth basis element], ..., [x d-dth basic element], and accordingly discloses [s1]=[x1-first basic element], [s l ]=[x l - lth basis element], ..., [s d ]=[x d -dth basis element], where x l represents the lth term in multiple multiplications, s l represents the ciphertext value corresponding to the lth item; and
[0073] (2) Decompose multiple multiplications into linear operations on ciphertext values and multiplication tuples, thereby obtaining the results of the multiple multiplications.
[0074] The present invention is significantly different from the existing preprocessing stage. In the prior art, only Beaver triples ([a], [b], [c]) are generated. When multiple multiplication calculations are performed, the Beaver triples ([a], [b], [c]) are generated multiple times and the multiplication is called multiple times iteratively to complete the calculation, resulting in high complexity. In the embodiment of the present invention, an extension is performed on the basis of the Beaver triples ([a], [b], [c]), that is, a large number of multiplication tuples including d+L elements are generated in the preprocessing stage to prevent multiple iterations in the online stage. That is, in the preprocessing stage, not only Beaver triples for 2 multiplication calculations are generated, but also a large number of multiplication tuples including d+L elements for d multiplication calculations of more than 3 multiplications are generated. The multiplication tuple can also be called an extended Beaver multiplication tuple, or extended multiplication tuple for short. The multiplication tuple in the embodiment of the present invention includes d basic elements and L extended elements generated based on the d basic elements. For each participant, it can be obtained by calling Π Triple Module to generate tuples.
[0075] The following will take d = 3 and d = 4 as examples to give the multiplication method of any finite number of private data, without loss of generality, that is, [x1·x2·...·x d ] calculation process.
[0076] When d = 3, the corresponding tuple is a 7-tuple, namely the extended Beaver 7-tuple, which includes [a], [b], [c], [p ab ],[p bc ],[p ca ],[p abc ], where [a], [b], [c] are the basic elements, [p ab ],[p bc ],[p ca ],[p abc ] is an extension element, that is [pab ],[p bc ],[p ca ] can be called a level 2 extension element, [p abc ] can be called a level 3 extension element. And, wherein the extension element satisfies: ab =a·b,p bc = b·c,p ca =c·a and p abc =a·b·c. In this embodiment, the extended Beaver multiplication group can be called by Triple Module generated.
[0077] The specific process of generating the extended Beaver 7-tuple is as follows:
[0078] 1) Randomly select [a] and [b] as input, and pass Π Triple Generate [p ab ]; At this time, it can be considered that [p ab ] is related to [a] and [b].
[0079] 2) Randomly select [c] and [b] as input, and pass Π Triple Generate [p bc ]; At this time, it can be considered that [p bc ] is related to [b] and [c].
[0080] 3) Input [c], [a], through Π Triple Generate [p ac ]; At this time, it can be considered that [p ac ] is related to [a] and [c].
[0081] 4)[p ab ] and [c] as input, through Π Triple Generate [p abc ], then it can be considered that [p abc ] is the same as [p ab ] and [c] are related.
[0082] When d=3, the calculation operation of [x1·x2·x3] performed in the online calculation step S120 includes:
[0083] (1) Each participant P i Compute locally and make it public
[0084] (2) Each participant P i Compute locally and make it public
[0085] (3) Each participant Pi Compute locally and make it public
[0086] (4) Each participant P i Compute locally:
[0087] Among them, a (i) , b (i) 、c (i) A shard of the base element; It is a fragment of the level 1 extension element; is a shard of a level 2 extended element; i = 1, 2, ..., n; n is the number of participants; They are the shards of x1, x2, and x3 respectively; They are s1, s2, and s3 shards respectively.
[0088] That is, multiple participants perform calculations based on the following calculation rules: [x1·x2·x3]=s1s2s3+s2s3[a]+s3s1[b]+s1s2[c]+s3[p ab ]+s1[p bc ]+s2[p ca ]+[p abc ].
[0089] The data calculation initiator can obtain the calculation result [x1·x2·x3] of the multiplication of three data based on the calculation of each participant.
[0090] For another example, when d=4, the corresponding tuple is a 15-tuple, namely, an extended Beaver 15-tuple, which includes: [a], [b], [c], [d], [p ab ],[p ac ],[p ad ],[p bc ],[p bd ],[p cd ],[p abc ],[p abd ],[p bcd ],[p acd ],[p abcd ], where p jk =j·k, (j, k∈[a, b, c, d]), p jkm =j·k·m, (j, k, m∈[a, b, c, d]) and p abcd =a· b·c·d. [a], [b], [c], [d] can be called basic elements, [p ab ],[p ac ],[pad ],[p bc ],[p bd ],[p cd ],[p abc ],[p abd ],[p bcd ],[p acd ],[p abcd ] can be called an extension element, where [p ab ],[p ac ],[p ad ],[p bc ],[P bd ],[p cd ] is a level 2 extension element, [p abc ],[p abd ],[p bcd ],[p acd ] is a level 3 expansion element, [p abcd ] is a 4-level extended element. Such an extended Beaver multiplication group is also constructed by calling the module Π Triple generate.
[0091] The specific process of generating the extended Beaver 15 tuple is as follows:
[0092] 1) Randomly select [a], [b], [c], [d];
[0093] 2) [a] and [b] are used as input, through Π Triple Generate [p ab ];
[0094] 3) [a] and [c] are used as input, through Π Triple Generate [p ac ];
[0095] 4) [a] and [d] are used as input, through Π Triple Generate [p ad ];
[0096] 5) [b] and [c] are used as input, through Π Triple Generate [p bc ];
[0097] 6) [b] and [d] are used as input, through Π Triple Generate [p bd ];
[0098] 7) [c] and [d] are used as input, through Π Triple Generate [p cd ];
[0099] 8)[p ab] and [c] as input, through Π Triple Generate [p abc ];
[0100] 9)[p ab ] and [d] as input, through Π Triple Generate [p abd ];
[0101] 10)[p bc ] and [d] as input, through Π Triple Generate [p bcd ];
[0102] 11)[p ac ] and [d] as input, through Π Triple Generate [p acd ];
[0103] 12)[p ab ] and [p cd ] as input, through Π Triple Generate [p abcd ].
[0104] When d=4, the calculation operation of [x1·x2·x3·x4] performed in the online calculation step S120 includes:
[0105] (1) Each participant P i Compute locally and make it public
[0106] (2) Each participant P i Compute locally and make it public
[0107] (3) Each participant P i Compute locally and make it public
[0108] (4) Each participant P i Compute locally and make it public
[0109] (5) Each participant calculates locally:
[0110] Among them, a (i) , b (i) 、c (i) d (i) A shard of the base element; It is a fragment of the level 1 extension element; It is a fragment of the level 2 extended element; is a shard of level 3 extended elements; i = 1, 2, ..., n; n is the number of participants; The shards are x1, x2, x3, and x4 respectively; They are s1, s2, s3, and s4 shards respectively.
[0111] That is, multiple participants perform calculations based on the following calculation rules: [x1·x2·x3·x4]=s1s2s3s4+s1s2s3[d]+s1s2s4[c]+s1s3s4[b]+s2s3s4[a]+s1s2[ cd ]+s1s3[p bd ]+s1s4[p bc ]+ s2s3[p ad ]+s2s4[p ac ]+s3s4[p ab ]+s1[p bcd ]+s2[p acd ]+s3[p abd ]+s4[p abc ]+[p abcd ].
[0112] The data calculation initiator can obtain the calculation result [x1·x2·x3·x4] of the multiplication of 4 data based on the calculation of each participant.
[0113] Such operation rules can be easily extended to the case where d>4.
[0114] As described above, the present invention improves the multiplication operation in the SPDZ series of protocols. Based on the special data structure adopted by the SPDZ series of protocols, the high-cost operation is moved to the preprocessing stage, thereby extending the multiplication between two private data in the SPDZ series of protocols to any finite number of private data, which greatly reduces the communication complexity and computational complexity of the multiplication requirements in the online stage. That is, the present invention generates a large number of extended Beaver multiplication tuples in the preprocessing stage. The expression obtained based on the extended Beaver multiplication tuples has 2∧d added monomials, and each monomial has at most d numbers multiplied, thereby reducing the communication complexity of the online stage from O(2 d ) is reduced to d, and the local computational complexity of each party is reduced from O(3 d ) is reduced to O(d2 d ).
[0115] Therefore, the present invention optimizes the performance of the SPDZ series protocols in completing secure computing to a great extent.
[0116] In addition, considering that it takes a lot of work to modify deployed protocols, the longer the protocol is used and the more components are optimized, the more expensive it is to make the modification. The present invention is made after great efforts to find the minimum modification to the deployed protocol to achieve maximum performance optimization or higher security. The present invention makes very small changes to the SPDZ series of protocols on the basis of achieving performance optimization, so that the cost of executing the relevant changes to the deployed protocol is also very small, but it achieves a very beneficial effect of improving performance. That is, the present invention greatly reduces the communication and computational complexity required for secure computing by fine-tuning the SPDZ series of protocols.
[0117] Correspondingly, the present invention also provides a multiplication calculation device in the SPDZ series protocol, which includes a processor and a memory, the memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the method described above.
[0118] In some embodiments of the present disclosure, the multiplication calculation device may include a transceiver unit in addition to a processor and a memory. The transceiver unit may include a receiver and a transmitter. The processor, memory, receiver and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals, thereby realizing the aforementioned method steps.
[0119] The present disclosure also relates to a storage medium, on which computer program code may be stored, and when the program code is executed, various embodiments of the method of the present invention may be implemented. The storage medium may be a tangible storage medium, such as an optical disk, a USB flash drive, a floppy disk, a hard disk, etc.
[0120] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0121] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0122] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0123] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A multiplication calculation method in the SPDZ series protocol, characterized in that: The method includes a preprocessing step and an online calculation step: The preprocessing step includes: generating a plurality of multiplication tuples with different numbers of elements for different times of multiple multiplications, wherein the multiplication tuples include a multiplication 3-tuple for 2 multiplications and an extended multiplication tuple for more than 3 multiplications, and for the extended multiplication tuple for d multiplications, the elements contained in the extended multiplication tuple include d basic elements and L extended elements, wherein d is an integer and d≥3, l=1,…,d-1; The generation process of the extended multiplication tuple for d multiplications includes: Basic element generation step: randomly select d random numbers as d basic elements; The first-level extended element generation step takes two elements from the d basic elements as input, generating a total of level 1 extension elements associated with the respective input element; Level l expansion element generation step, based on the generated elements as input to generate l-level expansion elements associated with their respective input elements, where 2≤l≤d-1; The online calculation step includes: selecting a multiplication tuple that matches the number of multiplications currently to be performed online, and the participant performs the calculation of the multiple multiplications locally based on the selected multiplication tuple.
2. The method according to claim 1, characterized in that In the case of d=3, the step of generating the level 1 extension element includes: Select the The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation A level 2 expansion element.
3. The method according to claim 1, characterized in that In the case of d>3, the step of generating the level 1 extension element includes: Select the The first-level extended element is used as the first input, and the elements in other basic elements other than the input elements associated with the selected extended element are selected as the second input. Triple Module Generation Level 2 expansion elements; The generated level 1-1 extension element and the level 1-2 extension element other than the extension element associated with the level 1-1 extension element are respectively used as input, and the generated level 1-1 extension element and the level 1-2 ... Triple Module Generation A level l extension element.
4. The method according to claim 1, characterized in that: The steps of each participant performing multiple multiplication calculations locally based on the selected multiplication tuple include: Each participant calculates [x1-first basic element], …, [x l -lth basis element],…,[x d -dth basic element], and accordingly discloses [s1]=[x1-first basic element], [s l ]=[x l -lth basic element],…,[s d ]=[x d -dth basis element], where x l represents the lth term in multiple multiplications, s l Indicates the ciphertext value corresponding to the lth item; The multiple multiplications are decomposed into linear operations of ciphertext values and multiplication tuples, thereby obtaining the results of the multiple multiplications.
5. The method according to claim 4, characterized in that For the case of d=3, the online calculation steps include: Each participant P i Compute locally and make it public Each participant P i Compute locally and make it public Each participant P i Compute locally and make it public Each participant P i Compute locally: Among them, a (i) 、b (i) 、c (i) A shard of the base element; It is a fragment of the level 1 extension element; is a shard of a level 2 extended element; i = 1, 2, ..., n; n is the number of participants; They are the shards of x1, x2, and x3 respectively; They are s1, s2, and s3 shards respectively.
6. The method according to claim 4, characterized in that For the case of d=4, the online calculation steps include: Each participant P i Compute locally and make it public Each participant P i Compute locally and make it public Each participant P i Compute locally and make it public Each participant P i Compute locally and make it public Each participant calculates locally: Among them, a (i) 、b (i) 、c (i) d (i) A shard of the base element; It is a fragment of the level 1 extension element; It is a fragment of the level 2 extended element; is a shard of level 3 extended elements; i = 1, 2, ..., n; n is the number of participants; The shards are x1, x2, x3, and x4 respectively; They are s1, s2, s3, and s4 shards respectively.
7. The method according to claim 5 or 6, characterized in that: The method also includes the data calculation initiator obtaining multiple multiplication calculation results based on the slices calculated by each participant.
8. The method according to claim 1, characterized in that The multiplication tuple is obtained by each participant calling Π Triple Module and by Π Triple Module generated.
9. A multiplication calculation device in the SPDZ series protocol, the device comprising a processor and a memory, characterized in that: The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of any one of the methods described in claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
