Generating shared private key
By using a secret sharing scheme in public key cryptography to divide the master private key into shares, and generate sub-private key shares by participants, the problem of key reuse and difficulty in recovery is solved, and safe and efficient key management is achieved.
Patent Information
- Application Number
- CN202380018627.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-25
- Filing Date
- 2023-01-03
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology makes it difficult to effectively derive subkeys or subprivate key shares in public key cryptography without leaking the master private key, leading to problems such as key reuse and difficulty in recovery.
The coordinator generates the main private key and main chain code, uses a secret sharing scheme to divide the main private key into shares, and the participants generate sub-private key shares based on the main private key share, main chain code and key index, ensuring that each Participants all have the ability to derive the same sub-private key.
It prevents key reuse and realizes key recovery, ensuring that each participant can independently generate private key shares for signing and encrypting and decrypting messages, while improving the security of the master private key.
Smart Images

Figure CN118592008A
Abstract
Description
Technical Field
[0001] The present disclosure relates to a method capable of generating multiple shared private keys (or more specifically, respective shares of respective shared private keys), and to a method of generating respective shares of respective shared private keys. Background Art
[0002] In general, a shared secret can be used to share a data item distributed among a group of participants. Each participant has a different share of the secret. In general, the secret can only be reconstructed when a certain number (called a "threshold") of participants provide their respective shares, e.g., combine together to calculate the secret.
[0003] Public key cryptography is a cryptographic system that uses a key pair consisting of a private key, which is known only to the owner of the private key, and a public key, which is generated based on the corresponding private key and can be disseminated without compromising the security of the private key.
[0004] Public key cryptography enables a sender to encrypt a message using a recipient's public key (i.e., a public key corresponding to a private key known only to the recipient). The encrypted message can then only be decrypted using the recipient's private key.
[0005] Similarly, a sender can sign a message using his or her own private key, for example to prove that the message was sent by the sender, and / or to indicate that the sender agrees with the message. The signer (i.e., the party generating the signature) creates a digital signature based on the message using their private key. Creating a digital signature based on a message means providing the message and private key to a function that generates the signature based on the message and private key. The signature is added to (e.g., marked to) the message or otherwise associated with the message. Anyone with the corresponding public key of the signer can use the same message and the digital signature in the message to verify whether the signature is validly created, i.e., whether the signature is indeed created using the signer's private key. In addition to ensuring the authenticity of the message, the digital signature also ensures the integrity and non-repudiation of the message. That is, a digital signature can be used to prove that a message has not been changed after being signed using the signature, and that the creator of the signature cannot deny that they created the signature in the future.
[0006] Digital signature schemes usually involve three processes, or algorithms. A key generation algorithm is used to generate a random private key and a corresponding public key. A signing algorithm is used to generate a signature based on a message and a private key. Given a public key and a message, a verification algorithm is used to verify that the corresponding private key has been used and a signature has been generated according to the signing algorithm.
[0007] A common use of a shared secret is as a shared private key of a private-public key pair. That is, the private key can be distributed among a group of participants so that no single participant has access to it. Therefore, no single participant can generate a valid signature for a message. Instead, some or all participants must jointly generate the private key in order to generate the signature.
[0008] Instead of sharing their shares of a private key to generate a signature, participants can use a threshold signature scheme. A threshold signature scheme allows a threshold number of participants in a group to create a digital signature based on a message using separate shares of a shared private key without providing the private key to any one participant. Here, a digital signature is a signature generated based on the message to be signed. In such a scheme, a signature can only be created if a threshold number of participants agree to generate a signature in the message. Any attempt to generate a signature using a smaller number of participants will not generate a valid signature. Therefore, a valid signature for the group (i.e., a signature generated using the message and the shared private key) proves that a threshold number of people agreed to generate the signature. This also means that any attacker needs to obtain a threshold number of shares of a private key in order to forge a signature using that private key. Summary of the invention
[0009] As mentioned above, a shared secret may correspond to a shared private key. In many scenarios, it is recommended that a given private key should not be used more than once. Furthermore, due to the nature of public-private keys, and in particular the difficulty in deriving a private key from a corresponding public key, it is critical to ensure that a private key is not lost. Therefore, it is desirable to be able to generate a series of "shared private keys" to prevent key reuse (i.e., to prevent a group of users from having to reuse the same shared private key) and to enable key recovery (i.e., to allow a group of users to reconstruct a shared private key).
[0010] It is known that a structure is generated that generates parent and child keys, where each child key links back to (i.e. is derivable from) a parent key, and ultimately, each key in the structure links back to (i.e. is derivable from) a master private key. It is necessary to replicate the same structure using a shared private key.
[0011] One challenge faced when trying to derive such a shared private key structure is how to derive a subkey (or a share of that subkey) based on a master private key without revealing the master private key and thereby compromising the security of every key in the structure.
[0012] According to one aspect disclosed herein, a computer-implemented method for generating a share of a child private key is provided, wherein the method is performed by a first participant in a group and includes: receiving a first share of a master private key from a coordinator, wherein the master private key is generated based on a first part of a hash of a seed value; receiving a master chain code of the master private key from the coordinator, wherein the master chain code is generated based on a second part of the hash of the seed value; receiving a master public key corresponding to the master private key from the coordinator; generating one or more first shares of one or more corresponding child private keys, wherein each first share of the corresponding child private key is generated based on the first share of the master private key and a first part of a hash of: i) the master chain code, ii) the master public key, and iii) a corresponding key index.
[0013] According to another aspect disclosed herein, a computer-implemented method for enabling participants in a group to generate shares of a child private key is provided, wherein the method is performed by a coordinator and includes: generating a master private key based on a first part of a hash of a seed value; generating a master chain code for the master private key, wherein the master chain code is generated based on a second part of the hash of the seed value; generating a master public key corresponding to the master private key; using a secret sharing scheme to provide a corresponding share of the master private key to each corresponding participant; and, providing the master chain code to each participant; wherein each participant is configured to generate a corresponding share of a first child private key based on the corresponding share of the master private key and a first part of a hash of: i) the master chain code, ii) the master public key, and iii) a first key index.
[0014] The coordinator (i.e., dealer) inputs at least a secret seed into a hash function (e.g., an HMAC function). The first part of the resulting hash is used as the master private key. The second part of the same hash is used as the chain code for the master private key. The coordinator also generates a master public key, for example using an elliptic curve to generate points. The coordinator shares the chain code and the master public key with each participant. That is, the same data (master chain code and master public key) is sent to each participant. The coordinator also splits the master private key into shares and distributes different shares to each participant. The coordinator can use Shamir's secret sharing scheme to distribute the master private key shares. Therefore, each participant is provided with a corresponding share of the master private key, which is used to generate a corresponding share of the child private key.
[0015] Since each participant has a share of the same master private key, they can each derive a share of the same child private key. Therefore, the group of participants can use different private keys to, for example, generate signature shares for signing messages or for encrypting and decrypting messages. This achieves the first goal, i.e., preventing the reuse of shared private keys. In addition, since each participant has a share of the master private key and a share of the child private key, if lost, the master private key and the child key can be recovered by reconstructing the required key using a threshold number of key shares. Therefore, the second goal, i.e., achieving key recovery of the shared private key, is achieved.
[0016] A key structure (sometimes also referred to as a hierarchical deterministic (HD) wallet) is a collection of deterministically linked private keys, where at least some of the keys are associated with different levels and positions within the hierarchy. For example, a master private key is located at the top of the hierarchy (i.e., level 0), with one or more subkeys located at the next level (i.e., level 1). Each subkey of level 1 is linked to the master private key. Each subkey of level 1 can be linked to one or more corresponding subkey sets of level 2. Therefore, although it is a subkey of the master key, a subkey of level 1 can also be a parent key of a subkey of level 2. It should be understood that an HD wallet can contain any number of levels and keys. Embodiments of the present disclosure enable the generation of a "shared wallet" of private key shares, where each private key can be traced back to (i.e., linked to) a master private key share. A shared wallet can take a form similar to a traditional HD wallet. Instead of each participant having a wallet with a private key, they now all have a wallet with a private key share. When needed, each participant can access its corresponding key share at the same level and position in the key structure, for example to generate a signature share. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] To facilitate an understanding of the embodiments of the present disclosure and to show how such embodiments may be implemented, reference will now be made, by way of example only, to the accompanying drawings, in which:
[0018] Figure 1 is a schematic block diagram of a system for generating a shared private key;
[0019] Figure 2 Schematically represents a hierarchical deterministic key structure;
[0020] Figure 3 is a flow chart illustrating an exemplary method of generating a shared private key from the perspective of a coordinator;
[0021] Figure 4 is a flow chart illustrating an exemplary method for generating a shared private key from the perspective of a participant;
[0022] Figure 5is a flow chart illustrating an exemplary signature generation method according to some embodiments of the present invention. DETAILED DESCRIPTION
[0023] 1. Encryption Principle
[0024] Although the following examples are described in terms of elliptic curve cryptography, the invention is not limited to any one particular encryption scheme and may generally be applied to any encryption scheme, such as RSA or other public key encryption schemes.
[0025] 1.1 Elliptic Curve Group
[0026] The elliptic curve E satisfies the following equation:
[0027] y 2 =x 3 +ax+b mod p
[0028] in and a,b satisfy 4a 3 +27b 2 ≠ 0. The group on this elliptic curve is defined as the set of elements (x, y) that satisfy this equation and the point at infinity The point at infinity is the unit element. The group operation on the elements of this group is called elliptic curve point addition, denoted by +. The group is Represented by, its order is represented by n.
[0029] This group operation can be used to define another operation on elements, called point multiplication, denoted by . and scalar A point k·G is defined as the point G added to itself k times.
[0030] In elliptic curve cryptography, a private key is defined as a scalar in is a symbol of the set {1, ..., n-1}, and the corresponding public key is a point k G on the elliptic curve. For example, in some blockchain protocols, the elliptic curve is chosen to be the secp256k1 elliptic curve, and the values a, b, and p are fully specified by the curve. Given these values, the order n of the group has been calculated, which in the case of this curve is a prime number, and the secp256k1 standard also specifies a point G that will be used as the generator of the group.
[0031] 1.2 Elliptic Curve Digital Signature Algorithm
[0032] To create a signature in message msg using private key a, the following steps are taken:
[0033] 1. Calculate the message digest e = hash(msg), where it can be any hash function. For example, in some examples, hash(msg) = SHA256 (SHA256(msg)), where SHA256 (■) is the SHA-256 hash function. It should be noted that, in contrast, the message can be hashed only once, or more than twice using the same or different hash functions.
[0034] 2. Choose a random integer k∈{1,...,n-1}, where n is the order of the elliptic curve (e.g., secp256k1 curve). In the following, k is called the temporary private key.
[0035] 3. Calculate the temporary public key k·G=(R x , R y ).
[0036] 4. Calculate r = R x mod n. If r=0, return to step 2.
[0037] 5. Calculate the multiplicative inverse k of the temporary key -1 mod n.
[0038] 6. Calculate s = k -1 (e+ar) mod n. If s=0, return to step 2.
[0039] 7. The signature in the message msg is (r, s).
[0040] The ephemeral key must be kept secret, otherwise the private key can be calculated given the message and the signature. Furthermore, each time a signature is generated, a different ephemeral key must be used. If this were not the case, the private key a could be derived given two different signatures and their corresponding messages.
[0041] Given a message msg, a public key P = a G, and a corresponding signature (r, s), the signature can be verified by completing the following steps:
[0042] 1. Calculate the message digest e=hash(msg), for example, e=SHA256(SHA256(msg)).
[0043] 2. Calculate the multiplicative inverse s modulo n -1 .
[0044] 3. Calculate j1 = es -1 mod n and j2 = rs -1 mod n.
[0045] 4. Calculate point Q = j1·G + j2·P.
[0046] 5. If (point at infinity), the signature is invalid.
[0047] 6. If Then let Q:=(Q x , Q y ), then calculate u = Q x mod n. If u = r, the signature is valid.
[0048] In a threshold signature scheme, the private key a is split into key shares that are distributed among participants in the threshold scheme group.
[0049] 1.3 Jointly Verifiable Random Secret Sharing
[0050] Suppose N participants want to create a joint secret that can only be regenerated by at least (t+1) participants in the scheme. To create a shared secret, take the following steps:
[0051] 1. Participants agree on a unique label i for each participant. Each participant i generates (t+1) random numbers
[0052]
[0053] Where ∈R represents the set Randomly generated elements in is a symbol of the set {1, ..., n-1}. Each participant has a secret polynomial of order t
[0054] f i (x) = a i0 +a i1 x+…+a it x t mod n,
[0055] where i=1, ..., N. It should be noted that from now on the symbol mod n is omitted and all arithmetic operations on integers are assumed to be performed modulo n.
[0056] 2. Each participant i will set the value f i (j) is sent to participant j, e.g., using only a secure communication channel with participant j.
[0057] 3. Each participant i calculates its own secret share of the shared secret polynomial according to the following equation
[0058]
[0059] The shared secret shares are in the form (i, a i), where i is the participant label in the scheme. As described in steps 1-3, for participant i, this method for creating a secret share a is referred to in this paper as a i = JVRSS(i) indicates. It should be noted that “JVRSS” generally stands for “Jointly Verified Random Secret Sharing” and also includes steps 4 and 5. However, in this document, JVRSS is understood to perform at least steps 1 to 3, wherein steps 4 and 5 are optional steps.
[0060] At this point, the participants have generated a shared polynomial, and each of these participants can verify that the other participants have shared the correct information to all participants, while also verifying that all participants have the same shared polynomial. This can be achieved in the following way.
[0061] 4. Each participant i broadcasts the confusion coefficient to all participants
[0062] a ik G,
[0063] Where k = 0, ..., t.
[0064] 5. Each participant i verifies that each participant j has correctly calculated the polynomial point f by j (i) Calculate f j (i) G, then verify
[0065]
[0066] If all participants find that this equality holds for each polynomial, then the group can collectively determine that they have all created the same shared polynomial.
[0067] 1.4 Reconstructing the shared secret
[0068] Suppose the participants want to reconstruct the shared secret a, which is the zeroth order of the shared polynomial. Given (t+1) points on this polynomial of the form,
[0069] (1, a1), ..., ((t+1), a t+1 ),
[0070] Then, to find the shared secret a, we need to calculate
[0071]
[0072] It can be derived from a general formula called "Lagrange interpolation method".
[0073] 1.5 Public Key Calculation
[0074] Given the N zero-order private polynomial coefficients shared in step 4 of JVRSS, the public key a i0 G (where j = 1, ..., N), each participant calculates the shared public key P using the following equation
[0075]
[0076] Corresponding to the shared secret a.
[0077] 1.6 Addition of Shared Secrets
[0078] To compute the sum of two shared secrets between a group of N participants, where each secret polynomial is of degree t, and the individual secrets are unknown to any entity, take the following steps:
[0079] 1. Generate the first shared secret a, where participant i’s share is given by a i =JVRSS(i), where i=1, ..., N, and the threshold is (t+1).
[0080] 2. Generate a second shared secret b, where participant i’s share is given by b i =JVRSS(i), the threshold is (t+1).
[0081] 3. Each participant i calculates his own share of addition
[0082] v i =a i +b i mod n.
[0083] 4. All participants add their added shares v i Broadcast to all other participants.
[0084] 5. Each participant has a share v i At least (t+1) shares in are interpolated to calculate
[0085] v = interpolate(v1, ..., v t+1 )=a+b.
[0086] For participant i, this method for adding the shared secrets is denoted by ADDSS(i), which results in each participant i knowing v=(a+b).
[0087] 1.7 Product of Shared Secrets
[0088] To compute the product of two shared secrets between a group of N participants, where each secret polynomial is of degree t, the group of participants needs to take the following steps:
[0089] 1. Generate the first shared secret a, where participant i’s share is given by a i = JVRSS(i) yields, where i = 1, ..., N. The order of the shared secret polynomial is t, which means that (t+1) participants need to recreate the shared secret polynomial.
[0090] 2. Generate a second shared secret b, where participant i’s share is given by b i =JVRSS(i) yields, and the order of the shared secret polynomial is t again.
[0091] 3. Each participant calculates his multiplication share μ using the following equation f
[0092] μ i =a i b i .
[0093] 4. All participants add their multiplication shares μ i Broadcast to all other participants.
[0094] 5. Each participant has a share μ at 0 i At least (2t+1) shares in are interpolated to calculate
[0095] μ=interpolate(μ1,…,μ 2t+1 )=ab.
[0096] For participant i, this method for computing the product of two shared secrets is denoted herein by μ=ab=PROSS(i).
[0097] 1.8 Inverse of the Shared Secret
[0098] To compute the inverse of the shared secret a, the following steps need to be taken:
[0099] 1. All participants calculate the product of the shared secret PROSS(i), the result of which is μ=ab mod n.
[0100] 2. Each participant calculates the modular inverse of μ, which results in
[0101] μ -1 =(ab) -1 mod n.
[0102] 3. Each participant i calculates its own inverse secret share by calculating the following
[0103]
[0104] For participant i, this method for computing the inverse of the shared secret is given by express.
[0105] 1.9 Shared private key generation and verification
[0106] To compute a shared private key a among N ≥ 2t + 1 participants, where t + 1 participants need to create a signature, the participants perform JVRSS over a threshold of t + 1 and perform the public key computation as described above. The result is that each participant i = 1, ..., N has a private key share a i And the corresponding shared public key P = (a·G).
[0107] 1.10 Generation of Temporary Key Shares
[0108] To generate the ephemeral key shares and the corresponding r as required in the signature, a group of size N (with a shared private key a and a threshold of (t+1)) needs to perform the following steps:
[0109] 1. Generate the inverse share of the shared secret It requires (t+1) shares to recreate.
[0110] 2. Each participant is calculated by the following method
[0111]
[0112] Used in verifying k i The confusion coefficient shared when , and then calculate
[0113] r=x mod n.
[0114] 3. Each participant i stores
[0115] 1.11 Non-optimal signature generation
[0116] Assume that at least 2t+1 participants want to create a signature in a message, and one of the participants chooses to coordinate this. In order for a group with a shared private key a to create a signature, the following steps are taken:
[0117] 1. The coordinator requests signatures in the message from at least 2t+1 participants.
[0118] 2. Each participant i recovers the temporary key calculated in the previous section All users must use shares corresponding to the same ephemeral key.
[0119] 3. Each participant calculates the message digest e = SHA-256 (SHA-256 (message)).
[0120] 4. Each participant i calculates its signature share s i :
[0121]
[0122] where a i is its private key share.
[0123] 5. Each participant sends its signature share (r, s i ).
[0124] 6. When the coordinator receives 2t+1 signature shares, each participant calculates:
[0125] s=interpolate(s1,…,s 2t+1 ),
[0126] And the signature is output as (r, s).
[0127] 7. The coordinator verifies the signature using standard ECDSA verification. If this fails, then at least one of the shares must be incorrect and the signature generation algorithm should be run again.
[0128] 1.12 Secret addition with different thresholds
[0129] In the case of adding secrets of order t and t′, computing the sum of the two secrets requires max(t, t′)+1 shares. The reason is that the step of adding the shares of the shared secret creates the shares of a new polynomial. This new additive polynomial is equivalent to the result of adding the two separate polynomials of the shared secret. Adding two polynomials is adding the corresponding coefficients of each order x. Therefore, the order of the additive polynomial must be the same as the highest order of the two polynomials. This can be generalized to adding more than two polynomials, where the order of the resulting polynomial is the same as the order of the single polynomial with the highest order.
[0130] Once the sum of two secrets with different thresholds is calculated, the security of the secret with the higher threshold is reduced. This is because, if the result (a+b) with corresponding thresholds t, t' is now known, and assuming t < t', a can be calculated using t shares, and then (a+b) - a = b, thus the value b has been calculated using only t shares. This lower threshold is hereinafter referred to as the "implicit threshold" of b.
[0131] 1.13 Multiplication of Secrets with Different Thresholds
[0132] In the case of multiplying two secrets with thresholds t and t′, calculating the product requires t + t′ + 1 shares. In this case, multiplying the shares of two polynomials results in shares of a new polynomial. This new polynomial is the result of multiplying two separate polynomials, so the degree of the result is the sum of the degrees of the two separate polynomials.
[0133] The multiplication operation can also be generalized to any number of shared secrets, and the resulting threshold is the sum of the individual thresholds plus 1, i.e., ∑ ρ t ρ + 1, where ρ iterates over the individual shared secrets.
[0134] Similar to the addition operation, multiplying two secrets with different thresholds results in the implicit threshold of the secret with the higher threshold. As mentioned before, if ab is known, where a has threshold t and b has threshold t′, and t < t′, then both a and b can be calculated using t shares. First, a can be calculated using only t shares of the secret, and then b can be obtained using (ab) / a -1 to find b.
[0135] 1.14 Combine addition and multiplication of a shared secret in one step
[0136] The above can be summarized as calculating any combination of addition and multiplication operations in one step. Suppose a group of N participants wants to calculate the result ab + c, where a, b, c are shared secrets with thresholds (t a + 1), (t b + 1), (t c + 1) respectively. The condition is that max(t a + t b , t c ) < N, that is, the number of participants in the solution of the present invention must be greater than the maximum value between the degree of the secret c and the degree of the result of the multiplication operation of the secrets a and b.
[0137] 1. Each participant i calculates its secret shares a a = JVRSS(i), b b = JVRSS(i), and c c = JVRSS(i) with thresholds (t i + 1), (t i + 1), (t i + 1) respectively.
[0138] 2. Each participant i calculates the share λ i = a i b i + c i .
[0139] 3. Each participant i shares the result λ with other participants i .
[0140] 4. Each participant has a a +t b , t c )+1 shares are interpolated to obtain the result λ=int(λ1,…,λ i ,…)=ab+c.
[0141] This is done when computing the shared signature according to some of the following embodiments. The above use case is basically the same, where and In this case, t a +t b =2t and t c = t, and the interpolation exceeds max(t a +t b , t c )+1=2t+1 shares.
[0142] 1.15 HD Wallet
[0143] Hierarchical deterministic wallets (of which Bitcoin Improvement Proposal 32 (BIP32) wallets are a special type of wallet) are deterministic wallets where many keys can be derived from a single input. The input is some random entropy called a seed, from which a master key is derived. The master key is then used to derive multiple child keys, such as Figure 2 shown.
[0144] In BIP32, the master private key is the left 32 bytes of the HMAC-SHA512 result of the seed, or more specifically, the master private key is
[0145] sk master =HMAC-SHA512 L ('Bitcoin Seed', seed),
[0146] and the chaincode is
[0147] C master =HMAC-SHA5 12 R ('Bitcoin Seed', seed),
[0148] And then all subkeys can be derived from it, where
[0149]
[0150] is an HMAC using the SHA512 hash function. In the above equation, opad is the outer padding of the block size, and ipad is the inner padding of the block size.
[0151] HMAC requires two inputs, c and K. For simplicity and so that the user only needs to remember or store a single seed, the BIP32 protocol sets the first input to the string "Bitcoin Seed", i.e. c = 'Bitcoin Seed'. It should be understood that this is an exemplary protocol for generating HD wallets, and different protocols may require different inputs, such as two randomly generated seeds. In other words, using the string "Bitcoin Seed" is not a necessary requirement for generating HD wallets.
[0152] Used to obtain the parent private key sk parent Calculate the enhanced sub-private key sk child The equation is as follows
[0153] sk child =sk parent +HMAC-SHA5 12 L (c parent ,sk parent ||index),
[0154] where c parent Is the parent chain code, 0≤index<2 31 is the subindex, and HMAC-SHA512 L It is the left 32 bytes of the result of the HMAC function calculated using the SHA-512 hash function. The corresponding equation for the child public key is derived simply by multiplying this equation with the base point G.
[0155] Used to obtain the parent public key pk parent and the parent private key sk parent Calculate the non-enhanced sub-private key sk child The equation is as follows
[0156] sk child =sk parent +HMAC-SHA5 12 L (c parent , pk parent ||index),
[0157] where c parent is the parent chain code, 2 31 ≤index<2 32 is the child index, and HMAC-SHA512 is the HMAC function calculated with the SHA-512 hash function. This second type of child key enables the child public key to be derived by anyone who knows the parent public key and the chain code using the following equation:
[0158] pk child =pk parent +HMAC-SHA5 12 L (c parent , pk parent ||index)·G.
[0159] This can be used by external parties to derive various payment addresses as needed, thus avoiding the reuse of keys while reducing the number of rounds of communication and storage.
[0160] Typically, an HD wallet should generate some sort of hierarchical tree structure of private-public key pairs. This provides a large number of key pairs that can all be regenerated from a single seed.
[0161] 2. Generate private key shares
[0162] Figure 1 An exemplary system 100 for implementing the described embodiments is shown. As shown, the system 100 includes a coordinator (or moderator) 101 and a plurality of participants 102. Figure 1 Only three participants 102 are shown in the system, but it should be understood that the system can generally include any number of participants. The coordinator 101 and each of the participants 102 operate a corresponding computing device. In some examples, the coordinator 101 can also play the role of the participant 102.
[0163] Each corresponding computing device includes a corresponding processing device, which includes one or more processors, such as one or more central processing units (CPUs), accelerator processors (such as graphics processing units GPUs), other dedicated processors, and / or field programmable gate arrays (FPGAs). The corresponding computing device may also include a memory, that is, a computer-readable memory in the form of a non-temporary computer-readable medium. The memory may include one or more memory units, which use one or more memory media, such as magnetic media such as hard disks, electronic media such as solid-state drives (SSDs), flash memory or electrically erasable programmable read-only memories (EEPROMs), and / or optical media such as optical disk drives. The corresponding computer device may include at least one user terminal, such as a desktop or laptop computer, a tablet computer, a smart phone, or a wearable device such as a smart watch. Alternatively or additionally, the corresponding computing device may include one or more other networked resources, such as cloud computing resources accessed via a user terminal (the cloud computing resources include resources of one or more physical server devices implemented at one or more sites). It should be understood that any action described as being performed by the coordinator 101 or the participant 102 can be performed accordingly by the corresponding computing device operated by the coordinator 101 or the participant 102.
[0164] The coordinator 101 is configured to transmit data to each of the participants 102 using a LAN or WAN connection over the Internet or via alternative wired or wireless communication means. Similarly, each participant 102 may be configured to transmit data to one, some, or all of the other participants 102 using a LAN or WAN connection over the Internet or via alternative wired or wireless communication means. Unless the context requires otherwise, references to a party (coordinator 101 or participant 102) transmitting data may be understood as, for example, transmitting data to the other party 101, 102 individually via a secure communication channel between the parties; or, for example, broadcasting data to the parties via email or other means. Similarly, unless the context requires otherwise, the parties 101, 102 may transmit data in original form or in encrypted form. For example, the data may be encrypted using the public key of the receiving party before sending it to the receiving party.
[0165] The embodiments will be described primarily from the perspective of the first participant 102a. However, it should be understood that the steps of the generally described method can be similarly performed by other participants (e.g., the second participant 102b or the third participant 102c). It should also be understood that the terms "first", "second", "third", etc. are used herein merely as distinguishing labels and do not necessarily imply an order unless the specific context in which the terms are used requires otherwise.
[0166] This disclosure describes techniques that enable each participant 102 in a group of participants 102 to generate a respective share of one or more shared private keys that are each linked to a shared master private key. That is, each participant 102 can obtain a share of a master private key and then use the master private key share to derive shares of additional private keys (often referred to as child private keys) to, for example, generate a shared wallet. Here, a wallet is a term that refers to a collection of keys stored, for example, in a memory of a given participant 102.
[0167] First, the coordinator 101 generates a master private key by hashing at least a seed using a hash function. The seed can be a number or a string. In some examples, additional data such as a number or a string (i.e., a second seed) is hashed together with the (first) seed. This increases the entropy of the master private key. The first seed and / or the second seed can be pseudo-randomly generated by the coordinator 101. Any hash function can be used, such as SHA256, SHA512, etc. In some examples, a hash function that performs more than one hash operation can be used, such as double hashing such as SHA256 followed by SHA256. Preferably, the hash function is a hash message authentication code (HMAC) function. The HMAC function requires two inputs—the first seed and the second seed mentioned above.
[0168] The master private key includes the first part (i.e., portion or component) of the output of the hash function. The output of the hash function is called a hash digest. The master private key can be the first half of the hash digest. For example, the hash digest produced by the SHA256 hash function is 256 bits, in which case the master private key can be the leftmost 128 bits of the hash digest. The hash digest produced by the HMAC function is 512 bits, in which case the master private key can be the leftmost 256 bits of the hash digest.
[0169] In these examples, the first component may be the entire output of the HMAC function, or may be a portion of the output, such as the left 256 bytes.
[0170] The second part of the hash digest is used by the coordinator 101 as the master chain code of the master private key. For example, if the SHA256 function is used or the HMAC function is used, the master chain code can be the leftmost 128 bits or 256 bits respectively. The purpose of the master chain code is to add more entropy to the derivation of the subkey.
[0171] The coordinator 101 also generates a master public key based on the master private key. The master public key can be generated based on the elliptic curve point multiplication of the master private key and the elliptic curve generator point.
[0172] The master chain code and master public key may be provided to the participants 102. The coordinator 101 may send the master chain code and master public key directly to each participant 102, or to one or more participants 102, who then forward the data to the remaining participants.
[0173] The master private key is not shared with the participants 102. Instead, the coordinator 101 uses a secret sharing scheme to split the master private key into shares ("master private key shares") and distributes a corresponding master private key share to each participant 102. For example, a first master private key share is sent to the first participant 102a, a second master private key share is sent to the second participant 102b, and a third master private key share is sent to the third participant 102c. Each participant 102 receives only a single master private key share. Once the master private key shares have been distributed to the participants 102, the coordinator 101 can delete the master private key from memory. This improves the security of the master private key because it no longer exists in plain text and cannot be stolen by attackers.
[0174] The coordinator 101 may use Shamir's Secret Sharing Scheme (SSSS) to split the master private key into shares and distribute the shares to the participants 102. The skilled person will be familiar with SSSS. Details are given below.
[0175] The coordinator 101 may also be a participant 102 of the scheme. That is, the coordinator 101 may retain one of the master private key shares for generating the child private key shares. In other words, the coordinator 101 may deal the master private key share to itself.
[0176] As described above, each participant 102 obtains a corresponding master private key share, a master chain code, and a master public key from the coordinator 101. Then, each participant 102 generates one or more sub-private key shares. For example, the first participant 102a can generate a first share of a first sub-private key, the second participant 102b can generate a second share of the first sub-private key, and the third participant 102c can generate a third share of the first sub-private key. Similarly, the first participant 102a can generate a first share of a second (different) sub-private key, the second participant 102b can generate a second share of the second sub-private key, and the third participant 102c can generate a third share of the second sub-private key. Participants 102 can generate shares of multiple sub-private keys.
[0177] Each child private key share is generated in a similar manner. Each child private key share is based on the master private key share. Each child private key share is also based on the first part (i.e., component) of the output of inputting the master chain code, the master public key, and the corresponding key index into a hash function. Preferably, the hash function is the same hash function as the coordinator 101 used to generate the master private key. The first part can be the first half of the hash digest, such as the leftmost 256 bits of the hash digest generated when the hash function is an HMAC function.
[0178] For example, the first participant 102a generates a first share of the first child private key based on the first master private key share and a portion of the hash of the master chain code, the master public key, and the first key index. Similarly, the second participant 102b generates a second share of the first child private key based on the second master private key share and a portion of the hash of the master chain code, the master public key, and the first key index.
[0179] The first participant 102a may generate a first share of a second (different) child private key based on a share of the first master private key and a portion of a hash of the master chain code, the master public key, and the second (different) key index. Similarly, the second participant 102b may generate a second share of a second child private key based on a share of the second master private key and a portion of a hash of the master chain code, the master public key, and the second key index.
[0180] In this way, participant 102 generates shares of the same child private key.
[0181] Participant 102 can generate a public key for a child private key, i.e., a child public key corresponding to the child private key. Participant 102 does not have access to the full child private key, and therefore cannot simply use an elliptic curve generator point to generate the child public key. Instead, the child public key is generated based on the master public key and the public key corresponding to the first part of the hash digest of the share used to generate the child private key share. That is, the child public key is based on the master public key and the result of applying an elliptic curve generator point to the first part of the hash of the master chain code, the master public key, and the corresponding key index.
[0182] Participant 102 may also generate a chain code for a child private key. The chain code for a given child private key is generated based on the second part of the hash of the master chain code, the master public key, and the corresponding key index. For example, the second part of the hash may be the second half (e.g., the rightmost 256 bits) of the hash digest.
[0183] The chain code of a given child private key is used to generate shares of a child key of that child private key (i.e., a grandchild key of a master private key). Shares of a grandchild private key are generated in a similar manner to shares of a child private key. Each grandchild private key share is based on a child private key share. Each grandchild private key share is also based on the first part (i.e., component) of the output of inputting the child key chain code, the child public key, and the corresponding key index into a hash function. Here, the "child key chain code" is the chain code of the child private key. Preferably, the hash function is the same hash function used by participant 102 to generate shares of the child private key. The first part can be the first half of the hash digest, such as the leftmost 256 bits of the hash digest produced when the hash function is an HMAC function.
[0184] For example, the first participant 102a can generate a first share of the first grandchild private key based on the first share of the first child private key and a portion of the hash of the first child key chain code, the first child public key, and the first key index. Similarly, the second participant 102b can generate a second share of the first grandchild private key based on the second share of the first child private key and a portion of the hash of the first child key chain code, the first child public key, and the first key index.
[0185] The first participant 102a can generate a first share of a second (different) grandchild private key based on a first share of the first child private key and a portion of a hash of the first child key chain code, the first child public key, and the second (different) key index. Similarly, the second participant 102b can generate a second share of a second grandchild private key based on a second share of the first child private key and a portion of a hash of the first child key chain code, the first child public key, and the second key index.
[0186] Participant 102 may also generate shares of sub-keys of one or more different sub-private keys.
[0187] The private key shares may be used as part of a signature scheme to sign a message, and / or as part of an encryption scheme to encrypt a message, or for different purposes. For example, when used as part of a signature scheme, a first participant 102a may use a first private key share to generate a first signature share for a message. A second participant 102b may similarly generate a second signature share for a message, and a third participant 102c may similarly generate a third signature share. The first signature share, the second signature share, and the third signature share may be used to generate a complete signature. The signature scheme may be a threshold signature scheme, in which case only a threshold number of signature shares may be required to generate a signature.
[0188] The concept of HD key structure (or HD wallet) is introduced above. Each participant 102 can generate an HD key structure of private key shares, where each private key share can ultimately be derived from the master key share distributed to the participant 102. The HD key structure can include multiple levels of child private key shares. Some private key shares can be both the parent private key share of the corresponding child private key share and the child private key share of the corresponding parent private key share. The HD key structure can be similar to Figure 2 The structure shown. Figure 2 As shown, each private key in the HD key structure has a parent private key. The parent private key of the private key at the first level in the HD key structure can be a master private key, where the master private key is at the zeroth level. The message can include at least a portion of a blockchain transaction, as discussed further below.
[0189] Figure 3 An exemplary method 300 according to some embodiments of the present disclosure is shown. In step S301, the coordinator 101 generates a master private key based on a seed. In step S302, the coordinator 101 generates a master chain code. In step S303, the coordinator generates a master public key. In step S304, the coordinator generates master private key shares, and in step S305, the coordinator distributes these private key shares to participants 102.
[0190] Figure 4 Another exemplary method 400 according to some embodiments of the present disclosure is shown. In step S401, each participant 102 receives a master private key share. In steps S402 and S403, each participant receives a master chain code and a master public key, respectively. In step S404, each participant 102 generates one or more child private key shares. Each participant 102 may also generate one or more grandchild private key shares. Each participant 102 may generate an HD key structure based on its corresponding master private key share.
[0191] An exemplary implementation of the described embodiment is now provided. As previously mentioned, one difficulty with deriving a shared wallet (completely as described in BIP32) is the need to compute a hash of a shared secret (i.e., a master private key). If the shared secret is not explicitly computed, then computing a hash function of the secret is difficult and therefore impractical. The present disclosure enables the creation of a shared wallet (compliant with BIP32) by initially using a distributor (i.e., coordinator 101). This allows for a shared wallet containing non-enhanced keys (as described in BIP32).
[0192] The method first assumes that there is a trusted party 101 that acts as a distributor in the scheme of N participants 102, and each participant has agreed on a participant index i. The trusted party 101 randomly generates a master seed seed. They use the following equation to derive the master private key and chain code (as described in BIP32),
[0193] sk master =HMAC-SHA512 L ('Bitcoin Seed', seed),
[0194] And use the following equation to derive the master private key and chain code,
[0195] C master =HMAC-SHA512 R (‘Bitcoin Seed’, seed).
[0196] The trusted party 101 then uses Shamir's secret sharing scheme to share the secret key sk among the participants. master That is, for j = 1, ..., t, they generate t random numbers a j The allocator 101 defines the following polynomial
[0197] f master (x) = sk master +a1x+…+a t-1 x t-1 +a t x t ,
[0198] Where t+1 is the threshold of the shared secret.
[0199] Then, for all i=1, ..., N, the allocator 101 derives the value a i-master =f master (i) and communicates to participant i a i-master .
[0200] The distributor also calculates the corresponding public key pkmaster =sk master G, and with the main chain code C master All participants share the public key pk master The distributor 101 can now delete the private key sk master If you need to restore the shared private key sk master , the shared private key can be recovered using Lagrange interpolation or reissuing shares (as described in WO2021254702).
[0201] To derive any non-enhanced subkey, each participant 102 calculates its subkey for a given index 2 using the following equation: 31 ≤index≤2 32 Subkey share of
[0202] a i-child =a i-parent +HMAC-SHA5 12 L (c parent , pk parent ||index),
[0203] And use the following equation to calculate the corresponding public key
[0204] pk child =pk parent +HMAC-SHA5 12 L (c parent , pk parent ||index)·G.
[0205] Participant 102 can also calculate the sub-chain code
[0206] C child =HMAC-SHA512 R (c parent , pk parent ||index),
[0207] Used to export any grandchild keys.
[0208] Participants 102 in the scheme can use the private key share a in any threshold signature scheme or other threshold technology i The same way to use a i-child .
[0209] Figure 5An exemplary method 500 for generating a signature in a message according to some embodiments of the present disclosure is shown. Steps S501 to S508 are performed by each participant (including the first participant 102a) of the threshold number of participants 102 in this example. Step S509 is performed by the coordinator 101, which may also be one of the participants performing steps S501 to S405. It should be understood that some of these steps may be omitted or performed in a different order.
[0210] Exemplary method 500 enables creation of a shared secret with a threshold of (t+1) among a set of N≥2t+1 participants, where the signature threshold is also (t+1).
[0211] Establish:
[0212] In step S501, each participant 102 calculates the child private key share a i-child and the corresponding public key. The sub-private key share a has been described above i-child At this point, each participant i has a secret subkey share and a public key (a i-child , P), where P is the public key corresponding to the shared private key (i.e., a child The threshold of the shared private key is (t+1).
[0213] Precompute:
[0214] In step S502, each participant 102 calculates a shared temporary key share and a corresponding public key. For example, each participant 102 can use JVRSS and the public key calculation given in the preliminary knowledge section to calculate the shared temporary key. Then, each participant 102 can calculate the inverse share based on the temporary private key. This will result in each participant having an inverse share The threshold is (t+1).
[0215] In step S503, each participant 102 creates two different shared blind key shares. For example, each participant 102 may create two shared secrets such that participant i has a share α i = JVRSS(i) and β i = JVRSS(i), the threshold of each shared secret is (t+1). It should be noted that in some examples, not all shared secrets need to have the same threshold.
[0216] In step S504, each participant 102 calculates the intermediate share and broadcasts its intermediate share to other participants. For example, each participant i may calculate the intermediate share The threshold of this value is (2t+1).
[0217] In step S505, each participant 102 calculates the intermediate value based on at least the intermediate share. For example, each participant 102 can calculate the intermediate value by using λ=interpolate(λ1, ..., λ 2t+1 ) = k -1 Interpolation of a+β is used to calculate intermediate values.
[0218] In step S506, each participant 102 calculates a pre-signed share. For example, each participant i may calculate their pre-signed share σ i =λ-β i =(k -1 a+β)-β i Each participant 102 may store The private key share and the corresponding public key (a i-child , P).
[0219] It should be noted that since each signature uses a different temporary key, multiple temporary keys can be set at once, that is, steps S502 to S506 can be repeated to create multiple temporary keys in the pre-calculation process and store them for subsequent use. These operations can be performed simultaneously, so no additional communication rounds are required. It should be noted that, preferably, different α and β values should be used for each signature.
[0220] Signature generation:
[0221] In order to sign the message msg, at least (t+1) participants must execute steps S507 and S508.
[0222] In step S507, at least a threshold number of participants 102 obtain the message to be signed and calculate the message digest. For example, the coordinator 101 can send a request to (t+1) participants to create a signature share in the message msg. Each participant i can calculate the message digest e=hash(msg). In some examples, the hash function is a double SHA-256 hash function. Alternative hash functions can be used.
[0223] In step S508, at least a threshold number of participants 102 calculate signature shares and send them to the coordinator 101. For example, each participant i may calculate their signature share Then their signature shares (r, s i ) is sent to the coordinator. It should be noted that the value r may not be sent by all participants.
[0224] In step S509, the coordinator 101 calculates the signature. For example, the coordinator 101 may calculate s=interpolate(s1, ..., s t+1) = k -1 (e+ar), and finally calculate the signature (r, s).
[0225] There are several alternative schemes for precomputing the message-independent components of signature shares. These schemes can be roughly divided into two groups of variations: when to include r in the calculation; and when to include (kα) -1 These schemes can be selected independently of each other, so there are eight variations of the above method 500.
[0226] One modification is to store in step S506 This means that r is included in the pre-signed share. Another modification is that it can also be multiplied by r in advance during the calculation of the intermediate share. By changing to define in step S504 In step S506, σ i =λ-β i =(rk -1 a+β)-β i , and the signature share is calculated as
[0227] Another modification is to calculate λ instead i =α i a i-child +β i , so that λ=(kα) -1 (αa+β), and σ i =λ-(kα) -1 β i . Both variants including r at alternative points can be done in conjunction with this. Each participant knows kα because it was calculated in the pre-calculation step S502. In addition, all participants 102 broadcast their λ i shares. Therefore, each participant 102 knows (at least) 2t+1 shares and the value kα. Then, calculate
[0228] λ=(kα) -1 ×interpolate(λ1, ..., λ 2t+1 )
[0229] Another modification is to calculate the intermediate value as λ = (αa + β) and the pre-signed share as σ i =λ-β i Finally, the signature share will be Two variations on when to include r in the calculation can also be done in conjunction with this. Each participant 102 calculates Then, they can calculate (kα) based on this -1 mod n, and then incorporate it into s i 's calculation.
[0230] In summary, each participant 102 can generate four secret shares: a i-child , k i , α i , β i In the exemplary method 500, two products need to be calculated: kα, which is then used to calculate (Interpolating these shares yields k -1 , since α will be cancelled); and k -1 a, used in the signature, which uses the first product, so if the share is extended, the calculation results in right Share (consisting of kα and a i-child Any calculation of α i Calculate it by itself, and then multiply by (kα) if necessary -1 to complete.
[0231] A version of the above scheme can be summarized as follows: the signature is computed using a share consisting of a message-independent component (MIC) and a message-dependent component (MDC), where the MIC can be based on the pre-signed share σ i , and MDC is based on message e.
[0232] An equivalent scheme consists in calculating the MIC as described above and then incorporating it into the signature together with the signature shares, for example after interpolating the signature shares consisting only of the MDC. Obviously, the scheme can be the same up to the pre-calculation step S506, where the intermediate shares include the r value So that after interpolation, λ = k -1 ar+β.
[0233] At this stage, participants know and compare it with the private key share and the corresponding public key (a i-child , P) are stored together.
[0234] Then, to generate their signature share given a message m, which is hashed to create a message digest e = hash(m), the participants compute
[0235]
[0236] and sends it to the coordinator. Then, the coordinator calculates
[0237] s=interpolate(s1,…,s t+1 )+λ,
[0238] =k -1 e+k-1 ar,
[0239] This leads to the expected signature share, since the β terms cancel. A similar variation of the protocol can be described as above when (kα) -1 and r are included in the calculation.
[0240] The following variants for computing message-independent components can be implemented:
[0241] i) Calculate λ=k -1 a+β, the signature share is now And the signature is generated as: s = int(s1, ..., s t+1 )+rλ.
[0242] ii) Calculate λ=aar+β, then the signature share is now s i =α i e-β i , and the signature is generated as: s = (kα) -1 (int(s1, ..., s t+1 )+λ).
[0243] iii) Calculate λ = αa + β, then the signature share is now And the signature is generated as: s = (kα) -1 (int(s1, ..., s t+1 )+rλ).
[0244] iv) Calculate λ = aar + β, then the signature share is now And the signature is generated as: s = (int (s1, ..., s t+1 )+(kα) -1 λ).
[0245] v) Calculate λ = αa + β, then the signature share is now And the signature is generated as: s = (int (s1, ..., s t+1 )+r(kα) -1 λ).
[0246] It should be noted that the secret threshold can be different. In other words, when executing the signature generation scheme, a child The thresholds for , k, α, and β themselves do not have to be the same. For example, if there is a group of six people, and three of them need to create signatures and / or private keys, they could technically do the computation with a threshold of 4 for k and a threshold of 3 for the other shared secrets, and they would still have a threshold-optimal solution.
[0247] It should be noted that the present invention can be applied to any threshold signature scheme (whether optimal or non-optimal) and is not limited to the specific scheme described above.
[0248] In general, embodiments of the present disclosure can be used to generate signatures in any message. As a specific exemplary use case, a message can be part or all of a blockchain transaction. In other words, a signature can be used to sign one or more inputs and / or one or more outputs of a blockchain transaction. For example, the generated signature can be used, at least in part, to unlock the output of a blockchain transaction. As a specific example, the output of a previous transaction can be a pay-to-public-key-hash (P2PKH) output that is locked to a public key hash. In order to unlock, the input of a subsequent transaction that references a P2PKH output needs to include an (unhashed) public key and a signature generated based on a private key corresponding to the public key.
[0249] The "locking script" and "unlocking script" represented in the script can take the following forms:
[0250] Locking script=OP_DUP OP_HASH160<Public KeyHash> OP_EQUAL OP_CHECKSIGUnlocking script==<Signature><Public Key>
[0251] With reference to the above embodiments,<Public Key> It can be equivalent to P = a child G, and <signature>It includes a threshold signature s, where the previous transaction is the message to be signed. It should be noted that, as mentioned above, the ECDSA signature takes the form (r, s).
[0252] It should be noted that the signature generation method described is not limited to any particular use case and can generally be used to generate a signature based on any message. Signing all or part of a blockchain transaction is only an illustrative example. For example, the described method can be used to sign and / or authorize legal documents (e.g., wills, deeds, or other contracts), communications between one or more parties, digital certificates (e.g., issued by a certification authority), medical prescriptions, bank transfers or financial instruments, mortgage or loan applications, etc.
[0253] As a specific example, a group of participants (assuming a total of five participants) can form the board of directors of a company. Voting matters for the company may require a majority of the board of directors (i.e., at least three participants) to agree on a specific vote. The board of directors can use the signature generation method described to prove that at least three board members agree to vote in favor of a specific result. In this example, the threshold of the signature generation scheme is 3. In other words, at least three board members must provide corresponding signature shares in order for the coordinator to successfully generate a signature. If the signature is successfully generated, at least the threshold number (i.e., three) of board members agree to vote in favor of the result. Therefore, the successful generation of the signature serves as a voting record and proves that the majority of the board members voted in a specific way.
[0254] Another use case of the present invention relates to the field of digital certificates (e.g., digital certificates issued in accordance with the X.509 standard). A digital certificate contains a signature that signs some data. The data can generally be any data, but one specific example of data contained in a digital certificate is a public key. The public key in a digital certificate is often called a "certification public key." The issuer of the digital certificate (a "certification authority") can perform one or more checks (e.g., know your customer checks) on the owner of the public key, and if the checks are successful, the certification authority issues a digital certificate that includes the certification public key. A user can use the certification public key to prove that they are who they say they are, for example, by signing a message using the private key that corresponds to the certification public key. One particular use of certification authorities is to sign certificates used in HTTPS for secure browsing on the Internet. Another common use is in national government-issued ID cards that are used to electronically sign documents. The certification authority signs the public key (or any other data to be proven) using the private key.
[0255] As described above, embodiments of the present invention may involve encrypting a message with a public key corresponding to a share of a private key, and similarly decrypting a message with a share of the private key. In this case, the first participant 102a may decrypt a message that has been encrypted by a different party. As another option, a message may be encrypted with a public key corresponding to a full private key (e.g., a full subkey). In this case, at least a threshold number of participants may have their respective shares of the subprivate key available in order to decrypt the message. The encrypted message may include part or all of a blockchain transaction, e.g., encrypted data may be included in a transaction to be recorded on a blockchain.
[0256] 3. Conclusion
[0257] Other variations or uses of the disclosed technology may become apparent to those skilled in the art once given the disclosure herein.The scope of the present disclosure is not limited by the described embodiments but only by the appended claims.
[0258] It should be understood that the above embodiments are described by way of example only. More generally, a method, apparatus or program may be provided according to any one or more of the following statements.
[0259] Statement 1. A computer-implemented method for generating a share of a child private key, wherein the method is performed by a first participant in a group and comprises:
[0260] receiving, from a coordinator, a first share of a master private key, wherein the master private key is generated based on a first portion of a hash of a seed value;
[0261] receiving, from a coordinator, a master chain code for the master private key, wherein the master chain code is generated based on a second portion of the hash of the seed value;
[0262] From the coordinator, receiving a master public key corresponding to the master private key;
[0263] Generate one or more first shares of one or more corresponding child private keys, wherein each first share of the corresponding child private key is generated based on the first share of the master private key and a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) a corresponding key index.
[0264] Statement 2. The method of statement 1, comprising:
[0265] For each respective child private key, generating a corresponding respective child public key, wherein each respective child public key is generated based on the master public key and a public key corresponding to a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) the respective key index.
[0266] Statement 3. The method of statement 1 or 2, comprising:
[0267] For each respective child private key, generating a respective chain code, wherein the respective chain code is generated based on the master chain code, the master public key, the respective key index, and a second portion of the hash of the first share of the master private key.
[0268] Statement 4. The method of statement 3, comprising:
[0269] For at least one corresponding child private key, one or more first shares of one or more corresponding grandchild private keys are generated, wherein each first share of the corresponding grandchild private key is generated based on the first share of the at least one corresponding child private key and a first part of a hash of: i) the corresponding chain code for the at least one child private key, ii) the child public key corresponding to the at least one child private key, and iii) a corresponding key index.
[0270] Statement 5. A method according to any of the preceding statements, wherein the hash of the first share of the master private key, the master chain code, the master public key and the corresponding key index is: a hash message authentication code (HMAC) of the first share of the master private key, the master chain code, the master public key and the corresponding key index.
[0271] Statement 6. A method according to any of the preceding statements, the method comprising: executing a signing phase of a threshold signature scheme, the executing comprising:
[0272] Get messages;
[0273] generating a first signature share based on the message and: a) a first child private key share of the first child private key shares, b) a first grandchild private key share of the first grandchild private key shares, or c) a first private key share derived from a) or b); and,
[0274] The first signature share is sent to the coordinator.
[0275] Statement 7. The method of statement 6, wherein the threshold signature scheme is a threshold optimal signature scheme.
[0276] Statement 8. The method of statement 6 or 7, wherein the message comprises at least a portion of a blockchain transaction.
[0277] Statement 9. A computer-implemented method for enabling participants in a group to generate shares of a child private key, wherein the method is performed by a coordinator and comprises:
[0278] Generate a master private key based on the first part of the hash of the seed value;
[0279] generating a master chain code for the master private key, wherein the master chain code is generated based on the second part of the hash of the seed value;
[0280] Generate a master public key corresponding to the master private key;
[0281] Using a secret sharing scheme to provide each respective participant with a respective share of the master private key; and,
[0282] Providing the master chain code to each participant;
[0283] Each participant is configured to generate a respective share of a first child private key based on the respective share of the master private key and a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) a first key index.
[0284] Statement 10. The method of statement 9, wherein the secret sharing scheme is Shamir's secret sharing scheme.
[0285] Statement 11. The method of statement 9 or 10, wherein the hash of the seed value is a hash message authentication code (HMAC) of the seed value.
[0286] Statement 12. The method of any one of statements 9 to 11, comprising: deleting the master private key from a memory.
[0287] Statement 13. A method according to any one of statements 9 to 12, wherein the coordinator is a participant of a plurality of participants.
[0288] Statement 14. A computer device, the computer device comprising:
[0289] a memory, the memory comprising one or more memory cells; and,
[0290] A processing device comprising one or more processing units, wherein the memory stores code configured to be executed on the processing device, the code being configured to execute a method according to any one of statements 1 to 13 when executed on the processing device.
[0291] Statement 15. A computer program embodied on a computer readable memory and configured to, when executed on one or more processors, perform the method of any one of statements 1 to 13.
[0292] According to another aspect disclosed herein, a method may be provided, the method comprising actions of the coordinator and at least one (eg, each) participant.
[0293] According to another aspect disclosed herein, a system may be provided, the system comprising the coordinator and a computer device of at least one (eg, each) participant.< / signature>
Claims
1. A computer-implemented method for generating a share of a child private key, wherein the method is performed by a first participant in a group and include: receiving, from a coordinator, a first share of a master private key, wherein the master private key is generated based on a first portion of a hash of a seed value; receiving, from a coordinator, a master chain code for the master private key, wherein the master chain code is generated based on a second portion of the hash of the seed value; From the coordinator, receiving a master public key corresponding to the master private key; Generate one or more first shares of one or more corresponding child private keys, wherein each first share of the corresponding child private key is generated based on the first share of the master private key and a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) a corresponding key index.
2. The method according to claim 1, wherein include: For each respective child private key, generating a corresponding respective child public key, wherein each respective child public key is generated based on the master public key and a public key corresponding to a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) the respective key index.
3. The method according to claim 1 or 2, wherein include: For each respective child private key, generating a respective chain code, wherein the respective chain code is generated based on the master chain code, the master public key, the respective key index, and a second portion of the hash of the first share of the master private key.
4. The method according to claim 3, wherein include: For at least one corresponding child private key, one or more first shares of one or more corresponding grandchild private keys are generated, wherein each first share of the corresponding grandchild private key is generated based on the first share of the at least one corresponding child private key and a first part of a hash of: i) the corresponding chain code for the at least one child private key, ii) the child public key corresponding to the at least one child private key, and iii) a corresponding key index.
5. A method according to any of the preceding claims, wherein the hash of the first share of the master private key, the master chain code, the master public key and the corresponding key index is: a hash message authentication code (HMAC) of the first share of the master private key, the master chain code, the master public key and the corresponding key index.
6. A method according to any preceding claim, wherein include: Executing the signing phase of the threshold signature scheme, the execution comprising: Page 2 / 3 Get messages; generating a first signature share based on the message and: a) a first child private key share of the first child private key shares, b) a first grandchild private key share of the first grandchild private key shares, or c) a first private key share derived from a) or b); and The first signature share is sent to the coordinator.
7. The method of claim 6, wherein the threshold signature scheme is a threshold optimal signature scheme.
8. The method of claim 6 or 7, wherein the message comprises at least a portion of a blockchain transaction.
9. A computer-implemented method for enabling participants in a group to generate shares of a child private key, wherein the method is performed by a coordinator and include: Generate a master private key based on the first part of the hash of the seed value; generating a master chain code for the master private key, wherein the master chain code is generated based on the second part of the hash of the seed value; Generate a master public key corresponding to the master private key; using a secret sharing scheme to provide each respective participant with a respective share of the master private key; as well as Provide the master chain code to each participant, Each participant is configured to generate a respective share of a first child private key based on the respective share of the master private key and a first portion of a hash of: i) the master chain code, ii) the master public key, and iii) a first key index.
10. The method of claim 9, wherein the secret sharing scheme is Shamir's secret sharing scheme.
11. The method of claim 9 or 10, wherein the hash of the seed value is a Hash Message Authentication Code (HMAC) of the seed value.
12. The method according to any one of claims 9 to 11, wherein the method include: The master private key is deleted from memory.
13. The method according to any one of claims 9 to 12, wherein the coordinator is one participant among a plurality of participants.
14. A computer device, wherein the computer device include: a memory, the memory comprising one or more memory units; as well as A processing device, comprising one or more processing units, wherein the memory stores a code arranged to be executed on the processing device, the code being configured to execute the method according to any one of claims 1 to 13 when executed on the processing device.
15. A computer program embodied on a computer readable memory and configured to, when run on one or more processors, perform the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Generating secret shares
WO2021254702A1
