Multi-party security computing method supporting threshold, logic circuit and computing device

Through secret sharing algorithms and homomorphic encryption to construct (t,n) threshold sharding of private data, the problem of threshold access control of multi-party security computing solutions in the existing technology under untrusted center nodes is solved, and the flexibility of multi-party computing is realized and safety, ensuring that at least t+1 participants can perform any calculation.

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

Patent Information

Application Number
CN202411039987.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing multi-party security computing solution is difficult to support flexible access control policies, especially threshold access control, and most solutions can only implement n-out-of-n policies and cannot meet the requirements of the new ones. Complex multi-party computing requirements.

Method used

Using a method based on secret sharing algorithm and homomorphic encryption, a (t, n) threshold form of private data is constructed, so that at least t+1 of the n participants can perform any multi-party operations to achieve the threshold. multi-party security calculations.

Benefits of technology

It realizes multi-party security calculations that support thresholds in the case of no trusted center nodes, improves the flexibility and security of multi-party computing, so that at least t+1 participants can perform arbitrary multi-party operations, enhancing the security of the algorithm sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972037A_ABST
    Figure CN118972037A_ABST
Patent Text Reader

Abstract

A multi-party security computing method supporting a threshold, a logic circuit and a computing device, the method being executed by n participants, each participant having a homomorphic ciphertext of first target data, the method comprising: each participant obtaining a threshold fragment of auxiliary data; the first participant in the n participants obtains the homomorphic ciphertext of the auxiliary data, and adds the homomorphic ciphertext of the first target data and the homomorphic ciphertext of the auxiliary data based on homomorphic addition to obtain an intermediate ciphertext; decrypting the intermediate ciphertext by using a distributed decryption algorithm to obtain first intermediate data; generating n threshold fragments of the first intermediate data based on a secret sharing algorithm, and respectively sending n-1 threshold fragments to other n-1 participants; and each participant subtracts the threshold fragment of the auxiliary data from the threshold fragment of the first intermediate data corresponding to the participant to obtain the threshold fragment of the first target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification belong to the technical field of cryptography, and in particular, relate to a threshold-supporting multi-party secure computing method, logic circuit, and computing device. Background Art

[0002] In the current multi-party secure computation scheme, multiple participants P1,…,P n without leaking their respective private inputs x1,…,x n Under the premise of jointly calculating (y1,…,y n )=f(x1,…,x n ), and obtain their own private outputs y1,…,y n Multi-party secure computing protocols have been widely used in privacy computing scenarios such as blockchain, distributed signatures, and distributed machine learning.

[0003] For example, in the blockchain scenario, the private key represents the identity of a participant, which can only be held by a specific user and cannot be made public. Using a private key to sign means that the private key owner recognizes a certain behavior in the digital world, so the security and privacy of the private key are the key and core of the construction of the digital world. In some cases, accounts on the blockchain require flexible access control strategies, that is, the private key information corresponding to a public key is jointly generated by n independent participants, and each private key calculation requires the consent of at least t participants, thereby improving the security of the algorithm. This type of distributed authentication can generally be divided into two categories: those that require a trusted center and those that do not. When a trusted center exists, secret distribution can be easily achieved, reducing the amount of communication and calculation between group members; but a trusted center trusted by all members of the group does not always exist. At this time, group members need to jointly share secrets, that is, there is no trusted center solution.

[0004] In scenarios where there is no trusted central node, multi-party secure computing can play a role, but most multi-party secure computing can only support the following access control strategy (referred to as n-out-of-n strategy): n participants have private data (or a shard of a private key), and n participants jointly perform multi-party computing, such as signing, decryption, and other operations, using private data as input without leaking their own private data. Summary of the invention

[0005] The purpose of the present invention is to provide a threshold-supporting multi-party secure computing method.

[0006] A first aspect of the present specification provides a threshold-supported multi-party secure computing method, which is performed by n participants, each of which has a homomorphic ciphertext of first target data, and the method includes:

[0007] Each participant obtains the threshold sharding of auxiliary data;

[0008] The first party among the n parties obtains the homomorphic ciphertext of the auxiliary data, adds the homomorphic ciphertext of the first target data and the homomorphic ciphertext of the auxiliary data based on homomorphic addition to obtain an intermediate ciphertext; decrypts the intermediate ciphertext using a distributed decryption algorithm to obtain first intermediate data; generates n threshold fragments of the first intermediate data based on a secret sharing algorithm, and sends n-1 threshold fragments of the first intermediate data to the other n-1 parties respectively;

[0009] Each participant subtracts the threshold slice of the auxiliary data from the threshold slice of the first intermediate data corresponding to itself to obtain the threshold slice of the first target data.

[0010] A second aspect of the specification provides a logic circuit, which implements the method described in the first aspect when running.

[0011] A third aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.

[0012] A fourth aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method described in the first aspect.

[0013] The fifth aspect of this specification provides a computer program product, including a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.

[0014] The solution in the embodiments of this specification is based on a secret sharing algorithm and homomorphic encryption, and constructs (t,n) threshold-based sharding of private data, so that multiplication operations in multi-party secure computing that supports thresholds can be performed, so that at least t+1 of the n participants can perform arbitrary multi-party operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0016] Figure 1 A schematic diagram of a multi-party secure computation based on a first algorithm in an embodiment of this specification;

[0017] Figure 2 A flow chart of a method for generating threshold sharding of data and homomorphic ciphertext thereof in an embodiment of this specification;

[0018] Figure 3 This is a flow chart of a method for threshold sharding based on homomorphic ciphertext to generate data in an embodiment of this specification;

[0019] Figure 4 A schematic diagram of a multi-party secure computation based on the second algorithm in an embodiment of this specification;

[0020] Figure 5 This is a method flow chart of the online phase of multi-party secure computing in an embodiment of this specification. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0022] Compared with the existing multi-party secure computing described above, the scheme in the embodiments of this specification constructs (t,n) threshold-based sharding of private data based on a secret sharing algorithm and homomorphic encryption, thereby enabling multiplication operations in multi-party secure computing that supports thresholds, so that at least t+1 of the n participants can perform arbitrary multi-party operations.

[0023] In order to clearly illustrate the solution of multi-party secure computing supporting thresholds provided by the embodiments of this specification, the following first introduces the relevant algorithms involved in the embodiments of this specification.

[0024] The DKG (Distributed Key Generation) protocol is a distributed protocol that generates a set of keys through collaboration among multiple parties participating in the protocol. The VSS (Verifiable Secret Sharing) protocol is an important theoretical basis for the DKG protocol.

[0025] VSS means that when a secret data is shared between multiple parties, the secret data can be split into multiple pieces without leaking the secret data itself, and each party can keep a piece. Later, when the secret data needs to be restored, all the pieces need to be collected to successfully restore the complete secret data.

[0026] The VSS protocol was first proposed by Shamir in 1979. It is a polynomial-based secret sharing protocol. The VSS protocol was developed from Shamir's Secret Sharing (SSS), so Shamir's Secret Sharing is introduced first.

[0027] Shamir secret sharing includes two stages: secret sharing (or secret distribution) and secret reconstruction. First, a Dealer needs to construct a polynomial:

[0028] f(x)=a0+a1x+a2x 2 +…+a n x n Polynomial(*)

[0029] Among them, a0 is the secret data to be shared.

[0030] This n-degree polynomial consists of a set of coefficients (a0, a1, a2, ..., a n ) is uniquely determined, and this set of coefficients includes n+1 values. In this way, if it is known that the curve corresponding to the n-degree polynomial passes through n+1 different points on the plane, the coordinates of n+1 different points are obtained (x1, y1), (x2, y2), …, (x n ,y n ),(x n+1 ,y n+1 ), we can get a system of (n+1)-variable linear equations of n+1 equations, and from this system of equations we can determine the n+1 coefficients a0, a1, a2, ..., a n The value of the polynomial (*) is determined, and finally the value of the secret data a0 is obtained. The coordinates of the n+1 different points (x1, y1), (x2, y2),…, (x n ,y n ),(x n+1 ,y n+1 ) means n+1 secret shards.

[0031] The process of finding a curve that passes through a number of existing points is called polynomial interpolation. There are many ways to implement polynomial interpolation. The following is a common Lagrange interpolation method. Given an n-degree polynomial*, it is known that the corresponding curve of the polynomial passes through n+1 points on the plane (x1, y1), (x2, y2),…, (x n ,y n ),(x n+1 ,y n+1 ), then the polynomial of the n-th order curve can be obtained by Lagrange interpolation method as follows:

[0032]

[0033] Polynomial (**) and polynomial (*) are actually equivalent. If x=0 in polynomial (*), then f(0)=a0, which means the value of secret data a0 can be obtained. Therefore, if x=0 in polynomial (**), the value of secret data a0 can also be obtained, that is, f(0)=a0.

[0034] For n+1 points (x1,y1),…,(x n ,y n ),(x n+1 ,y n+1 ), the above polynomial (**) can also be expressed as:

[0035]

[0036] in, Similarly, for constant terms or secret values, we have

[0037] In summary, we can select any n+1 points on the polynomial and share these n+1 points among n+1 participants, for example, each participant obtains the coordinates of one point. The original secret data a0 cannot be inferred by collecting the coordinates of any points less than n+1. Only after obtaining all n+1 points can the value of the secret data a0 be restored by reconstructing the polynomial coefficients. In addition, even if we collect the coordinates of any points less than n+1, for example, the coordinates of n points, since there are countless n-order curves passing through these n points, the value of the secret data a0 will not be leaked in terms of probability. The degree n here is also called the degree of the polynomial.

[0038] On this basis, threshold Shamir secret sharing can be implemented. For example, t-of-n secret sharing is to share secrets among n participants, and stipulate that the threshold of the minimum number of secret shards required for recovery is greater than t, that is, greater than or equal to t+1. For example, in a transaction involving 4 parties, the agreed threshold is 3, that is, n=4, t=2, then the secret can only be restored when greater than or equal to t+1=3 participants provide their own secret shards, otherwise the secret cannot be restored. Specifically, a polynomial of degree t=2 can be constructed:

[0039] f(x)=a0+a1x+a2x 2 Polynomial(***)

[0040] It can be obtained that the curve corresponding to the 2-degree polynomial passes through 4 different points on the plane, that is, the coordinates of 4 different points are obtained (x1, y1), (x2, y2), (x3, y3), (x4, y4), and the coordinates of the 4 points are distributed to a participant respectively in the secret sharing stage. The 4 participants are set as Party1, Party2, Party3, and Party4. In this way, it is assumed that Party1 has a slice (x1, y1), Party2 has a slice (x2, y2), Party3 has a slice (x3, y3), and Party4 has a slice (x4, y4). Since the polynomial (**) can be determined by any 3 points on the corresponding curve, therefore, Party i In (i∈{1,2,3,4}), when any three participants provide their own secret slices, the polynomial (***) can be restored in the secret reconstruction phase, and the secret value a0 can be obtained. When any less than three participants provide their own secret slices, the polynomial (***) cannot be restored, and the secret value a0 cannot be obtained. The above t is also called the threshold.

[0041] In 1999, Rabin et al. proposed an improved protocol called Joint-Feldman. The basic idea of ​​this protocol is to execute n Feldman VSS protocols in parallel, in which each participant generates a random polynomial locally and then shares the randomly selected secret value among all participants. Since what is shared is a commitment to a secret rather than the secret itself, the secret cannot be recovered as long as there is no collusion and cheating by multiple people exceeding the threshold t. Such a distributed VSS protocol is also called the DVSS protocol (Distributed VSS).

[0042] Specifically, taking 4 participants as an example, assuming that the threshold is t=2, then the degree of the polynomial is also t=2, and the decentralized threshold secret sharing, that is, the implementation of Joint-Feldman, includes the following:

[0043] Each P i (Party i Abbreviated as P i , i∈{1,2,3,4}) sets the secret s to be shared i0 , and randomly choose other parameters to generate a t-1 degree polynomial:

[0044] Participant P1 generates a 2nd degree polynomial:

[0045] f1(z)=a 10 +a 11 z+a 12 z 2 , where a 10 It is the secret s1 set by P1;

[0046] Participant P2 generates a 2nd degree polynomial:

[0047] f2(z)=a 20 +a 21 z+a 22 z 2 , where a 20 is the secret s2 set by P2;

[0048] Participant P3 generates a 2nd degree polynomial:

[0049] f3(z)=a 30 +a 31 z+a 32 z 2 , where a 30 It is the secret s3 set by P3;

[0050] Participant P4 generates a 2nd degree polynomial:

[0051] f4(z)=a 40 +a 41 z+a 42 z 2 , where a 40 It is the secret s4 set by P4.

[0052] Next, each participant P i Generate n values ​​on the curve corresponding to its own t-degree polynomial and distribute them. Here we still assume n=4, t=2, n=1,2,3,4, then:

[0053] Participant P1 generates s 11 =f1(1),s 12 =f1(2),s 13 =f1(3),s 14 =f1(4), keep s 11 , and encrypt and send s 12 To P2, encrypt and send s 13 To P3, encrypt and send 14 To P4;

[0054] Participant P2 generates s 21 =f2(1),s 22 =f2(2),s 23 =f2(3),s 24 =f2(4), keep s 22 , and encrypt and send s 21 To P1, encrypt and send s 23 To P3, encrypt and send 24 To P4;

[0055] Participant P3 generates 31 =f3(1),s 32 =f3(2),s 33 =f3(3),s 34 =f3(4), keep s 33 , and encrypt and send s 31 To P1, encrypt and send s 32 To P2, encrypt and send s 34 To P4;

[0056] Participant P4 generates 41 =f4(1),s 42 =f4(2),s 43 =f4(3),s 44 =f4(4), keep s 44 , and encrypt and send s 41 To P1, encrypt and send s 42 To P2, encrypt and send s 43 To P3.

[0057] In addition, each participant P i You can also generate the public verification parameter A corresponding to your own t-1 degree polynomial ik =g aik , where k = 0, 1, ..., t, and announced to each participant, specifically:

[0058] Participant P1 generates include Broadcast 10 ,A 11 ,A 12} to P2, P3 and P4;

[0059] Participant P2 generates include Broadcast 20 ,A 21 ,A 22} to P1, P3 and P4;

[0060] Participant P3 generation include Broadcast 30 ,A 31 ,A 32} to P1, P2 and P4;

[0061] Participant P4 generation include Broadcast 40 ,A 41 ,A 42} to P1, P2 and P3.

[0062] In this way, P1 receives s 21 After that, you can use {A 20 ,A 21 ,A 22} to verify; P1 receives s 31 After that, you can use {A 30 ,A 31 ,A 32} to verify; P1 receives s 41 After that, you can use {A 40 ,A 41 ,A 42} for verification; the verification method is similar to the above and will not be repeated here.

[0063] then:

[0064] Participant P1 can calculate the secret share s1 as: s1 = s 11 +s 21 +s 31 +s 41 ;

[0065] Participant P2 can calculate the secret share s2 as: s2 = s 12 +s 22 +s 32 +s 42 ;

[0066] Participant P3 can calculate the secret share s3 as: s3 = s 13 +s 23 +s 33 +s 43 ;

[0067] Participant P4 can calculate the secret share s4 as: s4 = s 14 +s 24 +s 34 +s 44 ;

[0068] Each participant P i can use the secret share s calculated by itself i Broadcast to other participants. Then each participant P i After collecting at least t+1 secret shares from {s1, s2, s3, s4}, the secret s0 can be reconstructed. Here, for t=2, each participant P i After collecting at least t+1=2+1=3 secret shares, the secret s0 can also be reconstructed.

[0069] This is because the sum of the curves of each participant can be summed up to get the total curve:

[0070] f(z) = f1(z) + f2(z) + f3(z) + f4(z)

[0071] f(z) = (a 10 + a 11 z + a 12 z 2 ) + (a 20 + a 21 z + a 22 z 2 ) + (a 30 + a 31 z + a 32 z 2 )

[0072] + (a 40 + a 41 z + a 42 z 2 )

[0073] f(z) = (a 10 + a 20 + a 30 + a 40 ) + (a 11 + a 21 + a 31 + a 41 )z + (a 12 + a 22 + a 32 + a 42 )z 2

[0074] Polynomial (Ⅰ)

[0075] As follows:

[0076] s1 = s 11 + s 21 + s 31 + s 41 = f1(1) + f2(1) + f3(1) + f4(1);

[0077] s2 = s 12 + s 22 + s 32 + s 42 = f1(2) + f2(2) + f3(2) + f4(2);

[0078] s3 = s 13 + s 23 + s 33 + s 43 = f1(3) + f2(3) + f3(3) + f4(3);

[0079] s4=s 14 +s 24 +s 34 +s 44 =f1(4)+f2(4)+f3(4)+f4(4);

[0080] For the total curve f(z), there is a relationship:

[0081] s1=f1(1)+f2(1)+f3(1)+f4(1)=f(1);

[0082] s2=f1(2)+f2(2)+f3(2)+f4(2)=f(2);

[0083] s3=f1(3)+f2(3)+f3(3)+f4(3)=f(3);

[0084] s4=f1(4)+f2(4)+f3(4)+f4(4)=f(4);

[0085] The secret is s0=a 10 +a 20 +a 30 +a 40 .

[0086] In this way, any participant P i After collecting at least three of the secret shares s1, s2, s3, and s4, it is equivalent to obtaining at least three points on the curve corresponding to polynomial (I), that is, obtaining at least three of the four coordinates (x1=1, y1=s1), (x2=2, y2=s2), (x3=3, y3=s3), and (x4=4, y4=s4), so that the total curve f(z) can be restored. Furthermore, f(0)=a can be calculated. 10 +a 20 +a 30 +a 40 =s0, so the secret s0 can be obtained.

[0087] Among them, according to the above Lagrange interpolation method, we can get: S includes at least t+1 participants out of the n participants.

[0088] Furthermore, by verifying the parameter {A 10 ,A 11 ,A 12}, {A 20 ,A 21 ,A 22}, {A 30 ,A 31 ,A 32}, {A 40 ,A 41,A 42} can also be used for secrets i The legitimacy of (0,s i ) is a point on the total curve. Specifically, the legality is determined by verifying whether the following equation holds:

[0089]

[0090] This is because the following relationship exists:

[0091]

[0092] Usually, the right side of the polynomial (II) is assumed to be the public key share, denoted as pub i ,i=1,2,…,n, to verify the corresponding private key share.

[0093]

[0094] As mentioned above, we can generally take x i =i for each i=1,2,…,n. In this way, i can be used as the number of each participant.

[0095] For the verification of secret s0, that is, x i =0, the above formula can be further deduced as follows:

[0096]

[0097] It can be seen that based on the polynomial (III), the legitimacy of s0 can be verified.

[0098] Moreover, based on the derivation of the above polynomial (III), the verification of the legitimacy of s0 can be further simplified as:

[0099]

[0100] It is also common to assume that the right side of the equal sign of polynomial (Ⅳ) is the total public key, denoted as pub.

[0101] The following will describe the threshold-supported multi-party computing method in the embodiments of this specification with reference to the accompanying drawings.

[0102] Figure 1 Schematic diagram of multi-party secure computing based on the first algorithm in the embodiment of this specification. Figure 1 In the multi-party secure computation process shown in the figure, n participants ( Figure 1 The three participants P1, P2 and P3 are shown in FIG. 1 . Based on the first algorithm in the embodiment of this specification, data can be obtained respectively. Shard data Shard as well as The ciphertext and The ciphertext The ciphertext and

[0103] Ciphertext Corresponding to the same homomorphic encrypted public key. and Sharding is the threshold sharding obtained based on the decentralized threshold secret sharing algorithm. For example, data Through n shards At least t+1 fragments in are calculated, where yes The Lagrangian coefficient of S includes at least t+1 participants out of the n participants.

[0104] Each party based on the ciphertext and ciphertext Computable ciphertext Among them yes and The product of Afterwards, n participants use the following text provided by the embodiments of this specification: Figure 3 The algorithm shown can be based on Calculate the data Threshold fragmentation At least t+1 of the N participants can share the same threshold sharding calculate The value of

[0105] Through this first algorithm, each participant can obtain data separately and without leaking data and So that the data and In the case of private data (such as a secret key), the algorithm can be used to calculate the data and The product of

[0106] The following is referenced Figure 2 and Figure 3 The process description is as follows Figure 1 The multi-party computation method shown.

[0107] Figure 2 This is a flow chart of a method for generating threshold sharding of data and homomorphic ciphertext thereof in an embodiment of this specification.

[0108] like Figure 2 As shown, in step S201, each participant P i Generate random data Random Data Homomorphic ciphertext and homomorphic ciphertext

[0109] Refer to the decentralized threshold secret sharing algorithm described above, which is the implementation of Joint-Feldman. and It is equivalent to the secret a set by each participant to be shared. i0 The secrets of each party i0 The sum is the secret value set by n participants. Right now

[0110] In the embodiments of the present specification, the data used for multi-party secure computing may be a single value (the value may be, for example, a real number, an integer, etc.) or a vector.

[0111] When the data is a single value, the value can be homomorphically encrypted using a partially homomorphic encryption algorithm, such as the Paillier algorithm and the CL algorithm.

[0112] Paillier homomorphic addition is a public key encryption system widely used in cryptography, proposed by Pascal Paillier in 1999. Its main feature is that it has additive homomorphic properties, which means that given two ciphertexts, the ciphertext of the sum of their corresponding plaintexts can be calculated without decryption. Specifically, suppose there are two plaintexts m1 and m2, and their Paillier encrypted ciphertexts are c1 and c2 respectively. Paillier's additive homomorphic property can realize the calculation of the product of c1 and c2 to obtain a new ciphertext c, which is exactly the ciphertext of the sum of m1 and m2. This homomorphic property can complete some forms of calculation on encrypted data without leaking the original data.

[0113] Specifically, in the Paillier algorithm, in the key generation phase, first select two large prime numbers p and q, calculate n = p·q and λ as the least common multiple of p-1 and q-1, and randomly select an integer Define the function L(x) = (x-1) / n, calculate μ = L(g λ mod n 2 ) -1mod n, the public key pair is (n,g), and the private key pair is (λ,μ). When encrypting plaintext m, randomly select an integer 1≤r≤n-1 and calculate the ciphertext c=g m ·r n mod n 2 When decrypting, calculate m = L (c λ mod n 2 )·μmod n. In addition, in the addition homomorphic process, let the ciphertext of plaintext m1 be The ciphertext of plaintext m2 is Then c1·c2 mod n 2 It is the ciphertext of the sum of plaintext m1 and plaintext m2.

[0114] CL algorithms include the following algorithms:

[0115] Generate private key dk and public key

[0116] For plaintext m, generate ciphertext based on CL algorithm Among them, ρ is a random number, g and f are public parameters, and q is the modulus;

[0117] Decrypt the ciphertext (c1, c2) based on the private key dk to obtain the plaintext m;

[0118] Assume that the ciphertext of plaintext m′ is E(ek,m′,ρ′)=(c1′,c2′), then,

[0119] a⊙E(ek,m,ρ)=(c1 a ,c2 a ).

[0120] When the data is a vector, the data can be homomorphically encrypted using a fully homomorphic encryption algorithm, such as CKKS.

[0121] The CKKS algorithm is based on the RLWE difficulty assumption. The ciphertext space is χ σ is a discrete Gaussian distribution with standard deviation σ, Indicates the generation of an N-dimensional vector, each element of which obeys χ σ . U(q N ) represents an N-dimensional vector that obeys uniform distribution. N is a power of 2. Homomorphic encryption algorithms specifically include the following algorithms:

[0122] KeyGen: key generation algorithm, generates public key and private key, where private key That is, an N-dimensional vector is generated; the public key pk = (-a*sk+e,a), where

[0123] Encode: Encoding algorithm, converting the plaintext vector m into a plaintext polynomial p m ;

[0124] Encryption: encryption algorithm, using the public key to encrypt the plaintext polynomial into a ciphertext polynomial, let pk = (p0, p1), then the ciphertext Here c1=u*p1+e1,c0=u*p0+e0+p m .in p m is the plaintext polynomial;

[0125] Decryption: Decryption algorithm, decrypting the ciphertext polynomial into a plaintext polynomial; suppose the ciphertext ct = (c0, c1), then p m ≈(c0+c1*sk)mod q is the decrypted plaintext polynomial;

[0126] Decode: decoding algorithm, converting the plaintext polynomial p m Converted into plain text m.

[0127] In addition, in the embodiments of the present specification, n participants use the same public key to homomorphically encrypt data, and decrypt the ciphertext through a distributed decryption algorithm. Each participant has a partial decryption key, and decryption can only be completed when these participants work together.

[0128] For example, in a distributed decryption algorithm, the key generation center (KGC) generates a public key PK and a private key sk for each participant. i =(s i,1 ,s i,2 ), when decrypting the ciphertext (c0, c1), each of the n participants can generate v as follows i :

[0129]

[0130] Afterwards, one or more of the n participants may n v i Calculate the plaintext corresponding to the ciphertext (c0, c1). That is to say, in this distributed decryption algorithm, the ciphertext can be decrypted to obtain the plaintext only when each of the n participants agrees to decrypt the ciphertext and participates in the decryption calculation, thereby providing security and reliability of data protection.

[0131] In step S203, each participant P i Broadcast Homomorphic Ciphertext and homomorphic ciphertext

[0132] In step S205, each participant P i generate n threshold shards and n threshold shards

[0133] Referring to the decentralized threshold secret sharing algorithm described above, and When it is a single value, and As the constant terms of two t-degree polynomials, two t-degree polynomials are formed, so that n threshold slices can be obtained from these two polynomials respectively. and n threshold shards in, exist and When is a vector, the same method can be used to generate threshold slices for each element in the vector, thereby obtaining the threshold slices of the vector.

[0134] In step S207, each participant P i Send threshold shards to other participants and

[0135] In step S209, each participant P i calculate

[0136] According to the decentralized threshold secret sharing algorithm, Therefore, according to the homomorphic encryption algorithm, Similarly, It can be understood that the The sum of , represents homomorphic addition.

[0137] In addition, according to According to the homomorphic encryption algorithm, we can get: The multiplication in this formula is homomorphic multiplication. In the embodiments of this specification, and For a vector, The operation refers to the vector and vector Multiply the elements at the same position in .

[0138] Figure 3 In the embodiment of this specification, based on homomorphic ciphertext Generate data Threshold fragmentation Flow chart of the method.

[0139] like Figure 3 As shown, first, in step S301, each participant P i Generate random data f i ′、Homomorphic ciphertext

[0140] Specifically, each participant P i Randomly select random data f i ′, use the above homomorphic encryption public key PK to encrypt the random data f i ′ performs homomorphic encryption to obtain homomorphic ciphertext

[0141] In step S303, each participant P i Broadcast Homomorphic Ciphertext

[0142] In step S305, each participant P i Generate f i ′ of n threshold fragments {f′ i,j}.

[0143] Each participant P i Generate threshold shards with the above Similarly, with f i ′ is used as the constant term of the t-degree polynomial to form a t-degree polynomial. Based on the t-degree polynomial, f is obtained. i ′ of n threshold fragments {f′ i,j}.

[0144] In step S307, each participant P i To the participant P j Send threshold fragment f′ i,j .

[0145] Each participant P i After receiving the threshold fragment f′ j,i Then, let f = ∑ i a i0 =∑ i f i ′, each participant P i The threshold slice f of f can be calculated i =∑ j∈[1,n] f′ j,i .

[0146] In step S309, one of the n participants (for example, participant P) j ) Calculate e f , Through the distributed decryption algorithm Decrypt and get Based on the secret sharing algorithm, we get {r i}.

[0147] According to the decentralized threshold secret sharing algorithm, f = ∑ i a i0 =∑ i f i ′, therefore, according to the homomorphic encryption algorithm, Among them, the pair in the summation formula The sum of represents homomorphic addition, and ⊕ also represents homomorphic addition.

[0148] It can be understood that in this embodiment, although it is shown that f is generated based on the decentralized threshold secret sharing algorithm i , and based on the ciphertext of each random number Calculate e f , this specification is not limited thereto, for example, multiple fragments f of f can be generated by a trusted third party i and homomorphic ciphertext e f , and the slice f i and homomorphic ciphertext e f Sent to all parties involved.

[0149] Participant P j The above distributed decryption algorithm can be started, so that the other n-1 participants can calculate v respectively as shown in formula (1) above. i , and send it to participant P j , participant P j Also calculate its own v j , so that the participant P j Based on n v i The value of

[0150] Participant P j In getting the plaintext Then, based on the Shamir secret sharing algorithm, r can be used as the constant term of the t-degree polynomial to obtain n fragments of r {r i},Right now

[0151] In step S311, the participant P j The n-1 slices {r i ,i≠j} are sent to other participants respectively.

[0152] In step S313, the participant P i calculate

[0153] Participant P i Upon receiving r i Afterwards, due to Right now According to Shamir's secret sharing algorithm,

[0154]

[0155] From the above formula, we can get:

[0156] In one embodiment, each participant obtains and After that, the message authentication code (MAC) value of each fragment is generated.

[0157] MAC is a mechanism for verifying the integrity and authenticity of a message, ensuring that the data has not been tampered with during transmission and confirming that the sender of the message is trustworthy. A MAC algorithm (such as γ()) uses a secret key and the message content to generate a unique authentication code, which is called a MAC value or tag. The receiver uses the same key and message content to calculate and verify whether the generated MAC value is consistent with the received MAC value. If they are consistent, the message is considered to be complete and comes from a trusted source.

[0158] The n participants can first generate a global MAC key α based on a decentralized threshold secret sharing algorithm.

[0159] Specifically, each participant P i Randomly select a value α′ i , generate α′ i Homomorphic ciphertext Broadcast ciphertext Each participant P i Based on Shamir's secret sharing algorithm, α′ is generated i The n threshold fragments {α′ i,j}, and α′ i,j Sent to each participant P j .

[0160] Let α = ∑ i α′ i , each participant P i After receiving the threshold fragment α′ j,i After that, we can calculate the threshold fragment α of α = i =∑ j α′ j,i , and calculate

[0161] Let γ(x)=αx, then we can calculate, based on Figure 3 The methods shown can be based on and generate

[0162] In one embodiment, the n participants each have and After that, at least t+1 participants still have shard x of data x i and shard y of data y i In the case of x i and i Quickly calculate the value of z=x﹒y or the slice z of z i , without revealing the information of x and y. Figure 4 FIG. 1 is a schematic diagram of a multi-party secure computation based on the second algorithm in an embodiment of this specification. Figure 3 As shown, for example, two of the three participants, P1 and P2, use the second algorithm based on their existing data shards ( x1,y1) and ( x2, y2), so that participant P1 obtains shard z1 of data z, and participant P2 obtains shard z2 of data z. Participants P1 and P2 can reconstruct data z based on shard z1 and shard z2 based on the Shamir secret sharing algorithm.

[0163] In this embodiment, Figure 1 The stages shown are considered preprocessing stages. Figure 4 The stages shown are considered online stages, because in the preprocessing stage, each participant has already performed complex calculations in advance to obtain and At least t+1 participants can obtain data z or its fragments through less calculations and interactive calculations in the online stage, thereby improving the efficiency of the online stage of multi-party secure computing.

[0164] Figure 5 This is a method flow chart of the online phase of multi-party secure computing in an embodiment of this specification.

[0165] like Figure 5 As shown, in step S501, at least t+1 participants P i Get shard x of data x i 、Shard y of data y i ,calculate

[0166] In step S503, at least t+1 participants P i broadcast

[0167] In step S505, at least t+1 participants combine t shards. and t shards get calculate Among them, (∈﹒ρ) i It can be calculated by one of at least t+1 participants based on Shamir's secret sharing algorithm and sent to each participant.

[0168] Specifically, due to

[0169] From the above formula, we can conclude that:

[0170] The at least t+1 participants can be based on the formula Reconstruct z.

[0171] By the above method, we can get z i After that, at least t+1 participants can use the pre-prepared shards and Fast multiplication of two data. In addition, at least t+1 participants calculate x i +y i , and obtain the slice of x+y, so that the value of x+y can be calculated. Since any operation can be converted into a combination of addition and multiplication, at least t+1 participants can be based on and x i ,y i Perform arbitrary computations between x and y, such as addition, constant multiplication, multiplication, etc., without revealing x and y.

[0172] The arbitrary operation can be implemented in the form of an algebraic circuit. Among them, an algebraic circuit is a mathematical and computational model composed of the following basic elements: input nodes: representing variables or constants; addition gates: performing addition operations; multiplication gates: performing multiplication operations; constants: constant values ​​that can be used as input or for multiplication.

[0173] The algebraic circuit can be physically implemented as a logic circuit. Each participant can perform multi-party secure computation in the embodiments of this specification through the logic circuit. The logic circuit of each participant may include the following components: input device: a device for receiving input variables, such as an input pin or an input port; adder: a circuit component for performing addition operations; multiplier: a circuit component for performing multiplication operations; output device: a device for outputting calculation results, such as a display, an output pin or a port; communication device: used to transmit data between other logic circuits by wired transmission or wireless transmission.

[0174] In hardware, these components may be implemented by integrated circuits (ICs), field programmable gate arrays (FPGAs) or other digital circuits. Among them, the communication device may include a data buffer, a register, and a control line for transmitting a control signal.

[0175] In one implementation, any signature algorithm can be represented as a circuit f, and the private key shards can be represented as x i , the message to be signed is m, and f(x i ,m), at least t+1 of the n participants can obtain the fragment sig of the signature sig respectively i Therefore, at least t+1 participants can reconstruct the signature sig based on at least t+1 fragments, thereby performing (t,n) threshold signature.

[0176] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0177] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0178] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0179] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0180] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0182] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

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

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

[0187] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0188] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0189] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0190] The above description is only an example of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims.

Claims

1. A threshold-supported multi-party secure computation method, performed by n participants, each of which possesses a homomorphic ciphertext of first target data, the method comprising: Each participant obtains the threshold sharding of auxiliary data; A first participant among the n participants obtains a homomorphic ciphertext of the auxiliary data, and adds the homomorphic ciphertext of the first target data and the homomorphic ciphertext of the auxiliary data based on homomorphic addition to obtain an intermediate ciphertext; Decrypting the intermediate ciphertext using a distributed decryption algorithm to obtain first intermediate data; generating n threshold fragments of the first intermediate data based on a secret sharing algorithm, and sending n-1 threshold fragments of the fragments to other n-1 participants respectively; Each participant subtracts the threshold slice of the auxiliary data from the threshold slice of the first intermediate data corresponding to itself to obtain the threshold slice of the first target data.

2. According to the method of claim 1, each participant also has a threshold shard of the first data and a threshold shard of the second data, the first target data is the product of the first data and the second data, and the method further comprises an online stage: At least t+1 of the n participants receive the threshold slice of the third data and the threshold slice of the fourth data, and the at least t+1 participants calculate the threshold slice of the second target data based on their corresponding threshold slice of the first data, the threshold slice of the second data, the threshold slice of the first target data, the threshold slice of the third data and the threshold slice of the fourth data, where the second target data is the product of the third data and the fourth data.

3. The method according to claim 2, further comprising: Each participant generates first random data, second random data, a homomorphic ciphertext of the first random data, and a homomorphic ciphertext of the second random data, and broadcasts the homomorphic ciphertext of the first random data and the homomorphic ciphertext of the second random data, wherein each participant uses the same public key to homomorphically encrypt the data; Based on a secret sharing algorithm, generate n threshold slices of the first random data and n threshold slices of the second random data, and send n-1 threshold slices of the first random data and n-1 threshold slices of the second random data to other n-1 participants respectively; Each participant adds n threshold slices of the first random data corresponding to itself to obtain a threshold slice of the first data, and adds n threshold slices of the second random data corresponding to itself to obtain a threshold slice of the second data; Add n homomorphic ciphertexts of the first random data to obtain the homomorphic ciphertext of the first data, add n homomorphic ciphertexts of the second random data to obtain the homomorphic ciphertext of the second data, and add the homomorphic ciphertext of the first data and the homomorphic ciphertext of the second data to obtain the homomorphic ciphertext of the first target data.

4. The method according to claim 2, wherein the at least t+1 participants calculate the threshold slice of the second target data based on the threshold slice of the first data, the threshold slice of the second data, the threshold slice of the first target data, the threshold slice of the third data and the threshold slice of the fourth data corresponding to the participants, comprising: Each of the at least t+1 participants calculates the difference between the threshold slice of the third data and the threshold slice of the first data to obtain the threshold slice of the second intermediate data, and calculates the difference between the threshold slice of the fourth data and the threshold slice of the second data to obtain the threshold slice of the third intermediate data; Broadcasting the threshold fragmentation of the second intermediate data and the threshold fragmentation of the third intermediate data; Each of the at least t+1 participants combines at least t+1 threshold slices of the second intermediate data to obtain the second intermediate data, and combines at least t+1 threshold slices of the third intermediate data to obtain the third intermediate data; based on the threshold slices of the first data, the threshold slices of the second data, the threshold slices of the first target data, the second intermediate data and the third intermediate data, the threshold slices of the second target data are calculated.

5. The method according to claim 3, wherein: The first data and the second data are two vectors with the same length, and the first target data is a vector obtained by multiplying elements at the same position in the two vectors.

6. According to the method of claim 5, the homomorphic encryption is fully homomorphic encryption.

7. The method according to claim 3 also includes that each of the n participants obtains a threshold fragmentation and a homomorphic ciphertext of the authentication key data based on a secret sharing algorithm, multiplies the homomorphic ciphertext of the authentication key data with the homomorphic ciphertext of the first data to obtain the homomorphic ciphertext of the first verification data, and generates a threshold fragmentation of the first verification data based on the homomorphic ciphertext of the first verification data.

8. The method according to claim 2, further comprising: At least t+1 participants reconstruct the second target data based on at least t+1 threshold fragments of the second target data.

9. The method according to claim 2, wherein the third data or the fourth data comprises a signature private key, and the method further comprises: At least t+1 participants calculate a threshold signature based on at least t+1 threshold fragments of the second target data.

10. A logic circuit, wherein the logic circuit implements the method according to any one of claims 1 to 9 when running.

11. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 9 is implemented.