WO2026007288A1 - 批量验证密文的方法和计算设备 - Google Patents

批量验证密文的方法和计算设备

Info

Publication number
WO2026007288A1
WO2026007288A1 PCT/CN2024/128777 CN2024128777W WO2026007288A1 WO 2026007288 A1 WO2026007288 A1 WO 2026007288A1 CN 2024128777 W CN2024128777 W CN 2024128777W WO 2026007288 A1 WO2026007288 A1 WO 2026007288A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
homomorphic
participant
proof
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/128777
Other languages
English (en)
French (fr)
Inventor
唐国锋
林立
魏长征
闫莺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Publication of WO2026007288A1 publication Critical patent/WO2026007288A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3255Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using group based signatures, e.g. ring or threshold signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/26Testing cryptographic entity, e.g. testing integrity of encryption key or encryption algorithm

Definitions

  • the embodiments in this specification belong to the field of cryptography technology, and in particular relate to a method and computing device for batch verification of ciphertext.
  • public-key cryptography also known as asymmetric cryptography, uses a pair of public and private keys (denoted as pk-sk, where pk represents public key and sk represents secret key), as opposed to cryptography that uses only a single private key.
  • Public-key cryptography includes encryption algorithms and digital signature algorithms.
  • Public-key-private key pairs are the cornerstone of modern cryptographic security, and many applications are based on pk-sk, such as application-layer encrypted transmission protocols like HTTPS (Hypertext Transfer Protocol Secure) and blockchain.
  • a private key typically represents the identity of the party possessing it. It can only be held by the owner and cannot be made public, while the corresponding public key can be shared.
  • a signature using a private key indicates the owner's approval of certain information in the digital world. The signed information can also represent the owner's action within a protocol message. Generally, one owner possesses a single private key, which they can use to sign information and send it to other parties.
  • the recipient can verify it using the corresponding public key. If the verification is successful, the recipient can confirm that the owner indeed signed the information and that the signed information has not been tampered with.
  • accounts require flexible access control policies, especially in blockchain scenarios where multiple parties jointly control an account.
  • an account needs to be jointly controlled by n participants.
  • controlling the account's actions such as transferring funds, requires the approval of all n participants.
  • the agreement of all n participants is not required; control can be achieved with the consent of t+1 participants (t ⁇ n, where t is also called the threshold).
  • t+1 participants t ⁇ n, where t is also called the threshold.
  • This can be implemented using threshold signatures.
  • threshold cryptography private key information is shared with multiple independent participants, and each private key calculation requires the consent of all participants, thus improving algorithm security. Furthermore, the availability of the private key is not affected when a small number of participants fail or become unavailable.
  • a secure (t,n) threshold cryptography algorithm should satisfy the following: (1) Any number of more than t participants can compute the final signature, the exchanged key or plaintext, while t or fewer than t participants cannot obtain any information about the above results; (2) No information about the private key and the participants' private key shares is disclosed during the execution of the algorithm.
  • the threshold signature process includes a preprocessing process, during which l pre-signature results can be generated in batches.
  • l pre-signature results can be generated in batches.
  • each participant needs to generate l sets of proofs and send them to the participant performing the verification.
  • the participant receiving the proofs needs to verify the plaintext ranges corresponding to the l homomorphic ciphertexts based on the l sets of proofs. In this process, each participant needs to provide a lot of computing and communication resources.
  • the purpose of this invention is to provide a method for batch verification of ciphertext, thereby improving the efficiency of ciphertext verification.
  • This specification provides a first aspect of a method for batch verification of ciphertext in a threshold signature, wherein the threshold signature includes n participants, and the method includes:
  • At least t+1 of the aforementioned participants shall execute:
  • a proof corresponding to the l homomorphic ciphertexts is generated, the proof including a first value, the first value being obtained by linear calculation based on the l first plaintexts and l challenge values, the l challenge values being received from a second participant among the at least t+1 participants, the range of each of the challenge values being within a first preset range, and the proof being used to verify whether each of the first plaintexts is within a second preset range;
  • the homomorphic ciphertext and the proof are sent to the second participant.
  • a second aspect of this specification provides a method for batch verification of encrypted text, executed by a first participant, the method comprising:
  • a proof corresponding to the l homomorphic ciphertexts is generated.
  • the proof includes a first value, which is obtained by linear calculation based on the l first plaintexts and l challenge values.
  • the l challenge values are received from a second participant.
  • the range of each of the challenge values is within a first preset range.
  • the proof is used to verify whether each of the first plaintexts is within the second preset range.
  • the homomorphic ciphertext and the proof are sent to the second participant.
  • a third aspect of this specification provides a method for batch verification of encrypted text, performed by a second participant, the method comprising:
  • the first participant receives a proof corresponding to l homomorphic ciphertexts, wherein the l homomorphic ciphertexts correspond to l first plaintexts, and the proof includes a first value, which is obtained by linear calculation based on the l first plaintexts and l challenge values, wherein the l challenge values are provided by the second participant, and the range of each of the challenge values is within a first preset range;
  • the l challenge values, and the l homomorphic ciphertexts verify whether each of the first plaintexts is within a second preset range.
  • This specification provides a scheme for batch verification of ciphertexts.
  • the encryptor obtains a zero-knowledge proof by performing linear calculations based on multiple ciphertexts and multiple challenge values provided by the verifier.
  • the verifier can then perform batch verification on the range of plaintexts corresponding to multiple homomorphic ciphertexts based on the zero-knowledge proof, thereby greatly reducing the computing and communication resources required by the encryptor and verifier.
  • Figure 1 is a schematic diagram of distributed threshold key generation in one embodiment of this invention.
  • Figure 2 is a schematic diagram of distributed threshold signature in one embodiment
  • FIG. 3 is a flowchart of the preprocessing process in threshold signature in one embodiment
  • Figure 4 is a schematic diagram of verifying multiple pre-signature results in a threshold signature in one embodiment
  • Figure 5 is a schematic diagram of batch verification of multiple pre-signature results in threshold signature in one embodiment of this specification
  • Figure 6 is a flowchart of a method for batch verification of ciphertext in a threshold signature according to an embodiment of this specification
  • Figure 7 is a flowchart of a method for batch verification of ciphertext in threshold signatures according to another embodiment of this specification.
  • the DKG (Distributed Key Generation) protocol is a distributed protocol that generates a set of keys through collaboration among multiple participating parties.
  • VSS Very Secret Sharing
  • VSS Virtual Private Server
  • the VSS protocol was first proposed by Shamir in 1979 and is a secret-sharing protocol based on polynomials.
  • the VSS protocol is derived from Shamir's Secret Sharing (SSS), so Shamir's Secret Sharing will be introduced first.
  • Shamir's secret sharing consists of two phases: secret sharing (or secret distribution) and secret reconstruction. It first requires a Dealer to construct a polynomial:
  • f(x) a ⁇ sub>0 ⁇ /sub> + a ⁇ sub> 1 ⁇ /sub>x + a ⁇ sub> 2 ⁇ /sub>x ⁇ sup> 2 ⁇ /sup> + ... + a ⁇ sub>n ⁇ /sub>x ⁇ sup> n ⁇ /sup> (a polynomial)(*)
  • This nth-degree polynomial is uniquely determined by a set of coefficients ( a0 , a1 , a2 , ..., an ), which includes n+1 values.
  • the curve corresponding to this nth-degree polynomial passes through n+1 distinct points on the plane, i.e., the coordinates of these n+1 distinct points are ( x1 , y1 ), ( x2 , y2 ), ..., ( xn , yn ), (xn +1 , yn +1 ), then a system of (n+1) linear equations can be obtained.
  • the values of the n+1 coefficients a0 , a1 , a2 , ..., an can be determined, thus determining the polynomial (*), and ultimately obtaining the value of the secret data a0 .
  • the coordinates of the above n+1 distinct points ( x1 , y1 ), ( x2 , y2 ), ..., ( xn , yn ), (xn +1 , yn +1 ) are the n+1 secret slices.
  • polynomial interpolation The process of finding a curve passing through a given set of points is called polynomial interpolation.
  • polynomial interpolation There are various methods for polynomial interpolation; the following introduces a common method: Lagrange interpolation. Given an nth-degree polynomial*, and knowing the coordinates of n+1 points ( x1 , y1 ), ( x2 , y2 ), ..., ( xn , yn ), (xn +1 , yn +1 ) on a plane whose corresponding curve passes through, then the Lagrange interpolation method can be used to obtain the coordinates of the nth-degree polynomial.
  • the polynomial of the curve is as follows:
  • Polynomial (**) and polynomial (*) are actually equivalent.
  • n+1 points on the polynomial can arbitrarily select n+1 points on the polynomial and share these n+1 points among the n+1 participants, for example, each participant receives the coordinates of one point. Collecting the coordinates of any fewer than n+1 points will not reveal the original secret data a ⁇ sub>0 ⁇ /sub> ; only after obtaining all n+1 points can the value of the secret data a ⁇ sub>0 ⁇ /sub> be reconstructed by reconstructing the polynomial coefficients.
  • the degree n is also called the degree of the polynomial.
  • the curve corresponding to the 2-degree polynomial passes through four distinct points on the plane, i.e., the coordinates of four distinct points ( x1 , y1 ), ( x2 , y2 ), ( x3 , y3 ), and ( x4 , y4 ).
  • these four coordinates are distributed to one participant each.
  • Party 1 , Party 2 , Party 3 , and Party 4. Assume Party 1 has a slice ( x1 , y1 ), Party 2 has a slice ( x2 , y2 ), Party 3 has a slice ( x3 , y3 ), and Party 4 has a slice ( x4 , y4 ).
  • the polynomial (**) can be determined by any three points on the corresponding curve, in Party i (i ⁇ 1,2,3,4 ⁇ ), when any three participants provide their own secret fragments, the polynomial (***) can be reconstructed during the secret reconstruction phase, thus obtaining the secret value a0 . If fewer than three participants provide their own secret fragments, the polynomial (***) cannot be reconstructed, and therefore the secret value a0 cannot be obtained.
  • the aforementioned t is also called the threshold.
  • Rabin et al. proposed an improved protocol called Joint-Feldman.
  • the basic idea of this protocol is...
  • the Feldman VSS protocol is executed in parallel n times, where each participant locally generates a random polynomial and then shares a randomly selected secret value among all participants. Since what is shared is a promise of the secret rather than the secret itself, the secret cannot be recovered unless there is a multi-party conspiracy exceeding a threshold t.
  • Such a distributed VSS protocol is also called the Distributed VSS protocol.
  • Decentralized threshold secret sharing which is the implementation scheme of Joint-Feldman, includes the following:
  • Participant P1 generates a polynomial of degree 2:
  • f1 (z) a10 + a11z + a12z2 , where a10 is the secret s1 set by P1 ;
  • Participant P2 generates a polynomial of degree 2:
  • f2 (z) a20 + a21z + a22z2 , where a20 is the secret s2 set by P2 ;
  • Participant P3 generates a 2-degree polynomial:
  • f3 (z) a30 + a31z + a32z2 , where a30 is the secret s3 set by P3 ;
  • Participant P4 generates a polynomial of degree 2:
  • f4 (z) a40 + a41z + a42z2 , where a40 is the secret s4 set by P4 .
  • each participant P ⁇ sub>i ⁇ /sub> generates and distributes n values on the curve corresponding to its own t-degree polynomial.
  • each participant P ⁇ sub> i ⁇ /sub> can also generate common verification parameters corresponding to its own t-1 degree polynomial.
  • k 0, 1, ..., t, and is published to each participant, specifically:
  • Participant P2 generation k 0, 1, ..., t, including Broadcast ⁇ A20 , A21 , A22 ⁇ to P1 , P3 , and P4 ;
  • Participant P3 generation k 0, 1, ..., t, including Broadcast ⁇ A30 , A31 , A32 ⁇ to P1 , P2 , and P4 ;
  • Participant P4 generation k 0, 1, ..., t, including Broadcast ⁇ A40 , A41 , A42 ⁇ to P1 , P2 , and P3 .
  • P1 can verify it using ⁇ A20 , A21 , A22 ⁇ ; after receiving s31 , P1 can verify it using ⁇ A30 , A31 , A32 ⁇ ; after receiving s41 , P1 can verify it using ⁇ A40 , A41 , A42 ⁇ ; verification method Similar to the above, I will not repeat myself.
  • Each participant Pi can broadcast its calculated secret share si to other participants. Then, after each participant Pi collects at least t+1 secret shares from ⁇ s1 , s2 , s3 , s4 ⁇ , it can reconstruct the secret s0 .
  • the validity of the secret s ⁇ sub>i ⁇ /sub> can also be verified by validating the parameters ⁇ A ⁇ sub>10 ⁇ /sub> , A ⁇ sub> 11 ⁇ /sub> , A ⁇ sub> 12 ⁇ /sub> ⁇ , ⁇ A ⁇ sub>20 ⁇ /sub> , A ⁇ sub>21 ⁇ /sub>, A ⁇ sub> 22 ⁇ /sub> ⁇ , ⁇ A ⁇ sub>30 ⁇ /sub> , A ⁇ sub>31 ⁇ /sub> , A ⁇ sub>32 ⁇ /sub> ⁇ , and ⁇ A ⁇ sub>40 ⁇ /sub>, A ⁇ sub> 41 ⁇ /sub>, A ⁇ sub>42 ⁇ /sub> ⁇ , i.e., whether (0, s ⁇ sub> i ⁇ /sub> ) is a point on the total curve. Specifically, validity is determined by verifying whether the following equation holds:
  • the Joint-Feldman protocol described above enables distributed secret sharing, thus completing the main content of the DKG (Device Key Generation).
  • the above sequence from Shamir to Threshold Shamir, FeldmanVSS, and then to the Joint-FeldmanDVSS protocol, represents a series of secret sharing implementation schemes.
  • Additive Secret Share SPDZ (an important protocol in multi-party secure computation, first proposed in 2012)
  • the Chinese Remainder Theorem which can ultimately also achieve a DKG.
  • each participant Pi broadcasts its generated secret share s ⁇ sub>ij ⁇ /sub>, i, j ⁇ (1, 2, ..., n), where n is the number of participants, and each participant Pi can broadcast its calculated secret share s ⁇ sub>i ⁇ /sub> to other participants, after each participant Pi collects at least t+1 secret shares from ⁇ s ⁇ sub>1 ⁇ /sub>, s ⁇ sub> 2 ⁇ /sub>, s ⁇ sub>3 ⁇ /sub> , s ⁇ sub> 4 ⁇ /sub> ⁇ , it can reconstruct the secret s ⁇ sub>0 ⁇ /sub>.
  • the properties of the DKG protocol can be used to construct distributed threshold signature protocols.
  • Blockchain as a distributed system, extensively uses signature algorithms.
  • nodes in the blockchain distribute secret shares through DKG, and at least t+1 blockchain nodes use these secret shares as private key shares to sign the information to be signed and broadcast them.
  • Any blockchain node that has collected at least t+1 signature shares can reconstruct the total signature and the total public key using the aforementioned method. This reconstructed total signature can be verified using the total public key, thereby achieving threshold signatures.
  • this approach has the advantage that each blockchain node's own secret share does not need to be broadcast to other nodes, thus avoiding the exposure of its own secret share and private key. Therefore, a secret share generated by a single DKG can be reused multiple times without requiring a separate DKG protocol for each threshold signature.
  • the threshold signature mentioned can be, for example, a threshold signature based on the ECDSA signature algorithm. It is understood that the signature algorithm corresponding to the threshold signature in the embodiments of this specification is not limited to the ECDSA signature algorithm, but can be other signature algorithms, such as the SM2 signature algorithm, etc. The following description uses the ECDSA signature algorithm as an example.
  • the basic ECDSA signature algorithm includes:
  • the signer Alice selects an elliptic curve E q (a,b) and a base point G, and shares this information with the verifier Bob, where q is the modulus.
  • Bob can use ⁇ , r from the received signature, message m, and public key X to perform calculations and verify whether the calculation result is equal to r in the signature.
  • n signers P1 , P2 , ..., Pn each have their own secret share and a total public key, where the threshold value is t, and t ⁇ n.
  • At least t+1 of the n signers each use their own secret share as their private key share to sign the same information to be signed and broadcast it. Any verifier that has collected at least t+1 signature shares can recover the total signature and verify it using the total public key, thereby realizing a threshold signature.
  • each signer can generate a threshold private key using a dealer- or dealer-less method, such as threshold Shamir, Feldman, or Joint-Feldman protocols, or through other DKG schemes.
  • the implementation of such DKG schemes results in each participant Pi (i ⁇ n) having a private key share ⁇ i , where any at least t+1 private key shares correspond to a total private key ⁇ .
  • the result of this DKG can also generate a total public key X.
  • n participants can use their own private key shares to sign the same message, generating a signature share. Any at least t+1 signature shares can be aggregated into a total signature, and this total signature can be verified by the total public key.
  • the above relationship can be represented by the distributed threshold key generation in Figure 1 and the distributed threshold signature in Figure 2.
  • the distributed threshold signature further includes a preprocessing stage and an online signing stage.
  • the threshold is t), so the degree of the polynomial is also t.
  • each participant P ⁇ sub> i ⁇ /sub> can generate n secret shares, retain one of them, and encrypt it. Send the remaining secret shares to the other participants.
  • participant P generates the coordinates of n points on the curve corresponding to its own polynomial as n secret shares, keeps the coordinates of one of the points, and encrypts and sends the coordinates of the remaining points to the other participants.
  • P1 has secret shares s11 , s21 , s31 , s41 , and s51 generated by different participants locally;
  • P2 has secret shares s12 , s22 , s32 , s42 , and s52 generated by different participants locally;
  • P3 has secret shares s13 , s23 , s33 , s43 , and s53 generated by different participants locally;
  • P4 has secret shares s14 , s24 , s34 , s44 , and s54 generated by different participants locally;
  • P5 has secret shares s15 , s25 , s35 , s45 , and s55 generated by different participants.
  • each participant P ⁇ sub>i ⁇ /sub> can sum up its own secret share s ⁇ sub> ii ⁇ /sub> and the secret shares s ⁇ sub> ji ⁇ /sub> obtained from other participants P ⁇ sub> j ⁇ /sub> to obtain its private key share.
  • the summation method is, for example, summation, such as the private key share of participant P ⁇ sub>i ⁇ /sub>. For example:
  • Each participant Pi can also verify the secret share sji sent by Pj based on the public verification parameters ⁇ Aj0 , Aj1 , ..., Ajt ⁇ of Pj , for example, by verifying it using the following formula:
  • each participant Pi can calculate the total public key X, in a similar manner to the above, for example, through the following formula:
  • this master public key can be used to verify the master signature after subsequent aggregation.
  • each participant P ⁇ sub>i ⁇ /sub> can generate and broadcast a hash value corresponding to its own secret public key.
  • the receiver can then use this hash value to verify the correctness of the secret public key sent by each participant P ⁇ sub> i ⁇ /sub>. For example:
  • each participant, Pi can generate its own public-private key pair for homomorphic encryption, such as the Paillier public-private key pair ( Ni , ski ), where ski is the private key and Ni is the corresponding public key.
  • Homomorphic encryption technology can process plaintext data "homomorphically," mapping it to a new, confidential state, ensuring that only the recipient possessing the key can access the plaintext data.
  • Paillier homomorphic addition is a widely used public-key encryption system in cryptography, proposed by Pascal Paillier in 1999. Its main characteristic is its additive homomorphic property, meaning that given two ciphertexts, the ciphertext sum of their corresponding plaintexts can be calculated without decryption.
  • Paillier's additive homomorphic property allows us to calculate the product of c1 and c2, resulting in a new ciphertext c, which is precisely the ciphertext sum of m1 and m2. This homomorphic property allows for some form of computation to be performed on encrypted data without revealing the original data.
  • the public key can be sent to other participants.
  • participant P1 After participant P1 generates a Paillier-encrypted public-private key ( N1 , sk1 ), it broadcasts the homomorphic encrypted public key N1 to other participants; after participant P2 generates a Paillier-encrypted public-private key ( N2 , sk2 ), it broadcasts the homomorphic encrypted public key N2 to other participants; after participant P3 generates a Paillier-encrypted public-private key ( N3 , sk3 ), it broadcasts the homomorphic encrypted public key N3 to other participants; after participant P4 generates a Paillier-encrypted public-private key ( N4 , sk4 ), it broadcasts the homomorphic encrypted public key N4 to other participants; after participant P5 generates a Paillier-encrypted public-private key ( N5 , sk5 ), it broadcasts the homomorphic encrypted public key N5 to other participants.
  • each participant Pi can locally store its own secret, its own share of private key, its own homomorphic encrypted private key, the total public key, and the homomorphic encrypted public key of each participant.
  • this polynomial corresponds to a global curve, and the following relationship exists:
  • each participant Pi can broadcast its calculated secret share si to other participants. Then, after each participant Pi collects at least t+1 secret shares from ⁇ s1 , s2 , s3 , s4 , s5 ⁇ , it can reconstruct the secret s0 . For example, with a threshold of 2, each participant Pi can also reconstruct the secret s0 after collecting at least 3 secret shares.
  • the goal is to achieve distributed threshold signatures. Therefore, the secret share s ⁇ sub> i ⁇ /sub> is not sent to other participants but is instead used as a private key share. This ensures that no single participant or other party obtains at least t+1 secrets. The total secret is obtained after the share is recovered, meaning the total private key is not obtained. This ensures that the private key shares obtained by multiple participants through a single distributed threshold key generation protocol can be used for subsequent distributed threshold signatures.
  • the following describes the distributed threshold signature process in this embodiment, which includes a preprocessing stage and an online signature stage.
  • the distributed key generation process described above requires n participants.
  • the distributed threshold signature process described below only requires at least t+1 participants.
  • we still use a threshold of t 2 as an example.
  • Preprocessing phase At least t+1 participants generate their own first random value k i and second random value ⁇ i . Each participant also uses a homomorphic encryption algorithm and obtains the coordinate component r and their own private key share component masking value ⁇ i through the preprocessing phase protocol.
  • FIG. 3 is a flowchart of a preprocessing procedure in threshold signature in one embodiment, which may specifically include:
  • i 1, 2, or 3
  • Step S11 Each of at least t+1 participants generates l sets of first random values and second random values, as well as the corresponding homomorphic ciphertext of the first random value and the public key hash of the second random value.
  • participant P ⁇ sub>i ⁇ /sub>, i ⁇ [1,t+1] generates a first random value k ⁇ sub>i ⁇ /sub> and a second random value ⁇ ⁇ sub>i ⁇ /sub> , and k ⁇ sub> i ⁇ /sub> ,
  • ECC elliptic curve cryptography
  • This typically refers to the set of integers modulo q, which represents the set of all integers from 0 to q-1. Operations within this set (such as addition and multiplication) are performed modulo q.
  • This modular arithmetic guarantees the closure and security of operations within a finite field, and is one of the key factors ensuring encryption strength in elliptic curve cryptography. For example, point addition or scalar multiplication operations on an elliptic curve require both the coefficients and results to be processed modulo q to ensure that the result remains on a valid elliptic curve.
  • t+1 3
  • participants are P ⁇ sub>1 ⁇ /sub> , P ⁇ sub>2 ⁇ /sub> , and P ⁇ sub>3 ⁇ /sub> :
  • P ⁇ sub> i ⁇ /sub> can send the generated first random value homomorphic ciphertext to the other participants, such as:
  • P1 broadcasts K1 to P2 and P3 ;
  • P2 broadcasts K2 to P1 and P2 ;
  • P3 broadcasts K3 to P1 and P2 .
  • the aforementioned set of first and second random values can be used to obtain a signature.
  • Each of at least t+1 participants can generate l sets of first and second random values.
  • k i ⁇ This can be used to generate l signatures for the same or different messages. Accordingly, each participant generates a homomorphic ciphertext Ki , ⁇ based on k i, ⁇ , and sends Ki , ⁇ to each of the other participants among at least t+1 participants.
  • Step S12 Upon receiving the broadcast from participant P ⁇ sub> i ⁇ /sub> , for each Ki , ⁇ sent by P ⁇ sub> j ⁇ /sub>, select two masks ⁇ ⁇ sub>i,j ⁇ /sub>, ⁇ sub> ⁇ /sub> . This indicates that the range of values for the subscript of this finite field is q to the power of 5, which is a proven range of values with cryptographic security.
  • Mask ⁇ i,j, ⁇ Generally, it is possible Choose the larger value within the range. Then, Pi can use a homomorphic algorithm to compute the intermediate ciphertext Di ,j, ⁇ and... And send to Pj :
  • E ⁇ sub>j ⁇ /sub> represent homomorphic multiplication and homomorphic addition operations, respectively.
  • E ⁇ sub> j ⁇ /sub>() represents homomorphic encryption using the homomorphic public key of participant P ⁇ sub> j ⁇ /sub>, where j ⁇ [1,t+1], j ⁇ i, and ⁇ [1,l].
  • Step S13 Each participant P i calculates the intermediate value ⁇ i, ⁇ and the private key share component masking value ⁇ i to obtain l sets of preprocessing results.
  • each participant P ⁇ sub> i ⁇ /sub> can calculate using the above relation 1:
  • the participating party Pi can store... As a preprocessed result or pre-signed result of group l.
  • Each participant uses the same set of preprocessing results corresponding to ⁇ , and signs the same message using its own first random value k ⁇ sub>i, ⁇ /sub> , private key share component masking value ⁇ ⁇ sub>i, ⁇ /sub> , and the coordinate component r ⁇ , obtaining at least t+1 signature shares ⁇ ⁇ sub>i, ⁇ /sub> .
  • H(m) is the hash value of message m. Afterwards, each participant can broadcast ⁇ sub> i, ⁇ /sub> to other participants.
  • each of the participants can also generate l first zero-knowledge proofs ⁇ i, ⁇ for l first random value homomorphic ciphertexts Ki, ⁇ , and broadcast them to other participants; correspondingly, in S12, after each participant receives the first random value homomorphic ciphertext Ki , ⁇ and the corresponding first zero-knowledge proof ⁇ i , ⁇ , it verifies the corresponding first random value homomorphic ciphertext Ki , ⁇ through the first zero-knowledge proof ⁇ i, ⁇ , that is, verifies that the plaintext ki , ⁇ corresponding to Ki, ⁇ belongs to This can resist attacks from malicious adversaries. If the verification is successful, the process in this embodiment can continue to the next step; otherwise, it is considered illegal and the process can be terminated.
  • Zero-knowledge proofs refer to proofs that enable a prover to convince a verifier that a statement is true without providing the verifier with any useful information.
  • the prover generates a proof ⁇ of a statement using witness information that only they possess.
  • the verifier can verify ⁇ to determine that the prover possesses the witness to the statement, while simultaneously being unable to obtain any information about that witness.
  • each of the participating parties can also generate l second zero-knowledge proofs ⁇ ⁇ sub>i,j, ⁇ /sub> and l third zero-knowledge proofs.
  • ⁇ i,j, ⁇ is used to prove the intermediate ciphertext D i,j, ⁇
  • Zero-knowledge proof Used to prove the intermediate ciphertext corresponding
  • the set of integers modulo q5 is the set of all integers from 0 to q5-1 .
  • step S13 after each participant receives the intermediate ciphertext Di ,j, ⁇ and the corresponding second zero-knowledge proof ⁇ i,j, ⁇ , it verifies the corresponding intermediate ciphertext Di, j, ⁇ using the second zero-knowledge proof ⁇ i,j, ⁇ .
  • each participant receives the intermediate ciphertext... and the corresponding third zero-knowledge proof Then, through this third zero-knowledge proof Verify the corresponding intermediate ciphertext This can resist attacks from malicious adversaries. If the verification is successful, the process in this embodiment can continue to the next step; otherwise, it is considered illegal and the process can be terminated.
  • each participant P ⁇ sub> i ⁇ /sub> needs to generate l sets of proofs to verify the l homomorphic ciphertexts corresponding to the l pre-signed results.
  • Each set of proofs includes: a first zero-knowledge proof ⁇ ⁇ sub>i, ⁇ ⁇ /sub>, at least t second zero-knowledge proofs ⁇ ⁇ sub>i,j, ⁇ ⁇ /sub> corresponding to at least t other participants, and at least t third zero-knowledge proofs corresponding to at least t other participants.
  • the l sets of proofs need to be sent to the verifier, such as participant Pj . After receiving the l sets of proofs, participant Pj needs to process each set of proofs... The verification calculations will be performed. This process requires significant computing and communication resources from all participating parties.
  • this specification provides a scheme for batch verification of ciphertext in threshold signatures.
  • this specification embodiment can generate a set of proofs for multiple sets of pre-signature results.
  • This set of proofs can perform batch verification of l homomorphic ciphertexts in l preprocessing processes at once, thereby greatly reducing the computing and communication resources required by each participant.
  • the set of proofs includes: a fourth zero-knowledge proof ⁇ ⁇ sub>i ⁇ /sub>, at least t fifth zero-knowledge proofs ⁇ ⁇ sub>i,j ⁇ /sub> corresponding to at least t other participants, and at least t sixth zero-knowledge proofs corresponding to at least t other participants.
  • the fourth zero-knowledge proof ⁇ ⁇ sub>i ⁇ /sub> can be used to perform batch verification of l homomorphic ciphertexts K ⁇ sub>i, ⁇ /sub> .
  • the fifth zero-knowledge proof ... This can be used for batch verification of l intermediate ciphertexts Di ,j, ⁇ sent to participant Pj , representing a sixth zero-knowledge proof. It can be used to process l intermediate ciphertexts sent to participant Pj. Perform batch verification.
  • Figure 6 is a flowchart of a method for batch verification of ciphertext in a threshold signature according to an embodiment of this specification. The method can be performed between any two of the at least t+1 participants. Participant Pi and participant Pj are shown in Figure 6 as examples.
  • step S601 participant Pi generates a homomorphically encrypted public-private key pair ( Ni , ski ), and in step S603, participant Pi sends its homomorphically encrypted public key Ni to participant Pj .
  • Steps S601 and S603 are described above and will not be repeated here. It is understood that since participant Pi may have already generated the public-private key pair and sent the public key to participant Pj beforehand, steps S601 and S603 are not mandatory.
  • step S605 participant P i generates l homomorphic ciphertexts K i , ⁇ for k i, ⁇ .
  • participant P ⁇ sub> i ⁇ /sub> can generate l random numbers ⁇ sub> i, ⁇ ⁇ /sub> for homomorphic encryption, and can calculate K ⁇ sub>i, ⁇ /sub> based on the Paillier homomorphic algorithm as shown in formula (1):
  • each ⁇ i, ⁇ is passed through Obtained by random selection from, Let represent the space that is coprime to N ⁇ sub> i ⁇ /sub> and less than N ⁇ sub>i ⁇ /sub> .
  • step S607 participant P i sends a homomorphic ciphertext Ki , ⁇ to participant P j .
  • Each e ⁇ sub> ⁇ ⁇ /sub> in e ⁇ sub>1 ⁇ /sub>, e ⁇ sub>2 ⁇ /sub> , ..., e ⁇ sub> l ⁇ /sub> is obtained by random selection within the range ( ⁇ 0,1 ⁇ sub> t ⁇ /sub> ).
  • the size of t is predetermined according to the security level.
  • ⁇ 0,1 ⁇ ⁇ sub>t ⁇ /sub> represents all binary sequences of length t. Each sequence consists of t elements, each of which can be either 0 or 1. Therefore, the set ⁇ 0,1 ⁇ ⁇ sub>t ⁇ /sub> can contain 2 ⁇ sup> t ⁇ /sup> distinct sequences, which are integers in the range 0 to 2 ⁇ sup>t -1 ⁇ /sup>.
  • step S611 participant P ⁇ sub>i ⁇ /sub> generates proof ⁇ sub> i ⁇ /sub> , which includes... It is obtained based on linear calculations of l k ⁇ sub> i, ⁇ /sub> and l challenge values e ⁇ sub> ⁇ ⁇ /sub>.
  • step S613 participant P ⁇ sub> i ⁇ /sub> sends the proof ⁇ sub> i ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> .
  • the result is obtained through linear calculation based on l k ⁇ sub> i, ⁇ /sub> and l challenge values e ⁇ sub> ⁇ ⁇ /sub>. Since the range of the challenge value e ⁇ is determined, participant Pj can determine the range of the challenge value e ⁇ . Indeed, it is obtained after performing a preset linear calculation based on l k ⁇ sub> i, ⁇ /sub> and l challenge values e ⁇ sub> ⁇ /sub> , according to... The range of each ki , ⁇ is proved without revealing the value of each ki , ⁇ , thus achieving a zero-knowledge proof of the range of each ki , ⁇ .
  • participant P ⁇ sub> i ⁇ /sub> can generate the masking value k ⁇ sub>i,0 ⁇ /sub>, the algorithmic random number ⁇ ⁇ sub>i,0 ⁇ /sub>, and the homomorphic ciphertext K ⁇ sub>i, 0 ⁇ /sub> of the masking value k ⁇ sub>i,0 ⁇ /sub> as shown in the following formula (2):
  • ⁇ $ indicates random selection within the numerical range
  • is a statistical value that can be set to be greater than or equal to t.
  • participant P ⁇ sub> i ⁇ /sub> can calculate and prove ⁇ ⁇ sub>i ⁇ /sub> based on formula (2). and As shown in formula (3) below:
  • participant P ⁇ sub> i ⁇ /sub> can send the proof ⁇ sub> i ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> for range verification of each k ⁇ sub>i ⁇ /sub>, ⁇ .
  • participant P ⁇ sub>i ⁇ /sub> can also receive auxiliary parameters from participant P ⁇ sub> j ⁇ /sub> . Used to generate Ring-Pedersen commitments Ct i, ⁇ .
  • participant Pi can first generate Where ⁇ [l].
  • participant P ⁇ sub>i ⁇ /sub> can generate l+1 commitment values C ⁇ sub> t ⁇ /sub>, ⁇ , where ⁇ ⁇ [0,l]:
  • Participant P i also generates proof ⁇ i
  • participant P ⁇ sub> i ⁇ /sub> can send l+1 commitment values C ⁇ sub> t ⁇ /sub>, ⁇ and proof ⁇ sub> i ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> for range verification of each k ⁇ sub>i ⁇ /sub>, ⁇ .
  • the l+1 commitment values C ⁇ sub> t ⁇ /sub>, ⁇ can be used as part of the data in the proof ⁇ ⁇ sub>i ⁇ /sub> .
  • step S615 participant Pj verifies the range of each k i, ⁇ based on the proof ⁇ i , l challenge values e ⁇ and l homomorphic ciphertexts K i, ⁇ .
  • participant Pj After receiving the proof ⁇ i , participant Pj first verifies whether the range of k i * in the proof ⁇ i is in [0, 2 ⁇ +t B].
  • participant Pj can verify whether the following equation (6) holds:
  • participant Pj has received Ki ,0 , l Ki , ⁇ , Ni from participant P i . and The value of ⁇ can be determined by substituting the values of these parameters and each e ⁇ into the left and right sides of equation (6) respectively. This will allow us to determine whether equation (6) is valid.
  • l can be determined.
  • the ciphertext is obtained by homomorphically encrypting l k i , ⁇ with l ⁇ i, ⁇ . This is because:
  • participant Pj can also verify whether the following equation (9) holds:
  • participant Pj based on According to the Forking Lemma, based on Given the range [0, 2 ⁇ +t B] and the range of each e ⁇ , it can be deduced that the range of each k i, ⁇ should be within [-2 ⁇ +t B, 2 ⁇ +t B]. Thus, within a certain error range, it is proven that each plaintext k i, ⁇ belongs to [0, 2 ⁇ +t B].
  • participant P ⁇ sub>i ⁇ /sub> will provide proof ⁇ sub> i ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> , and proof ⁇ sub> i ⁇ /sub> will be obtained through... It includes information about each k i, ⁇ , in This includes information about each ⁇ i , ⁇ , while the participant Pj is based on... and Since it is impossible to derive any k ⁇ sub> i, ⁇ /sub> or ⁇ ⁇ sub>i, ⁇ /sub> , it is proven that ⁇ ⁇ sub>i ⁇ /sub> has zero-knowledge proof.
  • Figure 7 is a flowchart of a method for batch verification of ciphertext in a threshold signature according to another embodiment of this specification. The method can be performed between any two of the at least t+1 participants. Participant Pi and participant Pj are shown in Figure 6 as examples.
  • step S701 participant P i generates l homomorphic ciphertexts Di ,j, ⁇ .
  • participant P ⁇ sub> i ⁇ /sub> first generates l ⁇ ⁇ sub>i, ⁇ /sub> and l ⁇ ⁇ sub>i,j, ⁇ ⁇ /sub>, where In addition, participant P i generates l random numbers ⁇ i,j, ⁇ for homomorphic encryption, where, Where Nj is the public key of participant Pj received from participant Pj .
  • step S703 participant P i sends a homomorphic ciphertext Di ,j, ⁇ to participant P j .
  • step S705 participant P i generates a proof ⁇ i,j , which includes ⁇ * and l.
  • ⁇ * is obtained based on linear calculations of l - ⁇ i,j, ⁇ and l challenge values e ⁇ . It is obtained based on linear calculation of the masking value ⁇ i ,0, ⁇ ,e ⁇ , ⁇ i , ⁇ .
  • participant Pi sends the proof ⁇ i,j to participant Pj .
  • participant P ⁇ sub> i ⁇ /sub> can generate l masking values ⁇ ⁇ sub>i,0, ⁇ /sub> as shown in formula (11) below, and the algorithm generates random numbers ⁇ ⁇ sub>i,j,0 ⁇ /sub> . and masking value ⁇ i ,j,0 :
  • participant Pi can calculate ⁇ * and l as shown in formula (13).
  • the values of ⁇ * are used as evidence to prove the data included in ⁇ i ,j :
  • participant Pi can also generate:
  • participant Pi can generate the following commitment value:
  • participant P i also generates proof ⁇ i,j and
  • participant P ⁇ sub> i ⁇ /sub> can send the aforementioned commitment value and proof ⁇ ⁇ sub>i,j ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> for range verification of each ⁇ ⁇ sub>i, ⁇ /sub> and ⁇ sub> i,j, ⁇ /sub> .
  • the committer can also send the data as part of the proof ⁇ sub> i,j ⁇ /sub> to participant P ⁇ sub> j ⁇ /sub> .
  • participant Pj verifies the range of each ⁇ i, ⁇ and ⁇ i,j , ⁇ based on the proof ⁇ i,j ,l, homomorphic ciphertext Kj, ⁇ ,l,challenge value e ⁇ , homomorphic ciphertext Di , j, 0 ,l,homomorphic ciphertext Di,j, ⁇ .
  • participant Pj After receiving the proof ⁇ i ,j , participant Pj first verifies the part of the proof ⁇ i ,j. Determine whether the range of ⁇ is within [0, 2 ⁇ +t B], and verify whether the range of ⁇ * is within [0, 2 ⁇ +t B2].
  • participant Pj can verify whether the following equation (14) holds true:
  • participant Pj has received the values of Di ,j,0 , l Di ,j, ⁇ , l Kj , ⁇ , l ⁇ i ,0, ⁇ , ⁇ * and ⁇ * from participant Pi .
  • equation (14) it can be determined whether equation (14) is valid.
  • participant Pj can also verify whether the following equations (16) and (17) hold true:
  • Equation (16) and (17) can be referred to the verification process of equation (9) above.
  • participant Pj verifies the validity of equation (16) based on the proof of ⁇ i ,j , then it is equivalent to verifying the validity of equation (9).
  • l ⁇ i, ⁇ under the condition that the verification equation (17) holds, it is equivalent to verifying that ⁇ * corresponds to l ⁇ i,j, ⁇ . Therefore, it can be further verified that l Di ,j, ⁇ is the ciphertext obtained by homomorphic encryption based on K j, ⁇ , ⁇ i, ⁇ , ⁇ i,j, ⁇ and ⁇ i,j, ⁇ .
  • participant Pj Similar to the above, based on... According to the forking lemma, it can be deduced that the range of each ⁇ ⁇ sub>i, ⁇ ⁇ /sub> should be within [-2 ⁇ +t ⁇ sub> B ⁇ /sub>, 2 ⁇ +t ⁇ sub> B ⁇ /sub>]. This proves, within a certain error range, that each plaintext ⁇ ⁇ sub>i, ⁇ ⁇ /sub> belongs to [the range of ⁇ sub>i, ⁇ /sub>].
  • the homomorphic ciphertext Di ,j, ⁇ corresponding to the second zero-knowledge proof ⁇ sub>i ,j, ⁇ ⁇ /sub> is obtained based on the same homomorphic operation. Therefore, it can be obtained using the same method as verifying the homomorphic ciphertext Di ,j, ⁇ , based on multiple third zero-knowledge proofs. For multiple homomorphic ciphertexts The corresponding plaintext is verified in batches, which will not be elaborated here.
  • This specification also provides a method for batch verification of ciphertext, executed by the encryptor, the method comprising:
  • a proof corresponding to the l homomorphic ciphertexts is generated.
  • the proof includes a first value, which is obtained by linear calculation based on the l first plaintexts and l challenge values.
  • the l challenge values are received from the verifier.
  • the range of each of the challenge values is within a first preset range.
  • the proof is used to verify whether each of the first plaintexts is within a second preset range.
  • the homomorphic ciphertext and the proof are sent to the verifier.
  • the verifier can verify whether each of the first plaintexts is within a second preset range based on the proof, the l challenge values, and the l homomorphic ciphertexts.
  • the verifier first verifies whether the first value is within a third preset range, which corresponds to the second preset range. After the verification is successful, the verifier substitutes the proof, the l challenge values, and the l homomorphic ciphertexts into a preset equation to verify whether the l homomorphic ciphertexts are obtained by homomorphically encrypting the l first plaintexts. In the case of successful verification, based on the third preset range and the first preset range, it is determined that each of the first plaintexts is within the second preset range.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • Hardware description languages such as Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language) are commonly used, with VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog being the most prevalent currently.
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller can be implemented in any suitable manner.
  • it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers.
  • computer-readable program code e.g., software or firmware
  • ASICs application-specific integrated circuits
  • controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320.
  • a memory controller can also be implemented as part of the control logic of the memory.
  • controller in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
  • the systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions.
  • a typical implementation device is a server system.
  • the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
  • each module can be implemented in one or more software and/or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units.
  • the device embodiments described above are merely illustrative.
  • the division of units is only a logical functional division; in actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
  • These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and/or one or more block diagrams.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing a process in a flowchart, one or more processes, and/or
  • a block diagram is a sequence of steps for a function specified in one or more boxes.
  • a computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory
  • one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this 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.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type.
  • One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network.
  • program modules can reside in local and remote computer storage media, including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

一种在门限签名中批量验证密文的方法和设备,其中,所述门限签名包括n个参与方,所述方法包括:至少t+1个所述参与方中的每一个执行:生成l个同态密文,所述l个同态密文与l个第一明文对应;生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从所述至少t+1个参与方中的第二参与方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;将所述l个同态密文和所述证明发送给所述第二参与方。

Description

批量验证密文的方法和计算设备
本申请要求于2024年6月30日提交中国国家知识产权局、申请号为202410868110.3、申请名称为“批量验证密文的方法和计算设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本说明书实施例属于密码学技术领域,尤其涉及一种批量验证密文的方法和计算设备。
背景技术
在密码学中,公开钥匙密码学,简称公钥密码学,又称非对称密码学,是使用一对公钥和私钥(公钥-私钥记为pk-sk,其中pk表示publickey,sk表示secretkey)的密码学,与只用一个私钥的密码学相对应。公钥密码学包括加密算法和数字签名算法。公钥-私钥密码对是现代密码学安全的基石,很多的应用都是基于pk-sk,例如基于https(Hypertext Transfer Protocol Secure,安全的超文本传输协议)应用层加密传输协议以及区块链等。
私钥通常代表拥有该私钥的一方的身份,其只能由私钥的拥有者持有,不能公开,而对应的公钥可以公开出去。使用私钥进行的签名可以表示私钥拥有者对数字世界的某种信息进行的认可,签名的信息在协议的消息中也可以表示私钥拥有者的某种行为。一般的,一个拥有者单独拥有一个私钥,则这个拥有者可以采用自身私钥对某个信息进行签名后发给其它方。接收方收到这个签名后,可以采用对应的公钥对该签名进行验证。验证通过,则接收方可以确认是拥有者对该信息进行了签名,且所签名的信息没有被篡改。
有些时候账户需要灵活的访问控制策略,尤其是区块链上由多方共同控制一个账户的情况。一些需求下,需要由n个参与方共同控制一个账户。这样,控制这个账户的行为,例如转账等,需要由全部的n个参与方均认可才能控制该账户执行转账的行为。另一些需求下,并不需要由n个参与方全部同意,而是可以由其中的t+1个参与方(t<n,t也称为门限)同意的情况下即可以控制账户,这可以通过门限签名来实现。在这类门限密码学中,私钥信息被分享给独立的多个参与方,每一次私钥计算都需要多个参与方同意,从而提高算法安全性;而且当少量参与方发生故障、不可用时,不影响私钥的可用性。一个安全的(t,n)门限密码算法应当满足:(1)任意多于t个参与者可以计算最终的签名、交换的密钥或明文,而t个或少于t个参与者不能得到关于以上结果的任何信息;(2)在算法执行过程中不泄露关于私钥和参与方的私钥份额的任何信息。
在门限签名的过程中包括预处理过程,在预处理过程中可批量生成l个预签名结果,为了对例如l个预签名结果对应的l个同态密文进行验证,每个参与方需要生成l组证明并发送给进行验证的参与方,接收到证明的参与方需要基于l组证明分别对l个同态密文对应的明文范围进行验证,在该过程中,各个参与方都需要提供较多的计算资源和通信资源。
发明内容
本发明的目的在于提供一种批量验证密文的方法,以提供验证密文的效率。
本说明书第一方面提供一种在门限签名中批量验证密文的方法,其中,所述门限签名包括n个参与方,所述方法包括:
至少t+1个所述参与方中的每一个执行:
生成l个同态密文,所述l个同态密文与l个第一明文对应;
生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从所述至少t+1个参与方中的第二参与方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;
将所述l个同态密文和所述证明发送给所述第二参与方。
本说明书第二方面提供一种批量验证密文的方法,由第一参与方执行,所述方法包括:
生成l个同态密文,所述l个同态密文与l个第一明文对应;
生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从第二参与方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;
将所述l个同态密文和所述证明发送给所述第二参与方。
本说明书第三方面一种批量验证密文的方法,由第二参与方执行,所述方法包括:
从第一参与方接收与l个同态密文对应的证明,所述l个同态密文与l个第一明文对应,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值由所述第二参与方提供,所述各个所述挑战值的范围在第一预设范围之内;
基于所述证明、所述l个挑战值和所述l个同态密文,验证各个所述第一明文是否在第二预设范围内。
本说明书实施例中提供一种批量验证密文的方案,通过由加密方基于多个密文和验证方提供的多个挑战值进行线性计算得到零知识证明,验证方可基于该零知识证明针对多个同态密文对应的明文的范围进行批量验证,从而可大大降低加密方和验证方所需要的计算资源和通信资源。
附图说明
为了更清楚地说明本说明书实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本一实施例中分布式门限密钥生成的示意图;
图2是一实施例中分布式门限签名的示意图;
图3为一实施例中在门限签名中进行预处理过程的流程图;
图4为一实施例中在门限签名中对多个预签名结果进行验证的示意图;
图5为本说明书一实施例中在门限签名中对多个预签名结果进行批量验证的示意图;
图6为本说明书一实施例中的一种在门限签名中批量验证密文的方法流程图;
图7为本说明书另一实施例中的一种在门限签名中批量验证密文的方法流程图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
为了清楚的说明本说明书实施例提供的在门限签名中批量验证密文的方案,下文中首先对于门限签名所涉及的相关算法进行介绍。
DKG(Distributed Key Generation)协议,即分布式密钥生成协议,指在参与协议的多个参与方之间通过协作产生一组密钥的分布式协议。
VSS(VerifiableSecretSharing)协议,即可验证秘密分享协议,是DKG协议的重要理论基础。
VSS是指在多个参与方之间进行一个秘密数据的分享时,可以在不泄露秘密数据本身的前提下,将秘密数据拆分成多个分片,交由多个参与方分别保管一个分片。之后,当需要还原秘密数据时,需要收集所有的分片才能成功还原完整的秘密数据。
VSS协议最早由Shamir于1979年提出,是一个基于多项式的秘密分享协议。VSS协议由Shamir秘密分享(Shamir's Secret Sharing,SSS)发展得来,因此先介绍Shamir秘密分享。
Shamir秘密分享,包括秘密分享(或秘密分发)和秘密重构两个阶段,并首先需要由一个Dealer构造一个多项式:
f(x)=a0+a1x+a2x2+...+anxn多项式(*)
其中,a0为要分享的秘密数据。
这个n次多项式由一组系数(a0,a1,a2,…,an)唯一确定,这一组系数包括n+1个值。这样,如果已知该n次多项式对应的曲线通过平面上的n+1个不同的点,即得到n+1个不同的点的坐标(x1,y1),(x2,y2),…,(xn,yn),(xn+1,yn+1),则可以得到n+1个方程的(n+1)元一次方程组,从而由该方程组可以确定该n+1个系数a0,a1,a2,…,an的取值,进而确定该多项式(*),最终也就可以获得秘密数据a0的值。上述n+1个不同的点的坐标(x1,y1),(x2,y2),…,(xn,yn),(xn+1,yn+1)即为n+1个秘密分片。
关于根据已有的若干点,求出通过这些点的曲线,这个求解过程称为多项式插值。实现多项式插值有多种方法,以下介绍一种常见的拉格朗日(Lagrange)插值法。给定一个n次多项式*,已知该多项式对应曲线通过平面上的n+1个点(x1,y1),(x2,y2),…,(xn,yn),(xn+1,yn+1)的坐标,则通过拉格朗日插值法可以得到该n次 曲线的多项式如下:
多项式(**)与多项式(*)实际上是等价的。多项式(*)中设x=0,则f(0)=a0,即可以得到秘密数据a0的值。因此,多项式(**)中设x=0,也可以得到秘密数据a0的值,即f(0)=a0
对于n+1个点(x1,y1),…,(xn,yn),(xn+1,yn+1),上述多项式(**)也可以表达成:
其中,同样的,对于常数项或秘密值,有
综上,可以任取该多项式上的n+1个点,并将这n+1个点在n+1个参与方之间进行分享,例如每个参与方获得一个点的坐标。收集齐任何少于n+1个点的坐标都无法推断出原始的秘密数据a0,只有获得全部n+1个点后才能通过重构多项式系数的方式还原秘密数据a0的值。另外,即使收集齐任何少于n+1个点的坐标,例如是n个点的坐标,则由于过这n个点的n次曲线有无数条,因此从概率上讲也不会泄露秘密数据a0的值。这里的次数n也称为多项式的度。
在此基础上,可以实现门限Shamir秘密分享。例如t-of-n秘密分享,是在n个参与方之间分享秘密,并规定恢复时需要的最少的秘密分片的阈值为大于t,即大于等于t+1。例如在4方参与的交易中,约定阈值为3,即n=4,t=2,则大于等于t+1=3个参与方提供自身的秘密分片时才能还原出秘密,否则无法还原出秘密。具体的,可以构造一个t=2度的多项式:
f(x)=a0+a1x+a2x2多项式(***)
可以得到该2度多项式对应的曲线通过平面上的4个不同的点,即得到4个不同的点的坐标(x1,y1),(x2,y2),(x3,y3),(x4,y4),并在秘密分享阶段将该4个点的坐标分别分发至一个参与方。4个参与方设为Party1,Party2,Party3,Party4,这样,假设Party1具有分片(x1,y1),Party2具有分片(x2,y2),Party3具有分片(x3,y3),Party4具有分片(x4,y4)。由于多项式(**)可以由对应曲线上任3个点来确定,因此,Partyi(i∈{1,2,3,4})中,任意三个参与方都提供自身的秘密分片时,在秘密重构阶段可以还原出多项式(***),从而可以得到秘密值a0。任意少于三个参与方提供自身的秘密分片时,都无法还原出多项式(***),也就无法得到秘密值a0。上述的t也称为门限。
1999年由Rabin等提出一个称为Joint-Feldman的改进协议。该协议的基本思想是 并行执行n次Feldman VSS协议,其中每一位参与者都在本地产生一个随机的多项式,然后把随机选择的秘密值在所有参与者中分享。由于分享的是秘密的一个承诺而不是秘密本身,因此只要不发生超过阈值t的多人共谋作弊,就不能恢复得到秘密。这样的分布式VSS协议也称为DVSS协议(DistributedVSS)。
具体的,以4个参与方为例,假设门限t=2,则多项式的度也为t=2,去中心化门限秘密分享,也就是Joint-Feldman的实现方案,包括如下:
每一个Pi(Partyi简写为Pi,i∈{1,2,3,4})设置要分享的秘密si0,并随机选择其他参数以生成t-1度多项式:
参与方P1生成2度多项式:
f1(z)=a10+a11z+a12z2,其中a10是P1设置的秘密s1
参与方P2生成2度多项式:
f2(z)=a20+a21z+a22z2,其中a20是P2设置的秘密s2
参与方P3生成2度多项式:
f3(z)=a30+a31z+a32z2,其中a30是P3设置的秘密s3
参与方P4生成2度多项式:
f4(z)=a40+a41z+a42z2,其中a40是P4设置的秘密s4
接着,每个参与方Pi生成自身t度多项式对应的曲线上的n个值并分发,这里仍然设n=4,t=2,n=1,2,3,4,则:
参与方P1生成s11=f1(1)、s12=f1(2)、s13=f1(3)、s14=f1(4),自己保留s11,并分别加密发送s12至P2,加密发送s13至P3,加密发送s14至P4
参与方P2生成s21=f2(1)、s22=f2(2)、s23=f2(3)、s24=f2(4),自己保留s22,并分别加密发送s21至P1,加密发送s23至P3,加密发送s24至P4
参与方P3生成s31=f3(1)、s32=f3(2)、s33=f3(3)、s34=f3(4),自己保留s33,并分别加密发送s31至P1,加密发送s32至P2,加密发送s34至P4
参与方P4生成s41=f4(1)、s42=f4(2)、s43=f4(3)、s44=f4(4),自己保留s44,并分别加密发送s41至P1,加密发送s42至P2,加密发送s43至P3
另外,每个参与方Pi还可以生成自身t-1度多项式对应的公共验证参数其中k=0,1,…,t,并公布给每一参与方,具体的:
参与方P1生成k=0,1,…,t,包括广播{A10,A11,A12}至P2、P3和P4
参与方P2生成k=0,1,…,t,包括广播{A20,A21,A22}至P1、P3和P4
参与方P3生成k=0,1,…,t,包括广播{A30,A31,A32}至P1、P2和P4
参与方P4生成k=0,1,…,t,包括广播{A40,A41,A42}至P1、P2和P3
这样,P1接收到s21后,可以用{A20,A21,A22}进行验证;P1接收到s31后,可以用{A30,A31,A32}进行验证;P1接收到s41后,可以用{A40,A41,A42}进行验证;验证方式 类似上述,不再赘述。
接着:
参与方P1可以计算得到秘密份额s1为:s1=s11+s21+s31+s41
参与方P2可以计算得到秘密份额s2为:s2=s12+s22+s32+s42
参与方P3可以计算得到秘密份额s3为:s3=s13+s23+s33+s43
参与方P4可以计算得到秘密份额s4为:s4=s14+s24+s34+s44
每一参与方Pi都可以将自身计算得到的秘密份额si广播给其它参与方。则每一参与方Pi收集齐{s1,s2,s3,s4}中至少t+1个秘密份额后,都可以重构出秘密s0。这里,对于t=2,每一参与方Pi收集齐至少t+1=2+1=3个秘密份额后,也都可以重构出秘密s0
这是因为,可以汇总各参与方的曲线之和,得到总曲线:
f(z)=f1(z)+f2(z)+f3(z)+f4(z)
f(z)=(a10+a11z+a12z2)+(a20+a21z+a22z2)+(a30+a31z+a32z2)
+(a40+a41z+a42z2)
f(z)=(a10+a20+a30+a40)+(a11+a21+a31+a41)z+(a12+a22+a32+a42)z2
多项式(Ⅰ)
这样:
s1=s11+s21+s31+s41=f1(1)+f2(1)+f3(1)+f4(1);
s2=s12+s22+s32+s42=f1(2)+f2(2)+f3(2)+f4(2);
s3=s13+s23+s33+s43=f1(3)+f2(3)+f3(3)+f4(3);
s4=s14+s24+s34+s44=f1(4)+f2(4)+f3(4)+f4(4);
对于总曲线f(z)来说,存在关系:
s1=f1(1)+f2(1)+f3(1)+f4(1)=f(1);
s2=f1(2)+f2(2)+f3(2)+f4(2)=f(2);
s3=f1(3)+f2(3)+f3(3)+f4(3)=f(3);
s4=f1(4)+f2(4)+f3(4)+f4(4)=f(4);
秘密为s0=a10+a20+a30+a40
这样,任一参与方Pi收集齐秘密份额s1、s2、s3、s4中的至少3个后,相当于得到多项式(Ⅰ)对应曲线上的至少3个点,即得到(x1=1,y1=s1),(x2=2,y2=s2),(x3=3,y3=s3),(x4=4,y4=s4)这4个坐标中的至少3个坐标,从而可以恢复出总曲线f(z)。进而,可以计算f(0)=a10+a20+a30+a40=s0,从而可以得到秘密s0
而且,通过验证参数{A10,A11,A12},{A20,A21,A22},{A30,A31,A32},{A40,A41,A42}也可以对秘密si的合法性进行验证,即可以验证(0,si)是否为总曲线上的点。具体的,通过验证以下等式是否成立来判断合法性:
这是因为,存在以下关系:

通常也设多项式(Ⅱ)等号右边为公钥份额,记为pubi,i=1,2,…,n,以用于验证对应的私钥份额。
如前所述,一般可以取xi=ifor each i=1,2,...,n。这样,i可以作为每个参与者的编号。
对于秘密s0的验证,即xi=0,上式可以进一步推导为如下:
定义00=1,而0k=0,k≠0,所以上式可以进一步推导:
可见,基于该多项式(Ⅲ),可以验证s0的合法性。
而且,基于上面的多项式(Ⅲ)中的推导,对于验证s0的合法性,可以进一步化简为:
通常也设多项式(Ⅳ)等号右边为总公钥,记为pub。
上述Joint-Feldman协议可以实现分布式的分享秘密,即完成了DKG的主要内容。上述从Shamir开始到门限Shamir,FeldmanVSS协议,再到Joint-FeldmanDVSS协议,是一系列的秘密分享实现方案。实际上,除了Shamir秘密分享为起点的这一系列方案外,还有基于加性秘密分享(Additive Secret Share)、SPDZ(多方安全计算中一个重要协议,最早在2012年提出)、或中国剩余定理的方案等,最终也可以实现DKG,这里省略,不再赘述。
通过上述DKG协议的实现,可以克服由单个实体生成密钥而带来单点故障导致整体不可用的问题,以及需要信任生成密钥的单点的问题。但是,由于各个参与方Pi广播生成的秘密份额sij,i,j∈(1,2,…,n),n为参与方数量,且每一参与方Pi都可以将自身计算得到的秘密份额si广播给其它参与方,这样每一参与方Pi收集齐{s1,s2,s3,s4}中至少t+1个秘密份额后,都可以重构出秘密s0,这样,导致至少t+1个参与方将获得最终重构出的秘密s0,即会暴露秘密s0,总曲线也将变得不再可用。如果下一次要再次产生一个新的秘密s0,需要重复执行该DKG协议的过程。
DKG协议在阈值与秘密承诺等方面的性质,结合与之相匹配的门限签名算法,就可以用于构造分布式的门限签名协议。区块链作为分布式系统,大量的使用签名算法。这样,区块链中的节点通过DKG分布式地产生秘密份额,并由至少t+1个区块链节点采用秘密份额作为私钥份额对待签名信息进行签名并广播后,任一收集齐至少t+1个签名份额的区块链节点可以恢复出总签名,并可以由上述方式恢复出总公钥,且这个恢复出的总签名可以由该总公钥进行验证,从而实现门限签名。而且,这样的好处在于,每个区块链节点自己持有的秘密份额不需要广播给其它节点,从而不会暴露自身的秘密份额,也就不会暴露私钥,因此一次DKG产生的秘密份额可以重复使用多次,而不用为了每次的门限签名都进行一次DKG协议。
所述门限签名例如可以是基于ECDSA签名算法的门限签名。可以理解,本说明书实施例中门限签名所对应的签名算法不限于ECDSA签名算法,而可以是其他签名算法,如SM2签名算法等。下文中以ECDSA签名算法为例进行描述。
基础的ECDSA签名算法包括:
签名方Alice选择一条椭圆曲线Eq(a,b)和基点G,并共享这些信息至验证方Bob,其中q为模数。
Alice在有限域上选择一个私钥x,并根据该私钥生成公钥X=x·G;
Alice在有限域上选择一个随机数k,并计算R=k-1·G,计算r=f(R),且r≠0;其中,f(R)可以是取R的横坐标。
Alice将待签名的消息m通过hash计算得到摘要值h,即h=hash(m),并计算:
σ=k(h+x·r)mod q式(a)
Alice生成签名sig=(r,σ),发送消息m、签名sig、公钥X至签名验证方Bob。
Bob用公钥X对接收到的消息m和签名sig验证如下等式:
r=f(σ-1·h·G+σ-1·r·X)式(b)
如果等式b成立,则说明签名有效,否则签名无效。这是因为,由式(a)可得:k-1=σ-1(h+x·r)mod q,进而可以将R=k-1·G和k-1代入r=f(R)可得:
r=f(R)=f(k-1·G)=f(σ-1(h+x·r)·G)=f(σ-1·h·G+σ-1·x·r·G)=f(σ-1·h·G+σ-1·r·X)
即根据式(b)右侧,Bob可以采用接收到的签名中的σ、r以及消息m和公钥X来进行计算,验证计算结果是否与签名中的r相等。
上述的基本ECDSA签名算法,可以扩展为门限签名算法。例如经过上述DKG过程,使得n个签名方P1,P2,…,Pn各自具有自身的秘密份额,且有一个总公钥,其中门限值为t,且t<n。n个参与方中的至少t+1个签名方各自分别采用自身秘密份额分别作为私钥份额,对同一待签名信息进行签名并广播后,任一收集齐至少t+1个签名份额的验证方可以恢复出总签名,并可以采用所述总公钥对该总签名进行验证,从而实现门限签名。
在一种基于ECDSA的分布式门限签名方法中,各签名方可以通过门限Shamir、Feldman或Joint-Feldman协议之类有Dealer或无Dealer的方式生成门限私钥,或者通过其它DKG方案实现。这类DKG方案的实施结果,参与方Pi(i∈n)具有私钥份额ωi,任意至少t+1个私钥份额都对应一个总私钥ω。该DKG的结果还可以生成一个总公钥X。这个总公钥X与总私钥ω之间具有关系:ω·G=X。
此外,n个参与方基于DKG得到各自的私钥份额后,可以采用自身私钥份额对同一消息进行签名,生成签名份额。任意至少t+1个签名份额可以聚合为总签名,并且该总签名可以由总公钥验证。
在一种相关技术中,上述关系可以由附图1的分布式门限密钥生成和附图2的分布式门限签名来表示。其中分布式门限签名又包括预处理阶段和在线签名阶段两部分。
以下首先介绍分布式门限密钥生成协议的过程。该过程中,假设共有n个参与方,分别是P1,P2,…,Pn。通过分布式门限密钥生成协议,每个参与方Pi(i={1,2,…,n})可以生成各自的私钥份额。
具体的,每个参与方Pi可以生成一个t度多项式fi(z)=ai0+ai1z+ai2z2+…+aitzt,其中ai0是Pi设置的秘密si0。这里的门限为t),这样多项式的度也为t。
设门限为2,设参与方总数为5,即t=2,n=5,则共有5个参与方P1,P2,P3,P4,P5,其中:
P1生成一个2度(t=2)多项式:f1(z)=a10+a11z+a12z2,其中a10是P1设置的秘密s10
P2生成一个2度(t=2)多项式:f2(z)=a20+a21z+a22z2,其中a20是P2设置的秘密s20
P3生成一个2度(t=2)多项式:f3(z)=a30+a31z+a32z2,其中a30是P3设置的秘密s30
P4生成一个2度(t=2)多项式:f4(z)=a40+a41z+a42z2,其中a40是P4设置的秘密s40
P5生成一个2度(t=2)多项式:f5(z)=a50+a51z+a52z2,其中a50是P5设置的秘密s50
进而,每个参与方Pi可以生成n个秘密份额,自身保留其中一个秘密份额,并加密 发送其余秘密份额至其它参与方。例如,参与方Pi生成自身多项式对应曲线上的n个点的坐标作为n个秘密份额,自身保留其中一个点的坐标,并加密发送其余点的坐标至其它参与方。
具体的,例如:
P1生成s11=f1(1)、s12=f1(2)、s13=f1(3)、s14=f1(4)、s15=f1(5),自己保留s11,并分别加密发送s12至P2,加密发送s13至P3,加密发送s14至P4,加密发送s15至P5
P2生成s21=f2(1)、s22=f2(2)、s23=f2(3)、s24=f2(4)、s25=f2(5),自己保留s22,并分别加密发送s21至P1,加密发送s23至P3,加密发送s24至P4,加密发送s25至P5
P3生成s31=f3(1)、s32=f3(2)、s33=f3(3)、s34=f3(4)、s35=f3(5),自己保留s33,并分别加密发送s31至P1,加密发送s32至P2,加密发送s34至P4,加密发送s35至P5
P4生成s41=f4(1)、s42=f4(2)、s43=f4(3)、s44=f4(4)、s45=f4(5),自己保留s44,并分别加密发送s41至P1,加密发送s42至P2,加密发送s43至P3,加密发送s45至P5
P5生成s51=f5(1)、s52=f5(2)、s53=f5(3)、s54=f5(4)、s55=f5(5),自己保留s55,并分别加密发送s51至P1,加密发送s52至P2,加密发送s53至P3,加密发送s54至P4
这样:
P1本地具有不同参与方生成的秘密份额s11、s21、s31、s41、s51
P2本地具有不同参与方生成的秘密份额s12、s22、s32、s42、s52
P3本地具有不同参与方生成的秘密份额s13、s23、s33、s43、s53
P4本地具有不同参与方生成的秘密份额s14、s24、s34、s44、s54
P5本地具有不同参与方生成的秘密份额s15、s25、s35、s45、s55
接着,每一参与方Pi可以将自身保留的一个秘密份额sii和从其它参与方Pj得到的秘密份额sji汇总后得到私钥份额,汇总方式例如是求和,如参与方Pi的私钥份额具体例如:
参与方P1可以计算得到私钥份额s1为:s1=s11+s21+s31+s41+s51
参与方P2可以计算得到私钥份额s2为:s2=s12+s22+s32+s42+s52
参与方P3可以计算得到私钥份额s3为:s3=s13+s23+s33+s43+s53
参与方P4可以计算得到私钥份额s4为:s4=s14+s24+s34+s44+s54
参与方P5可以计算得到私钥份额s5为:s5=s15+s25+s35+s45+s55
而且,每个参与方Pi还可以生成自身t度多项式对应的公共验证参数Aik=aikG,其中k=0,1,…,t,并公布给每一参与方,具体的:
参与方P1生成A1k=a1kG,k=0,1,…,t=2,包括A10=a10G=s10G,A11=a11G,A12=a12G,广播{A10,A11,A12}至P2、P3、P4和P5
参与方P2生成A2k=a2kG,k=0,1,…,t=2,包括A20=a20G=s20G,A21=a21G,A22=a22G,广播{A20,A21,A22}至P1、P3、P4和P5
参与方P3生成A3k=a3kG,k=0,1,…,t=2,包括A30=a30G=s30G,A31=a31G,A32=a32G,广播{A30,A31,A32}至P1、P2、P4和P5
参与方P4生成A4k=a4kG,k=0,1,…,t=2,包括A40=a40G=s40G,A41=a41G,A42=a42G,广播{A40,A41,A42}至P1、P2、P3和P5
参与方P5生成A5k=a5kG,k=0,1,…,t=2,包括A50=a50G=s50G,A51=a51G,A52=a52G,广播{A50,A51,A52}至P1、P2、P3和P4
每个参与方Pi还可以根据Pj的公共验证参数{Aj0,Aj1,…,Ajt}验证Pj发来的秘密份额sji,例如通过下面公式验证:
sjiG=Aj0+iAj1+…+itAjt
具体的:
参与方P1通过s21G=A20+A21+A22验证s21,通过s31G=A30+A31+A32验证s31,通过s41G=A40+A21+A42验证s41,通过s51G=A50+A51+A52验证s51
参与方P2通过s12G=A10+2A11+22A12验证s12,通过s32G=A30+2A31+22A32验证s32,通过s42G=A40+2A21+22A42验证s42,通过s52G=A50+2A51+22A52验证s52
参与方P3通过s13G=A10+3A11+32A12验证s13,通过s23G=A30+3A31+32A32验证s23,通过s43G=A40+3A21+32A42验证s43,通过s53G=A50+3A51+32A52验证s53
参与方P4通过s14G=A10+4A11+42A12验证s14,通过s24G=A20+4A21+42A22验证s24,通过s34G=A40+4A21+42A42验证s42,通过s54G=A50+4A51+42A52验证s52
参与方P5通过s15G=A10+5A11+52A12验证s15,通过s25G=A20+5A21+52A22验证s25,通过s35G=A30+5A31+52A32验证s35,通过s45G=A40+5A41+52A42验证s45
任一方如果验证不通过,可以终止协议。
另一方面,每个参与方Pi可以计算得到总公钥X,计算方式与前述类似,这里例如通过下面公式:
如前所述,该总公钥可以用于验证后续聚合后的总签名。
此外,为了抵抗恶意敌手的攻击,进一步的,每一参与方Pi可以生成自身秘密对应公钥的哈希值并广播,从而接收方可以通过该哈希值来验证每一参与方Pi发来的秘密对应公钥的正确性。例如:
P1计算H1()为哈希算法,A10=a10G为秘密s10对应公钥(通过椭圆曲线上的运算得到,这里是积的形式);P1可以广播至其它参与方,任一接收方接收到后,可以用该验证A10的正确性,从而可以抵抗恶意敌手的攻击;
P2计算H1()为哈希算法,A20=a20G为秘密s20对应公钥(通过椭圆曲线上的运算得到,这里是积的形式);P2可以广播至其它参与方,任一接收方接收到后,可以用该验证A20的正确性,从而可以抵抗恶意敌手的攻击;
P3计算H1()为哈希算法,A30=a30G为秘密s30对应公钥(通过椭圆曲线上的运算得到,这里是积的形式);P3可以广播至其它参与方,任一接收方接收到后,可以用该验证A30的正确性,从而可以抵抗恶意敌手的攻击;
P4计算H1()为哈希算法,A40=a40G为秘密s40对应公钥(通过椭圆曲线上的运算得到,这里是积的形式);P4可以广播至其它参与方,任一接收方接收到后,可以用该验证A40的正确性,从而可以抵抗恶意敌手的攻击;
P5计算H1()为哈希算法,A50=a50G为秘密s50对应公钥(通过椭圆曲线上的运算得到,这里是积的形式);P5可以广播至其它参与方,任一接收方接收到后,可以用该验证A50的正确性,从而可以抵抗恶意敌手的攻击;
此外,每个参与方Pi可以生成自身的用于同态加密的公私钥对,例如Paillier公私钥对(Ni,ski),其中ski为私钥,Ni为对应公钥。同态加密技术可以将明文数据进行“同态”处理,即将明文数据映射到一个新的、保密的状态,从而使得只有拥有密钥的接收者才能获取明文数据。Paillier同态加法是一种在密码学中广泛使用的公钥加密系统,由帕斯卡·佩利埃(Pascal Paillier)在1999年提出。它的主要特点是具有加法同态性质,这意味着给定两个密文,可以在不解密的情况下计算出它们对应明文之和的密文。具体来说,假设有两个明文m1和m2,它们的Paillier加密密文分别为c1和c2。Paillier的加法同态性质可以实现计算c1和c2的乘积得到的一个新的密文c,它正好是m1和m2的和的密文。这种同态性质可以在不泄露原始数据的情况下完成对加密数据进行某种形式的计算。
每个参与方Pi生成的同态加密的公私钥对后,可以将其中的公钥发送至其它参与方。
例如,参与方P1生成Paillier加密的公私钥(N1,sk1)后,将同态加密公钥N1广播至其它参与方;参与方P2生成Paillier加密的公私钥(N2,sk2)后,将同态加密公钥N2广播至其它参与方;参与方P3生成Paillier加密的公私钥(N3,sk3)后,将同态加密公钥N3广播至其它参与方;参与方P4生成Paillier加密的公私钥(N4,sk4)后,将同态加密公钥N4广播至其它参与方;参与方P5生成Paillier加密的公私钥(N5,sk5)后,将同态加密公钥N5广播至其它参与方。
这样,每一参与方Pi本地可以保存自身秘密、自身私钥份额、自身同态加密私钥、总公钥和每个参与方的同态加密公钥。
经过上述分布式门限密钥生成过程,相当于存在一个总的多项式:
f(z)=f1(z)+f2(z)+f3(z)+f4(z)+f5(z)
=a10+a11z+a12z2+a20+a21z+a22z2+a30+a31z+a32z2+a40
+a41z+a42z2+a50+a51z+a52z2
=(a10+a20+a30+a40+a50)+(a11+a21+a31+a41+a51)z
+(a12+a22+a32+a42+a52)z2
如前所述,该多项式对应一个总曲线,并且存在如下关系:
s1=f1(1)+f2(1)+f3(1)+f4(1)+f5(1)=f(1);
s2=f1(2)+f2(2)+f3(2)+f4(2)+f5(2)=f(2);
s3=f1(3)+f2(3)+f3(3)+f4(3)+f5(3)=f(3);
s4=f1(4)+f2(4)+f3(4)+f4(4)+f5(4)=f(4);
s5=f1(5)+f2(5)+f3(5)+f4(5)+f5(5)=f(5);
在前述的DKG方案中,每一参与方Pi都可以将自身计算得到的秘密份额si广播给其它参与方。则每一参与方Pi收集齐{s1,s2,s3,s4,s5}中至少t+1个秘密份额后,都可以重构出秘密s0。例如对于门限为2,每一参与方Pi收集齐至少3个秘密份额后,也都可以重构出秘密s0
而本实施例中,目的是实现分布式的门限签名,因此并不将秘密份额si发送至其它参与方,而是作为私钥份额。这样也不会由任一参与方或其它方获得至少t+1个秘密 份额后恢复得出总的秘密,即不会获得总私钥,从而保证多个参与方通过一次分布式门限密钥生成协议后得到的私钥份额,可以在后续重复进行分布式门限签名。
以下介绍本实施例中的分布式门限签名过程,该过程可以包括预处理阶段和在线签名阶段两部分。上述分布式密钥生成过程需要n个参与方共同参与协议过程。下述的分布式门限签名过程,只需要至少t+1个参与方共同参与协议过程。这里仍然以门限t=2为例。
预处理阶段:至少t+1个参与方生成各自的第一随机值ki和第二随机值γi,各参与方还采用同态加密算法并通过预处理阶段协议得到坐标分量r及各自的私钥份额分量掩盖值χi
图3为一实施例中在门限签名中进行预处理过程的流程图,具体可以包括:
步骤S10,t+1个参与方,每个参与方Pi计算Lagrange系数并计算私钥份额分量xi=λisi。这里例如i取1、2、3,则:
参与方P1计算Lagrange系数并计算私钥份额分量x1=λ1s1
参与方P2计算Lagrange系数并计算私钥份额分量x2=λ2s2
参与方P3计算Lagrange系数并计算私钥份额分量x3=λ3s3
步骤S11:至少t+1个参与方中的每一个生成l组第一随机值和第二随机值,及对应的第一随机值同态密文和第二随机值公钥哈希。
具体例如,参与方Pi,i∈[1,t+1]生成第一随机值ki和第二随机值γi,且ki,其中,在椭圆曲线加密(ECC)中,通常指的是模q的整数集,即表示由从0到q-1的所有整数构成的集合,其中的运算(如加法、乘法等)都是在模q的条件下进行的。这种模运算保证了在有限域内的运算闭合性和安全性,是椭圆曲线加密技术中确保加密强度的关键因素之一。例如,椭圆曲线上的点加运算或标量乘运算,其系数和结果都需要在模q的条件下处理,以确保结果仍然位于合法的椭圆曲线上。
在此基础上,参与方Pi可以计算第一随机值同态密文,如Paillier密文Ki=Ei(ki),以及计算第二随机值公钥哈希,如gi=H1iG),H1()为哈希算法,与前述类似。t+1为3,参与方为P1、P2、P3时:
P1生成第一随机值k1和第二随机值γ1,并计算第一随机值的Paillier密文K1=E1(k1),以及计算第二随机值公钥哈希g1=H11G);
P2生成第一随机值k2和第二随机值γ2,并计算第一随机值的Paillier密文K2=E2(k2),以及计算第二随机值公钥哈希g2=H12G);
P3生成第一随机值k3和第二随机值γ3,并计算第一随机值的Paillier密文K3=E3(k3),以及计算第二随机值公钥哈希g3=H13G);
进而,至少t+1个参与方中的每一个,Pi可以发送生成的第一随机值同态密文至其它参与方,如:
P1广播K1至P2和P3
P2广播K2至P1和P2
P3广播K3至P1和P2
上述一组第一随机值和第二随机值可用于得到一个签名。至少t+1个参与方中的每一个可生成l组第一随机值和第二随机值,且k,从而可用于生成对相同或不同消息的l个签名。相应的,各个参与方基于ki,ξ生成同态密文Ki,ξ,并将Ki,ξ发送给至少t+1个参与方中其他各个参与方。
步骤S12:接收到广播的参与方Pi,对于Pj发来的Ki,ξ,对于每个Ki,ξ,选取两个掩数βi,j,ξ,这里表示该有限域下标的取值范围是q的5次方,这是经过证明的一个具备密码学上安全性的取值范围。掩数βi,j,ξ,一般可以在范围内选择较大的值。进而,Pi可以通过同态算法计算中间密文Di,j,ξ并发送至Pj
上面两个公式中的⊙、分别表示同态乘和同态加运算。Ej()表示用参与方Pj的同态公钥进行同态加密,其中,j∈[1,t+1],j≠i,ξ∈[1,l]。
具体的:
P1接收到P2广播的l个K2,ξ=E2(k2,ξ)后,对于每个K2,ξ,选取两个掩数β1,2,ξ, 进而P1可以通过同态算法计算l组中间密文D1,2,ξ并发送至P2,其中:
这样,P2收到D1,2,ξ=E21,2,ξ)和尽管P2具有对应的Paillier私钥e2,k2,ξ也是P2生成的,但由于其中有P1选择的掩数β1,2,ξ,的掩盖作用,P2无法推测出P1的私钥份额x1和随机值γ1,ξ,从而在此基础上完成了信息传递。下面类似,不再赘述。
P1接收到P3广播的l个K3,ξ=E3(k3,ξ)后,可以通过同态算法计算l组中间密文D1,3,ξ并发送至P3,其中:
类似的,P2接收到P1广播的l个K1,ξ=E1(k1,ξ)后,可以通过同态算法计算l组中间密文D2,1,ξ并发送至P1,其中:
P2接收到P3广播的l个K3,ξ=E3(k3,ξ)后,可以通过同态算法计算l组中间密文D2,3,ξ并发送至P3,其中:
类似的,P3接收到P1广播的l个K1,ξ=E1(k1,ξ)后,可以通过同态算法计算l组中间密文D3,1,ξ并发送至P1,其中:
P3接收到P2广播的l个K2,ξ=E2(k2,ξ)后,可以通过同态算法计算l组中间密文D3,2,ξ并发送至P2,其中:
步骤S13:每个参与方Pi计算中间值δi,ξ和私钥份额分量掩盖值χi,得到l组预处理结果。
进一步的,每一参与方Pi对接收到的l组中间密文Dj,i,ξ采用对应的同态加密私钥进行解密,分别得到l组明文αj,i,ξ,这里称为中间明文,其中:αj,i,ξ=γj,ξ·ki,ξj,i,ξ
进而对于每个ξ∈[1,l],可以基于第一随机值ki,ξ和第二随机值γi,ξ以及中间明文αj,i,ξ,计算中间值δi,ξ,并可以基于私钥份额分量xi和第一随机值ki,ξ以及中间明文αj,i,ξ,计算私钥份额分量掩盖值χi
这里,存在两个关系式:
这是因为,对于每个ξ:

此外,每一参与方Pi还可以计算l个第二随机值γi,ξ对应的随机数公钥Γi,ξ=γi,ξG,并将l个δi,ξ和Γi,ξ广播给至少t+1个参与方中的其他参与方。各个参与方Pi对于每个ξ,由上述关系式1可以计算:
可见这与前述ECDSA的形式是一样的。Pi可以计算得到rξ=f(Rξ),f(Rξ)如前可以是取点Rξ的横坐标。
之后,参与方Pi可存储作为l组预处理结果,或预签名结果。
例如:
P1本地可保存
在线阶段:所述至少t+1个参与方各自针对待签名的消息m,在l组预处理结果中,选取未使用的一组(rξ,k1,ξ1,ξ1,ξ),其中各个参与方使用相同的ξ对应的一组预处理结果,采用自身的第一随机值ki,ξ、私钥份额分量掩盖值χi,ξ和所述坐标分量rξ对同一消息签名,得到至少t+1数量的签名份额σi,ξ
σi,ξ=ki,ξH(m)+χi,ξrξ
其中,H(m)为消息m的哈希值。之后,各个参与方可向其他参与方广播σi,ξ
这样,任一方获得至少t+1数量的签名份额后,可以将所述至少t+1数量的签名份额聚合为总签名sig=(rξξ)。并且,可以采用前述的总公钥X验证该总签名σξ的正确性。这是因为,该公式的形式是与前述ECDSA中的形式是一致的。
需要首先说明的是,存在以下关系:
这样,至少t+1数量的签名份额聚合为总签名σξ为:
这里的x=s10+s20+…+sn0=f(0),可见这里的σξ=kξ·H(m)+kξ`x`rξ,与前述ECDSA签名算法中的式(a)实质相同,因此,显然可以采用总公钥X验证。
此外,在上述步骤S11中,参与方中的每一个还可以生成l个第一随机值同态密文Ki,ξ的l个第一零知识证明Φi,ξ,并广播至其它参与方;相应的,在S12中,每一参与方接收到第一随机值同态密文Ki,ξ和对应的第一零知识证明Φi,ξ后,通过该第一零知识证明Φi,ξ验证对应的第一随机值同态密文Ki,ξ,即,验证Ki,ξ对应的明文ki,ξ属于这样可以抵抗恶意敌手的攻击。如果验证通过则本实施例流程可以继续后续过程,否则说明不合法,可以终止本流程。
其中,零知识证明(ZKP),指的是证明者能够在不向验证者提供任何有用的信息的情况下,使验证者相信某个论断是正确的。具体而言,证明者通过只有自己拥有的见证信息(witness)生成一个某个论断(statement)的证明σ,验证者可以通过验证σ从而确定证明者拥有该论断的witness,同时又无法得到该witness的任何信息。
此外,S12中,参与方中的每一个还可以生成l个第二零知识证明Φi,j,ξ以及l个第三零知识证明Φi,j,ξ用于证明中间密文Di,j,ξ对应的零知识证明用于证明中间密文对应的表示模q5的整数集,即为由从0到q5-1的所有整数构成的集合;相应的,在步骤S13中,每一参与方接收到中间密文Di,j,ξ和对应的第二零知识证明Φi,j,ξ后,通过该第二零知识证明Φi,j,ξ验证对应的中间密文Di,j,ξ,且类似的,每一参与方接收到中间密文和对应的第三零知识证明后,通过该第三零知识证明验证对应的中间密文这样可以抵抗恶意敌手的攻击。如果验证通过则本实施例流程可以继续后续过程,否则说明不合法,可以终止本流程。
也就是说,如图4所示,与上述过程对应的,每个参与方Pi需要生成l组证明以用于对l个预签名结果对应的l个同态密文分别进行验证,其中,每组证明中包括:第一零知识证明Φi,ξ、与其他至少t个参与方分别对应的至少t个第二零知识证明Φi,j,ξ、以及与其他至少t个参与方分别对应的至少t个第三零知识证明并需要将所述l组证明发送给验证方,例如参与方Pj。参与方Pj在接收到所述l组证明之后,需要关于每组证 明进行验证计算。在该过程中,各个参与方都需要较多的计算资源和通信资源。
为此,本说明书实施例中提供一种在门限签名中批量验证密文的方案。如图5所示,本说明书实施例中可针对多组预签名结果生成一组证明,该一组证明可对l个预处理过程中的l个同态密文一次性进行批量验证,从而可大大降低各个参与方需要的计算资源和通信资源。例如,该组证明中包括:第四零知识证明Φi、与其他至少t个参与方分别对应的至少t个第五零知识证明Φi,j、以及与其他至少t个参与方分别对应的至少t个第六零知识证明其中第四零知识证明Φi可用于对l个同态密文Ki,ξ进行批量验证,第五零知识证明可用于对发送给参与方Pj的l个中间密文Di,j,ξ进行批量验证,第六零知识证明可用于对发送给参与方Pj的l个中间密文进行批量验证。
下文分别参考图6~图7中的流程图描述上述几种批量验证过程。
图6为本说明书一实施例中的一种在门限签名中批量验证密文的方法流程图,该方法可由所述至少t+1个参与方中的任意两个参与方之间进行,图6中示出参与方Pi和参与方Pj作为示例。
如图6所示,在步骤S601,参与方Pi生成同态加密的公私钥对(Ni,ski),在步骤S603,参与方Pi将其同态加密公钥Ni发送给参与方Pj。步骤S601和步骤S603可参考上文的描述,在此不再赘述。可以理解,由于参与方Pi有可能已经预先生成了公私钥对,并预先将公钥发送给参与方Pj,因此,步骤S601和步骤S603不是必须的。
在步骤S605,参与方Pi生成l个ki,ξ的l个同态密文Ki,ξ
具体是,参与方Pi可生成l个用于进行同态加密的算法随机数ρi,ξ,可基于Paillier同态算法如公式(1)所示计算Ki,ξ
其中,各个ρi,ξ通过在中随机选取而获得,表示与Ni互素且小于Ni的空间。
在步骤S607,参与方Pi将l个同态密文Ki,ξ发送给参与方Pj
在步骤S609,参与方Pj向参与方Pi发送l个挑战值eξ,即e=(e1,e2,…el)。
其中,e1,e2,…el中的每个eξ通过在({0,1}t)l的范围中随机选取而获取。其中,t的大小根据安全级别预先确定。{0,1}t表示长度为t的所有二进制序列。每个序列由t个元素组成,每个元素可以是0或1。因此,集合{0,1}t可包含2t个不同的序列,其包括在0~2t-1的范围内的整数。
在步骤S611,参与方Pi生成证明Φi,证明Φi中包括基于对l个ki,ξ和l个挑战值eξ的线性计算得到。在步骤S613,参与方Pi将证明Φi发送给参与方Pj
证明Φi即为零知识证明,假设的范围为[0,B],则证明Φi对应的断言包括B,{Ki,ξ}ξ∈[l],参与方Pi将{ki,ξξ}ξ∈[l]作为私有数据(witness),证明Φi可用于证明各个明文ki,ξ的范围在[0,B]内,即属于
通过基于l个ki,ξ和l个挑战值eξ的线性计算得到由于挑战值eξ的范围确定,从而参与方Pj可在确定确实是基于l个ki,ξ和l个挑战值eξ进行预设的线性计算得到之后,根据的范围和l个挑战值eξ的范围证明各个ki,ξ的范围,同时不泄露各个ki,ξ的值,从而实现对各个ki,ξ的范围的零知识证明。
具体是,参与方Pi可如下面的公式(2)生成掩盖值ki,0,算法随机数ρi,0,及掩盖值ki,0的同态密文Ki,0
其中,“←$”表示在数值范围内随机选取,ε为统计值,可将其设置为大于或等于t。
之后,参与方Pi可基于公式(2)计算证明Φi中的如下面的公式(3)所示:
之后,参与方Pi可将证明Φi发送给参与方Pj,以用于进行对各个ki,ξ的范围验证。
在一种实施方式中,参与方Pi还可以从参与方Pj接收辅助参数以用于生成Ring-Pedersen承诺Cti,ξ
具体是,参与方Pi可首先生成其中ξε[l]。
之后,参与方Pi可生成l+1个承诺值Cti,ξ,其中ξε[0,l]:
参与方Pi还生成证明Φi中的
在该实施方式中,参与方Pi可将l+1个承诺值Cti,ξ和证明Φi发送给参与方Pj,以用于进行对各个ki,ξ的范围验证。在一种实施方式中,可以将l+1个承诺值Cti,ξ作为证明Φi中的部分数据。
在步骤S615,参与方Pj基于证明Φi、l个挑战值eξ和l个同态密文Ki,ξ验证各个ki,ξ的范围。
参与方Pj在接收到证明Φi之后,首先验证证明Φi中的ki *的范围是否在[0,2ε+tB]中。
之后,参与方Pj可验证如下的等式(6)是否成立:
其中,参与方Pj已经从参与方Pi接收了Ki,0、l个Ki,ξ、Ni的值,通过将这些参数的值和各个eξ的值分别代入等式(6)的左右两边进行计算,即可判断等式(6)是否成立。
在确定等式(6)成立的情况中,可确定l个是基于l个ρi,ξ对l个ki,ξ进行同态加密得到的密文。这是因为:
对于等式(6)左侧:
假设满足,

将上面两个式子代入等式(6)左侧可得:
假设等式(6)右侧的参数如公式(3)中定义,将公式(3)代入等式(6)的右侧可得:
显然,公式(7)与公式(8)实际是相等的。因此,根据强RSA假设,参与方Pj在基于证明Φi验证等式(6)成立的情况下,也即相当于验证了等式(6)的左侧和右侧分别满足上述假设,从而可确定l个是基于l个ρi,ξ对l个ki,ξ进行同态加密得到的密文。
在一种实施方式中,参与方Pj还可以验证如下等式(9)是否成立:
其中,对于等式(9)左侧,假设满足公式(4)的定义,根据公式(4)可得:
假设等式(9)右侧满足公式(3)和公式(4)的假设,根据公式(3)和公式(4)可得,公式(10)与等式(9)右侧一致。因此,根据强RSA假设,参与方Pj在基于证明Φi验证等式(9)成立的情况下,也即相当于验证了等式(9)的左侧和右侧分别满足上述假设。即可确定与l个ki,ξ对应,因此可进一步验证l个是基于l个ρi,ξ对l个ki,ξ进行同态加密得到的密文。
参与方Pj在上述验证通过之后,基于根据分叉引理(Forking Lemma),基于的范围[0,2ε+tB]和各个eξ的范围,可推导出各个ki,ξ的范围应在[-2ε+tB,2ε+tB]内,从而在一定误差范围内证明了各个明文ki,ξ属于
在上述验证过程中,参与方Pi将证明Φi提供给参与方Pj,证明Φi中通过在中包括各个ki,ξ的信息,在中包括各个ρi,ξ的信息,而参与方Pj基于无法推导出任一ki,ξ或ρi,ξ,因此证明Φi具备零知识证明性。
图7为本说明书另一实施例中的一种在门限签名中批量验证密文的方法流程图,该方法可由所述至少t+1个参与方中的任意两个参与方之间进行,图6中示出参与方Pi和参与方Pj作为示例。
参考图7,在步骤S701,参与方Pi生成l个同态密文Di,j,ξ
参考上文的描述,至少t+1个参与方中的参与方Pi在门限签名的预处理阶段中,生成l个中间密文Di,j,ξ
为了生成l个Di,j,ξ,参与方Pi首先生成l个γi,ξ和l个βi,j,ξ,其中另外,参与方Pi还生成用于进行同态加密的l个随机数ρi,j,ξ,其中,其中,Nj为从参与方Pj接收的参与方Pj的公钥。
根据Paillier算法,
在步骤S703,参与方Pi将l个同态密文Di,j,ξ发送给参与方Pj
在步骤S705,参与方Pi生成证明Φi,j,证明Φi,j中包括β*和l个β*基于对l个-βi,j,ξ和l个挑战值eξ线性计算而得到,基于对掩盖值γi,0,ξ,eξi,ξ线性计算而得到。在步骤S707,参与方Pi将证明Φi,j发送给参与方Pj
对于零知识证明Φi,j,假设的范围为[0,B2],则其断言包括B、B2、{Kj,ξ,Di,j,ξ}ξ∈[l],参与方Pi包括{γi,ξi,j,ξi,j,ξ}ξ∈[l]作为私有数据(witness),证明Φi,j可用于证明各个明文γi,ξ的范围在[0,B]内,即属于各个明文βi,j,ξ的范围在[0,B2]内,即属于
具体是,参与方Pi可如下面的公式(11)所示生成l个掩盖值γi,0,ξ,算法随机数ρi,j,0, 及掩盖值βi,j,0
然后,可如下面的公式(12)所示,生成同态密文Di,j,0
从而,参与方Pi可如公式(13)所示计算β*、l个和ρ*的值作为证明Φi,j中包括的数据:
为了基于Ring-Pedersen承诺进行验证,参与方Pi还可以生成:
其中ξε[l]
其中ξε[l]。
之后,参与方Pi可生成如下承诺值:
其中ξε[l]
从而,参与方Pi还生成证明Φi,j中的
在该实施方式中,参与方Pi可将上述承诺值和证明Φi,j发送给参与方Pj,以用于进行对各个γi,ξ和βi,j,ξ的范围验证。在一种实施方式中,也可以将承诺者作为证明Φi,j中的部分数据发送给参与方Pj
在步骤S709,参与方Pj基于证明Φi,j、l个同态密文Kj,ξ、l个挑战值eξ、同态密文Di,j,0、和l个同态密文Di,j,ξ验证各个γi,ξ和βi,j,ξ的范围。
参与方Pj在接收到证明Φi,j之后,首先验证证明Φi,j中的的范围是否在[0,2ε+tB],并验证β*的范围是否在[0,2ε+tB2]的范围中。
之后,参与方Pj可验证如下的等式(14)是否成立:
其中,参与方Pj已经从参与方Pi接收了Di,j,0、l个Di,j,ξ、l个Kj,ξ、l个γi,0,ξ、β*和ρ*的值,通过将这些值以及各个eξ的值和Nj的值代入公式(14)进行计算,即可判读等式(14)是否成立。
在确定等式(14)成立的情况中,与上述等式(6)类似地,基于强RSA假设,可确定l个Di,j,ξ是基于Kj,ξ、γi,ξ、βi,j,ξ和ρi,j,ξ进行同态加密得到的,这是因为:
对于等式(14)的左边,假设Di,j,0满足公式(12)的定义,Di,j,ξ满足在步骤S701中的定义,
则可得:

对于等式(14)的右边,假设β*、和ρ*满足公式(13)的定义,则可以得出上述公式(15)与等式(14)的右边是相等的。因此,根据强RSA假设,参与方Pj在基于证明Φi,j验证等式(14)成立的情况下,也即相当于验证了等式(14)的左侧和右侧分别满足上述假设,从而可确定l个Di,j,ξ是基于Kj,ξ、γi,ξ、βi,j,ξ和ρi,j,ξ进行同态加密得到的。
在一种实施方式中,参与方Pj还可以验证如下等式(16)和等式(17)是否成立:
等式(16)和等式(17)的验证可参考上文对等式(9)的验证过程。根据强RSA假设,参与方Pj在基于证明Φi,j验证等式(16)成立的情况下,也即相当于验证了与l个γi,ξ对应,在验证等式(17)成立的情况下,也即相当于验证了β*与l个βi,j,ξ对应,因此可进一步验证l个Di,j,ξ是基于Kj,ξ、γi,ξ、βi,j,ξ和ρi,j,ξ进行同态加密得到的密文。
参与方Pj在上述验证通过之后,与上文类似地,基于根据分叉引理(Forking Lemma),可推导出各个γi,ξ的范围应在[-2ε+tB,2ε+tB]内,从而在一定误差范围内证明了各个明文γi,ξ属于基于β*=βi,j,0+∑ξε[l]eξ(-βi,j,ξ),根据分叉引理(Forking Lemma),可推导出各个βi,j,ξ的范围应在[-2ε+tB2,2ε+tB2]内,从而在一定误差范围内证明了各个明文βi,j,ξ属于
对于上述多个第三零知识证明由于其对应的同态密文与第二零知识证明Φi,j,ξ对应的同态密文Di,j,ξ基于相同的同态运算得到,因此,可以使用与验证同态密文Di,j,ξ相同的方式,基于多个第三零知识证明对多个同态密文对应的明文进行批量验证,在此不再赘述。
可以理解,上文中虽然以门限签名为例描述了批量验证密文的方法,本说明书不限于此。
本说明书实施例还提供一种批量验证密文的方法,由加密方执行,所述方法包括:
生成l个同态密文,所述l个同态密文与l个第一明文对应;
生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从验证方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;
将所述l个同态密文和所述证明发送给所述验证方。
所述验证方在接收到所述证明之后,可基于所述证明、所述l个挑战值和所述l个同态密文,验证各个所述第一明文是否在第二预设范围内。
具体是,验证方首先验证所述第一数值是否在第三预设范围之内,所述第三预设范围与所述第二预设范围对应;在验证通过之后,通过将所述证明、所述l个挑战值和所述l个同态密文代入预设等式,以用于验证所述l个同态密文是否是通过对所述l个第一明文进行同态加密而得到;在验证通过的情况中,基于所述第三预设范围和所述第一预设范围,确定各个所述第一明文在所述第二预设范围内。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如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)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为服务器系统。当然,本申请不排除随着未来计算机技术的发展,实现上述实施例功能的计算机例如可以为个人计算机、膝上型计算机、车载人机交互设备、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
虽然本说明书一个或多个实施例提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或终端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式数据处理环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。例如若使用到第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书一个或多个时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本发明是参照根据本发明实施例的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或 方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储、石墨烯存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
本领域技术人员应明白,本说明书一个或多个实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
以上所述仅为本说明书一个或多个实施例的实施例而已,并不用于限制本本说明书一个或多个实施例。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进 等,均应包含在权利要求范围之内。

Claims (16)

  1. 一种在门限签名中批量验证密文的方法,其中,所述门限签名包括n个参与方,所述方法包括:
    至少t+1个所述参与方中的每一个执行:
    生成l个同态密文,所述l个同态密文与l个第一明文对应;
    生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从所述至少t+1个参与方中的第二参与方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;
    将所述l个同态密文和所述证明发送给所述第二参与方;
    所述第二参与方基于所述证明、所述l个挑战值和所述l个同态密文验证各个所述第一明文的范围。
  2. 根据权利要求1所述的方法,所述l个同态密文与l个算法随机数对应,所述证明中还包括第二数值,所述第二数值基于所述l个算法随机数和所述l个挑战值计算得到。
  3. 根据权利要求1所述的方法,还包括:所述n个参与方中的每一个各自生成同态加密的公私钥对,将同态加密公钥发送至其它参与方。
  4. 根据权利要求1所述的方法,所述生成l个同态密文包括:所述至少t+1个参与方中的每一个在所述分布式门限签名的预处理阶段生成l个同态密文,所述l个同态密文用于生成l组预处理结果。
  5. 根据权利要求4所述的方法,所述l个同态密文包括l个第一同态密文,所述l个第一明文包括l个第一随机数,所述l个第一同态密文通过基于所述l个算法随机数分别对所述l个第一随机数进行同态加密而获得。
  6. 根据权利要求5所述的方法,所述至少t+1个参与方中的每一个还执行:生成第一掩盖值和第二掩盖值,所述第一掩盖值在所述第二预设范围对应的第三预设范围内随机选取获得,所述第一数值基于所述第一掩盖值与所述l个第一随机数的加权和计算得到,其中,各个第一随机数的权重为与各个第一随机数对应的挑战值;
    所述第二掩盖值与同态加密的公钥互素,所述第二数值基于将所述第二掩盖值与所述l个算法随机数的幂次方的乘积相乘而计算得到,其中,各个算法随机数的指数为与该算法随机数对应的挑战值;
    以所述第二掩盖值作为同态加密中的随机数,生成所述第一掩盖值的第二同态密文,所述证明中还包括所述第二同态密文。
  7. 根据权利要求6所述的方法,所述第二参与方基于所述证明、所述l个挑战值和所述l个同态密文验证各个所述第一明文的范围,包括:
    所述第二参与方验证所述第一数值是否在所述第三预设范围之内;
    在验证通过之后,将所述证明、所述l个挑战值和所述l个同态密文代入第一预设等式,以用于验证所述l个同态密文是否是通过对所述l个第一明文进行同态加密而得到;
    在验证通过的情况中,基于所述第三预设范围和所述第一预设范围,确定各个所 述第一明文在所述第二预设范围内。
  8. 根据权利要求7所述的方法,所述至少t+1个参与方中的每一个还执行:从所述第二参与方接收辅助参数,生成l+1个承诺随机数,以所述第一掩盖值和所述l个第一随机数作为l+1个承诺明文,基于所述辅助参数生成l+1个第一承诺值;
    计算第三数值,所述第三数值为所述l+1个承诺随机数的加权和,其中,第0个承诺随机数的权重为1,第1个~第l个承诺随机数的权重为与各个承诺随机数对应的挑战值,所述证明中还包括所述第三数值和所述l+1个第一承诺值。
  9. 根据权利要求8所述的方法,还包括:将所述l个挑战值、以及所述证明中的所述第一数值、所述第三数值和所述l+1个第一承诺值代入第二预设等式,以用于验证所述第一数值是否与所述l个第一明文对应。
  10. 根据权利要求4所述的方法,所述至少t+1个参与方中的每一个还执行:从所述第二参与方接收l个第一同态密文,所述l个第一同态密文通过由所述第二参与方基于l个算法随机数分别对l个第一随机数进行同态加密而获得,
    所述l个同态密文包括l个第三同态密文,所述l个第一明文包括l个第三随机数,所述l个第三同态密文还与l个第二随机数对应,各个所述第三同态密文通过基于一个第二随机数、一个第一同态密文和l个第四同态密文中的一个第四同态密文的同态运算而获得,所述l个第四同态密文通过使用所述第二参与方的公钥分别对所述l个第三随机数进行同态加密获得;
    所述证明还包括l个第四数值,所述l个第四数值通过基于l个第三掩盖值和所述l个挑战值对所述l个第二随机数进行掩盖而得到,所述证明还用于验证各个所述第二随机数是否在第四预设范围内,所述第三掩盖值在所述第四预设范围对应的第五预设范围内随机选取获得。
  11. 根据权利要求10所述的方法,所述第四数值为通过将所述第三掩盖值与所述挑战值与所述第二随机数的乘积相加得到的数值。
  12. 根据权利要求10或11所述的方法,还包括:
    所述第二参与方验证所述所述第一数值是否在所述第三预设范围之内,各个所述第四数值是否在所述第五预设范围之内;
    在验证通过之后,将所述证明、所述l个挑战值、l个第一同态密文和所述l个第三同态密文代入第三预设等式,以用于验证所述l个第三同态密文是否是与所述l个第三随机数和所述l个第二随机数对应的同态密文;
    在验证通过的情况中,基于所述第三预设范围和所述第一预设范围,确定各个所述第二随机数在所述第二预设范围内,基于所述第五预设范围和所述第一预设范围,确定各个所述第三随机数所述第四预设范围内。
  13. 一种批量验证密文的方法,由加密方执行,所述方法包括:
    生成l个同态密文,所述l个同态密文与l个第一明文对应;
    生成与所述l个同态密文对应的证明,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值从验证方接收,所述各个所述挑战值的范围在第一预设范围之内,所述证明用于验证各个所述第一明文是否在第二预设范围内;
    将所述l个同态密文和所述证明发送给所述验证方。
  14. 一种批量验证密文的方法,由验证方执行,所述方法包括:
    从加密方接收与l个同态密文对应的证明,所述l个同态密文与l个第一明文对应,所述证明中包括第一数值,所述第一数值通过基于所述l个第一明文和l个挑战值进行线性计算得到,所述l个挑战值由所述验证方提供,所述各个所述挑战值的范围在第一预设范围之内;
    基于所述证明、所述l个挑战值和所述l个同态密文,验证各个所述第一明文是否在第二预设范围内。
  15. 根据权利要求14所述的方法,所述基于所述证明、所述l个挑战值和所述l个同态密文,验证各个所述第一明文是否在第二预设范围内,包括:
    验证所述第一数值是否在第三预设范围之内,所述第三预设范围与所述第二预设范围对应;
    在验证通过之后,通过将所述证明、所述l个挑战值和所述l个同态密文代入预设等式,以用于验证所述l个同态密文是否是通过对所述l个第一明文进行同态加密而得到;
    在验证通过的情况中,基于所述第三预设范围和所述第一预设范围,确定各个所述第一明文在所述第二预设范围内。
  16. 一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求13-15中任一项所述的方法。
PCT/CN2024/128777 2024-06-30 2024-10-31 批量验证密文的方法和计算设备 Pending WO2026007288A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410868110.3 2024-06-30
CN202410868110.3A CN118842594A (zh) 2024-06-30 2024-06-30 批量验证密文的方法和计算设备

Publications (1)

Publication Number Publication Date
WO2026007288A1 true WO2026007288A1 (zh) 2026-01-08

Family

ID=93139793

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/128777 Pending WO2026007288A1 (zh) 2024-06-30 2024-10-31 批量验证密文的方法和计算设备

Country Status (2)

Country Link
CN (1) CN118842594A (zh)
WO (1) WO2026007288A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118842594A (zh) * 2024-06-30 2024-10-25 蚂蚁区块链科技(上海)有限公司 批量验证密文的方法和计算设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547212A (zh) * 2018-12-04 2019-03-29 中国电子科技集团公司第三十研究所 一种基于sm2签名算法的门限签名方法
CN114338028A (zh) * 2020-09-28 2022-04-12 华为技术有限公司 门限签名方法、装置、电子设备和可读存储介质
CN115694812A (zh) * 2022-12-28 2023-02-03 苏州浪潮智能科技有限公司 一种基于零知识的门限身份认证方法、装置及云计算系统
CN116915414A (zh) * 2023-08-31 2023-10-20 蚂蚁区块链科技(上海)有限公司 一种实现门限签名的方法、计算机设备和存储介质
US20230344632A1 (en) * 2022-04-22 2023-10-26 Vmware, Inc. Distributed registration and authentication via threshold secret sharing and additively homomorphic encryption
CN118842594A (zh) * 2024-06-30 2024-10-25 蚂蚁区块链科技(上海)有限公司 批量验证密文的方法和计算设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547212A (zh) * 2018-12-04 2019-03-29 中国电子科技集团公司第三十研究所 一种基于sm2签名算法的门限签名方法
CN114338028A (zh) * 2020-09-28 2022-04-12 华为技术有限公司 门限签名方法、装置、电子设备和可读存储介质
US20230344632A1 (en) * 2022-04-22 2023-10-26 Vmware, Inc. Distributed registration and authentication via threshold secret sharing and additively homomorphic encryption
CN115694812A (zh) * 2022-12-28 2023-02-03 苏州浪潮智能科技有限公司 一种基于零知识的门限身份认证方法、装置及云计算系统
CN116915414A (zh) * 2023-08-31 2023-10-20 蚂蚁区块链科技(上海)有限公司 一种实现门限签名的方法、计算机设备和存储介质
CN118842594A (zh) * 2024-06-30 2024-10-25 蚂蚁区块链科技(上海)有限公司 批量验证密文的方法和计算设备

Also Published As

Publication number Publication date
CN118842594A (zh) 2024-10-25

Similar Documents

Publication Publication Date Title
US9037623B2 (en) Proxy calculation system, proxy calculation method, proxy calculation requesting apparatus, and proxy calculation program and recording medium therefor
WO2025043917A1 (zh) 一种实现门限签名的方法、计算机设备和存储介质
CN106533699B (zh) 一种标准模型下格上基于身份的盲签名方法
JP7800995B2 (ja) 共有秘密鍵の生成
CN111989891A (zh) 数据处理方法、相关装置及区块链系统
EP1710952B1 (en) Cryptographic Applications of the Cartier Pairing
WO2017202161A1 (zh) 基于无证书两方认证密钥协商方法、装置和存储介质
CN103490883B (zh) 一种多变量公钥加密/解密系统及加密/解密方法
WO2025043916A1 (zh) 一种实现门限签名的方法、系统和节点
WO2025043919A1 (zh) 一种实现分布式数字证书的方法、计算机设备和存储介质
CN104168114A (zh) 一种分布式的基于(k,n)门限证书加密方法及系统
CN108964906B (zh) 协同ecc的数字签名方法
CN103973439B (zh) 一种多变量公钥加密方法
Al-Kaabi et al. Methods toward enhancing RSA algorithm: a survey
CN117997532A (zh) 基于格的分布式可验证随机函数构造方法及系统
CN117040764A (zh) 一种秘钥份额更新方法、计算机设备和存储介质
JP6053983B2 (ja) 暗号システム、署名システム、暗号プログラム及び署名プログラム
CN118842594A (zh) 批量验证密文的方法和计算设备
Alam et al. A Comparative Study of RSA and ECC and Implementation of ECC on Embedded Systems
WO2025043918A1 (zh) 一种秘钥份额更新方法、计算机设备和存储介质
JP2012237881A (ja) 情報提供システム、仲介装置、情報提供装置、仲介方法、情報提供方法、及びプログラム
JP5679344B2 (ja) 署名鍵難読化システム、署名鍵難読化方法、難読化された署名鍵を用いた暗号化署名システム、難読化された署名鍵を用いた暗号化署名方法とプログラム
JP5314449B2 (ja) 電子署名検証システム、電子署名装置、検証装置、電子署名検証方法、電子署名方法、検証方法、電子署名プログラム、検証プログラム
Elhassani et al. Fully homomorphic encryption scheme on a nonCommutative ring R
WO2017203743A1 (ja) 暗号化装置、復号装置及び暗号システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24946154

Country of ref document: EP

Kind code of ref document: A1