DIGITAL SIGNATURES
20230163977 · 2023-05-25
Inventors
Cpc classification
H04L2209/56
ELECTRICITY
H04L9/3239
ELECTRICITY
H04L9/085
ELECTRICITY
H04L2209/46
ELECTRICITY
H04L9/3255
ELECTRICITY
H04L9/0894
ELECTRICITY
H04L9/3252
ELECTRICITY
International classification
H04L9/32
ELECTRICITY
H04L9/08
ELECTRICITY
Abstract
A computer-implemented method of generating a share of a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method being performed by a first one of the participants and comprising: generating a first message-independent component and a first message-dependent component, wherein the message-independent component is generated based on a first private key share and wherein the message-dependent component is generated based on the message; causing the first message-independent component to be made available to a coordinator; and causing a first signature share to be made available to the coordinator for generating the signature based on at least the threshold number of signature shares, wherein the first signature share comprises at least the message-dependent component.
Claims
1. A computer-implemented method of generating a share of a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method being performed by a first one of the participants and comprising: generating a first message-independent component and a first message-dependent component, wherein the message-independent component is generated based on a first private key share, wherein the message-dependent component is generated based on the message, wherein each participant has a respective ephemeral private key share, and wherein the first message-independent component and/or the first message-dependent component is based on a first ephemeral private key share; causing the first message-independent component to be made available to a coordinator; and causing a first signature share to be made available to the coordinator for generating the signature based on at least the threshold number of signature shares, wherein the first signature share comprises at least the message-dependent component.
2. The method of claim 1, wherein the message-independent component is generated prior to obtaining the message.
3. The method of claim 1, wherein the first signature share comprises the message-independent component.
4. The method of claim 1, wherein the first private key share is generated using a joint secret sharing scheme for generating a share of a first private key.
5-8. (canceled)
9. The method of claim 4, wherein the first ephemeral private key share is generated using the joint secret sharing scheme for generating a share of the ephemeral private key.
10. The method of claim 1, wherein the first message-independent component is generated based on an inverse corresponding to the first ephemeral private key share.
11. The method of claim 10, wherein generating the inverse of the first ephemeral private key share comprises: generating an intermediate value based on the ephemeral private key and a first blinding key; and generating the inverse of the first ephemeral private key share based on an inverse of the intermediate value and a first blinding key share of the first blinding key.
12. The method of claim 11, wherein the first blinding key share is generated using a joint secret sharing scheme for generating a share of the first blinding key.
13. The method of claim 11, wherein the intermediate value is generated by: generating a first multiplicative key share based on the first ephemeral private key share and the first blinding key share; obtaining a respective multiplicative key share from at least the threshold number of participants; and generating the intermediate value based on the first multiplicative key share and each of the respective multiplicative key shares.
14. (canceled)
15. The method of claim 1, wherein the message-independent component is generated based on a second blinding key share of a second blinding key.
16. The method of claim 15, wherein the second blinding key share is generated using a joint secret sharing scheme for generating a share of the second blinding key.
17. The method of claim 10, wherein the first message-independent component is generated based on a first pre-signature share, wherein the first pre-signature share is generated based on: a first intermediary share, the first intermediary share being generated based on the first private key share and the inverse corresponding to the first ephemeral private key share; and a respective intermediary share obtained from at least the threshold number of participants.
18. The method of claim 11, wherein the first message-independent component is generated based on a first pre-signature share, wherein the first pre-signature share is generated based on: a first intermediary share, the first intermediary share being generated based on the first private key share and the first blinding key share; and a respective intermediary share obtained from at least the threshold number of participants.
19. The method of claim 18, wherein the first pre-signature share is generated based on the inverse corresponding to the first ephemeral private key share.
20. The method of claim 17, wherein the first intermediary share is generated based on a second blinding key share.
21. The method of claim 17, wherein the first pre-signature share is generated based on the shared value.
22. The method of claim 21, wherein the first intermediary share is generated based on the shared value.
23-32. (canceled)
33. A computer-implemented method of generating a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, wherein each participant has a respective ephemeral private key share, the method being performed by a coordinator and comprising: obtaining at least a threshold number of respective message-independent components, wherein each respective message-independent component is generated based on a respective private key share; obtaining at least the threshold number of respective signature shares, wherein each respective signature share is based on at least a respective message-dependent component, and wherein each respective message-dependent component is generated based on the message; and generating the signature of the message based on each of the obtained signature shares and each of the obtained message-independent components, wherein each message-independent component and/or message-dependent component is based on a respective ephemeral private key share.
34-41. (canceled)
42. The method of claim 1, wherein the message comprises at least part of a blockchain transaction.
43. The method of claim 1, wherein the threshold number of participants is less than a total number of participants in the group of participants.
44. Computer equipment comprising: memory comprising one or more memory units; and processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when run on the processing apparatus, the processing apparatus performs a method of generating a share of a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method comprising: generating a first message-independent component and a first message-dependent component, wherein the message-independent component is generated based on a first private key share, wherein the message-dependent component is generated based on the message, wherein each participant has a respective ephemeral private key share, and wherein the first message-independent component and/or the first message-dependent component is based on a first ephemeral private key share; causing the first message-independent component to be made available to a coordinator; and causing a first signature share to be made available to the coordinator for generating the signature based on at least the threshold number of signature shares, wherein the first signature share comprises at least the message-dependent component.
45. A computer program embodied on computer-readable storage and configured so as, when run on computer equipment, to perform a method of generating a share of a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method comprising: generating a first message-independent component and a first message-dependent component, wherein the message-independent component is generated based on a first private key share, wherein the message-dependent component is generated based on the message, wherein each participant has a respective ephemeral private key share, and wherein the first message-independent component and/or the first message-dependent component is based on a first ephemeral private key share; causing the first message-independent component to be made available to a coordinator; and causing a first signature share to be made available to the coordinator for generating the signature based on at least the threshold number of signature shares, wherein the first signature share comprises at least the message-dependent component.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0016] To assist understanding of embodiments of the present disclosure and to show how such embodiments may be put into effect, reference is made, by way of example only, to the accompanying drawings in which:
[0017]
[0018]
[0019]
DETAILED DESCRIPTION OF EMBODIMENTS
Preliminaries
Elliptic Curve Groups
[0020] An elliptic curve E satisfies the equation:
y.sup.2=x.sup.3+ax+b mod p
where a, b∈ and a, b are constants satisfying 4a.sup.3+27b.sup.3≠0. The group over this elliptic curve is defined to be the set of elements (x, y) satisfying this equation along with the point at infinity
, which is the identity element. The group operation on the elements in this group is called elliptic curve point addition and denoted by +. This group is denoted by E(
) and its order by n.
[0021] This group operation can be used to define another operation on the elements called point multiplication denoted by .Math.. For a point G∈E() and a scalar k∈
, the point k.Math.G is defined to be the point G added to itself k times.
[0022] In elliptic curve cryptography, a private key is defined to be a scalar k∈\{0} where
\{0} is notation for the set {1, . . . , n−1}, and the corresponding public key is the point k.Math.G on an elliptic curve. For instance, in some blockchain protocols, the elliptic curve is chosen to be the secp256k1 elliptic curve, and the values a, b, and p are completely specified by this curve. The order n of this group has been calculated given these values, which in the case of this curve is a prime, and the secp256k1 standard also specifies a point G which is to be used as the generator of this group.
Elliptic Curve Digital Signature Algorithm
[0023] In order to create a signature on a message msg, with the private key a, the following steps are taken: [0024] 1. Calculate the message digest e=hash(msg), where may be any hash function. For instance, in some examples hash(msg)=SHA256(SHA256(msg)) where SHA256(.square-solid.) is the SHA-256 hash function. Note that instead the message may be hashed only once, or more that two times with the same or different hash functions. [0025] 2. Chose a random integer k∈{1, . . . , n−1}, where n is the order of the elliptic curve, e.g. the secp256k1 curve. In the following, k is referred to as the ephemeral private key. [0026] 3. Calculate the ephemeral public key corresponding to this ephemeral private key k G=(R.sub.x, R.sub.y). [0027] 4. Calculate r=R.sub.x mod n. If r=0, return to step 2. [0028] 5. Calculate the multiplicative inverse of the ephemeral key k.sup.−1 mod n. [0029] 6. Calculate s=k.sup.−1(e+ar) mod n. If s=0, return to step 2. [0030] 7. The signature on the message msg is (r, s).
[0031] The ephemeral key must be kept secret, otherwise the private key can be calculated, given a message and signature. Additionally, each time a signature is generated, a different ephemeral key must be used. If this is not the case, it is possible to derive the private key a given two different signatures and their corresponding messages.
[0032] Given a message msg, a public key P=a.Math.G, and corresponding signature (r, s), then one can verify the signature by completing the following steps: [0033] 1. Calculate the message digest e=hash(msg), e.g. e=SHA256(SHA256(msg)). [0034] 2. Calculate the multiplicative inverse s.sup.−1 of s modulo n. [0035] 3. Calculate j.sub.1=es.sup.−1 mod n and j.sub.2=rs.sup.−1 mod n. [0036] 4. Calculate the point Q=j.sub.1.Math.G+j.sub.2.Math.P. [0037] 5. If Q=, the point at infinity, the signature is invalid. [0038] 6. If Q≠
, then let Q:=(Q.sub.x, Q.sub.y), and calculate u=(2, mod n. If u=r, the signature is valid.
[0039] In threshold signature schemes, this private key a is split into key shares that are distributed amongst participants in a threshold scheme group.
Joint Verifiable Random Secret Sharing
[0040] Assume that N participants want to create a joint secret that can only be regenerated by at least (t+1) of the participants in the scheme. To create the shared secret, the following steps are taken: [0041] 1. The participants agree on the unique label i for each participant. Each participant i generates (t+1) random numbers
a.sub.ij∈.sub.Rn\{0},∀j=0, . . . ,t, [0042] where ∈.sub.R means a randomly generated element of the set
\{0} where
\{0} is notation for the set {1, . . . , n−1}. Then each participant has a secret polynomial of order t
f.sub.i(x)=a.sub.i0+a.sub.i1x+ . . . +a.sub.itx.sup.t mod n, [0043] for i=1, . . . , N. Note that we omit the mod n notation from now on, and it is assumed that all arithmetic operations over integers are done modulo n. [0044] 2. Each participant i sends the value f.sub.t(j) to participant j e.g. using a secure communication channel with participant j only. [0045] 3. Each participant i calculates their own private secret share of a shared secret polynomial as
[0046] A shared secret share is a point with the form (i, a.sub.i), where i is the participants label in the scheme. This method for creating a secret share of a, as described in steps 1-3, is denoted herein by a.sub.i=JVRSS(i) for participant i. Note that “JVRSS” typically stands for “Joint verification random secret sharing” and includes steps 4 and 5 as well. However, throughout this document JVRSS is taken to mean performing at least steps 1 to 3, where steps 4 and 5 are optional steps.
[0047] Now that the participants have generated a shared polynomial, they can each verify that the other participants have shared the correct information to all participants, and that all participants have the same shared polynomial. This is done in the following way. [0048] 4. Each participant i broadcasts to all participants the obfuscated coefficients
a.sub.ik.Math.G, [0049] for k=0, . . . , t. [0050] 5. Each participant i checks that each participant j has correctly calculated the polynomial point f.sub.j(i) by calculating f.sub.j(i).Math.G and verifying that
[0051] If all participants find that this equation holds for each polynomial, then the group can collectively be sure that they have all created the same shared polynomial.
Reconstructing a Shared Secret
[0052] Assume a participant wants to reconstruct a shared secret a which is the zeroth order of a shared polynomial. Given (t+1) points on this polynomial of the form
(1,a.sub.1), . . . ,((t+1),a.sub.t+1),
then to find the shared secret a, one calculates
which is derived from a general formula known as “Lagrange Interpolation”.
Public Key Calculation
[0053] Given the N zeroth-order private polynomial coefficient public keys a.sub.i0.Math.G for i=1, . . . , N shared in step 4 of JVRSS, each participant calculates the shared public key P using
corresponding to the shared secret a.
Addition of Shared Secrets
[0054] To calculate the addition of two shared secrets that are shared amongst a group of N participants, where each secret polynomial has order t, without any entity knowing the individual secrets, the following steps are taken: [0055] 1. Generate the first shared secret a, where participant i's share is given by a.sub.i=JVRSS(i) for i=1, . . . , N with a threshold of (t+1). [0056] 2. Generate the second shared secret b, where participant i's share is given by b.sub.i=JVRSS(i), with a threshold of (t+1). [0057] 3. Each participant i calculates their own additive share
v.sub.i=a.sub.i+b.sub.i mod n. [0058] 4. All participants broadcast their additive share v.sub.i to all other participants. [0059] 5. Each participant interpolates over at least (t+1) of the shares v.sub.i to calculate
v=interpolate(v.sub.i, . . . ,v.sub.t+1)=a+b.
[0060] This method for the addition of shared secrets is denoted by ADDSS(i) for participant i, which results in each participant i knowing v=(a+b).
Product of Shared Secrets
[0061] To calculate the product of two shared secrets that are both shared amongst a group of N participants, where each secret polynomial has order t, the group takes the following steps: [0062] 1. Generate the first shared secret a, where participant i's share is given by a.sub.i=JVRSS(i) for i=1, . . . , N. The shared secret polynomial has order t, meaning (t+1) participants are required to recreate it. [0063] 2. Generate the second shared secret b, where participant i's share is given by b.sub.i=JVRSS(i), and the shared secret polynomial again has order t. [0064] 3. Each participant calculates their own multiplicative share μ.sub.i using
μ.sub.i=a.sub.ib.sub.i. [0065] 4. All participants broadcast their multiplicative share μ.sub.i to all other participants. [0066] 5. Each participant interpolates over at least (2t+1) of the shares μ.sub.i at 0 to calculate
μ=interpolate(μ.sub.1, . . . ,μ.sub.2t+1)=ab.
[0067] This method for calculating the product of two shared secrets is denoted herein by μ=ab=PROSS(i) for participant i.
Inverse of a Shared Secret
[0068] In order to calculate the inverse of a shared secret a, the following steps are taken: [0069] 1. All participants calculate the product of shared secrets PROSS(i), the result of which is μ=ab mod n. [0070] 2. Each participant calculates the modular inverse of μ which results in
μ.sup.−1=(ab).sup.−1 mod n. [0071] 3. Each participant i calculates their own inverse secret share by calculating
a.sub.i.sup.−1=μ.sup.−1b.sub.i.
[0072] This method for calculating the inverse of shared secrets is denoted by a.sub.i.sup.−1=INVSS(i) for participant i.
Shared Private Key Generation and Verification
[0073] To calculate a shared private key a between N≥2t+1 participants, t+1 of which are required to create a signature, the participants execute JVRSS with a threshold of t+1 and public key calculation as described above. The result is that every participant i=1, . . . , N has a private key share a.sub.i and the corresponding shared public key P=(a.Math.G).
Ephemeral Key Shares Generation
[0074] To generate ephemeral key shares and the corresponding r, as is required in a signature, a group of size N with a shared private key a of threshold (t+1) execute the following steps: [0075] 1. Generate the inverse share of a shared secret k.sub.i.sup.−1=INVSS(i), where (t+1) shares are required to recreate it. [0076] 2. Each participant calculates
r=x mod n. [0077] 3. Each participant i stores (r,
Threshold Optimal Signatures
[0078]
[0079] The coordinator 101 is the party that initiates the signature using a threshold number of signature shares generated by respective participants of a group of participants 102. That is, the coordinator 101 generates the signature on a message to be signed. Again, note that generating a signature on a message is taken to mean that a signature is dependent on the message to be signed, or put another way, the signature is a function of the message to be signed. The coordinator 101 may also be the party that sends the signature, and optionally the message, to a third party 103 or otherwise outputs the signature. For instance, the third party 103 may be a certificate authority or other form of authority, or another user. In other examples, the signature may be recorded, e.g. in a database or other document. In some examples, the signature may be made available to the public, e.g. recorded on a website or other publicly accessible medium.
[0080] The coordinator 101 may transmit a message to be signed to the participants 102. The message may be transmitted to all of the participants 102, or to a subset of the participants, e.g. the threshold number of participants. In the example of
[0081] The message may be transmitted over the internet using a LAN or WAN connection, or via alternative wired or wireless communication means. The message may be transmitted to each participant 102 individually, e.g. via a secure communication channel between the coordinator 101 and each participant 102, or broadcast to the group as a whole, e.g. via email or other means. The message may be transmitted in raw form, or in encrypted form. For instance, the message may be hashed one or more times.
[0082] One or more of the participants 102 may obtain the message via alternative means, i.e. not from the coordinator 101. For example, the message may be generated by one of the participants 102, or otherwise available, e.g. publicly. One or more participants 102 may receive the message from a third party 103. A participant 102 that obtains the message may transmit the message (in raw or encrypted form) to one or more other participants 102. For instance, the first participant 102 may transmit the message to the second participant 102b and/or the third participant 102c.
[0083] The coordinator 101 obtains (e.g. receives) a threshold number of signature shares. In the example of
[0084] In order to obtain the signature shares, the coordinator 101 may transmit a request for signature shares on a message. For instance, the coordinator 101 may transmit a request for signature shares to one, some or all of the group of participants 102.
[0085] Having obtained at least the threshold number of signature shares, the coordinator 101 generates the signature using the obtained shares. The coordinator 101 may then broadcast or transmit the signature to one or more other entities. Additionally or alternatively, the coordinator may store the signature, and/or record the signature as part of a digital record, e.g. in an email or other document.
[0086] The method for generating a signature share s.sub.i will now be described. The method is described from the perspective of the first participant 102a, but it will be appreciated that each other participant 102 that generates a signature share does so using an equivalent method, albeit using certain data specific to that other participant 102.
[0087] Each participant 102 has access to the following data items: a respective private key share a.sub.i (i.e. a share of the same private key), a respective ephemeral private key share k.sub.i, and a common shared value r that is generated based on a common ephemeral public key k.Math.G. The common ephemeral public key corresponds to, i.e. is generated based on, the ephemeral private key. Here, a value or key may be common in the sense that each participant has access to that same value or key. Note that unless specified, generating a second key based on a first key does not necessarily imply that the first key itself is known. Examples of how these data items may be generated are provided below.
[0088] The first participant 102a obtains, or already has access to, a message to be signed. The message may be in its raw form (e.g. plaintext), or in an encrypted or otherwise encoded for (e.g. ciphertext). The first participant 102a may obtain the message (in either form) from the coordinator and/or from another participant 102. Alternatively, the first participant 102a may generate the message to be signed.
[0089] The first participant 102a generates a first signature share s.sub.1. Note that “first” in this context is just used as an arbitrary label to distinguish the particular participant and the particular signature share from other participants and signature shares respectively, and does not necessarily imply that the first participant 102a is the first participant to generate a signature share s.sub.i, or that the first signature share s.sub.1 is the first in an ordered list of signature shares s.sub.i.
[0090] In some embodiments, the first signature share s.sub.1 may be generated based on, i.e. is a function of, a first message-independent component (MIC) and a first message-dependent component (MDC), where again “first” is just used as a label. The MIC is generated independently of the message. That is to say, the MIC is not a function of the message to be signed (i.e. the MIC is not generated based on the message), and knowledge of the message is not required to generate the MIC. In contrast, the MDC is a function of the message to be signed and knowledge of the message is required to generate the MDC.
[0091] In other embodiments, the first signature may not be a function of the first message-independent components (MIC). In these embodiments, the first message-independent component is generated and made available to the coordinator 101, e.g. transmitted to the coordinator 101 or broadcast to one or more participants 102. The first message independent component (MIC) may be shared with the coordinator in advance of, and separately from the first signature share.
[0092] The coordinator 101 may obtain a respective message-independent component (MIC) from at least the threshold number of participants, and generate the signature based on the respective signature shares (which are a function of the respective message-dependent components (MDC)) and the respective message-independent components (MIC). More details are provided below.
[0093] Since the MIC does not require knowledge of the message, the MIC can be pre-calculated. In other words, the MIC can be generated before obtaining the message. Therefore a plurality of different MICs can be pre-calculated, each for use in generating a different respective signature shares s.sub.1′ for signing different messages, where the prime (′) indicates that it is a different instance of the first signature share.
[0094] Having generated the first signature share s.sub.1, the first participant 102a makes the first signature share s.sub.1 available to the coordinator 101 for generating the signature s on the message. If the first participant 102a is the coordinator 101, making the first signature share s.sub.1 available to the coordinator 101 may merely mean outputting the first signature share s.sub.1 to a function for generating the signature s. Otherwise, the first participant 102a may transmit the first signature share s.sub.1 to the coordinator 101, or to one or more other participants 102 for forwarding to the coordinator 101, or broadcast the first signature share s.sub.1, or use a combination of these options.
[0095] As stated above, the first signature share s.sub.1 may be generated based on a first MIC and a first MDC. Regardless of whether the first signature share is a function of the first MIC, the first MIC is generated based on (i.e. is a function of) the first private key share a.sub.1 (i.e. the share of the private key a known to the first participant 102a). The first MIC may also be based on the first ephemeral private key share k.sub.1 (i.e. the share of the ephemeral private key k known to the first participant 102a) and the shared value r generated based on the ephemeral public key k.Math.G corresponding to the ephemeral private key k. The first MDC is generated based on (i.e. is a function of) the message (in raw or encrypted form) and may also be generated based on the first ephemeral private key share k.sub.1. Variations of the MIC and MDC are provided below.
[0096] Preferably, the first private key share a.sub.1 may be calculated using a joint secret sharing scheme, e.g. using the JVRSS technique described above. For instance, the first participant 102a may have an index of 1, and generate the first private key share using a.sub.1=JVRSS(1) for participant 1, where the private key is denoted by a. Each participant may generate a respective private key share a.sub.i. For instance, the second participant 102b may generate a second private key share using a.sub.2=JVRSS(2) for participant 2, and so on.
[0097] Generating a first private key share a.sub.1 using a joint secret share scheme may comprise generating a set of numbers a.sub.1j∈.sub.R\{0}, ∀j=0, . . . , t, and then generating a first polynomial f.sub.1(x)=a.sub.10+a.sub.11x+ . . . +a.sub.1tx.sup.t mod n, where the set of numbers are the coefficients of the polynomial. Each of the other participants 102 generates a respective polynomial using a respective set of numbers. For instance, the second participant 102b generates a second polynomial f.sub.2(x)=a.sub.20+a.sub.21x+ . . . +a.sub.2tx.sup.t mod n. The participants 102 then transmit, to each other participant, a value of their respective function evaluated at the index of that other participant. For instance, the first participant 102a evaluates f.sub.1(2) for the second participant 102b and then transmits that value to the second participant 102b, evaluates f.sub.1(3) for the third participant 102c and then transmits that value to the third participant 102c, and so on. The first participant 102a obtains the respective values generated, as a function of the first participant's index, by the other participants 102. The values may be transmitted over the internet, or via other means. The values may be transmitted via respective secure communication channels between respective pairs of the participants. Instead of transmitting directly, one or more participants 102 (e.g. the first participant 102a) may broadcast their respective values. Having obtained at least the threshold number of values from at least the threshold number of participants, the first participant 102a generates the first private key share based on the first value and each other obtained data value, e.g. f.sub.2(1), f.sub.3(1), etc.
[0098] The first participant may calculate the corresponding public key a G based on a set of obfuscated coefficients, where the coefficients are used to generate the respective private key shares a.sub.i of each participant 102. That is, when generating the ephemeral private key share k.sub.i, each participant 102 may share the obfuscated coefficients a.sub.ij.Math.G with each other participant 102. The coefficients are obfuscated by a common generator point G on the chosen elliptic curve. These obfuscated coefficients may be transmitted between participants 102 directly, or broadcast to the group. For instance, the first participant 102a may broadcast the obfuscated coefficients a.sub.10.Math.G, a.sub.11.Math.G, a.sub.12.Math.G, and so on. The public key corresponding to the private key may then be calculated as
[0099] Note that the private key shares a.sub.i may be generated using an alternative method, i.e. not using the JVRSS method described above. Whilst each participant requires a share of a private key a in order to generate a respective signature share s.sub.i, the particular method for generating the private key share may be chosen to suit the particular scenario, e.g. whether some, all or none of the participants can be trusted, or whether a trusted dearer is available to distribute key shares, etc. Methods for generating shares of a private key are, in themselves, known in the art. Similarly, method for distributing shares of a private key (or other such data) are, in themselves, known in the art. That being said, the private key share a.sub.i may be generated in a number of ways. For instance, a dealer (e.g. the coordinator) may be used to generate and distribute one, some or all of the private key shares a.sub.i, e.g. using a Shamir's secret sharing scheme. One such scheme that may be used for generating and distributing private key shares a.sub.i is described in WO2017145010A1.
[0100] Similarly, an alternative to JVRSS may be used when generating some or all of the private key shares described below, e.g. the ephemeral private key share k.sub.i, the first blinding value key share α.sub.i and/or the second blinding value key share β.sub.i.
[0101] The first ephemeral private key share k.sub.1 may be calculated using a joint secret sharing scheme, e.g. using the JVRSS technique described above. For instance, the first participant 102a may have an index of 1, and generate the first ephemeral private key share using k.sub.1=JVRSS(1) for participant 1, where the ephemeral private key is denoted by k. Each participant 102 may generate a respective ephemeral private key share k.sub.i. For instance, the second participant 102b may generate a second ephemeral private key share using k.sub.2=JVRSS(2) for participant 2, and so on.
[0102] Generating the first ephemeral private key k.sub.1 share using the joint secret sharing scheme comprises the same steps described above for generating the first private key share a.sub.1, except that the random numbers used for generating the ephemeral private key share k.sub.1 are different numbers comparted to those used for generating the private key share a.sub.1.
[0103] Note that the same private key a, and private key shares a.sub.i are used for each signature, whereas the ephemeral private key k and ephemeral private key shares k.sub.i are changed for each signature.
[0104] The shared value r is generated based on the ephemeral public key k.Math.G corresponding to the ephemeral private key k. The ephemeral public key (x, y) comprises two components, usually referred to as the x and y components. The shared value r may be a function of the x component of the ephemeral public key, e.g. r=x mod n.
[0105] The ephemeral public key k.Math.G may be generated based a set of obfuscated coefficients, wherein the coefficients were used to generate the respective ephemeral private key shares k.sub.i of each participant 102. That is, when generating the ephemeral private key share k.sub.i, each participant 102 shares the obfuscated coefficients k.sub.ij.Math.G with each other participant 102. The coefficients are obfuscated by a common generator point G on the chosen elliptic curve. These obfuscated coefficients may be transmitted between participants 102 directly, or broadcast to the group. For instance, the first participant 102a may broadcast the obfuscated coefficients k.sub.10.Math.G, k.sub.11.Math.G, k.sub.12.Math.G, and so on. The ephemeral public key may then be calculated as
[0106] In some embodiments, the first MIC is generated based on a first inverse share k.sub.i.sup.−1 corresponding to the first ephemeral private key share k.sub.1. That is, the first inverse share k.sub.i.sup.−1 is a function of the first ephemeral private key share k.sub.1.
[0107] The first inverse share k.sub.i.sup.−1 may be an inverse of shared secrets, for example, generated by calculating k.sub.i.sup.−1=INVSS(1) for participant 1. As set out above, calculating the inverse of shared secrets comprises calculating the product of shared secrets. The first participant 102a generates an intermediate value μ as the product of the first ephemeral private key k and a first blinding key a. For instance, the intermediate value may be calculated as by μ=kα=PROSS(1) for participant 1, the result of which is μ=kα mod n.
[0108] This may involve each participant 102 generating a multiplicative share μ.sub.i=k.sub.iα.sub.i, where α.sub.i is a share of the first blinding key a. Each participant 102 may calculate their respective share α.sub.i of the first blinding key a using a joint secret sharing scheme, e.g. using the JVRSS technique described above. For instance, the first participant 102a may have an index of 1, and generate a share of the first blinding key using α.sub.1=JVRSS(1) for participant 1. Each participant shares (e.g. via direct transmission or broadcasting) their respective multiplicate share μ.sub.i, and then generate the intermediate value μ based on each of the multiplicative shares μ.sub.i, e.g. by interpolation. The first inverse share k.sub.i.sup.−1 may be generated by calculating the inverse of the intermediate value μ. For instance, the first participant 102a may calculate the modular inverse of μ which results in
μ.sup.−1=(kα).sup.−1 mod n.
[0109] The first participant 102a may then calculate the first inverse share k.sub.1.sup.−1 based on the modular inverse μ.sup.−1 of the intermediate value and their respective first blinding key share α.sub.1, e.g. by calculating
k.sub.1.sup.−1=μ.sup.−1α.sub.1.
[0110] Note that the use of the blinding key share α.sub.i is optional and may be omitted from the above steps.
[0111] Optionally, the MIC may be generated based on (i.e. a function of) a share of a second blinding key β. That is to say, the MIC is also based on the first share β.sub.1 of the second blinding key β, in addition to the previously mentioned data items. The first share of the second blinding key may be calculated using a joint secret sharing scheme, e.g. using the JVRSS technique described above. For instance, the first participant 102a may have an index of 1, and generate the first share of the second blinding key using β.sub.1=JVRSS(1) for participant 1, where the second blinding key is denoted by β.
[0112] The MIC may be generated based on a first pre-signature share σ.sub.1 which is a function of a first intermediary share λ.sub.1 and a respective intermediary share λ.sub.i obtained from at least the threshold number of participants 102. That is, each of the participants 102 may generate a respective intermediate share λ.sub.i and transmit and/or broadcast those intermediate shares λ.sub.i to the other participants 102. The first participant 102a may collect the intermediary shares λ.sub.i to generate a common intermediary value λ, e.g. by interpolation of the intermediary shares λ.sub.i. The first participant 102a, (and optionally, the other participants 102) may generate a plurality of pre-signature shares σ.sub.1′, each for use in the generation of different signature shares s.sub.1′.
[0113] The first intermediary share λ.sub.1 may be a function of the first private key share a.sub.1 and the first inverse share k.sub.1.sup.−1. In that case, each of at least the threshold number of participants 102 generates and shares a respective intermediary share λ.sub.i that is a function of their respective private key a.sub.i share and their respective inverse share k.sub.i.sup.−1.
[0114] Alternatively, the first intermediary share λ.sub.1 may be a function of the first private key share a.sub.1 and the first share of the first blinding key α.sub.1. In that case, each of at least the threshold number of participants 102 generates and shares a respective intermediary share λ.sub.i that is a function of their respective private key share a.sub.i and their respective share of the first blinding key α.sub.1.
[0115] In some embodiments, the first pre-signature share σ.sub.1 may also be generated based on the first share of the second blinding key β.sub.1. For instance, the first intermediary share λ.sub.1 may be a function of the first share of the second blinding key β.sub.1. In additional or alternative embodiments, the first intermediary share λ.sub.1 may also be a function of the common value r.
[0116]
[0117] The example method 200 enables the creation of a shared secret of threshold (t+1) in a group of N≥2t+1 participants, where the signing threshold is also (t+1).
Set-Up:
[0118] In step S201, each participant 102 calculates a shared private key share and a corresponding public key. For instance, each participant 102 may calculate the shared private key, and corresponding public key using JVRSS and the calculation of the public key given in the preliminaries. At this point, each participant i has a secret key share and public key (a.sub.i, P), where P is notation for the public key corresponding to the shared private key. The shared private key has a threshold of (t+1).
Pre-Calculation:
[0119] In step S202, each participant 102 calculates a shared ephemeral key share and a corresponding public key. For instance, each participant 102 may calculate a shared ephemeral key using JVRSS and the calculation of the public key given in the preliminaries. Each participant 102 may then calculate an inverse share based on the ephemeral private key. This results in each participant having an inverse share (k.sub.i.sup.−1,r), with a threshold of (t+1).
[0120] In step S203, each participant 102 creates two different shared blinding key shares. For instance, each participant 102 may create two shared secrets so that participant i has shares α.sub.i=JVRSS(i) and β.sub.i=JVRSS(i), each shared secret having a threshold (t+1). Note that in some examples, not all of the shared secrets need to have the same threshold.
[0121] In step S204, each participant 102 calculates an intermediary share and broadcasts their intermediary share to the other participants. For instance, each participant i may calculate the intermediary share λ.sub.i=k.sub.i.sup.−1 a.sub.i+β.sub.i. This value has a threshold of (2t+1).
[0122] In step S205, each participant 102 calculates an intermediary value based on at least the intermediary shares. For instance, each participant 102 may calculate the intermediary value using interpolation over (2t+1) shares λ=interpolate(λ.sub.1, . . . , λ.sub.2t−1)=k.sup.−1α+β.
[0123] In step S206, each participant 102 calculates a pre-signature share. For instance, each participant i may calculate their pre-signature share σ.sub.i=λ−β.sub.i=(k.sup.−1α+β)−β.sub.i. Each participant 102 may store (r, k.sub.i.sup.−1, σ.sub.i), and the private key share and corresponding public key (a.sub.i, P).
[0124] Note that since a different ephemeral key is used for each signature, multiple ephemeral keys can be set up at one time, that is, steps S202 to S206 can be repeated to create multiple ephemeral keys during pre-calculation and stored for later use. These can be executed at the same time so that there are no additional rounds of communication. Note that preferably, a different value of α and β should be used for each signature.
Signature Generation:
[0125] In order to sign a message msg, at least (t+1) participants must perform steps S207 and S208.
[0126] In step S207, at least the threshold number of participants 102 obtain a message to be signed and calculate a message digest. For instance, a coordinator 101 may send a request to (t+1) participants to create a signature share on the message msg. Each participant i may calculate the message digest e=hash(msg). In some examples, this hash function is the double SHA-256 hash function. Alternative hash functions may be used.
[0127] In step S208, at least the threshold number of participants 102 calculate a signature share and send it to the coordinator 101. For instance, each participant i may calculate their signature share s.sub.i=k.sub.i.sup.−1e+rσ.sub.i, and then send their signature share (r, s.sub.i) to the coordinator. Note that the value r may not be sent by all participants.
[0128] In step S209, the coordinator 101 calculates the signature. For instance, the coordinator 101 may calculate s=interpolate(s.sub.1, . . . , s.sub.t+1)=k.sup.−1(e+ar), and finally the signature (r, s).
[0129] There are several alternatives for pre-calculating the message independent component of the signature share. These can broadly be split into two sets of variations: when to include r in the calculation, and when to include (kα).sup.−1. These can be selected independent of each other and so there are eight variations to the above method 200.
[0130] One modification is to store (r, k.sub.i.sup.−1, rσ.sub.i) during step S206, meaning that r is included in the pre-signature share.
[0131] Another modification is that the multiplication with r can also come earlier during the calculation of the intermediary shares. By defining instead λ.sub.i=rk.sub.i.sup.−1α.sub.i+β.sub.i in step S204, then in step S206, σ.sub.i=λ−β.sub.i=(rk.sup.−1α+β)−β.sub.i and the calculation of signature shares is s.sub.i=k.sub.i.sup.−1e+σ.sub.i.
[0132] Another modification is to instead calculate λ.sub.i=α.sub.ia.sub.i+β.sub.i such that λ=(kα).sup.−1(αa+β), and σ.sub.i=λ−(kα).sup.−1β.sub.i. The two variations of including r at alternative points can be done in combination with this. Each participant has knowledge of kα as it is calculated in step S202 of the pre-calculation. Additionally, all participants 102 broadcast their λ.sub.i share. So each participant 102 has knowledge of (at least) 2t+1 shares and the value kα. They can then calculate
λ=(kα).sup.−1×interpolate(λ.sub.1, . . . ,λ.sub.2t+t)
[0133] Another modification is to instead calculate the intermediary value as λ=(αa+β) and the pre-signature share as σ.sub.i=λ−β.sub.i. Finally, the signature share would then be s.sub.i=k.sub.i.sup.−1e+r(kα).sup.−1σ.sub.i. The two variations of when to include r in the calculation can also be done in combination with this. Each participant 102 has knowledge of kα from the calculation of k.sub.i.sup.−1. They can then calculate (kα).sup.−1 mod n with this, and then include it in the calculation of s.sub.i.
[0134] In summary, each participant 102 may generate four secret shares: a.sub.i, k.sub.i, α.sub.i, β.sub.i. Two products need to be calculated in the example method 200: kα which is then used to calculate (kα).sup.−1α.sub.i=k.sub.i.sup.−1 (interpolation over these shares gives k.sup.−1 as the α's will cancel), and k.sup.−1a for use in the signature, which uses the first product, and so if the shares are expanded, the calculated gives k.sub.i.sup.−1a.sub.i=(kα).sup.−1α.sub.ia.sub.1. Any calculations with the k.sub.i.sup.−1 share, which is made of kα and α.sub.i, can be done by doing the calculation just with α.sub.i itself first, and then multiplying by (kα).sup.−1 where necessary.
[0135] One version of the above scheme can be summarised by saying that a signature is calculated using shares that are composed of a message independent component (MIC) and a message dependent component (MDC), where the MIC may be based on the pre-signature share a, and the MDC is based on the message e.
[0136] An equivalent scheme comprises calculating the MIC as above, and then incorporating this in the signature along with the signature shares, e.g. after interpolation of the signature shares which are made of just an MDC. Explicitly, the scheme may be same up to step S206 of the pre-calculation, where the intermediary shares include the r value, λ.sub.i=k.sub.i.sup.−1a.sub.ir+β.sub.i such that after interpolation this is λ=k.sup.−1ar+β.
[0137] At this stage, the participants have knowledge of (r, k.sub.i.sup.−1, λ, β.sub.i) and store this along with the private key share and corresponding public key (a.sub.i, P),
[0138] Then in order to generate their signature share on a given message m which is hashed to create the message digest e=hash(m), the participants calculate
s.sub.i=k.sub.i.sup.−1e−β.sub.i,
and send this to a coordinator. The coordinator then calculates
s=interpolate(s.sub.1, . . . ,s.sub.t+1)+λ,
=k.sup.−1e+k.sup.−1ar,
resulting in the expected signature share since the β terms cancel. Similar variations of this protocol can be made as above describing when the (kα).sup.−1 and r is included in the calculation.
[0139] The following variations for calculating the message-independent component may be implemented:
i) Calculate:
[0140]
λ=k.sup.−1a+β
[0141] Then the signature shares are now:
s.sub.i=k.sub.i.sup.−1e−rβ.sub.i
[0142] And the signature is generated as:
s=int(s.sub.1, . . . ,s.sub.t+1)+rλ
ii) Calculate:
[0143]
λ=αar+β
[0144] Then the signature shares are now:
s.sub.i=α.sub.ie−β.sub.i
[0145] And the signature is generated as:
s=(kα).sup.−1(int(s.sub.1, . . . ,s.sub.t+1)+λ)
iii) Calculate:
λ=αa+β
[0146] Then the signature shares are now:
s.sub.i=k.sub.i.sup.−1e−rβ.sub.i
[0147] And the signature is generated as:
s=(kα).sup.−1(int(s.sub.1, . . . ,s.sub.t+1)+rλ)
iv) Calculate:
[0148]
λ=αar+β
[0149] Then the signature shares are now:
s.sub.i=k.sub.i.sup.−1e−(kα).sup.−1β.sub.i
[0150] And the signature is generated as:
s=(int(s.sub.1, . . . ,s.sub.t+1)+(kα).sup.−1λ)
v) Calculate:
[0151]
λ=αa+β
[0152] Then the signature shares are now:
s.sub.i=k.sub.i.sup.−1e−r(kα).sup.−1β.sub.i
[0153] And the signature is generated as:
s=(int(s.sub.1, . . . ,s.sub.t+1)+r(kα).sup.−1λ)
[0154] One difference between the method 200 and the previous schemes is that the calculation of the k.sup.−1a term in the signature may be moved into the pre-calculation phase. The result of this is that the signature generation has the same threshold as the private key calculation and so is now a threshold-optimal scheme. To see how the correct signature is found, it is noted that the interpolation over the signature shares results in
which is exactly the signature as required.
[0155] Note that the thresholds of the secrets may be different. That is the threshold of a, k, α, β themselves do not necessarily need to be the same to execute the signature generation scheme. For example, if there is a group of six and three are needed to create the signature and/or private key, they could technically do the calculation with the threshold of the k being four and the thresholds of the other shared secrets being three, and they will still have a threshold-optimal scheme.
[0156] Note that if the blinding secret β is not used, then it may be possible to calculate the ephemeral key and therefore the shared secret key in the following way. Assume that the participants use simply (k.sup.−1a), and that they also know r, e, and s. Anyone in the scheme can calculate
(s−(k.sup.−1a)r)e.sup.−1=k.sup.−1.
[0157] This result can then be used to calculate
(k.sup.−1).sup.−1(k.sup.−1a)=a,
which is the shared private key.
[0158] By including β in the calculation, this calculation cannot be done. The value (k.sup.−1a+β) gives away no information about the individual secrets, nor the result k.sup.−1a. In order to gain any information that would reveal the private key a, at least (t+1) participants must collaborate which is the same number as the threshold of the private key, and so the security is not decreased by calculating this intermediate value λ.
[0159] A problem to solve with previous threshold optimal signature calculations is that one must calculate the product of two shared secrets, where the secrets are sums of individual secrets of all participants in a group
[0160] In a signature, if the private key a is a shared secret then necessarily k must be as well (or else a can be calculated by anyone who knows k). The second term in the signature is then the multiplication of two shared secrets and this is the part that makes it difficult to achieve optimality. In the non-optimal scheme by Gennaro et al. and the example method 200 described above, these secrets are each the zeroth order of a polynomial of order-t, and multiplying the polynomials together results in a threshold of 2t+1 shares required to calculated the result of the multiplication. To ensure honesty in this scheme, most communications can be broadcast, and simple equivalences can be checked. Additionally, if a participant drops out of the calculation of a signature, it is easy for another participant to contribute.
[0161] In the threshold-optimal scheme by Gennaro et al., this threshold of 2t+1 is avoided by calculating the individual terms in the product of the secrets individually. That is, each pair of participants i,j calculate the individual terms a.sub.i0k.sub.j0 for each i,j and summing these results. The ephemeral key k is created during signing, and then these products of individual secret contributions are calculated using Pallier encryption. This requires that each participant must communicate individually with all other signers. To ensure honesty in this case, there are multiple zero-knowledge proofs that must be executed. In this case, if a participant drops out of the calculation of the signature, the signature algorithm must be restarted.
[0162] In other words, each secret is the sum of individual secrets and the multiplication of two secrets is a multiplication of two sums of individual terms, which can be expanded out as
a.sub.10b.sub.10+a.sub.20b.sub.10+ . . . b.sub.n0a.sub.n0, etc
[0163] The Gennaro scheme calculates these terms individually. That is, participant 1 has to calculate a.sub.20b.sub.10 with participant 2, and also a.sub.30b.sub.10 with participant 3 and so on. These are then all summed together. These individual calculations involve computationally expensive zero knowledge proofs. So as soon as there are many people in the scheme it becomes inefficient. This is also all done at the signing phase, and so it is a computationally expensive way to calculate a signature.
[0164] In a simple case with 3 participants, the rounds of communication are roughly comparable between the two schemes (i.e. the optimal threshold scheme by Gennaro et al. and the example method 200): while the Gennaro scheme does have more, this is not where the main efficiency savings are. The savings are in the volume of data that is calculated and communicated. Gennaro's scheme has to include multiple zero-knowledge proofs (ZKPs) which are not present in the example method 200.
[0165] The following compares a 2-of-3 scheme implemented using the optimal threshold scheme by Gennaro et al. and the example method 200. In Gennaro's scheme there is a JVRSS before signing and an additional encryption key to create for Pallier's encryption. Then there are seven ZKPs to create, and seven ZKPs to verify in the signature calculation. These ZKPs cannot be sent simultaneously, so there are multiple rounds of communication in the signing phase. Additionally, in some steps, each participant must communicate individually with all other participants in the signing phase, which is inefficient. This means that those participants must all be online at the same time. In contrast, the present invention enables a given participant to calculate a signature share without the other participants being online.
[0166] On the other hand, in the present scheme described above, there are four JVRSS calculations in the pre-signing phase and no ZKPs at any point. The JVRSS calculation can be done simultaneously and so the communication is the same as one JVRSS. In the signing phase, there is only a request-response style communication, and all information can be broadcast to the group.
[0167] To compare between the storage of the two schemes, note that the ephemeral key is calculated with the set-up stage in the scheme above. This means that there is more storage required when compared to Gennaro's scheme. For the scheme described above, there are three additional values to be stored corresponding to creating a signature, each with e.g. 32 bytes of storage space required. This is minimal considering the efficiency savings in the calculation and communication, and the optimality achievement.
[0168] To summarise, Gennaro's scheme reduces the storage required after set-up and pre-calculation but increases the calculation and communication during the signature calculation. This is due to it being inefficient to move any more of the calculation to pre-signing in Gennaro's scheme. The scheme of the present invention is more efficient than Gennaro's optimal scheme, particularly if the inequality N 2t+1 is acceptable.
Example Use Case
[0169] In general, the present invention can be used to generate a signature on any message. As a particular example use case, the message may be part or all of a blockchain transaction. That is, the signature may be used to sign one or more inputs and/or one or more outputs of a blockchain transaction.
[0170]
[0171] In a UTXO-based model, each transaction (“Tx”) 152 comprises a data structure comprising one or more inputs 202, and one or more outputs 203. Each output 203 may comprise an unspent transaction output (UTXO), which can be used as the source for the input 202 of another new transaction (if the UTXO has not already been redeemed). The UTXO includes a value specifying an amount of a digital token, e.g. representing an amount of a digital asset. This represents a set number of tokens on the (distributed) ledger. The UTXO may also contain the transaction ID of the transaction from which it came, amongst other information. The transaction data structure may also comprise a header 201, which may comprise an indicator of the size of the input field(s) 202 and output field(s) 203. The header 201 may also include an ID of the transaction. In embodiments the transaction ID is the hash of the transaction data (excluding the transaction ID itself) and stored in the header 201 of the raw transaction 152 submitted to the miners.
[0172] Say a first user, e.g. Alice, wishes to create a transaction 152j transferring an amount of the digital token in question to a second user, e.g. Bob. In
[0173] The preceding transaction Tx.sub.0 may already have been validated and included in the blockchain at the time when Alice creates her new transaction Tx.sub.1, or at least by the time she sends it to the network 106. It may already have been included in one of the blocks at that time, or it may be still waiting in the pool 154 in which case it will soon be included in a new block. Alternatively Tx.sub.0 and Tx.sub.1 could be created and sent to the blockchain network together, or Tx.sub.0 could even be sent after Tx.sub.1 if the node protocol allows for buffering “orphan” transactions. The terms “preceding” and “subsequent” as used herein in the context of the sequence of transactions refer to the order of the transactions in the sequence as defined by the transaction pointers specified in the transactions (which transaction points back to which other transaction, and so forth). They could equally be replaced with “predecessor” and “successor”, or “antecedent” and “descendant”, “parent” and “child”, or such like. It does not necessarily imply an order in which they are created, sent to the network, or arrive at any given node. Nevertheless, a subsequent transaction (the descendent transaction or “child”) which points to a preceding transaction (the antecedent transaction or “parent”) will not be validated until and unless the parent transaction is validated. A child that arrives at a node before its parent is considered an orphan. It may be discarded or buffered for a certain time to wait for the parent, depending on the node protocol and/or miner behaviour.
[0174] One of the one or more outputs 203 of the preceding transaction Tx.sub.0 comprises a particular UTXO, labelled here UTXO.sub.0. Each UTXO comprises a value specifying an amount of the digital token represented by the UTXO, and a locking script which defines a condition which must be met by an unlocking script in the input 202 of a subsequent transaction in order for the subsequent transaction to be validated, and therefore for the UTXO to be successfully redeemed. Typically the locking script locks the amount to a particular party (the beneficiary of the transaction in which it is included). I.e. the locking script defines an unlocking condition, typically comprising a condition that the unlocking script in the input of the subsequent transaction comprises the cryptographic signature of the party to whom the preceding transaction is locked.
[0175] The locking script (aka scriptPubKey) is a piece of code written in the domain specific language recognized by the node protocol. A particular example of such a language is called “Script” (capital S). The locking script specifies what information is required to spend a transaction output 203, for example the requirement of Alice's signature. Unlocking scripts appear in the outputs of transactions. The unlocking script (aka scriptSig) is a piece of code written the domain specific language that provides the information required to satisfy the locking script criteria. For example, it may contain Bob's signature. Unlocking scripts appear in the input 202 of transactions.
[0176] So in the example illustrated, UTXO.sub.0 in the output 203 of Tx.sub.0 comprises a locking script [Checksig P.sub.A] which requires a signature Sig P.sub.A of Alice in order for UTXO.sub.0 to be redeemed (strictly, in order for a subsequent transaction attempting to redeem UTXO.sub.0 to be valid). [Checksig P.sub.A] contains the public key P.sub.A from a public-private key pair of Alice. The input 202 of Tx.sub.1 comprises a pointer pointing back to Tx.sub.1 (e.g. by means of its transaction ID, TxID.sub.0, which in embodiments is the hash of the whole transaction Tx.sub.0). The input 202 of Tx.sub.1 comprises an index identifying UTXO.sub.0 within Tx.sub.0, to identify it amongst any other possible outputs of Tx.sub.0. The input 202 of Tx.sub.1 further comprises an unlocking script <Sig P.sub.A> which comprises a cryptographic signature of Alice, created by Alice applying her private key from the key pair to a predefined portion of data (sometimes called the “message” in cryptography). What data (or “message”) needs to be signed by Alice to provide a valid signature may be defined by the locking script, or by the node protocol, or by a combination of these.
[0177] When the new transaction Tx.sub.1 arrives at a node, the node applies the node protocol. This comprises running the locking script and unlocking script together to check whether the unlocking script meets the condition defined in the locking script (where this condition may comprise one or more criteria). In embodiments this involves concatenating the two scripts:
<Sig P.sub.A><P.sub.A>∥[Checksig P.sub.A]
where “∥” represents a concatenation and “< . . . >” means place the data on the stack, and “[ . . . ]” is a function comprised by the unlocking script (in this example a stack-based language). Equivalently the scripts may be run one after the other, with a common stack, rather than concatenating the scripts. Either way, when run together, the scripts use the public key P.sub.A of Alice, as included in the locking script in the output of Tx.sub.0, to authenticate that the locking script in the input of Tx.sub.1 contains the signature of Alice signing the expected portion of data. The expected portion of data itself (the “message”) also needs to be included in Tx.sub.0 in order to perform this authentication. In embodiments the signed data comprises the whole of Tx.sub.0 (so a separate element does to need to be included specifying the signed portion of data in the clear, as it is already inherently present).
[0178] The details of authentication by public-private cryptography will be familiar to a person skilled in the art. Basically, if Alice has signed a message by encrypting it with her private key, then given Alice's public key and the message in the clear (the unencrypted message), another entity such as a node of the blockchain network is able to authenticate that the encrypted version of the message must have been signed by Alice. Signing typically comprises hashing the message, signing the hash, and tagging this onto the clear version of the message as a signature, thus enabling any holder of the public key to authenticate the signature. Note therefore that any reference herein to signing a particular piece of data or part of a transaction, or such like, can in embodiments mean signing a hash of that piece of data or part of the transaction.
[0179] If the unlocking script in Tx.sub.1 meets the one or more conditions specified in the locking script of Tx.sub.0 (so in the example shown, if Alice's signature is provided in Tx.sub.1 and authenticated), then the blockchain node deems Tx.sub.1 valid. If it is a mining node, this means it will add it to the pool of transactions awaiting proof-of-work. If it is a forwarding node, it will forward the transaction Tx.sub.1 to one or more other nodes in the blockchain network, so that it will be propagated throughout the network. Once Tx.sub.1 has been validated and included in the blockchain, this defines UTXO.sub.0 from Tx.sub.0 as spent. Note that Tx.sub.1 can only be valid if it spends an unspent transaction output 203. If it attempts to spend an output that has already been spent by another transaction, then Tx.sub.1 will be invalid even if all the other conditions are met. Hence the node 104 also needs to check whether the referenced UTXO in the preceding transaction Tx.sub.0 is already spent (has already formed a valid input to another valid transaction). This is one reason why it is important for the blockchain 150 to impose a defined order on the transactions. In practice a given node 104 may maintain a separate database marking which UTXOs 203 in which transactions have been spent, but ultimately what defines whether a UTXO has been spent is whether it has already formed a valid input to another valid transaction in the blockchain.
[0180] If the total amount specified in all the outputs 203 of a given transaction is greater than the total amount pointed to by all its inputs 202, this is another basis for invalidity in most transaction models. Therefore such transactions will not be propagated nor mined into blocks.
[0181] Note that the script code is often represented schematically (i.e. not the exact language). For example, one may write [Checksig P.sub.A] to mean [Checksig P.sub.A]=OP_DUP OP_HASH160 <H(P.sub.A)> OP_EQUALVERIFY OP_CHECKSIG. “OP_ . . . ” refers to a particular opcode of the Script language. OP_CHECKSIG (also called “Checksig”) is a Script opcode that takes two inputs (signature and public key) and verifies the signature's validity using the Elliptic Curve Digital Signature Algorithm (ECDSA). At runtime, any occurrences of signature (‘sig’) are removed from the script but additional requirements, such as a hash puzzle, remain in the transaction verified by the ‘sig’ input. As another example, OP_RETURN is an opcode of the Script language for creating an unspendable output of a transaction that can store metadata within the transaction, and thereby record the metadata immutably in the blockchain. E.g. the metadata could comprise a document which it is desired to store in the blockchain.
[0182] The signature P.sub.A is a digital signature. In embodiments this is based on the ECDSA using the elliptic curve secp256k1. A digital signature signs a particular piece of data. In embodiments, for a given transaction the signature will sign part of the transaction input, and all or part of the transaction output. The particular parts of the outputs it signs depends on the SIGHASH flag. The SIGHASH flag is a 4-byte code included at the end of a signature to select which outputs are signed (and thus fixed at the time of signing).
[0183] The locking script is sometimes called “scriptPubKey” referring to the fact that it comprises the public key of the party to whom the respective transaction is locked. The unlocking script is sometimes called “scriptSig” referring to the fact that it supplies the corresponding signature. However, more generally it is not essential in all applications of a blockchain that the condition for a UTXO to be redeemed comprises authenticating a signature. More generally the scripting language could be used to define any one or more conditions. Hence the more general terms “locking script” and “unlocking script” may be preferred.
[0184] According to some embodiments of the present invention, the signature generated by the coordinator 101 may be used to sign a blockchain transaction. For instance, the generated signature may be used, at least in part, to unlock an output of a blockchain transaction. As a particular example, the output of a previous transaction may be a pay-to-public-key-hash (P2PKH) output which is locked to a hash of a public key. In order to be unlocked, an input of a later transaction that references the P2PKH output needs to include the (unhashed) public key and a signature generated based on the private key corresponding to the public key.
[0185] Represented in script, the “locking script” and “unlocking script” may take the following forms:
[0186] Locking script=OP_DUP OP_HASH160<Public KeyHash>OP_EQUAL OP_CHECKSIG Unlocking script=<Signature><Public Key>
[0187] Referring to the above described embodiments, the <Public Key> may be equated to P=a.Math.G, and the <Signature> comprises the threshold signature s, where the previous transaction is the message to be signed. Note that as stated above, ECDSA signatures are in the form (r, s).
[0188] Note that the described signature generation method is not limited to any particular use case and may in general be used for generating a signature based on any message. Signing all or part of a blockchain transaction is just one illustrative example. The described method may be used to sign and/or authorise, for instance, a legal document (e.g. a will, deed or other contract), correspondence between one or more parties, digital certificates (e.g. issued by a certificate authority), medical prescriptions, a bank transfer or a financial instrument, a mortgage or loan applications, etc.
[0189] As a particular example, the group of participants (say five participants in total) may form the Board of a company. Voting matters of the company may require a majority of the Board (i.e. at least three participants) to agree on the particular vote. The Board may use the described signature generation method to prove that at least three Board members agreed to vote in favour of a particular outcome. In this example, the threshold of the signature generation scheme is three. That is, at least three of the Board members must provide a respective signature share in order for the co-ordinator to successfully generate a signature. If a signature is generated successfully, at least the threshold number (i.e. three) of Board members must have agreed to vote in favour of that outcome. Thus the successful generation of a signature acts as a record of the vote and proves that a majority of the Board voted in a particular way.
[0190] Another use case for the present invention lays in the field of digital certificates, e.g. digital certificate issued by the X.509 standard. A digital certificate contains a signature that signs over some data. The data can in general be any data, but one particular example of data included in a digital certificate is a public key. A public key in a digital certificate is often referred to as a “certified public key”. The issuer of the digital certificate (a “certificate authority”) may perform one or more checks on the owner of the public key (e.g. know-your-customer checks), and if the checks are successful, the certificate authority issues a digital certificate that includes the certified public key. A user can use a certified public key to prove they are who they say they are, e.g. by signing a message with a private key corresponding to the certified public key.
[0191] One particular use for certificate authorities is to sign certificates used in HTTPS for secure browsing on the internet. Another common use is in issuing identity cards by national governments for use in electronically signing documents. The certificate authority signs the public key (or any other data to be attested to) using a private key. This introduces a single point of failure. That is, if a malicious party can gain access to the private key used by the certificate authority to issue digital certificates, the malicious party can then issue fraudulent certificates. A particular example of a certificate authority being targeted is DigiNotar, a Dutch certificate authority. The private key used by DigiNotar was compromised in 2011 and used to issue fraudulent certificates. This attack was possible as the attacker needed only to obtain a single piece of data, i.e. the private key. However, this attack would not have been possible (or at least made more difficult) if the certificate authority (DigiNotar) used a threshold signature scheme according to the present invention. In order to issue certificates, an attacker must acquire the threshold number of key shares (or signature shares) required for generating the signature.
[0192] It will be appreciated that the above embodiments have been described by way of example only. More generally there may be provided a method, apparatus or program in accordance with any one or more of the following Statements.
[0193] Statement 1. A computer-implemented method of generating a share of a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method being performed by a first one of the participants and comprising: [0194] generating a first message-independent component and a first message-dependent component, wherein the message-independent component is generated based on a first private key share and wherein the message-dependent component is generated based on the message; [0195] causing the first message-independent component to be made available to a coordinator; and [0196] causing a first signature share to be made available to the coordinator for generating the signature based on at least the threshold number of signature shares, wherein the first signature share comprises at least the message-dependent component.
[0197] For instance, the first message-independent component may be sent to the coordinator before the first signature share, and even before the first message-dependent component is generated.
[0198] Statement 2. The method of statement 1, wherein the message-independent component is generated prior to obtaining the message.
[0199] In other words, the message-independent component may be pre-calculated. That is, the message-independent component can be generated in advance of obtaining (e.g. receiving) the message. Then, once the message has been obtained, the message-dependent component can be generated, thus enabling the signature share to be generated.
[0200] Statement 3. The method of statement 1 or statement 2, wherein the first signature share comprises the message-independent component.
[0201] That is, in at least some embodiments the first signature share does not contain the message-independent component.
[0202] Statement 4. The method of any of statements 1 to statement 3, wherein the first private key share is generated using a joint secret sharing scheme for generating a share of a first private key.
[0203] Statement 5. The method of statement 4, wherein generating the first private key share using the joint secret sharing scheme comprises: [0204] generating a first data item, the first data item being a first polynomial; [0205] obtaining a respective data item from at least the threshold number of participants, each respective data item being a respective polynomial generated by a respective participant; and [0206] generating the first private key share based on the first data item and each of the respective data items.
[0207] Statement 6. The method of statement 5, wherein obtaining the respective data items comprises obtaining the respective data items over a respective communication channel between the first participant and each of the respective participants.
[0208] Preferably, each communication channel is a secure communication channel.
[0209] Statement 7. The method of statement 4 or statement 5, comprising transmitting a respective instance of the first polynomial to at least each of the threshold number of participants, wherein the respective instance of the first polynomial is based on a respective participant.
[0210] E.g. the respective instances may be transmitted over the respective communication channel.
[0211] In some examples, the joint secret sharing scheme may be a joint verifiable secret sharing scheme that further comprises: [0212] sharing, with at least each of the threshold number of participants, a respective set of coefficients of the first polynomial obfuscated with a generator value; [0213] obtaining a respective set of coefficients of the respective polynomial generated by each respective participant, the respective set of coefficients being obfuscated with the generator value; and [0214] verifying, for each respective participant, that the respective participant has generated their respective private key share correctly by: [0215] determining a first candidate value based on the respective data item, obtained from that participant, obfuscated with the generator value; [0216] determining a second candidate value based on the respective set of obfuscated coefficients obtained from that respective participant; and [0217] verifying that the first candidate value corresponds to the second candidate value.
[0218] Statement 8. The method of any preceding statement, wherein each participant has a respective ephemeral private key share, and wherein the first message-independent component and/or the first message-dependent component is based on a first ephemeral private key share.
[0219] Statement 9. The method of statement 8, wherein each participant has a respective shared value based on an ephemeral public key corresponding to the ephemeral private key, and wherein the first message-independent component is based on the shared value.
[0220] Statement 10. The method of any preceding statement, wherein the first ephemeral private key share is generated using the joint secret sharing scheme for generating a share of the ephemeral private key.
[0221] Statement 11. The method of statement any preceding statement, wherein the first message-independent component is generated based on an inverse corresponding to the first ephemeral private key share.
[0222] Statement 12. The method of statement 11, wherein generating the inverse of the first ephemeral private key share comprises: [0223] generating an intermediate value based on the ephemeral private key and a first blinding key; and [0224] generating the inverse of the first ephemeral private key share based on an inverse of the intermediate value and a first blinding key share of the first blinding key.
[0225] The intermediate value is the product of the ephemeral private key and the first blinding key.
[0226] Statement 13. The method of statement 12, wherein the first blinding key share is generated using the joint secret sharing scheme for generating a share of the first blinding key.
[0227] Statement 14. The method of statement 12 or statement 13, wherein the intermediate value is generated by [0228] generating a first multiplicative key share based on the first ephemeral private key share and the blinding key share; [0229] obtaining a respective multiplicative key share from at least the threshold number of participants; and [0230] generating the intermediate value based on the first multiplicative key share and each of the respective multiplicative key shares.
[0231] Note that in some examples, the threshold number of participants required to generate a multiplicative key share is different from the threshold number of participants required to generate the private key share. E.g. the private key has a threshold t+1 and the multiplicative key share needs 2t+1.
[0232] Statement 15. The method of statement 14, comprising transmitting the first multiplicative key share to at least each of the threshold number of participants.
[0233] Statement 16. The method of any preceding statement, wherein message-independent component is generated based on a second blinding key share of a second blinding key.
[0234] Statement 17. The method of statement 16, wherein the second blinding key share is generated using the joint secret sharing scheme for generating a share of the second blinding key.
[0235] Statement 18. The method of statement 11 or any statement dependent thereon, wherein the first message-independent component is generated based on a first pre-signature share, wherein the first pre-signature share is generated based on: [0236] a first intermediary share, the first intermediary share being generated based on the first private key share and the inverse corresponding to the first ephemeral private key share; and [0237] a respective intermediary share obtained from at least the threshold number of participants.
[0238] Statement 19. The method of statement 11 when dependent on any of statements 1 to 17, wherein the first message-independent component is generated based on a first pre-signature share, wherein the first pre-signature share is generated based on: [0239] a first intermediary share, the first intermediary share being generated based on the first private key share and the first blinding key share; [0240] a respective intermediary share obtained from at least the threshold number of participants.
[0241] Statement 20. The method of statement 19, wherein the first pre-signature share is generated based on the inverse corresponding to the first ephemeral private key share.
[0242] Statement 21. The method of any of statements 18 to 20, wherein the first intermediary share is generated based on the second blinding key share.
[0243] Statement 22. The method of any of statements 18 to 21, wherein the first pre-signature share is generated based on the shared value.
[0244] Statement 23. The method of statement 22, wherein the first intermediary share is generated based on the shared value.
[0245] Statement 24. The method of either statement 18 or statement 19, or any statement dependent thereon, comprising transmitting the first intermediary share to at least the threshold number of participants.
[0246] Statement 25. The method of any preceding statement, comprising generating a plurality of different instances of the message-independent component.
[0247] Statement 26. The method of any preceding statement, comprising generating a plurality of different instances of the first ephemeral private key shares.
[0248] Statement 27. The method of statement 25 or statement 26, comprising generating a plurality of different instances of the first blinding key share and/or the second blinding key share.
[0249] Statement 28. The method of either statement 18 or statement 19, or any statement dependent thereon, comprising generating a plurality of different instances of the first pre-signature shares.
[0250] Statement 29. The method of any preceding statement, comprising obtaining the message from the coordinator.
[0251] Statement 30. The method of any of statements 1 to 28, comprising generating the message.
[0252] Statement 31. The method of any preceding statement, wherein the message is a hash of a second message.
[0253] Statement 32. The method of any preceding statement, wherein said causing of the first signature share to be made available to the coordinator comprises at least one of: [0254] transmitting the first signature share to the coordinator; [0255] broadcasting the first signature share to one or more of the threshold number of participants.
[0256] Statement 33. The method of any preceding statement, wherein said causing of the first message-independent component to be made available to the coordinator comprises at least one of: [0257] transmitting the first message-independent component to the coordinator; [0258] broadcasting the first message-independent component to one or more of the threshold number of participants.
[0259] Statement 34. A computer-implemented method of generating a digital signature of a message, wherein a threshold number of different signature shares from respective participants of a group of participants are required to generate the digital signature, wherein each participant has a respective private key share, the method being performed by a coordinator and comprising: [0260] obtaining at least a threshold number of respective message-independent components, wherein each respective message-independent component is generated based on a respective private key share; [0261] obtaining at least the threshold number of respective signature shares, wherein each respective signature share is based on at least a respective message-dependent component, and wherein each respective message-dependent component is generated based on the message; and [0262] generating the signature of the message based on each of the obtained signature shares and each of the obtained message-independent components.
[0263] A respective message-independent component may form part of the respective signature share.
[0264] Generating the signature may comprise interpolating the signature shares.
[0265] Note that in some instances, the signature may be a component of an ECDSA signature.
[0266] Statement 35. The method of statement 34, wherein each respective signature share is based on the respective message-independent component.
[0267] Statement 36. The method of statement 34, comprising: [0268] generating a common message-independent component based on each of the obtained message-independent components; and [0269] generating the signature based on the common message-independent component.
[0270] Statement 37. The method of any of statements 34 to 36, wherein each participant has a respective ephemeral private key share, and wherein each respective message-independent component and/or message-dependent component is based on a respective ephemeral private key share.
[0271] Statement 38. The method of statement 37, wherein each participant has a shared value based on an ephemeral public key corresponding to the ephemeral private key, and wherein each respective message-independent component is based on the shared value.
[0272] Statement 39. The method of any of statements 34 to statement 38, comprising transmitting the message to one, some or all of the participants in the threshold number of participants.
[0273] Statement 40. The method of any of statements 34 to statement 39, comprising transmitting a request for a respective signature share to at least the threshold number of participants.
[0274] Statement 41. The method of any of statements 34 to statement 40, comprising generating one of the obtained signature shares.
[0275] Statement 42. The method of any of statements 34 to 41, comprising outputting the signature.
[0276] Statement 43. The method of statement 42, wherein outputting the signature comprises: [0277] transmitting the signature to one or more parties; and/or [0278] recording the signature on a digital medium; and/or [0279] making the signature available to the public.
[0280] Statement 44. The method of any preceding statement, wherein the message comprises at least part of a blockchain transaction.
[0281] The message may instead comprise one of: at least part of a document (e.g. a legal document), a digital certificate, a medical prescription, or a financial instrument.
[0282] Statement 45. The method of any preceding statement, wherein the threshold number of participants is less than the total number of participants in the group of participants.
[0283] Statement 46. Computer equipment comprising: [0284] memory comprising one or more memory units; and [0285] processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when on the processing apparatus to perform the method of any of statements 1 to 45.
[0286] Statement 47. A computer program embodied on computer-readable storage and configured so as, when run on computer equipment of statement 46, to perform the method of any of statements 1 to 45.
[0287] According to another aspect disclosed herein, there may be provided a method comprising the actions of the first participant and the coordinator.
[0288] According to another aspect disclosed herein, there may be provided a system comprising the computer equipment of the first participant and the coordinator.
[0289] Other variants or use cases of the disclosed techniques may become apparent to the person skilled in the art once given the disclosure herein. The scope of the disclosure is not limited by the described embodiments but only by the accompanying claims.