Digital signature method, device and electronic equipment
By splitting the homomorphic encryption public and private key into multiple subkey pieces and only conducting adjacent communications between signers, the problem of large traffic and calculation volume in the (t, q) threshold ECDSA digital signature scheme is solved, and the problem of large traffic volume and calculation volume in the (t, q) threshold ECDSA digital signature scheme is realized. More efficient digital signature processing.
Patent Information
- Application Number
- CN202211061563.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing (t, q) threshold ECDSA digital signature scheme requires a lot of traffic and computational overhead when signing generation, resulting in inefficiency.
By splitting the homomorphic encryption public and private key into q component key pieces, and only adjacent round function output results are performed between signers, the traffic volume is reduced and signature efficiency is improved. The specific method includes the first signature party receiving the first sub-key piece sent by the master node, determining the output results of the first round function, the second round function and the third round function based on the random number, and sending these results to the second signature , used to calculate digital signatures.
It reduces the amount of communication and computing between signing parties, improves the efficiency of digital signatures, reduces server burden, and saves resources.
Smart Images

Figure CN115459924B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and in particular to a digital signature method, apparatus, and electronic device in the technical field of data security. Background Art
[0002] With the wide use of the Elliptic Curve Digital Signature Algorithm (ECDSA) in cryptocurrencies, the threshold ECDSA digital signature scheme has also attracted much attention. Reducing the communication volume of the threshold ECDSA digital signature and improving the efficiency of the threshold ECDSA digital signature are the goals pursued in the technical field of data security. Summary of the Invention
[0003] The present disclosure provides a digital signature method, apparatus, and electronic device.
[0004] According to a first aspect of the present disclosure, there is provided a digital signature method, including:
[0005] A first signatory receives a first sub-secret key piece sent by a master node, where the first sub-secret key piece is one of q sub-secret key pieces obtained by splitting the private key in a homomorphic encryption public-private key pair by the master node;
[0006] The first signatory determines the output result of the i-th round of a first-round function based on a first random number, and determines the output result of the i-th round of a second-round function and the output result of the i-th round of a third-round function based on the first random number and the first sub-secret key piece;
[0007] The first signatory respectively sends the output result of the i-th round of the first-round function, the output result of the i-th round of the second-round function, and the output result of the i-th round of the third-round function to a second signatory to obtain a first target output result of the first-round function, a second target output result of the second-round function, and a third target output result of the third-round function;
[0008] wherein, the first target output result is used as the input of the t-th round of the second-round function, the second target output result is used as the input of the first round of the third-round function, and the third target output result is used to determine the digital signature; i < t, t ≤ q, and q is the number of signatories.
[0009] According to a second aspect of the present disclosure, there is provided a digital signature apparatus, where the digital signature apparatus includes:
[0010] A receiving module, configured to receive a first sub-secret key piece sent by a master node, where the first sub-secret key piece is one of q sub-secret key pieces obtained by splitting the private key in a homomorphic encryption public-private key pair by the master node;
[0011] A determination module, configured to determine the output result of the i-th round of the first-round function based on a first random number, and determine the output result of the i-th round of the second-round function and the output result of the i-th round of the third-round function based on the first random number and the first sub-secret key piece;
[0012] A sending module, configured to send the output result of the i-th round of the first-round function, the output result of the i-th round of the second-round function, and the output result of the i-th round of the third-round function to a second signatory respectively, so as to obtain a first target output result of the first-round function, a second target output result of the second-round function, and a third target output result of the third-round function;
[0013] Wherein, the first target output result is used as the input of the t-th round of the second-round function, the second target output result is used as the input of the first round of the third-round function, and the third target output result is used to determine a digital signature; i < t, t ≤ q, and q is the number of signatories.
[0014] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0015] At least one processor; and a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the above digital signature method.
[0017] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the above digital signature method.
[0018] According to a fifth aspect of the present disclosure, there is provided a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the above digital signature method is implemented.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. Description of the Drawings
[0020] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0021] Figure 1 is an optional processing flow schematic diagram of the digital signature method provided by the embodiment of the present disclosure;
[0022] Figure 2 This is a schematic diagram of an optional processing flow for a first signing party to determine an i-th round output result of a first round function based on a first random number provided by an embodiment of the present disclosure;
[0023] Figure 3 This is a schematic diagram of an optional processing flow for a first signing party to determine an i-th round output result of a second round function based on a first random number and a first sub-secret key fragment provided by an embodiment of the present disclosure;
[0024] Figure 4 It is a schematic diagram of an optional processing flow for a first signing party to determine an i-th round output result of a third-round function based on a first random number and a first sub-secret key fragment provided by an embodiment of the present disclosure;
[0025] Figure 5 It is a detailed processing flow diagram of the digital signature method provided by the embodiment of the present disclosure;
[0026] Figure 6 This is a schematic diagram of an optional structure of a digital signature device provided by an embodiment of the present disclosure;
[0027] Figure 7 It is a block diagram of an electronic device used to implement the image classification model training method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0029] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0030] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this disclosure pertains. The terms used herein are for the purpose of describing embodiments of this disclosure only and are not intended to limit this disclosure.
[0032] Before describing the embodiments of this disclosure in detail, the relevant terms related to this disclosure are explained.
[0033] 1. Elliptic Curve Digital Signature Algorithm (ECDSA): It is an analog of the Digital Signature Algorithm (DSA) using Elliptic Curve Cryptography (ECC).
[0034] The signature process based on ECDSA is as follows:
[0035] 1). Select an elliptic curve Ep(a, b) and a base point G.
[0036] 2). Select a private key k (k < n, where n is the order of G), and calculate the public key K = kG using the base point G.
[0037] 3). Generate a random integer r (r < n), and calculate the point R = rG.
[0038] 4). Take the original data and the coordinate values i, y of the point R as parameters, and calculate SHA1 as the hash, i.e., Hash = SHA1(original data, i, y).
[0039] 5). Calculate s ≡ r - Hash * k (mod n).
[0040] 6). r and s are used as the signature values. If either r or s is 0, start over from step 3.
[0041] The verification process based on ECDSA is as follows:
[0042] 1). After the recipient receives the message (m) and the signature values (r, s), perform the following operations:
[0043] 2). Calculate: sG + H(m)P = (i1, y1), r1 ≡ i1 mod p.
[0044] 3). Verify the equation: r1 ≡ r mod p.
[0045] 4). If the equation holds, accept the signature; otherwise, the signature is invalid.
[0046] 3. Homomorphic encryption is a special encryption method that allows calculations, such as addition and multiplication, to be performed directly on encrypted data without leaking any information about the original text. The result of the calculation is still encrypted, and the user with the key decrypts the processed ciphertext data and gets the result of the processed original text.
[0047] Among them, homomorphic encryption only supports one of the operations of addition or multiplication. Supporting only addition operations is also called additive homomorphic encryption.
[0048] Digital signatures based on ECDSA are widely used in blockchain wallets, distributed system key management, and distributed system permission management. Threshold schemes based on ECDSA digital signatures include the (2, 2) threshold signature scheme, the (2, q) threshold signature scheme, and the (t, q) threshold signature scheme. Among them, the (2, 2) threshold signature scheme uses multiplication secret sharing technology to generate the signature sub-secret key of each signatory (also called a participant), and uses Paillier additive homomorphic encryption technology to calculate the product of the reciprocal of the random number k and the private key x (i.e., x / k) in the ECDSA signature generation process during the signature generation phase; however, the (2, 2) threshold signature scheme requires high-precision Paillier encryption and decryption calculations when signing, resulting in low signature efficiency. The (2, q) threshold signature scheme converts x / k in the ECDSA signature calculation into w1+w2, which reduces the computational complexity of the signature but increases the amount of communication. The (t, q) threshold signature scheme uses additive homomorphic encryption technology or oblivious transfer technology to convert the two important calculations x / k and 1 / k in the ECDSA signature generation process into Shamir additive secret sharing respectively; when generating a signature, the (t, q) threshold signature scheme requires any two parties to perform two multiplication-to-addition (MtA) protocols to complete (k1+…+k q )·(d1+…+d q )or Calculation of d i (i∈[1,q]), k i (i∈[1,q]) represents the private key and random number of the participants respectively. The disadvantage of this method is that the MtA protocol requires each user to communicate with other users in pairs, which generates a large amount of communication volume and communication rounds, and then generates a large amount of computing and communication overhead, resulting in low signature efficiency of the (t,q) threshold signature scheme.
[0049] Based on this, the present disclosure provides a digital signature method. Figure 1 This is an optional processing flow diagram of the digital signature method provided by the present disclosure. The digital signature method may at least include the following steps:
[0050] Step S101: The first signing party receives the first sub-key fragment sent by the master node.
[0051] In some embodiments, the master node generates a homomorphically encrypted public-private key pair, the homomorphically encrypted public-private key pair including a homomorphically encrypted public key and a private key; the master node splits the private key into q sub-secret key pieces, and sends a sub-secret key piece to each of the q signatories, where each signatories has a different sub-secret key piece. As an example, the first sub-secret key piece is sent to the first signator, and the second sub-secret key piece is sent to the second signator.
[0052] In some embodiments, the homomorphic encryption public-private key pair includes (P Ep ,d DP ), where P Ep is the homomorphic encryption public key, d DP is the private key; DP Split into q secret key pieces to get d 1dp ,d 2dp ,…,d qdp ; where d DP =(d 1dp +d 2dp +…+d qdp ). The q-shared sub-key pieces are q decryption sub-key pieces, and the encrypted ECDSA private key is d is the private key for ECDSA signature.
[0053] Step S102: The first signer determines the i-th round output result of the first round function based on the first random number, and determines the i-th round output result of the second round function and the i-th round output result of the third round function based on the first random number and the first sub-secret key fragment.
[0054] In some embodiments, the signing party performs t rounds of calculations on the first round function, t≤q; specifically, each signing party performs one round of calculations on the first round function; as an example, the first signing party performs the i-th round of calculations on the first round function, the second signing party performs the i+1-th round of calculations on the first round function, and so on.
[0055] In some embodiments, the first signing party determines an optional processing flow of the i-th round output result of the first round function based on the first random number, such as Figure 2 As shown, at least the following steps are included:
[0056] Step S201: The first signing party receives the (i-1)th round output result of the first round function.
[0057] In some embodiments, the i-1th round output result is calculated by other signing parties except the first signing party, such as a third signing party calculating the i-1th round output result and sending the i-1th round output result to the first signing party.
[0058] In some embodiments, the output result of the i-1th round is Ri-1.
[0059] Step S202: The first signer uses the first random number and the (i-1)th round output result of the first round function as the i-th round input of the first round function to obtain the i-th round output result of the first round function.
[0060] In some embodiments, if the i-th round is not the first round, the i-th round output result of the first round function is equal to the first random number multiplied by the i-1-th round output result; the i-th round output result is represented by R i Indicates that the output result of the i-1th round is expressed as R i-1 Indicates that the random number in round i is k i Indicates that R i =[k i ]R i-1 ; where k i It can also be called the first random number of the first signer.
[0061] In some embodiments, R0 is generated by the corresponding signing party itself, R0 = [1] G; wherein G is the generator of the elliptic curve group in the ECDSA signature scheme, and the order of G is n.
[0062] In some embodiments, if the i-th round is the first round, the first signing party generates R0. The first round output result of the first round function is R0=[1]G.
[0063] In some embodiments, the first signing party determines an optional processing flow of the i-th round output result of the second round function based on the first random number and the first sub-secret key fragment, such as Figure 3 As shown, at least the following steps are included:
[0064] Step S301: The first signing party receives the (i+1)th round output result of the second round function.
[0065] In some embodiments, the output result of the second round function is calculated starting from the tth round, and the output result of the second round function of the 1st round is calculated last.
[0066] In some embodiments, the input of the second-round function of the tth round includes two parts, namely: 1. The result of performing a homomorphic encryption multiplication operation on the horizontal coordinate value corresponding to the elliptic curve function after the private key is encrypted by the homomorphic encryption public key in the homomorphic encryption public-private key pair, and the value obtained by performing a homomorphic encryption addition operation on the hash value of the signature object; 2. The horizontal coordinate value of the first target output result of the first-round function.
[0067] The result of performing homomorphic encryption multiplication operation on the horizontal coordinate value corresponding to the elliptic curve function after the private key is encrypted by the homomorphic encryption public key in the homomorphic encryption public-private key pair, and the value obtained by performing homomorphic encryption addition operation on the hash value of the signature object can be expressed as:
[0068] Among them, M is the signature object, H(M) is the hash value of the signature object; r is the horizontal coordinate value corresponding to the elliptic curve function, which can also be called the horizontal coordinate value in the first target output result; α is the result of encrypting the private key with the homomorphic encryption public key.
[0069] Step S302: The first signer uses the (i+1)th round output result of the second round function and the (i)th intermediate value as the (i)th round input of the second round function to obtain the (i)th round output result of the second round function.
[0070] In some embodiments, the i+1th round output of the second round function includes the i+1th intermediate value, expressed as β i+1 express.
[0071] In some embodiments, the i-th round output result of the second round function includes the i-th intermediate value, which is equal to the result of homomorphically encrypted ciphertext multiplication of the reciprocal of the first random number and the i+1th intermediate value. i express,
[0072] In some embodiments, the first signing party determines an optional processing flow of the i-th round output result of the third round function based on the first random number and the first sub-secret key fragment, such as Figure 4 As shown, at least the following steps are included:
[0073] Step S401: The first signing party receives the (i-1)th round output result of the third round function.
[0074] In some embodiments, the (i-1)th parameter value in the (i-1)th round output result is determined based on the first intermediate value in the second target output result.
[0075] Step S402: Using the first sub-key fragment and the (i-1)th parameter value as inputs of the third round function to obtain an i-th round output result of the third round function.
[0076] In some embodiments, the i-1th parameter value is represented by γi-1, and the first round input of the third round function includes: γ0 and d0DP; wherein, γ0=β1, β1 is the second target output result of the second round function output, and d0DP=1.
[0077] In some embodiments, the i-th round output result of the third round function includes: γi=Dec(diDP, γi-1); wherein diDP represents the i-th sub-key fragment, and γi-1 is the i-1-th round output result of the third round function.
[0078] In some embodiments, the first round function may be round function FR, the second round function may be Fk, and the third round function may be FS.
[0079] Step S103: The first signing party sends the i-th round output result of the first round function, the i-th round output result of the second round function, and the i-th round output result of the third round function to the second signing party respectively.
[0080] In some embodiments, the first signing party sends the i-th round output result of the first round function, the i-th round output result of the second round function, and the i-th round output result of the third round function to the second signing party, so that the second signing party and other subsequent signing parties obtain the first target output result of the first round function, the second target output result of the second round function, and the third target output result of the third round function by calculating the first round function, the second round function, and the third round function.
[0081] In the disclosed embodiment, any signatory only needs to communicate with adjacent signatory to receive and / or send the corresponding round function output result, without having to communicate with each signatory, thereby reducing the amount of communication and improving signature efficiency.
[0082] Embodiments of the present disclosure Figures 1 to 4In the embodiment shown, the first signing party is used as the execution subject to perform digital signature calculation. For the t rounds of calculations performed by the first round function, the second round function and the third round function, t signing parties are required to participate simultaneously, and each signing party performs the round calculations corresponding to the first round function, the second round function and the third round function; for example, the third signing party performs the i-1th round calculations of the first round function, the second round function and the third round function; the third signing party sends the i-1th round output result of the first round function, the i-1th round output result of the second round function and the i-1th round output result of the third round function to the first signing party. The first signing party performs the i-th round calculation of the first round function according to the i-1th round output result of the first round function, performs the i-th round calculation of the second round function according to the i-1th round output result of the second round function, and performs the i-th round calculation of the third round function according to the i-1th round output result of the third round function; the first signing party sends the i-th round output result of the first round function, the i-th round output result of the second round function and the i-th round output result of the third round function to the second signing party. The second signing party performs the i+1th round calculation of the first round function according to the i-th round output result of the first round function, the second signing party performs the i+1th round calculation of the second round function according to the i-th round output result of the second round function, and the second signing party performs the i+1th round calculation of the third round function according to the i-th round output result of the third round function.
[0083] In the disclosed embodiment, since one sub-secret key piece is used in each round of calculation in the first round function, the second round function and the third round function, it is ensured that the decryption operations involved in each sub-secret key piece are the same; therefore, each round of calculation can be implemented using the same program or code, saving resources.
[0084] A detailed processing flow diagram of the digital signature method provided by the embodiment of the present disclosure is as follows: Figure 5 As shown, the first round function is FR, the second round function may be Fk, and the third round function may be FS.
[0085] In the disclosed embodiment, the round function F R The input of each round is a two-tuple (R′, k), and the round function F R The output of each round is a tuple (R), and the round function F R The relationship between the input and output results is:
[0086] R=R′+[k]G. That is, F R =(R′,k)=(R)=(R′+[k]G), where k is an integer.
[0087] Here, the description of R, k, and G is the same as above. Figure 2 The descriptions for R, k, and G in the process shown are the same and will not be repeated here.
[0088] In the embodiment of the present disclosure, the input of the round function Fk is a triple (k, r′, β′), and its output is a binary (r, β); the relationship between the input and output of the round function Fk is: r = r′,
[0089] Right now:
[0090] Where k is a random number, r′ and r are round functions F R The horizontal coordinate value in the output result of the tth round, r′ and r are integers; β and β′ represent the large integers of Paillier encryption, represents homomorphic addition; therefore,
[0091]
[0092] Here, the explanations for β, k, and r are the same as above. Figure 3 The descriptions of β, k and r in the illustrated process are the same and will not be repeated here.
[0093] In the disclosed embodiment, the input of the round function FS is a binary group (γ, d′ DP ), the output is a tuple (s); the relationship between the input and output results of the round function FS is: s = Dec(d′ DP ,γ).
[0094] Therefore, F s (γ,d′ DP )=s=Dec(d′ DP ,γ); where d′ DP , s are both integers, and γ is a large integer for Paillier encryption.
[0095] Here, for γ and d′ DP The description is consistent with the above Figure 4 In the process shown, for γ and d′ DP The description is the same as that of , and will not be repeated here.
[0096] The following is based on Figure 5 The iterative calculations performed by each signing party on the round function FR, the round function Fk, and the round function FS in the embodiment of the present disclosure are described. There are t signing parties that perform t iterative calculations on each of the round functions FR, the round function Fk, and the round function FS respectively; it can also be understood that for the round function FR, each signing party performs one round calculation, and the t signing parties perform t round calculations in total; for the round function Fk, each signing party performs one round calculation, and the t signing parties perform t round calculations in total; for the round function FS, each signing party performs one round calculation, and the t signing parties perform t round calculations in total.
[0097] For the round function FR, each signatory party performs iterative calculations in the order of the first round, the second round, ..., the tth round. The round function FR is calculated once in each round of iteration, and the output result of the i-1th round of the round function FR is used as the i-th round input of the round function FR.
[0098] Specifically, if t rounds of iterations are performed with A1, A2, ..., A t If A1, A2, ..., A t Generate random elliptic curve points R respectively t The first iteration A1 generates R0 = [1]G and k1, uses k1 as the round key, takes (R0) as the input of the round function FR, calculates R1 = FR (k1, R0); that is, R1 = [k1]R0, and sends R1 to the next iteration A2.
[0099] For the i-th iteration A of the round function FR i (i=2,…,t),A i First, receive the message R(i-1) from the previous round of iteration Ai-1, then generate ki∈[1,n] through the random number generator, then use ki as the round key and R(i-1) as the input of the round function FR to calculate Ri=FR(ki,Ri-1), that is, Ri=[ki]Ri-1; then send Ri to the next round of iteration Ai+1; after calculating Rt in the tth round of iteration At, no message is passed.
[0100] For the round function Fk, each signatory party performs iterative calculations in the order of round t, round t-1, ..., round 1. The round function Fk is calculated once in each round of iteration. The output result of the i-th round of the round function FR is used as the input of the i-1th round of the round function FR. The output result of each round of the round function Fk is a binary tuple (r, β).
[0101] Specifically, if t rounds of iterations are performed with A1, A2, ..., A t Indicates that the tth iteration A t The input r is the horizontal coordinate value of the output result of the round function FR in the tth round, which can also be called the horizontal coordinate value of the elliptic curve point Rt; the tth round iteration A t Input Among them, M is the signature object, H(M) is the hash value of the signature object; r is the horizontal coordinate value corresponding to the elliptic curve function, which can also be called the horizontal coordinate value in the first target output result; α is the result of encrypting the homomorphic encryption private key by the homomorphic encryption public key.
[0102] Therefore, A t (k t ,β t ) as the round key, with (r,β t+1 ) as the round function F k Input, calculate (r,st )=F k (k t ,s t+1 ), that is, r = r, and And r and s t Send to the next iteration A t-1 .
[0103] For the i-th iteration, A i (i=m-1,…,2,1), first receive the A from the previous iteration i+1 The message r and β i+1 , then k i As the round key, (r,β i+1 ) as the round function F s Input, calculate (r,s i )=F s (r,k i ,s i+1 ), that is, r = r, and r and β i Send to the next iteration A i-1 ; Until the first iteration, A1 calculates (r, β1) and no longer transmits messages.
[0104] For the round function FS, each signatory party performs iterative calculations in the order of the first round, the second round, ..., the tth round. The round function FS is calculated once in each round of iteration. The output result of the i-th round of the round function FS is used as the i+1-th round input of the round function FR. The output result of each round of the round function FS is a binary tuple (r, β).
[0105] Specifically, if t rounds of iterations are performed with A1, A2, ..., A t Indicates that the first iteration A1 is based on the round function F k The calculated result determines that γ0=β1, and (d 1DP ) as the round key and γ0 as the round function F s Input, calculate β1 = F S (d 1dp ,β0), that is, β1=Dec(d 1DP ,β0); send β1 to the next iteration A2.
[0106] For the i-th iteration, A i (i=1,2…,t),A i First, receive the A from the previous iteration i-1 News of β i-1 , will (d iDP ) as the round key, with β i-1 As the round function F s Input, calculate β i=F s (d iDP ,β i-1 ), that is, β i = Dec(d iDP ,β i-1 ); i Send to the next iteration A i+1 . The tth iteration A t Calculate β t =s, A t The output signature of the signature object M is σ=(r,s).
[0107] In the disclosed embodiment, each signatory is only required to perform round function-based communications three times, which reduces the burden on the server, reduces the communication volume and number of communication rounds of each signatory, and improves signature efficiency.
[0108] In the disclosed embodiment, each round of iterative calculation of the round function only involves Paillier homomorphic encryption operations and does not involve complex multiplication-to-addition operations, which greatly reduces the amount of calculation and improves signature efficiency.
[0109] The digital signature method provided by the embodiments of the present disclosure can be applied to scenarios such as blockchain wallets, distributed system permission management, distributed system key management, etc., which require encrypted transmission of messages or data.
[0110] The present disclosure also provides a digital signature device, the digital signature device has a structure such as Figure 6 As shown, including:
[0111] A receiving module 601 is used to receive a first sub-secret key fragment sent by a master node, where the first sub-secret key fragment is a portion of q sub-secret key fragments that the master node splits into a private key in a homomorphically encrypted public-private key pair;
[0112] A determination module 602 is configured to determine an i-th round output result of a first round function based on a first random number, and determine an i-th round output result of a second round function and an i-th round output result of a third round function based on the first random number and the first sub-secret key fragment;
[0113] A sending module 603 is used to send the i-th round output result of the first round function, the i-th round output result of the second round function, and the i-th round output result of the third round function to the second signing party, so as to obtain a first target output result of the first round function, a second target output result of the second round function, and a third target output result of the third round function;
[0114] Among them, the first target output result is used as the input of the t-th round of the second-round function, the second target output result is used as the input of the first round of the third-round function, and the third target output result is used to determine the digital signature; i < t, t ≤ q, where q is the number of signers.
[0115] In some optional embodiments, the determining module 602 is configured to receive the output result of the (i - 1)-th round of the first-round function;
[0116] Using the first random number and the output result of the (i - 1)-th round of the first-round function as the input of the i-th round of the first-round function, to obtain the output result of the i-th round of the first-round function;
[0117] Alternatively, when i = 1, an initial value of the elliptic curve is generated based on the elliptic curve function, and the abscissa value corresponding to the initial value of the elliptic curve and the first random number are used as the input of the i-th round of the first-round function, to obtain the output result of the i-th round of the first-round function.
[0118] In some optional embodiments, the output result of the i-th round of the first-round function is equal to the first random number multiplied by the output result of the (i - 1)-th round.
[0119] In some optional embodiments, the determining module 602 is configured to receive the output result of the (i + 1)-th round of the second-round function;
[0120] Using the output result of the (i + 1)-th round of the second-round function and the i-th intermediate value as the input of the i-th round of the second-round function, to obtain the output result of the i-th round of the second-round function.
[0121] In some optional embodiments, the i-th intermediate value is equal to the result of a homomorphic encryption ciphertext multiplication operation between the reciprocal of the first random number and the (i + 1)-th intermediate value.
[0122] In some optional embodiments, when i = t, the i-th intermediate value is equal to the value obtained by performing a homomorphic encryption addition operation between the result of a homomorphic encryption multiplication operation between the homomorphic encryption public key in the homomorphic encryption public-private key pair encrypted with the private key and the abscissa value corresponding to the elliptic curve function, and the hash value of the signature object.
[0123] In some optional embodiments, the determining module 602 is configured to receive the output result of the (i - 1)-th round of the third-round function, and the (i - 1)-th parameter value in the output result of the (i - 1)-th round is determined based on the first intermediate value in the second target output result;
[0124] Using the first sub-secret key slice and the (i - 1)-th parameter value as the input of the third-round function, to obtain the output result of the i-th round of the third-round function.
[0125] In some optional embodiments, the target output result of the third round function is: the sum of the result of multiplying the horizontal coordinate value corresponding to the elliptic curve function by the first sub-key fragment and the hash value of the signature object, divided by the first random number.
[0126] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0127] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0128] Figure 7 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. In some optional embodiments, the electronic device 800 can be a terminal device or a server. In some optional embodiments, the electronic device 800 can implement the digital signature method provided in the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (Application, APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0129] In practical applications, the electronic device 800 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, where cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. The electronic device 800 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart TV, a smart watch, etc., but is not limited thereto.
[0130] Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, vehicle-mounted terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0131] like Figure 7 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0132] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0133] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a digital signature method. For example, in some optional embodiments, the digital signature method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some optional embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the digital signature method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured as a digital signature method in any other appropriate manner (e.g., by means of firmware).
[0134] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0135] The program code for implementing the digital signature method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or entirely on a remote machine or server.
[0136] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0138] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0139] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0140] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0141] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A digital signature method, comprising: The first signatory receives a first sub-secret key piece sent by the master node, where the first sub-secret key piece is one of the q sub-secret key pieces obtained by splitting the private key in the homomorphic encryption public-private key pair by the master node; The first signatory determines the output result of the i-th round of the first-round function based on the first random number, and determines the output result of the i-th round of the second-round function and the output result of the i-th round of the third-round function based on the first random number and the first sub-secret key piece; The first signatory respectively sends the output result of the i-th round of the first-round function, the output result of the i-th round of the second-round function, and the output result of the i-th round of the third-round function to the second signatory to obtain the first target output result of the first-round function, the second target output result of the second-round function, and the third target output result of the third-round function; Wherein, the first target output result is used as the input of the t-th round of the second-round function, the second target output result is used as the input of the first round of the third-round function, and the third target output result is used to determine the digital signature; i < t, t ≤ q, and q is the number of signatories.
2. The method according to claim 1, wherein: The first signatory determines the output result of the i-th round of the first-round function based on the first random number, including: The first signatory receives the output result of the (i - 1)-th round of the first-round function; The first signatory uses the first random number and the output result of the (i - 1)-th round of the first-round function as the input of the i-th round of the first-round function to obtain the output result of the i-th round of the first-round function; Or, when i = 1, the first signatory generates an elliptic curve initial value based on the elliptic curve function, and uses the abscissa value corresponding to the elliptic curve initial value and the first random number as the input of the i-th round of the first-round function to obtain the output result of the i-th round of the first-round function.
3. The method according to claim 2, wherein: The output result of the i-th round of the first-round function is equal to the first random number multiplied by the output result of the (i - 1)-th round.
4. The method according to claim 1, wherein: Determining the output result of the i-th round of the second-round function based on the first random number and the first sub-secret key piece includes: The first signatory receives the output result of the (i + 1)-th round of the second-round function; The first signatory uses the output result of the (i + 1)-th round of the second-round function and the i-th intermediate value as the input of the i-th round of the second-round function to obtain the output result of the i-th round of the second-round function.
5. The method according to claim 4, wherein: The i-th intermediate value is equal to the result of performing a homomorphic encryption ciphertext multiplication operation on the reciprocal of the first random number and the (i + 1)-th intermediate value.
6. The method according to claim 4, wherein: When i = t, the i-th intermediate value is equal to the result of performing a homomorphic encryption multiplication operation on the homomorphic encryption public key of the homomorphic encryption public-private key pair encrypted with the private key and the abscissa value corresponding to the elliptic curve function, and then performing a homomorphic encryption addition operation with the hash value of the signature object.
7. The method according to claim 1, wherein: Determining the output result of the i-th round of the third-round function based on the first random number and the first sub-secret key piece includes: The first signatory receives the output result of the (i - 1)-th round of the third-round function, and the (i - 1)-th parameter value in the output result of the (i - 1)-th round is determined based on the first intermediate value in the second target output result; Using the first sub-secret key fragment and the (i - 1)-th parameter value as the input of the third-round function to obtain the output result of the i-th round of the third-round function.
8. The method according to claim 7, wherein: The target output result of the third-round function is: the sum of the result of multiplying the abscissa value corresponding to the elliptic curve function by the first sub-secret key fragment and the hash value of the signature object, divided by the first random number.
9. A digital signature device, the digital signature device includes: A receiving module, configured to receive a first sub-secret key fragment sent by a main node, where the first sub-secret key fragment is one of q sub-secret key fragments obtained by splitting the private key in a homomorphic encryption public-private key pair by the main node; A determining module, configured to determine the output result of the i-th round of the first-round function based on a first random number, and determine the output result of the i-th round of the second-round function and the output result of the i-th round of the third-round function based on the first random number and the first sub-secret key fragment; A sending module, configured to send the output result of the i-th round of the first-round function, the output result of the i-th round of the second-round function, and the output result of the i-th round of the third-round function to a second signatory respectively, so as to obtain the first target output result of the first-round function, the second target output result of the second-round function, and the third target output result of the third-round function; Wherein, the first target output result is used as the input of the t-th round of the second-round function, the second target output result is used as the input of the first round of the third-round function, and the third target output result is used to determine the digital signature; i < t, t ≤ q, and q is the number of signatories.
10. An electronic device, including: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the digital signature method according to any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the digital signature method according to any one of claims 1 to 8.
12. A computer program product, including computer programs / instructions, where when the computer programs / instructions are executed by a processor, the digital signature method according to any one of claims 1 to 8 is implemented.
