A universal non-interactive zero-knowledge proof method and system
By introducing a framework of multi-party security calculation and homomorphic commitment in the zero-knowledge proof system, the promise value of the beaver triple is used to verify the correctness of the circuit, and the problems of low efficiency and dependence on algebraic structure in the existing technology are solved, achieving high efficiency, Secure universal non-interactive zero-knowledge proof.
Patent Information
- Application Number
- CN202310085347.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-01-17
AI Technical Summary
In the prior art, a universal non-interactive zero-knowledge proof system that only needs to run the proven problem circuit once, can resist quantum computer attacks, and does not rely on any algebraic structures is still an open problem, and the existing methods have proofs. Problems of excessive size expansion and rewinding.
Adopt a new framework based on multi-party security calculations and homomorphic commitments, including pre-computation stages, proof stages and verification stages. By generating and verifying the commitment values of beaver triplets, ensuring the correctness and efficiency of proofs are achieved using homomorphic commitment algorithms. Additive homomorphism avoids dependence on algebraic structures.
An efficient general non-interactive zero-knowledge proof system is realized. It only needs to run the proven problem circuit once, which can resist quantum computer attacks, does not rely on any algebraic structure, and improves the efficiency and security of the system.
Smart Images

Figure CN116112181B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cryptographic technology, and specifically relates to a universal non-interactive zero-knowledge proof method and system based on multi-party secure computing and homomorphic commitment. Background Art
[0002] Multi-party secure computation: Multiple parties jointly compute a function without disclosing their inputs.
[0003] Homomorphic commitment: a commitment scheme that satisfies Com(a)+Com(b)=Com(a+b).
[0004] Non-interactive zero-knowledge proof: The prover proves the correctness of a proposition without the need for interaction and without revealing evidence.
[0005] Zero-knowledge (ZK) proofs and their non-interactive variants are one of the most basic and common cryptographic primitives in theory and practice. Zero-knowledge proofs allow the prover to convince the verifier of the validity of a statement without revealing any other information, while non-interactive zero-knowledge (NIZK) proof systems require that proofs be generated without the participation of the verifier. NIZK proofs can be verified with any verifier without specifying a special verifier. The NIZK proof system will be very useful, as it can prove arbitrary arithmetic circuits and even NP language classes. Specifically, its application scenarios include building IND-CCA secure public key encryption schemes, signature schemes, blockchains, etc.
[0006] It has been extensively studied that NIZKs can be constructed from standard assumptions such as factorization and groups with bilinear maps. A recent study also showed that NIZKs for proofs over arbitrary NP languages can also be constructed from lattice-based assumptions. Such protocols are particularly desirable because lattice-based assumptions are considered difficult, even in the average case under quantum computer models. While this line of work has enabled exciting new feasibility gains from lattice-based assumptions, our understanding of how to optimize the efficiency of such constructions is still in its infancy.
[0007] There are two main possible approaches to obtaining NIZKs for general arithmetic circuits. The first approach is mainly theoretical. At CRYPTO 2019, Peikert and Sheiehan showed how to convert a zero-knowledge proof system based on the Σ-protocol paradigm for an arbitrary class of NP languages into a non-interactive system via a family of related hashes (CI-hash). Another clever way to build general non-interactive zero-knowledge proofs comes from secure multi-party computation (MPC) proposed by Ishai et al., called the MPC-in-the-head paradigm. The MPC protocol allows multiple parties to jointly compute n-square functions (functions of inputs) while maintaining the privacy of the inputs and the correctness of the outputs.
[0008] In CRYPTO 2019, Peikert and Sheiehan showed how to use the CI-hash family to transform a zero-knowledge proof system based on the Σ protocol paradigm for an arbitrary class of NP languages into a non-interactive system. However, as pointed out in their article, such a transformation requires repeating the Σ protocol O(λ) times in parallel, which leads to a significant expansion of the proof size. In addition, the Σ protocol used in this method is specifically designed for a specific NP-complete problem. It is usually inconvenient to transform a specific arithmetic circuit, such as a message encrypted with a ciphertext, into this specific NP-complete problem.
[0009] An ingenious way to construct universal non-interactive zero-knowledge proofs comes from secure multi-party computation (MPC) proposed by Ishai et al., called the MPC-in-the-head paradigm. Existing zero-knowledge proofs based on the MPCitH paradigm are all based on secure MPC protocols under a semi-honest model. When constructing NIZKs from an MPC with semi-honest security of n parties, the probability of detecting cheating by randomly revealing the copies of two participants may be 1 / n due to the violation of robustness, which requires the cheating prover to produce at least one pair of inconsistent copies. In order to make the probability of integrity error reach a negligible value, the NIZKs prover needs to repeatedly run the MPC protocol corresponding to the required proof statement O(λ) times, where λ is a security parameter. Recently, a series of beautiful works have shown the great potential of constructing efficient NIZKs from semi-honest secure MPC protocols in various applications, but still cannot solve the problem of excessive rewinding times.
[0010] Therefore, how to construct an efficient general non-interactive zero-knowledge proof system based on multi-party secure computation that only needs to run the circuit of the problem to be proved once, can resist quantum computer attacks, and does not rely on any algebraic structure remains an open problem. Summary of the invention
[0011] In view of the problems existing in the prior art, the purpose of the present invention is to provide a universal non-interactive zero-knowledge proof method and system based on multi-party secure computation and homomorphic commitment. The present invention is an efficient universal non-interactive zero-knowledge proof method that only needs to run the circuit corresponding to the problem to be proved once, can resist quantum computer attacks, and does not rely on any algebraic structure.
[0012] The present invention provides a universal non-interactive zero-knowledge proof method based on multi-party secure computation and homomorphic commitment, and the steps include:
[0013] (1) A new proof framework is proposed. The algorithm framework is mainly divided into three parts: pre-calculation phase, proof phase and verification phase. For any NP language class in is the description of the known NP problem with statement x and evidence w. Assume that the corresponding arithmetic circuit is C(x, w) = 1, and the number of multiplication gates is k. First, the prover and the verifier interactively run the first stage: the pre-computation stage, to generate the materials required for the second stage of the proof stage, that is, the remaining unopened beaver triples in the N beaver triples described in the subsequent step (2). The second stage of the proof stage is run by the prover, who randomly selects a random number r according to the evidence w. w , call the homomorphic commitment algorithm Com to calculate the commitment value C of evidence w w =Com(w;r w ) is sent to the verifier, where the Com algorithm inputs the evidence w and the random number r w , the calculation result is the commitment to the evidence w. Then, the prover runs the circuit C(w, x) based on the evidence w, the statement x, and the materials generated in the pre-calculation phase, obtains the copy of each multiplication gate in the arithmetic circuit C(x, w) and the random number corresponding to the commitment of the copy and outputs it. The result is used by the verifier to verify the correctness of the circuit operation. Finally, the prover uses the random number r when committing to the evidence w. w , calculate the open value r of the commitment corresponding to the final result result , that is, r result =C(r w ). Finally, the prover outputs a proof that the prover computes the replica information in the arithmetic circuit C(x, w), which includes: a replica of the circuit multiplication gate, a random number corresponding to the replica commitment, and r result The proof is finally sent to the verifier. The third phase, the verification phase, is run by the verifier. The verifier commits to the homomorphic value C based on the evidence w. w =Com(w;r w ) and statement x, running circuit C (C w , x), we get the same arithmetic circuit C with respect to the input (C w, x) corresponds to the commitment of each multiplication gate copy. The correctness of the multiplication gate execution is verified based on the randomness of the multiplication gate copy and its commitment contained in the proof. The verification process is a well-known commitment opening algorithm.
[0014] Furthermore, the verifier uses r result For circuit C(C w , x) The result of the operation is used to open the commitment and verify whether the proof is passed or not. Where Com is a commitment algorithm that satisfies additive homomorphism. w =Com(w;r w ) indicates the use of random number r w Commit to w, and open the commitment to publish randomness r w , according to r w and C w w can be recovered to verify the correctness of the committed value.
[0015] Furthermore, the present invention does not rely on any algebraic structure, and can be constructed based on any group, ring and its corresponding algebraic assumption. A large number of related studies on homomorphic commitment algorithms show that there are currently efficient commitment algorithms that satisfy additive homomorphism.
[0016] (2) A new zero-knowledge proof pre-computation phase is proposed. The prover and the verifier jointly run the pre-computation algorithm. In the pre-computation phase, certain materials required for the proof can be generated without knowing the proof circuit. Specifically, in the pre-computation phase, the prover and the verifier generate a series of beaver triplets through the GenTriple protocol, where beaver is the name of the author who invented the triple. Specifically, the prover randomly selects N beaver triplets (a i , b i , c i ) i∈[N] , where c i =a i ×b i , and independently randomly select triplets Where i is the i-th random triple used to commit to the beaver triple. The homomorphic commitment algorithm Com is used to calculate the commitment value of the N generated beaver triples respectively. in To use random numbers to a i Make a commitment, To use random numbers For b i Make a commitment, To use random numbers C iThe prover outputs the commitment value of the beaver triple and sends it to the verifier. After receiving the commitment of N beaver triples, the verifier randomly selects the set C = {i 1 ,i 2 ,…,i t}, where i t ∈{1, 2, ..., N}, sent to the prover, where i 1 ,i 2 ,…,i t is the index of the commitment value corresponding to t beaver triplets randomly selected from N beaver triplets. The prover opens the corresponding commitment value according to the challenge set C received, that is, the prover converts the randomness used in the commitment Sent to the verifier. Verifier verification: The verifier verifies the randomness received. and commitment Recover the beaver triplet corresponding to the promise (a i , b i , c i ) i∈[C] If the beaver triples corresponding to the restored commitment all satisfy c i =a i ×b i , then the verification is successful. The prover uses the remaining unopened N\C beaver triples to enter the second step of the online phase of the algorithm, which is recorded as k = |N|-|C|, that is, k is the number of unopened beaver triples, used in the second phase of the proof algorithm. A beaver triple is a triple (a, b, c) that satisfies c = a×b, and a homomorphic commitment algorithm refers to a commitment algorithm that satisfies additive homomorphism, that is, Com(a, r a )+Com(b,r b )=Com(a+b,r a +r b ).
[0017] Furthermore, in the pre-computation phase, the GenTriple protocol used in the present invention covers any protocol that generates the required beaver triples by any method. A large number of related studies on homomorphic commitment algorithms have shown that there are currently efficient GenTriple protocols. The present invention specification only takes the "Cut-and-Choose" method to generate the corresponding beaver triples as an example to introduce the method of the present invention.
[0018] (3) A new proof commitment method is proposed. For any NP language class In the proof phase: the prover has the evidence w, the statement x of the NP problem, the k unopened beaver triples generated in the pre-computation phase (as shown in (2)), and the corresponding randomness of the commitment, while the verifier only has the statement x of the NP problem and the commitment of the k unopened beaver triples generated in the pre-computation phase (as shown in (2)). In the proof algorithm, the prover randomly selects a random number r w , use the homomorphic commitment algorithm Com to calculate the commitment value C of evidence w w =Com(w;r w ) and will commit to C w Send to the verifier, the prover will r w As a promise to open the save is not sent. Among them, C w =Com(w;r w ) is to use random r w Commit the evidence w. A homomorphic commitment algorithm is a commitment algorithm that satisfies additive homomorphism, that is, Com(a, r a )+Com(b,r b )=Com(a+b,r a +r b ).
[0019] (4) A new proof algorithm is proposed. The prover uses the evidence w and the corresponding commitment randomness r w , k beaver triples generated in the pre-computation phase and not opened (a i , b i , c i ) i∈[k] (as shown in (2)) and the corresponding commitment to randomness Run the proof algorithm:
[0020] Prover computation on NP languages The corresponding arithmetic circuit C(x, w)=1:
[0021] 1) Addition gate Add(e, f): For any two elements e, f∈F that need to be added in the algebraic circuit q :The prover calculates the addition gate as d=e+f, where F q The elements are taken from the set between {0, 1, ..., q-1};
[0022] 2) Multiplication gate Multi(g i ,h i , a i , b i , c i ): For the i-th multiplication gate of the circuit, the element g needs to be calculated i ,h iThe prover uses the i-th beaver triple (a i , b i , c i ), calculate: ε i =g i -a i ∈F q , δ i =h i -b i ∈F q , the final calculation result of multiplication: z = c i +ε i a i +δ i b i +ε i δ i ∈F q By introducing the beaver triplet, the nonlinear operation of the multiplication gate can be converted into a linear operation, where ε i , δ i represents the computational copy of the i-th multiplication gate, a i and b i and c i is the i-th beaver triplet generated in the pre-computation phase, g i ,h i are the two elements that need to be multiplied by the i-th multiplication gate, indicating F q is a set whose elements are taken from {0, 1, ..., q-1}, and i represents the index of the multiplication gate.
[0023] To ensure that the prover cannot forge the proof, we need to give the correctness of the operation of each multiplication gate, that is, the prover is honestly running the arithmetic circuit C(x, w) = 1. Specifically, for each multiplication gate, the verifier w =Com(w,r w ) and the commitment calculation Com(g i )-Com(a i )=Com(ε i ) and Com(h i )-Com(b i )=Com(δ i ). Further, the prover needs to give ε i and δ i The open value of the promise and That is, the prover calculates and And add it to the proof Π and send it to the verifier, where F q is a set whose elements are taken from {0, 1, ..., q-1}. and For ε i and δ i The randomness used in the commitment, ε i and δ i is a copy of the i-th multiplication gate. and For g i and h i The randomness used in the commitment, g i and h i is the element that needs to be multiplied by the i-th multiplication gate. and For a i and b i The randomness used in the commitment, a i and b i is the i-th beaver triplet generated in the pre-computation phase.
[0024] In order to verify the correctness of the final output, the prover needs to give the open value promised by the final calculation result, that is, the prover needs to calculate: in, is the randomness of the commitment corresponding to the k-th beaver triple, ε k and δ k is a copy of the kth multiplication gate. The final prover outputs the proof:
[0025] Furthermore, according to the universal Fiat-Shamir transformation, we can transform the above universal interactive zero-knowledge proof protocol into a non-interactive zero-knowledge proof protocol.
[0026] (5) A new verification algorithm is proposed. The verifier receives the proof Π and the pre-computed beavertriples commitment and the commitment value C of the evidence w =Com(w,r w ), run the verification algorithm:
[0027] First, the verifier verifies the correctness of the multiplication gate operation: For each multiplication gate, the verifier verifies the correctness of the multiplication gate operation according to and verify: and in, To use random numbers For g i The commitment made, To use random numbers For h i Commitment made, g i and h i is the element that needs to be multiplied by the i-th multiplication gate; To use random numbers to a i The commitment made, To use random numbers For b i A commitment to i and b i It is the beaver triplet used when the i-th multiplication gate needs to perform a multiplication operation; To use random numbers For ε i The commitment made, To use random numbers δ i Commitment made, ε i and δ i It is the copy generated when the i-th multiplication gate needs to perform a multiplication operation;
[0028] Verify the correctness of the output results: For the final output results, the verifier verifies: in, To use random numbers A commitment to result, where result is the result of the circuit operation, that is, To use random numbers C k The commitment made, To use random numbers to a k Commitment made. To use random numbers For b k a commitment made; k , b k 、c k is the beaver triplet used by the kth multiplication gate, ε k δ k is the copy generated by the kth multiplication gate.
[0029] The advantages of the present invention are as follows:
[0030] The zero-knowledge proof system of the present invention is efficient. Compared with similar non-interactive zero-knowledge proofs based on multi-party secure computing, the present invention only needs to run the circuit of the proved problem once and can resist quantum computer attacks. At the same time, the framework of the present invention does not rely on any algebraic structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The flowchart of the non-interactive zero-knowledge proof method based on multi-party secure computation and homomorphic commitment. DETAILED DESCRIPTION
[0032] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.
[0033] The present invention does not rely on any algebraic structure, but can be constructed based on any group, ring and its corresponding algebraic assumption. q The present invention is introduced by taking the elements on the above as an example. A large number of related studies on homomorphic commitment algorithms show that there are currently efficient commitment algorithms that satisfy additive homomorphism. The GenTriple protocol used in the present invention covers protocols that use any method to generate the required beaver triples, where the beaver triple is a triple (a, b, c) that satisfies c = a × b. A large number of related studies on multi-party secure computing technology show that there are currently efficient GenTriple protocols. The present invention specification only takes the "Cut-and-Choose" method to generate the corresponding beaver triples as an example, combined with the attached Figure 1 The method of the present invention is introduced.
[0034] 1. Preprocessing Algorithm
[0035] The preprocessing algorithm of zero-knowledge proof is run by two participants, the prover P and the verifier V. Finally, the prover generates the beaver triple required for the multiplication gate in the proof phase, and the verifier generates the corresponding beaver triple commitment. The specific protocol process is as follows:
[0036] 1. N beaver triplets generated locally by the prover (a i , b i , c i ) i∈[N] , where a i , b i , c i ∈F q And satisfy c i =a i ×b i . Randomly select a random number Use the homomorphic commitment algorithm Com to calculate the commitment value of the beaver triple respectively And sent to the verifier, where The randomness of the input of the homomorphic commitment algorithm, the beaver triple is a triple (a, b, c) that satisfies c = a × b, and the homomorphic commitment algorithm refers to the commitment algorithm that satisfies additive homomorphism, that is, Com (a, ra )+Com(b,r b )=Com(a+b,r a +r b ), F q is a set whose elements are taken from {0, 1, ..., q-1}, To use random numbers to a i Make a commitment. To use random numbers For b i Make a commitment. To use random numbers C i Make a commitment.
[0037] 2. After receiving the commitment values of N beaver triples, the verifier randomly selects a set C = {i 1 ,i 2 ,…,i t}, where i t ∈{1, 2, ..., N}, sent to the prover, where i 1 ,i 2 ,…,i t is the index of t triplets randomly selected from N beaver triplets.
[0038] 3. The prover opens the corresponding commitment value based on the challenge set C received, that is, the prover uses the randomness used in the commitment Sent to the verifier. Verifier verification: The verifier verifies the randomness received. and commitment Restore the committed value (a i , b i , c i ) i∈[C] If the open commitment values all satisfy c i =a i ×b i , then the verification is successful. The prover uses the remaining unopened N\C beaver triples to perform the online proof, where we denote it as k = |N| - |C|, i.e., k is the number of unopened beaver triples used in the proof algorithm.
[0039] 2. Proof Algorithm
[0040] For any NP language class The corresponding arithmetic circuit C(x, w) = 1, the number of multiplication gates is k, where k is a positive integer. The prover has evidence wThe verifier only has the statement x of the NP problem and the commitment of k unopened beaver triples generated by precomputation and the corresponding randomness of the commitment (as shown in the beaver triples generated by the above precomputation algorithm).
[0041] 1. The prover randomly selects r w ∈F q , use the homomorphic commitment algorithm Com to calculate the commitment value C of evidence w w =Com(w,r w )∈F q And send it to the verifier, the prover will r w Save as a committed key.
[0042] 2. The prover uses the evidence w and the corresponding commitment randomness r w , the pre-calculated k beavertriples (a i , b i , c i ) i∈[k] and the corresponding commitment to randomness Run the proof algorithm:
[0043] Prover computation on NP languages The corresponding arithmetic circuit C(x, w) = 1: The arithmetic circuit can be decomposed into addition gate operation and multiplication gate operation
[0044] 1) Addition gate Add(e, f): For any two elements e, f∈F that need to be added in the algebraic circuit q :The prover calculates the addition gate as d=e+f, where F q is a set whose elements are taken from {0, 1, ..., q-1};
[0045] 2) Multiplication gate Multi(g i ,h i , a i , b i , c i ): For the i-th multiplication gate of the circuit, the element g needs to be calculated i ,h i The prover uses the i-th beaver triple (a i , b i , c i ), calculate: ε i =g i -a i∈F q , δ i =h i -b i ∈F q , the final calculation result of multiplication: z = c i +ε i a i +δ i b i +ε i δ i ∈F q By introducing the beaver triplet, the nonlinear operation of the multiplication gate can be converted into a linear operation, where ε i , δ i represents the computational copy of the i-th multiplication gate, a i and b i and c i is the i-th beaver triplet generated in the pre-computation phase, g i ,h i are the two elements that need to be multiplied by the i-th multiplication gate, indicating F q is a set whose elements are taken from {0, 1, ..., q-1}, and i represents the index of the multiplication gate.
[0046] To ensure that the prover cannot forge the proof, we need to give the correctness of the operation of each multiplication gate, that is, the prover is honestly running the arithmetic circuit C(x, w) = 1. Specifically, for each multiplication gate, the verifier w =Com(w,r w ) and the commitment calculation Com(g i )-Com(a i )=Com(ε i ) and Com(h i )-Com(b i )=Com(δ i ). Further, the prover needs to give ε i and δ i The open value of the promise and That is, the prover calculates and And add it to the proof of Π, where F q is a set whose elements are taken from {0, 1, ..., q-1}. and For ε i and δ i The randomness used in the commitment, ε i and δ iis a copy of the i-th multiplication gate. and For g i and h i The randomness used in the commitment, g i and h i is the element that needs to be multiplied by the i-th multiplication gate. and For a i and b i The randomness used in the commitment, a i and b i is the i-th beaver triplet generated in the pre-computation phase.
[0047] In order to verify the correctness of the final output, the prover needs to give the open value promised by the final calculation result, that is, the prover needs to calculate: in, The randomness of the commitment corresponding to the k-th beaver triple, ε k and δ k is a copy of the kth multiplication gate.
[0048] 3. The final prover outputs the proof:
[0049] 3. Verification Algorithm
[0050] The validator commits to the received proof Π and the precomputed beaver triples and the commitment value C of the evidence w =Com(w,r w ), run the verification algorithm: First, the verifier verifies the correctness of the multiplication gate operation: For each multiplication gate, the verifier verifies the correctness of the multiplication gate according to Com(x i ), Com(a i ), Com(yi), Com(b i )and verify: Com(a i )and in, To use random numbers For g i The commitment made, To use random numbers For h i Commitment made, g i and h i is the element that needs to be multiplied by the i-th multiplication gate; To use random numbers to a i The commitment made, To use random numbers For b i A commitment to i and b i It is the beaver triplet used when the i-th multiplication gate needs to perform a multiplication operation; To use random numbers For ε i The commitment made, To use random numbers δ i Commitment made, ε i and δ i It is the copy generated when the i-th multiplication gate needs to perform a multiplication operation;
[0051] Verify the correctness of the output results: For the final output results, the verifier verifies: in, To use random numbers A commitment to result, where result is the result of the circuit operation, that is, To use random numbers C k The commitment made, To use random numbers to a k Commitment made. To use random numbers For b k a commitment made; k , b k 、c k is the beaver triplet used by the kth multiplication gate, ε k δ k is the copy generated by the kth multiplication gate.
[0052] The present invention covers the technical solution of any zero-knowledge proof protocol framework: the prover randomly selects a random number r according to the evidence w w And call the homomorphic commitment algorithm Com to calculate the commitment value Com(w, r w ) is sent to the verifier. The prover uses the evidence w and the statement x and the randomness r promised by the evidence w. w , run the circuit C(w, x). The verifier uses the homomorphic commitment value C of the evidence w =Com(w,r w ) and statement x, running circuit C (C w , x). Finally, the prover uses the promised randomness r w Calculation circuit C(C w , x) The open value r of the commitment corresponding to the final result result, as the proof of output. Among them, Com is a commitment algorithm that satisfies additive homomorphism. The verifier result For circuit C(C w , x) The result of the operation is used to open the commitment and verify whether the proof passes or not.
[0053] The present invention does not rely on any algebraic structure and can be constructed based on any group, ring and its corresponding algebraic assumption. q The algorithm of the present invention is introduced by taking the domain as an example.
[0054] In the pre-computation phase, the GenTriple protocol used in the present invention covers any method for generating the required beaver triples. A large number of related studies on homomorphic commitment algorithms show that there are efficient GenTriple protocols. The present invention specification only takes the "Cut-and-Choose" method to generate the corresponding beaver triples as an example to introduce the method of the present invention.
[0055] The present invention covers any proof circuit that runs using a different homomorphic commitment algorithm.
[0056] The present invention covers any verification circuit that runs using a different homomorphic commitment algorithm.
[0057] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.
Claims
1. A general non-interactive zero-knowledge proof method, the steps of which are include: 1) For any NP language class The corresponding arithmetic circuit is recorded as C(x,w)=1, and the number of multiplication gates is K. The prover and the verifier interactively run the pre-computation phase to generate the materials required for the proof phase. The method for generating the materials required for the proof phase is: 11) The prover and verifier first generate a series of beaver triplets through the GenTriple protocol; 12) The prover randomly selects N beaver triplets from the generated beaver triplets, (a i ,b i ,c i ) is the i-th beaver triplet, satisfying c i =a i ×b i , and randomly select a triplet for each selected beaver triplet to calculate its commitment; where i = 1~N, For calculation (a i ,b i ,c i )'s commitment value triple; 13) The prover uses the homomorphic commitment algorithm Com to calculate the commitment values of the selected N beaver triples and sends them to the verifier; where: for (a i ,b i ,c i )'s commitment value, To use random numbers to a i Make a commitment, To use random numbers For b i Make a commitment, To use random numbers C i Make a commitment; 14) The verifier randomly selects t commitment values from the commitment values of the N beaver triples received, and sets the index set C of the t commitment values to {i 1 ,i 2 ,…,i t }Sent to the prover, i t is the index of the commitment value of the selected t-th beaver triple; 15) The prover sends the random number used in the corresponding commitment to the verifier based on the received set C; 16) The verifier recovers the beaver triples corresponding to the t commitment values based on the received random numbers and commitments; if each opened beaver triple (a, b, c) satisfies c = a × b, the verification is successful; 17) The prover uses the remaining unopened beaver triples in the N beaver triples as materials for the proof stage; the number of the remaining unopened beaver triples in the N beaver triples is k; 2) The prover runs the proof phase: The prover first randomly selects a random number r based on the evidence w w , call the homomorphic commitment algorithm Com to calculate the commitment value C of evidence w w =Com(w;r w ) and sends it to the verifier; the prover then takes the evidence w and statement x as the input of circuit C(x,w) and records it as circuit C(w,x), runs circuit C(w,x) to obtain a copy of each multiplication gate in the circuit and the committed random number corresponding to the copy and sends it to the verifier; the prover then calculates the random number r according to the random number r w Calculate the opening value r result =C(r w ) and sends it to the verifier; where, for each multiplication gate in the circuit, the verifier verifies the proof according to the commitment C w =Com(w,r w ) and the beaver triplet obtained in the pre-calculation phase (a k ,b k ,c k )'s commitment calculation Com(g k )-Com(a k )=Com(ε k ) and Com(h k )-Com(b k )=Com(δ k ); the prover calculates ε k and δ k The corresponding promise's open value And add it to the proof of Π; ε k and δ k is the copy of the kth multiplication gate, and For g k and h k The random number used in the commitment, g k and h k is the element that needs to be multiplied by the kth multiplication gate, and For a k and b k The random number used in the commitment; the prover computes is the random number committed to the kth beaver triple, ε k and δ k is a copy of the kth multiplication gate; the prover will prove Send to the validator; 3) The verifier runs the verification phase: The verifier first sends the commitment value C of the evidence w w =Com(w;r w ) and state x as the input of circuit C(x,w) as circuit C(C w ,x), running circuit C(C w ,x) Get the commitment corresponding to each multiplication gate copy in the circuit; then verify the correctness of the multiplication gate execution based on the multiplication gate copy sent by the prover and its committed random number; the method for the verifier to verify the correctness of the multiplication gate execution is: 31) For each multiplication gate, the verifier and verify and Is it established? If it is established, execute 32); where, To use random numbers For g k The commitment made, To use random numbers For h k Commitment made, g k and h k is the element that needs to be multiplied by the k-th multiplication gate; To use random numbers to a k The commitment made, To use random numbers For b k The commitment made, To use random numbers For ε k The commitment made, To use random numbers δ k Commitment made, ε k and δ k This is the copy generated when the k-th multiplication gate needs to perform a multiplication operation; 32) Verifier verification Is it true? If it is true, the multiplication gate is executed correctly; among them, To use random numbers A commitment to result, where result is the result of the circuit operation; To use random numbers C k The commitment made, To use random numbers to a k commitments made; To use random numbers For b k Commitment made; k δ k is the copy generated by the kth multiplication gate.
2. The method according to claim 1, It is characterized in that The operation method of the kth multiplication gate in the arithmetic circuit C(x,w)=1 is: the kth multiplication gate needs to calculate the element g k ,h k The corresponding multiplication result, the beaver triple used is (a k ,b k ,c k ), first calculate: ε k =g k -a k ,δ k =h k -b k , then calculate the multiplication result z = c k +ε k a k +δ k b k +ε k δ k .
3. The method according to claim 1, It is characterized in that In step 3), the verifier uses r result For circuit C(C w ,x) The result of the operation is used to open the commitment and verify whether the proof passes or not.
4. A universal non-interactive zero-knowledge proof system, It is characterized in that Includes prover client and verifier client; Pre-computation phase: The prover client and the verifier client interact to generate the materials required for the proof phase; The method for generating the materials required for the proof phase is as follows: 11) the prover and the verifier first generate a series of beaver triplets through the GenTriple protocol; 12) the prover randomly selects N beaver triplets from the generated beaver triplets, (a i ,b i ,c i ) is the i-th beaver triplet, satisfying c i =a i ×b i , and randomly select a triplet for each selected beaver triplet to calculate its commitment; where i = 1~N, For calculation (a i ,b i ,c i )'s commitment value triple; 13) The prover uses the homomorphic commitment algorithm Com to calculate the commitment value of each of the selected N beaver triplets and sends it to the verifier; where, for (a i ,b i ,c i )'s commitment value, To use random numbers to a i Make a commitment, To use random numbers For b i Make a commitment, To use random numbers C i Make a commitment; 14) The verifier randomly selects t commitment values from the commitment values of the N beaver triples received, and the index set C of the t commitment values is C = {i 1 ,i 2 ,…,i t }Sent to the prover, i t is the index of the selected t-th beaver triple commitment value; 15) The prover sends the random number used in the corresponding commitment to the verifier based on the received set C; 16) The verifier recovers the beaver triples corresponding to the t commitment values based on the received random number and commitment; if each opened beaver triple (a, b, c) satisfies c = a × b, the verification is successful; 17) The prover uses the remaining unopened beaver triples in the N beaver triples as materials for the proof stage; the number of remaining unopened beaver triples in the N beaver triples is k; Proof phase: The prover client first randomly selects a random number r based on the evidence w w , call the homomorphic commitment algorithm Com to calculate the commitment value C of evidence w w =Com(w;r w ) and sends it to the verifier client; then the prover client takes the evidence w and statement x as the input of circuit C(x,w) and records it as circuit C(w,x), runs circuit C(w,x) to obtain a copy of each multiplication gate in the circuit and the committed random number corresponding to the copy and sends it to the verifier client; then the prover client calculates the random number r according to the random number r w Calculate the opening value r result =C(r w ) and sends it to the verifier client; for each multiplication gate in the circuit, the verifier performs the verification according to the commitment C of the proof. w =Com(w,r w ) and the beaver triplet obtained in the pre-calculation phase (a k ,b k ,c k )'s commitment calculation Com(g k )-Com(a k )=Com(ε k ) and Com(h k )-Com(b k )=Com(δ k ); the prover calculates ε k and δ k The corresponding promise's open value And add it to the proof of Π; ε k and δ k is the copy of the kth multiplication gate, and For g k and h k The random number used in the commitment, g k and h k is the element that needs to be multiplied by the kth multiplication gate, and For a k and b k The random number used in the commitment; the prover computes is the random number committed to the kth beaver triple, ε k and δ k is a copy of the kth multiplication gate; the prover will prove Send to the validator; Verification phase: The verifier client first sends the commitment value C of the evidence w w =Com(w;r w ) and state x as the input of circuit C(x,w) as circuit C(C w ,x), running circuit C(C w ,x) Get the commitment corresponding to each multiplication gate copy in the circuit; then verify the correctness of the multiplication gate execution based on the multiplication gate copy and the random number promised by the prover client; the method for the verifier to verify the correctness of the multiplication gate execution is: 31) For each multiplication gate, the verifier and verify and Is it established? If it is established, execute 32); where, To use random numbers For g k The commitment made, To use random numbers For h k Commitment made, g k and h k is the element that needs to be multiplied by the k-th multiplication gate; To use random numbers to a k The commitment made, To use random numbers For b k The commitment made, To use random numbers For ε k The commitment made, To use random numbers δ k Commitment made, ε k and δ k This is the copy generated when the k-th multiplication gate needs to perform a multiplication operation; 32) Verifier verification Is it true? If it is true, the multiplication gate is executed correctly; among them, To use random numbers A commitment to result, where result is the result of the circuit operation; To use random numbers C k The commitment made, To use random numbers to a k commitments made; To use random numbers For b k commitment made; k δ k is the copy generated by the kth multiplication gate.
