A method and apparatus for key generation of a blockchain user

By generating and sending private key shards on the blockchain platform by the first node, the resource consumption problem of centralized public key management systems is solved, and decentralized private key generation and security improvement are achieved.

CN112367168BActive Publication Date: 2026-03-20WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-30
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

The centralized public key management system of existing blockchain platforms results in high resource consumption and does not conform to the decentralized concept, thus requiring a decentralized key management method.

Method used

The first node obtains the user's public key from the smart contract and generates a private key fragment using its own stored master key fragment. This fragment is then sent to the user client to prevent master key leakage. The user client generates a private key based on the private key fragment, reducing third-party involvement.

Benefits of technology

It achieves decentralized private key generation, which improves the security of private keys and reduces resource consumption and third-party involvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112367168B_ABST
    Figure CN112367168B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method and device for generating the key of blockchain user, comprising: first node obtains the first transaction initiated by user client from smart contract, wherein the user public key for identifying the identity information of user and the address information for identifying user client are carried in first transaction, then first node generates the private key fragment of user based on smart contract according to the main key fragment stored in itself and user public key, the main key fragment is distributed to first node after the second node shards main key, first node sends the private key fragment of user to user client according to address information, prevent the leakage of main key, user client is used to generate the user private key of user for the private key fragment of user, no longer generate user private key by main key, no longer need the participation of main key and third party, realize the generation of user private key in decentralization.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Fintech, and in particular to a method and device for generating a key of a blockchain user. BACKGROUND

[0002] With the development of computer technology, more and more technologies (for example: blockchain, cloud computing or big data) are applied in the financial field, and the traditional financial industry is gradually changing to Fintech, and big data technology is no exception. However, due to the security and real-time requirements of the financial and payment industries, higher requirements are also put forward for big data technology.

[0003] In the prior art, various blockchain platforms represented by Hyperledger Fabric (a distributed super account book) use an identity management system based on a PKI (Public Key Infrastructure, public key infrastructure) key system. Each transaction sender of a blockchain holds a public key and a certificate issued by a third-party trusted CA (Certification Authority, signing right) authority to the public key to ensure the authenticity of the public key. The public key is a string of meaningless characters, and the transaction verifier needs to use the certificate to derive the real information of the user behind the public key. However, the centralized system does not conform to the decentralized concept of the blockchain system, and the third-party trusted CA needs to manage and maintain a large amount of data, which occupies a large amount of resources.

[0004] Therefore, it is necessary to provide a decentralized key management method that no longer generates a user's private key through a centralized master key and reduces the management and maintenance of public key data to save resources. SUMMARY

[0005] The embodiments of the present application provide a method and device for generating a key of a blockchain user, which are used to realize the decentralized generation of a key of a blockchain user.

[0006] In a first aspect, the embodiments of the present application provide a method for generating a key of a blockchain user, comprising:

[0007] A first node obtains a first transaction initiated by a user client from a smart contract; the first transaction carries a user public key used to identify the identity information of the user and address information used to identify the user client;

[0008] The first node generates a private key shard for the user based on the smart contract and the user public key stored by itself; the master key shard is a master key shard distributed to the first node by a second node after the master key is sharded;

[0009] The first node sends the private key fragment to the user client according to the address information; the private key fragment is used for the user client to generate a user private key of the user.

[0010] In the technical solution, the first node obtains a fragment of the master key, and when obtaining a user private key of the user, the first node generates a private key fragment of the user according to the fragment of the master key and the obtained user public key, and then sends the generated private key fragment of the user to the user client of the user, instead of sending the fragment of the master key to the user client of the user, thereby preventing the leakage of the master key and ensuring that the master key is not disclosed. After receiving the private key fragment sent by the first node, the user client determines the user private key of the user, and no longer generates the user private key of the user by using the master key, that is, the master key and the third party are no longer needed when generating the user private key, thereby increasing the security of the user private key and reducing the participation of the third party, and realizing the generation of the user private key in a decentralized manner.

[0011] Optionally, generating the private key fragment for the user according to the stored fragment of the master key and the user public key comprises:

[0012] The first node determines the private key fragment for the user by using an identity-based encryption algorithm according to the user public key and the fragment of the master key.

[0013] In the technical solution, the first node determines the private key fragment of the user by using an identity-based encryption algorithm according to the user public key of the user and the fragment of the master key of the first node, so as to prevent the leakage of the fragment of the master key.

[0014] Optionally, before the first node obtains the first transaction initiated by the user client from the smart contract, the method further comprises:

[0015] The third node receives the first transaction sent by the user client.

[0016] The third node writes the first transaction into the smart contract after the first transaction meets the verification requirement and the consensus requirement.

[0017] The first node obtains the first transaction initiated by the user client from the smart contract, and the method comprises:

[0018] The first node obtains the first transaction from the smart contract through a registration mechanism.

[0019] Optionally, the method further comprises:

[0020] After the second node distributes the fragmented master key to the first node, the second node deletes the master key.

[0021] Optionally, the master key shards are distributed to the first nodes by the second node after the second node shards the master key, and the method comprises the following steps of:

[0022] The second node obtains the master key by using a random number algorithm.

[0023] The second node determines a master key function according to the master key.

[0024] The second node randomly determines a plurality of coordinate points as a plurality of master key shards from the master key function; the coordinate points correspond to the master key shards one by one.

[0025] The second node randomly sends the plurality of master key shards to the plurality of first nodes; the master key shards correspond to the first nodes one by one.

[0026] In the technical solution, after the second node sends the master key shards to the first nodes, the second node destroys the master key function and the master key, prevents the master key from being leaked, ensures that the master key is not disclosed, and increases the security of the user private key.

[0027] In a second aspect, an embodiment of the present application provides a method for generating a user key of a block chain, and the method comprises the following steps of:

[0028] A user client sends a first transaction initiated by a user and carrying a user public key to a block chain system; the first transaction is used to instruct the block chain system to store the first transaction to a smart contract; and the user public key is used to identify identity information of the user.

[0029] The user client receives a plurality of private key shards of the user sent by a plurality of first nodes; any private key shard is generated by a first node based on the smart contract and a master key shard stored by the first node and the user public key; and each master key shard is distributed to each first node by a second node after the second node shards a master key.

[0030] The user client generates a user private key of the user according to the plurality of private key shards of the user.

[0031] In the technical solution, the user client of the user receives the private key shards of the user sent by the plurality of first nodes, generates the user private key of the user according to the plurality of private key shards, and does not generate the user private key according to the master key shards or the master key, so that the participation of the master key and a third party is no longer needed, the security of the private key is increased, the participation of the third party is reduced, and the generation of the user private key is decentralized.

[0032] Optionally, the generation of the user private key of the user comprises the following steps of:

[0033] The user client generates a user private key of the user after receiving a number of private key shards of the user that is no less than a number threshold, the number threshold being determined according to a number of master key shards.

[0034] In a third aspect, an embodiment of the present application provides a device for key generation of a blockchain user, comprising:

[0035] The acquisition module is configured to acquire, from the smart contract, a first transaction initiated by a user client; the first transaction carrying a user public key used to identify identity information of a user and address information used to identify the user client.

[0036] The processing module is configured to generate, based on the smart contract, a private key shard of the user according to a master key shard stored by itself and the user public key; the master key shard being distributed to the first node by a second node after the master key is fragmented.

[0037] According to the address information, the private key shard is sent to the user client; the private key shard being used by the user client to generate a user private key of the user.

[0038] Optionally, the processing module is specifically configured to:

[0039] The user public key and the master key shard are determined to generate the private key shard of the user by an identity-based encryption algorithm.

[0040] Optionally, the processing module is specifically configured to:

[0041] The first transaction is acquired from the smart contract through a registration mechanism.

[0042] In a fourth aspect, an embodiment of the present application provides a device for key generation of a blockchain user, comprising:

[0043] The sending unit is configured to send, to a blockchain system, a first transaction initiated by a user and carrying a user public key; the first transaction being used to instruct the blockchain system to store the first transaction to a smart contract; the user public key being used to identify identity information of the user.

[0044] The receiving unit is configured to receive private key shards of the user sent by a plurality of first nodes; any private key shard being generated by a first node based on the smart contract and a master key shard stored by itself and the user public key; each master key shard being distributed to each first node by a second node after a master key is fragmented.

[0045] The generating unit is configured to generate a user private key of the user according to a plurality of private key shards of the user.

[0046] Optionally, the generating unit is specifically configured to:

[0047] generate the user private key of the user after receiving that the number of private key shards of the user is not less than a number threshold, wherein the number threshold is determined according to the number of master key shards.

[0048] In a fifth aspect, an embodiment of the present application further provides a computing device, comprising:

[0049] a memory for storing program instructions;

[0050] a processor for invoking the program instructions stored in the memory to execute the method for generating a key of a blockchain user according to the obtained program.

[0051] In a sixth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used for making a computer execute the method for generating a key of a blockchain user. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0053] Figure 1 a system architecture schematic diagram provided by an embodiment of the present application;

[0054] Figure 2 a flowchart of a method for generating a key of a blockchain user provided by an embodiment of the present application;

[0055] Figure 3 a flowchart of a method for generating a key of a blockchain user provided by an embodiment of the present application;

[0056] Figure 4 a flowchart of a method for generating a key of a blockchain user provided by an embodiment of the present application;

[0057] Figure 5 a structure schematic diagram of a device for generating a key of a blockchain user provided by an embodiment of the present application;

[0058] Figure 6 a structure schematic diagram of a device for generating a key of a blockchain user provided by an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the present application in detail with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0060] In the prior art, the identity-based key generation method includes an IBE algorithm (Identity Based Encryption, identity-based encryption algorithm), and the public key of a transaction sender is a meaningful string, such as the email, telephone, etc. of the sender. However, the private key of the user is generated by a trusted third-party generator PKG (Private Key Generator, private key generator center). Although the identity-based encryption system IBE does not need to verify the public key, a trusted third-party generator needs to generate the private key of the user according to the master key and the public key of the user, which is not consistent with the concept of decentralization in the blockchain. Therefore, the present application provides a decentralized key generation method.

[0061] Figure 1 An exemplary system architecture to which the embodiments of the present application are applicable is shown, which includes a user client 110 and a blockchain system 120.

[0062] The blockchain system 120 includes a third node 111, a first node 121 and a smart contract 200. The first node 121 can be multiple, and the specific number is not limited here.

[0063] The user client 110 is configured to initiate a first transaction carrying a user public key, and then the user client 110 verifies (such as transaction amount, transaction address, etc.) and reaches consensus (such as reaching consensus on the first transaction by the Byzantine method) on the first transaction by the third node 111 in the blockchain system 120 and the consensus node in the blockchain system 120. After the first transaction meets the verification requirement and the consensus requirement, the third node 111 writes the first transaction into the smart contract 200 in the blockchain system 120. The first transaction includes address information for identifying the user client, such as the IP address of the user, etc.

[0064] The user client 110 is further configured to generate a user private key of the user according to the user private key fragments when the user private key fragments reach a number threshold, wherein the user private key fragments include those obtained by the first node 121 according to the first transaction and / or those obtained by the third node according to the first transaction.

[0065] The first node 121 executes the smart contract 200 in the blockchain system 120. For example, a user public key of a first transaction is obtained, a user private key shard is generated according to the user public key and a master key shard of the first node 121 itself, and then the user private key shard is sent to the user client 110 according to address information of the user client, without being sent through the blockchain system 120, so as to prevent the user private key shard from being leaked.

[0066] It should be noted that the above Figure 1 The structure shown is only an example, and the embodiments of the present application are not limited thereto.

[0067] Based on the above description, Figure 2 An exemplary flow of a method for generating a private key of a blockchain user is shown, which can be executed by a device for generating a private key of a blockchain user.

[0068] As Figure 2 shown, the flow specifically includes:

[0069] In step 210, the first node obtains a first transaction initiated by a user client from a smart contract.

[0070] In the embodiments of the present application, the first node obtains the first transaction from the smart contract through a registration mechanism, wherein the first transaction carries a user public key used to identify identity information of a user and address information of a user client, for example, the user public key is a phone number of the user, and the address information of the user client is an IP address of the user.

[0071] In step 220, the first node generates a private key shard for the user according to the user public key and a master key shard stored by the first node based on the smart contract.

[0072] In the embodiments of the present application, the master key shard is distributed to the first node after the second node shards the master key, and the second node can be any node in the first node or any node in the blockchain. After the second node shards the master key and distributes it to the first node, the second node deletes the master key. The master key is randomly generated by the second node, and then the second node shards and distributes it according to the randomly generated master key.

[0073] Further, the second node uses a random number algorithm to obtain the master key, then determines a master key function according to the master key, and then randomly determines a plurality of coordinate points as a plurality of master key fragments from the master key function, and then randomly sends the plurality of master key fragments to the plurality of first nodes, wherein the coordinate points correspond one-to-one to the master key fragments, and the master key fragments correspond one-to-one to the first nodes. For example, n coordinate points (n coordinate points are all different) determined from the master key function are randomly selected as n master key fragments, and then the n master key fragments are randomly sent to n first nodes (that is, one master key fragment is sent to each first node), wherein n is a positive integer, and finally the master key function and the master key are destroyed.

[0074] In order to better explain the technical scheme of the master key fragment, the following will be described in specific examples.

[0075] Example 1

[0076] The second node generates a master key S using a random number algorithm, wherein the master key S can be a 256-bit numerical value, and then establishes a master key function, such as the master key function shown in the following formula 1.

[0077] F(x) = S + a1*x 1 +a2*x 2 +…+a t-1 *x t-1 ……………………………………(1)

[0078] Wherein, the master key function F(x) is a polynomial, the master key S is the 0th order constant coefficient of the polynomial F(x), a is a random number, and t is a positive integer value determined according to the quantity threshold.

[0079] Then a curve can be created according to the polynomial F(x), and the y value of the curve is equal to the value of F(x). Randomly select n different x values in the polynomial F(x) to obtain n different y values, and then obtain n coordinate points (x i , y i ), and then randomly send different coordinate points (x i , y i ) to n first nodes as master key fragments, and then destroy the polynomial F(x) and the master key S. In this way, the first node obtains the master key fragment and stores it to the client of the first node, and does not chain the master key fragment to prevent the master key fragment from being leaked. Then the first node generates a user private key of the user according to the user public key and the master key fragment of the client of the first node.

[0080] Specifically, the first node determines the private key fragment for the user by an identity-based encryption algorithm based on the user public key and the master key fragment.

[0081] In this embodiment of the invention, the first node maps its own client's master key fragment and the user's public key to the user's private key fragment using an identity-based encryption algorithm (such as the IBE algorithm). It should be noted that the private key fragment is a data pair, such as (k, z).

[0082] For example, before the first node obtains the first transaction initiated by the user client from the smart contract, the third node receives the first transaction sent by the user client. After the first transaction meets the verification and consensus requirements, the third node writes the first transaction into the smart contract. The verification requirements are used to indicate whether the user's identity information in the first transaction is correct. It should be noted that the third node can be any of the first nodes or any node in the blockchain; that is, the third node can determine its own private key fragment based on its own master key fragment and the user's public key in the first transaction it initiated.

[0083] Step 230: The first node sends the private key fragments to the user client based on the address information.

[0084] In this embodiment of the invention, after the first node generates the user's private key, it sends the user's private key to the user's client according to the user's address information in the first transaction.

[0085] Based on the above technical solutions Figure 3 An exemplary embodiment of the present invention illustrates a method for generating a key for a blockchain user, which can be executed by a device for generating a key for a blockchain user.

[0086] like Figure 3 As shown, the specific process includes:

[0087] Step 310: The user client sends the first transaction initiated by the user, carrying the user's public key, to the blockchain system.

[0088] In this embodiment of the invention, the first transaction is used to instruct the blockchain system to store the first transaction in a smart contract, and the user's public key is used to identify the user's identity information.

[0089] Step 320: The user client receives private key fragments for the user sent by multiple first nodes.

[0090] In this embodiment of the invention, any private key fragment is generated by the first node based on the smart contract using its own stored master key fragments and user public keys, and each master key fragment is distributed to each first node by the second node after the master key is fragmented.

[0091] Step 330: The user client generates the user's private key based on the user's multiple private key fragments.

[0092] In the embodiment of the present application, the user client generates the user private key of the user after receiving the number of private key fragments of the user is not less than the number threshold, wherein the number threshold is determined according to the number of master key fragments.

[0093] Specifically, the user client determines the user private key according to the user private key function and the private key fragments not less than the number threshold. In order to better explain the technical solution of generating the user private key, the following will be described in specific examples.

[0094] Example 2

[0095] The user private key function is shown in the following formula (2).

[0096] F(k) = L + b1*k 1 +b2*k 2 +…+b t-1 *k t-1 ……………………………………(2)

[0097] Wherein, the user private key function F(k) is a polynomial, the user private key L is the 0th order constant coefficient of the polynomial F(k), b is a random number, and t is the number threshold. It should be noted that the private key function F(k) of any user client is the same in the same process of generating the user private key, and the random number is different in each process of generating the user private key. For example, the random number of user C in generating the user private key is different from that of user D in generating the user private key, but the user private key function of each first node is the same in the process of generating the user private key of user C.

[0098] The t in the user private key function F(k) and the master key function F(x) is equal, and then the value of the user private key L can be determined by multiple private key fragments. In order to better explain the technical solution of the above Figure 2 and Figure 3 , the following will be described in specific examples in combination with the above example 1 and example 2.

[0099] Example 3

[0100] Figure 4 An exemplary flowchart of a method for generating a key of a blockchain user is shown, as shown in Figure 4 The second node B divides the master key S into n (n is the total number of master key fragments), wherein n is 4, S = 15, and the number threshold is the difference between n and 1, that is, the number threshold is 3. Then randomly assign the value of x in the master key function, and the obtained four master key fragments are: master key fragment 1 (1, 22), master key fragment 2 (2, 0), master key fragment 3 (3, 18) and master key fragment 4 (4, 7), and each master key fragment is distributed to the first node,Figure 4 As shown, the first node 1 is distributed with the master key shard 1, the first node 2 is distributed with the master key shard 2, the first node 3 is distributed with the master key shard 3, and the third node A (i.e., the third node is the first node) is distributed with the master key shard 4.

[0101] The user client A stores the first transaction to the smart contract through the third node A, wherein the first transaction includes the user public key A of the user.

[0102] After each first node obtains the public key A in the first transaction from the smart contract through the registration mechanism, the first node obtains the private key shard of the user A in combination with the master key shard of the first node and the public key A, for example, the first node 1 generates the private key shard 1 (1, 14) of the user A according to the master key shard 1 and the public key A through the IBE algorithm, and then sends the private key shard of the user A to the user client A through the address information of the user A according to the smart contract, and similarly, the first node 2 generates the private key shard 2 (2, 7) of the user A, the first node 3 generates the private key shard 3 (3, -4) of the user A, and the third node A generates the private key shard 4 (0, 15) of the user A.

[0103] The user client A receives the private key shards of the user A sent by the plurality of first nodes (including the third node A), and if the number of the received private key shards of the user A reaches 3 (a number threshold), the user private key of the user A is obtained according to the user private key function. For example, the user client A receives the private key shard 1 (1, 14), the private key shard 2 (2, 7), and the private key shard 3 (3, -4), and three relational expressions can be obtained according to the above formula (2): 14 = L + b1 + b2, 7 = L + 2b1 + 4b2, and -4 = L + 3b1 + 9b2. Through equation transformation, L = 17 can be obtained, and then the value of the user private key L is obtained. Wherein, 17 is only an example, and in essence, L is a 256-bit number.

[0104] In the embodiment of the application, the first node generates the private key shard of the user according to the user private key obtained by the master key shard of the first node, and then sends the generated private key shard of the user to the user client of the user, instead of sending the master key shard to the user client of the user, so as to prevent the leakage of the master key shard and ensure that the master key is not disclosed. The user client determines the user private key after receiving the private key shard sent by the first node and reaching the number threshold, and no longer generates the master key through the master key or the master key shard, that is, in the generation of the user private key, the master key and the participation of the third party are no longer needed, the security of the private key is increased, the participation of the third party is reduced, and the generation of the user private key is decentralized.

[0105] Based on the same technical concept, Figure 5An exemplary structure of a device for key generation of a blockchain user is shown, which can execute the flow of the method for key generation of a blockchain user.

[0106] As shown in Figure 5 , the device specifically includes:

[0107] The acquisition module 510 is configured to acquire a first transaction initiated by a user client from a smart contract; the first transaction carries a user public key used to identify identity information of a user and address information used to identify the user client;

[0108] The processing module 520 is configured to generate a private key shard for the user according to a master key shard stored by itself and the user public key based on the smart contract; the master key shard is a master key shard distributed to the first node by a second node after the master key is sharded;

[0109] According to the address information, the private key shard is sent to the user client; the private key shard is used by the user client to generate a user private key of the user.

[0110] Optionally, the processing module 520 is specifically configured to:

[0111] The user public key and the master key shard are used to determine the private key shard for the user by an identity-based encryption algorithm.

[0112] Optionally, the processing module 520 is specifically configured to:

[0113] The first transaction is acquired from the smart contract through a registration mechanism.

[0114] Based on the same technical concept, Figure 6 An exemplary structure of a device for key generation of a blockchain user is shown, which can execute the flow of the method for key generation of a blockchain user.

[0115] As shown in Figure 6 , the device specifically includes:

[0116] The sending unit 610 is configured to send a first transaction carrying a user public key initiated by a user to a blockchain system; the first transaction is used to instruct the blockchain system to store the first transaction to a smart contract; the user public key is used to identify identity information of the user;

[0117] The receiving unit 620 is configured to receive a plurality of first nodes sending the private key fragments of the user; any private key fragment is generated by the first node based on the smart contract through the master key fragment stored by the first node and the user public key; each master key fragment is distributed to each first node after the second node shards the master key;

[0118] The generating unit 630 is configured to generate the user private key of the user according to the plurality of private key fragments of the user.

[0119] Optionally, the generating unit is specifically configured to:

[0120] After receiving the number of private key fragments of the user is not less than the number threshold, the user private key of the user is generated; the number threshold is determined according to the number of master key fragments.

[0121] Based on the same technical concept, the embodiment of the present application also provides a computing device, comprising:

[0122] A memory is configured to store program instructions;

[0123] A processor is configured to invoke the program instructions stored in the memory, and execute the method for generating the key of the user of the blockchain according to the obtained program.

[0124] Based on the same technical concept, the embodiment of the present application also provides a computer readable storage medium, the computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make the computer execute the method for generating the key of the user of the blockchain.

[0125] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0126] The present application is described with reference to flowcharts and / or block diagrams according to the method, device (system), and computer program product of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices produce a machine that implements the flowcharts and / or block diagrams. Figure 1apparatus for performing the functions specified in the flow or flows and / or blocks. Figure 1

[0127] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 apparatus for performing the functions specified in the flow or flows and / or blocks. Figure 1

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 apparatus for performing the functions specified in the flow or flows and / or blocks. Figure 1

[0129] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of theapparent, such modifications and variations are to be included within the scope of the application and the equivalent of such.​​

Claims

1. A method for generating keys for blockchain users, characterized in that, include: The first node obtains the first transaction initiated by the user client from the smart contract; the first transaction carries a user public key for identifying the user's identity information and address information for identifying the user client; the first transaction is written into the smart contract after the verification requirements and consensus requirements are met; The first node, based on the smart contract, generates a private key fragment for the user according to its own stored master key fragment and the user's public key; The master key fragment is generated by the second node after fragmenting the master key and distributing it to the first node. The master key is randomly generated by the second node through a master key function, and after distributing the master key fragment, the master key and the master key function are deleted. The second node can be any of the first nodes, or the second node can be any node in the blockchain; the master key shards correspond one-to-one with the first nodes; The first node sends the private key fragments to the user client based on the address information; The private key fragment is used by the user client to generate the user's private key.

2. The method as described in claim 1, characterized in that, Generate a private key fragment for the user based on its own stored master key fragment and the user's public key, including: The first node uses the user's public key and the master key fragment to determine the private key fragment for the user through an identity-based encryption algorithm.

3. The method as described in claim 1, characterized in that, Before the first node obtains the first transaction initiated by the user client from the smart contract, it also includes: The third node receives the first transaction sent by the user client; After the first transaction meets the verification and consensus requirements, the third node writes the first transaction into the smart contract. The first node obtains the first transaction initiated by the user client from the smart contract, including: The first node obtains the first transaction from the smart contract through a registration mechanism.

4. The method according to any one of claims 1 to 3, characterized in that, The master key fragmentation is the process by which the second node fragments the master key and distributes it to the first node, including: The second node uses a random number algorithm to obtain the master key; The second node determines the master key function based on the master key; The second node randomly determines multiple coordinate points from the master key function as multiple master key fragments; each coordinate point corresponds one-to-one with a master key fragment. The second node randomly sends multiple master key fragments to multiple first nodes; each master key fragment corresponds one-to-one with a first node. The second node destroys the master key function and the master key.

5. A method for generating a key for a blockchain user, characterized in that, include: The user client sends the first transaction initiated by the user, carrying the user's public key, to the blockchain system; The first transaction is used to instruct the blockchain system to store the first transaction in a smart contract; the user's public key is used to identify the user's identity information; the first transaction is written into the smart contract after the verification and consensus requirements are met; the user client receives private key fragments for the user sent by multiple first nodes; Any private key shard is generated by the first node based on the smart contract using its own stored master key shard and the user's public key; Each master key shard is distributed to each first node after the second node shards the master key. The master key is randomly generated by the second node using a master key function, and after distributing the master key shards, the master key and the master key function are deleted. The second node can be any of the first nodes, or any node in the blockchain. Each master key shard corresponds one-to-one with a first node. The user client generates the user's private key based on the user's multiple private key shards.

6. The method as described in claim 5, characterized in that, Generating the user's private key includes: After receiving a number of private key fragments for the user that are not less than a certain threshold, the user client generates the user's private key; the threshold is determined based on the number of master key fragments.

7. A device for generating keys for blockchain users, characterized in that, Applied to the first node, including: The acquisition module is used to acquire a first transaction initiated by the user client from the smart contract; the first transaction carries a user public key for identifying the user's identity information and address information for identifying the user client; the first transaction is written into the smart contract after the verification requirements and consensus requirements are met; The processing module is used to generate a private key fragment for the user based on the smart contract, according to its own stored master key fragment and the user's public key; the master key fragment is distributed to the first node after the second node fragments the master key, and the master key is randomly generated by the second node through a master key function. After distributing the master key fragment, the master key and the master key function are deleted; the second node can be any of the first nodes, or any node in the blockchain; the master key fragment corresponds one-to-one with the first node; Based on the address information, the private key fragment is sent to the user client; the private key fragment is used by the user client to generate the user's private key.

8. A device for generating keys for blockchain users, characterized in that, include: The sending unit is used to send the first transaction initiated by the user, carrying the user's public key, to the blockchain system; The first transaction is used to instruct the blockchain system to store the first transaction in a smart contract; the user public key is used to identify the user's identity information; The first transaction is written into the smart contract after the verification and consensus requirements are met; A receiving unit is configured to receive private key fragments for the user sent by multiple first nodes; Any private key shard is generated by the first node based on the smart contract using its own stored master key shard and the user's public key; Each master key fragment is distributed to each first node after the second node fragments the master key. The master key is randomly generated by the second node through a master key function, and the master key and the master key function are deleted after the master key fragments are distributed. The second node can be any of the first nodes, or the second node can be any node in the blockchain; Each master key fragment corresponds one-to-one with the first node; The generation unit is used to generate the user's private key based on the user's multiple private key fragments.

9. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Key generation method and device

    CN111385098A