A method for issuing user private keys based on blockchain

By updating the target key generation value of the central node in the blockchain system and generating the main private key shard in distributed generation, the security and flexibility problems in the generation process of blockchain users' private keys are solved, and the user public key and blockchain address are realized that are easy to remember and identify, improving the security and user-friendliness of the issuance process.

CN117040729BActive Publication Date: 2025-08-19SHANGHAI FANXUN ELECTRONIC TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310922963.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-08-19
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

In the prior art, the process of generating blockchain user private keys is difficult to remember, easy to mix, and poorly useable, and does not support the free entry and exit of nodes, resulting in insufficient security and flexibility of the issuance process.

Method used

The central node of the target key generation in the blockchain system receives the user's private key issuance request, updates the target value, and generates the main private key shard in a distributed manner. The polynomial function and threshold algorithm are used to issue the reserve user private key to avoid centralized KGC saving the main private key.

Benefits of technology

It improves the security and flexibility of the private key issuance process of blockchain users, supports the free entry and exit of nodes, provides user public keys and blockchain addresses that are easy to remember and identify, and enhances user friendliness and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117040729B_ABST
    Figure CN117040729B_ABST
Patent Text Reader

Abstract

This application discloses a blockchain-based method for issuing user private keys. The method includes receiving a user private key issuance request from a resource sending client via a target key generation center node in the blockchain system, the user private key issuance request providing a user identifier; updating the target value of the target key generation center node when the blockchain system is updated; randomly selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of participating nodes; generating a master private key shard based on the updated target value via the target participating nodes; determining a preliminary user private key based on the master private key shard and the user identifier via the target participating nodes, receiving the preliminary user private key via the resource sending client, and issuing the target user private key. This method can improve the security and flexibility of the distributed user private key issuance process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of identification cryptographic algorithm technology, and more specifically, to a method for issuing user private keys based on blockchain. Background Art

[0002] With the development of blockchain technology, users' blockchain addresses and public keys in blockchain transactions are often represented by irregular hexadecimal encodings. Blockchain addresses are typically 160-bit strings, and public keys are typically 512-bit strings. This definition of user addresses and public keys is difficult to remember, easily confused, and lacks usability. This makes them highly susceptible to forgery and confusion by attackers, and also increases user experience. Confirming important transactions often requires multiple, digit-by-digit verifications.

[0003] To reduce the complexity of key management and use in public key systems, Shamir proposed Identity-Based Cryptography (IBC) in 1984. This allows a user-defined identity to be used as the public key. In simple terms, IBC involves the user first creating a custom identity (such as a name, email address, or domain name) as the public key. A centralized Key Generation Center (KGC) then generates the private key and sends it to the user.

[0004] SM9 is an IBC (International Business Code) cryptographic algorithm independently designed in my country and incorporated into ISO / IEC international standards, effectively meeting the common security requirements of information systems. However, the traditional SM9 signature standard generates user private keys through a centralized KGC. This is inconsistent with the decentralized node structure of blockchains and, in addition, the KGC holds all user private keys, a fact that could present a potential vulnerability in security attacks.

[0005] Furthermore, due to the uncertainty and openness of blockchain nodes, some nodes may go offline during the issuance of user private keys, or new nodes may join while old ones exit. However, the traditional SM9 signature standard method for generating user private keys does not support the free entry and exit of nodes, resulting in the inability to update information on individual nodes, reducing the security and flexibility of the user private key issuance process. Summary of the Invention

[0006] In response to at least one defect or improvement need in the prior art, the present invention provides a blockchain-based method for issuing user private keys, which supports updating node information of each node, thereby improving the security of the distributed user private key issuance process.

[0007] To achieve the above objectives, the present invention provides a method for issuing a user private key based on blockchain, the method comprising:

[0008] The target key generation center node in the blockchain system receives the user private key issuance request sent by the resource sending client, and the user private key issuance request provides the user identification;

[0009] When the blockchain system is updated, the target value of the target key generation center node is updated; updates to the blockchain system include at least one of regular updates, at least one key generation center node exiting the blockchain system, at least one new key generation center node joining the blockchain system, and at least one key generation center node applying for data recovery;

[0010] Select a preset number of online key generation center nodes from the blockchain system to obtain a preset number of participating nodes;

[0011] Generate master private key shards based on the updated target value through the target participating nodes;

[0012] The target participating node determines the preliminary user private key according to the master private key shard and the user identifier, so that the preliminary user private key is received by the resource sending client and the target user private key is issued.

[0013] Furthermore, in the case where the blockchain system is updated regularly, the target value of the target key generation center node is updated, including: generating a first polynomial function through the target key generation center node, where the constant term of the first polynomial function is zero; calculating a target number of first function values based on a target number of independent variable values and the first polynomial function through the target key generation center node, where the target number of first function values include a first self-function value and a first associated function value; broadcasting the first associated function value to the remaining key generation center nodes through the target key generation center node; obtaining an updated target value through the target key generation center node based on the first self-function value, the first associated function values of the remaining key generation center nodes, and the target value.

[0014] Furthermore, when the blockchain system is updated and at least one key generation center node exits the blockchain system, the target value of the target key generation center node is updated, including: generating a second polynomial function through the assigned node, the constant term of the second polynomial function is zero, and the assigned node is any online key generation center node in the blockchain system; calculating the remaining number of second function values through the assigned node according to the remaining independent variable values and the second polynomial function, the remaining number of second function values including the second self-function value and the second associated function value; broadcasting the second associated function value to each key generation center node other than the assigned node through the assigned node; obtaining an updated target value through the assigned node according to the second self-function value and the target value; obtaining the updated target value through each key generation center node other than the assigned node according to the second associated function value and the target value of the assigned node.

[0015] Furthermore, when the blockchain system is updated and at least one new key generation center node is added to the blockchain system, the target value of the target key generation center node is updated, including: generating a new independent variable value through the new key generation center node, and broadcasting the new independent variable value to each key generation center node in the blockchain system; randomly selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of assisting nodes; generating a third polynomial function through the target assisting node, the constant term of the third polynomial function being calculated by a third random positive integer and the new independent variable value; and performing a calculation based on the preset number of independent variables through the target assisting node. The method comprises the following steps: measuring a value and a third polynomial function, calculating a preset number of third function values, wherein the preset number of third function values include a third self-function value and a third associated function value; broadcasting the third associated function value to the remaining assisting nodes through the target assisting node; obtaining a pseudo target value through the target assisting node according to the third self-function value, the third associated function values of the remaining assisting nodes, and the target value, and sending the pseudo target value to a new key generation center node; determining a target value of the new key generation center node through the new key generation center node according to the preset number of pseudo target values, a preset number of independent variable values, the new independent variable value, and the sum of the first random positive integer.

[0016] Furthermore, the blockchain-based user private key issuance method also includes: generating a preset number of first random positive integers through a new key generation center node, and broadcasting the preset number of first random positive integers to corresponding assisting nodes; calculating the sum of the preset number of first random positive integers through the new key generation center node; decomposing the corresponding first random positive integer through a target assisting node to generate a preset number of second random positive integers, the preset number of second random positive integers including its own random value and an associated random value; broadcasting the associated random value to the remaining assisting nodes respectively through the target assisting node; obtaining a third random positive integer through the target assisting node based on its own random value and the associated random values of the remaining assisting nodes.

[0017] Furthermore, when the blockchain system is updated and at least one key generation center node applies for data recovery, updating the target value of the target key generation center node includes: broadcasting the value of the independent variable of the key generation center node where data loss occurs to each key generation center node in the blockchain system; randomly selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of assisting nodes; generating a third polynomial function through the target assisting node, wherein the constant term of the third polynomial function is calculated by a third random positive integer and the independent variable value of the key generation center node where data loss occurs; and performing a calculation based on the preset number of independent variable values and the third polynomial function through the target assisting node. A preset number of third function values are calculated, and the preset number of third function values include a third self-function value and a third associated function value; the third associated function value is broadcast to the remaining assisting nodes respectively through the target assisting node; a pseudo target value is obtained through the target assisting node according to the third self-function value, the third associated function values of the remaining assisting nodes, and the target value, and the pseudo target value is sent to the key generation center node where data loss occurs; the target value of the key generation center node where data loss occurs is determined according to the preset number of pseudo target values, the preset number of independent variable values, the independent variable value of the key generation center node where data loss occurs, and the sum of the first random positive integer.

[0018] Furthermore, the constant term of the third polynomial function is calculated by taking the third random positive integer and the new independent variable value, including: calculating the constant term of the third polynomial function according to the following formula:

[0019]

[0020] Where a0 is the constant term of the third polynomial function, a v is the non-constant coefficient of the third polynomial function, r′ m is the third random positive integer, X w is the new value of the independent variable, and t is the preset number.

[0021] Further, determining the target value of the new key generation central node by the new key generation central node according to the sum of a preset number of pseudo target values, a preset number of independent variable values, the new independent variable value, and the first random positive integer includes: calculating the target value of the new key generation central node according to the following formula:

[0022]

[0023] Where, L w The target value of the central node for generating new keys, F i is the pseudo target value, r is the sum of the first random positive integers, X w is the new value of the independent variable, and t is the preset number.

[0024] Furthermore, a master private key shard is generated through the target participating node according to the updated target value, including: a master private key shard is generated through the target participating node according to the updated target value of the target participating node and a preset number of independent variable values, and the sum of the master private key shards of the preset number of participating nodes is the master private key of the blockchain system.

[0025] Furthermore, the user public key is the user ID of the user to whom the resource sending client belongs, and the user private key issuance request also provides a user random number. The target participating node determines the preliminary user private key according to the master private key shard and the user ID, so that the resource sending client receives the preliminary user private key and issues the target user private key, including: generating a second shard and a user private key shard according to the master private key shard and the user public key through the target participating node, and broadcasting the second shard and the user private key shard to the remaining participating nodes in the blockchain system; confirming the second shard, the user private key shard, and the second shard and the user private key shard received from the remaining participating nodes through the target participating node. Prepare a user private key; send blockchain resources to the resource receiving client through the resource sending client to generate blockchain resource transfer information, where the blockchain address of the resource receiving client is the user ID of the user to which the resource receiving client belongs, and the blockchain address of the resource sending client is the user public key; sign the blockchain resource transfer information through the resource sending client according to the prepared user private key and the user random number to obtain encrypted resource transfer information, and send the encrypted resource transfer information to the target participating node; verify the encrypted resource transfer information through the target participating node according to the user public key, and record the blockchain resource transfer information that has passed the verification.

[0026] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0027] (1) The present invention provides a blockchain-based user private key issuance method. Taking into account the uncertainty and openness of the key generation center node in the blockchain system, the target key generation center node updates the target value of the target key generation center node after receiving the user private key issuance request sent by the resource sending client, and when the blockchain system is updated, and issues the target user private key according to the updated target value, thereby achieving the purpose of improving the security and flexibility of the distributed user private key issuance process.

[0028] (2) Provide blockchain users with friendly blockchain addresses and user public keys. The user public key and blockchain address are unified and can be used as a public key to verify digital signatures and as a blockchain address to send and receive blockchain resources. In addition, the user identifier that is easy to remember and identify is used as the user public key and blockchain address, which can provide personalized user public key and blockchain address services for individuals and enterprises. For example, the name, email address, domain name, etc. of an individual or enterprise can be used as the user public key and blockchain address. Therefore, the purpose of improving the user friendliness of the user public key and blockchain address is achieved.

[0029] (3) The target key generation center node only issues the preparatory user private key. After the blockchain user receives the preparatory user private key, it generates the official target user private key based on the preparatory user private key and the user random number. This can effectively solve the problem of the issuing node or the transmission channel being attacked and cracked, thereby achieving the purpose of ensuring the security of the user private key issuance process.

[0030] (4) The distributed issuance of preliminary user private keys eliminates the need for a centralized KGC to store the master private key. Instead, it is stored in multiple key generation center nodes in the form of master private key shards. During the distributed issuance of preliminary user private keys, each node cannot obtain the master private key, thus achieving higher security and improving the security of the user private key issuance process.

[0031] (5) A threshold scheme is used to ensure that the user private key can still be issued when some key generation center nodes are offline. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0033] Figure 1 A flowchart of a blockchain-based method for issuing user private keys provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0035] The terms "first," "second," "third," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0036] like Figure 1 As shown, the present application provides a blockchain-based user private key issuance method, which is jointly executed by a target key generation center node and a resource sending client in a blockchain system. The blockchain system includes multiple blockchain nodes, which are used to record resource transfer information. The resource transfer information includes the receipt and transmission information of blockchain resources (for example, transaction information generated by blockchain transactions), and the multiple blockchain nodes include at least two key generation center nodes (abbreviated as KGC nodes). The key generation center nodes are used to record resource transfer information and issue user private keys. The target key generation center node is any key generation center node in the blockchain system. The target key generation center node can be deployed on a computer device or a server. The resource sending client is a terminal used by a user who acts as the initiator of a blockchain service. The resource sending client is connected to the computer device or server network where the target key generation center node is deployed. The blockchain service can be at least one of the reception or transmission of blockchain resources, which is not limited in the embodiments of the present application.

[0037] A method for issuing a user private key based on blockchain, comprising the following steps:

[0038] Step 101: A target key generation center node in the blockchain system receives a user private key issuance request sent by a resource sending client, and the user private key issuance request provides a user identifier.

[0039] The user private key issuance request provides the user ID of the user to whom the resource sending client belongs. The user ID can be a name, domain name, or email address. The user private key issuance request also provides a user nonce, a random integer generated by the resource sending client that corresponds to the user ID. The user nonce is kept secret by the resource sending client and is not available to any KGC node in the blockchain system.

[0040] Exemplarily, after the user of the resource sending client selects a user identifier as the user public key (ID), the resource sending client generates a user random number, and calculates a first user value from the user random number according to the following formula (1); the first user value and the user public key are combined to obtain a user private key issuance request, and the user private key issuance request is sent to the blockchain system.

[0041] R ID =r·Q1 Formula (1)

[0042] In the above formula (1), R ID is the first user value, r is the user random number, Q1 is the generator of the q-order additive cyclic group G1, and Q1 is (x Q1 ,y Q1 ) represents the coordinates.

[0043] It should be noted that due to the characteristics of the additive cyclic group, although the user random number r satisfies R ID = r·Q1, but any KGC node obtains R ID In the case of Q1, r cannot be deduced. Therefore, the user random number r corresponding to each user private key issuance request is secretly stored by the resource sending client and is not disclosed to any KGC node in the blockchain system, which can improve the security of the user private key issuance process. The user private key issuance request can be (ID, R ID ), which is converted into the corresponding bit string during calculation.

[0044] The blockchain system receives the user's private key issuance request (ID, R ID ), check its legitimacy, and if the user private key issuance request is a legal request, the user private key issuance request (ID, R ID ) is broadcast to every KGC node in the blockchain system.

[0045] Step 102: When the blockchain system is updated, the target value of the target key generation center node is updated.

[0046] Among them, the target value of the target key generation center node is a value used to calculate its master private key shard.

[0047] There are four types of updates to the blockchain system: (1) regular updates, that is, the target value of each key generation center node in the blockchain system is updated regularly. The update cycle is set in advance by the blockchain based on actual needs, for example, it can be one hour, one day, or a longer period of time; (2) at least one key generation center node exits the blockchain system; (3) at least one new key generation center node joins the blockchain system; (4) at least one key generation center node applies for data recovery, that is, when data is lost at a key generation center node, the key generation center node needs to submit a data recovery application to the blockchain system.

[0048] After the target key generation center node receives the user's private key issuance request, it determines whether the blockchain system has been updated. If not, the original target key generation center node is still used; if there is an update, the target value of each key generation center node in the blockchain system needs to be updated so that the correct master private key can still be calculated based on the updated target values of all key generation center nodes, thereby ensuring the security of the blockchain system.

[0049] Step 103: Select a preset number of online key generation center nodes from the blockchain system to obtain a preset number of participating nodes.

[0050] Among them, the participating node is an online key generation center node used to determine the master private key of the blockchain system.

[0051] Using the (t,n) threshold algorithm, when there are a preset number of KGC nodes online (t is an integer less than n, and n is an integer greater than 1) or more, the blockchain system randomly selects t of them to issue distributed user private keys. Using a threshold scheme not only conserves computing resources but also ensures that user private keys can be issued even when some key generation center nodes are offline.

[0052] In step 104, the target participating node generates a master private key shard based on the updated target value. In step 105, the target participating node determines the preliminary user private key based on the master private key shard and the user identifier, receives the preliminary user private key through the resource sending client, and issues the target user private key.

[0053] The target participating node is any one of a preset number of participating nodes.

[0054] To issue user private keys, the blockchain system must first generate a master private key and a matching master public key in a distributed manner. The master private key shards are generated by the target participating nodes, and the master private key shards of all target participating nodes in the blockchain system jointly determine the blockchain system's master private key. The blockchain system's master private key and master public key together form the blockchain system's master key, which is used to issue user private keys.

[0055] The remaining key generation center nodes are all KGC nodes in the blockchain system, excluding the target key generation center node. The remaining participating nodes are a preset number of participating nodes, excluding the target participating node. The master public key shard is publicly available to the remaining participating nodes in the blockchain system, while the master private key shard is kept secret by the target participating node and is not publicly available to the remaining participating nodes in the blockchain system.

[0056] The preliminary user private key is generated by the target participating node and made public to the other participating nodes in the blockchain system to determine the target user private key. The target user private key is the official user private key used to sign blockchain resource transfer information.

[0057] In this embodiment, taking into account the uncertainty and openness of the key generation center node in the blockchain system, after receiving the user private key issuance request sent by the resource sending client, and when the blockchain system is updated, the target key generation center node updates the target value of the target key generation center node and issues the target user private key according to the updated target value, thereby achieving the purpose of improving the security of the distributed user private key issuance process.

[0058] The following describes the distributed generation of a master private key and a master public key that matches the master private key.

[0059] (1) Distributed generation of master private keys

[0060] The target key generation center node generates a random positive integer using a random number generator and uses this random positive integer as the master private key shard. If all key generation center nodes in the blockchain system are online, the sum of the master private key shards of all key generation center nodes in the blockchain system is the master private key of the blockchain system, and the sum of the master public key shards of all key generation center nodes is the master public key of the blockchain system.

[0061] Let the target key generation center node be KGC j Node (j∈[1,n]), n is the number of all key generation center nodes in the blockchain system (n is an integer greater than 1). KGC j The random positive integer generated by the node is u j , will u j As the master private key shard, the master public key shard is The master private key of the blockchain system is s, The system parameter of the blockchain system is Q2, which is the q-order (q is a random prime number, usually greater than 2 191 ) is the generator of the additive cyclic group G2, Q2 is (x Q2 ,y Q2 ) represents the coordinates, the master public key of the blockchain system is P pub ,but

[0062]

[0063] (2) Generate a master public key

[0064] KGC j Node Computing And shard the obtained master public key Broadcast to the entire blockchain system so that each KGC node in the blockchain system can obtain the master public key fragments of other KGC nodes. Then, each KGC node calculates

[0065]

[0066] Get the master public key P of the blockchain system ub , and broadcast to the entire blockchain system. Since Q2 is (x Q2 ,y Q2 ) represents the coordinates of the master public key shard and the master public key P pub are two-dimensional coordinates.

[0067] It should be noted that due to the characteristics of the additive cyclic group, although the master private key s satisfies P pub =s·Q2, but KGC j The node obtains P pub In the case of Q2, s cannot be deduced. Therefore, the master private key s is kept secret from all KGC nodes, thereby improving the security of the user private key issuance process.

[0068] (3) Distributed generation of master private key shards

[0069] The blockchain system uses the (t,n) threshold algorithm to achieve that when there are more than or equal to t (t is less than n) KGC nodes online (in actual applications, if there are more than t KGC nodes online, the blockchain system will randomly select t of them to save computing resources. Therefore, the following is based on t KGC i Each KGC node generates a master private key shard s. i (i∈[1, t]), and satisfy these t master private key shards s i The sum of the addition is the primary private key s, that is,

[0070]

[0071] This achieves the goal of ensuring that the sum of the master private key shards of some key generation center nodes remains the master private key s when some key generation center nodes are online in the blockchain system.

[0072] In order to implement the (t,n) threshold algorithm, n KGC nodes are first required to randomly generate their own t-1 degree polynomials.

[0073] The number of values of the independent variable of the random polynomial is the target number, and the target number is the number of all KGC nodes in the blockchain system.

[0074] When some key generation center nodes in a blockchain system are online, and the number of online key generation center nodes is greater than or equal to a preset number, the master private key shards of any preset number of key generation center nodes in the blockchain system are used together to determine the master private key of the blockchain system. For example, if the target number is 8 and the preset number is 5, and the number of online KGC nodes in the blockchain system is 6, the sum of the master private key shards of any 5 of these 6 KGC nodes can be used as the master private key of the blockchain system. This allows the master private key of the blockchain system to be determined even when some KGC nodes are online, while also conserving computing resources in the blockchain system.

[0075] Assume that the number of all KGC nodes in the blockchain system (target number) is n, the preset number is t, and KGC j The random polynomial generated by node (j∈[1,n]) is:

[0076] f j (x) = a t-1 x t-1 +a t-2 x t-2 +…+a2x 2 +a1x+a0 formula (2)

[0077] In the above formula (2), the constant term a 0= u j , a t-1 、a t-2 , ..., a2, a1 are all constants and can be generated by a random number generator, and each KGC j Node a t-1 、a t-2 , ..., a1, a0 can be the same or different. The number of values of the random polynomial independent variable x is n, which are X1, X2, ..., X n-1 、X n .

[0078] In one embodiment, let n=5, t=3, and for the KGC1 node, let f1(x)=x 2 +2x+6; for KGC2 node, let f2(x)=x 2 +x+7; for KGC3 node, let f3(x)=2x 2 -x+5; for KGC4 node, let f4(x)=x 2 -2x+4; for KGC5 node, set f5(x)=2x 2 +x+8.

[0079] It can be seen that the constant terms of f1(x) to f5(x) are 6, 7, 5, 4, and 8 respectively. Therefore, the master private key of the blockchain system is the sum of the constant terms of the five polynomials f1(x) to f5(x), which is 30.

[0080] The blockchain system randomly generates a target number of independent variable values, and each KGC node substitutes these target number of independent variable values into its random polynomial to calculate the function value, including the associated function value and the own function value. Among them, the own function value is the function value corresponding to the target setting value of the independent variable of the random polynomial. The target setting value is a positive integer corresponding to the target KGC node. It can be randomly generated by the blockchain system and assigned to each KGC node, or each KGC node can generate a random positive integer by itself and use the positive integer as its own target setting value. In addition, each KGC node will broadcast its own target setting value to other KGC nodes, so that each KGC node uses its own target setting value and the target setting values of other KGC nodes as the independent variable values of its random polynomial; the associated function value is the function value corresponding to the value of the independent variable of the random polynomial other than the target setting value.

[0081] The blockchain system randomly generates five independent variables: X1=1, X2=2, X3=3, X4=4, X5=5, then:

[0082] The KGC1 node substitutes x=1, 2, 3, 4, and 5 into the above f1(x) respectively, and calculates the five objective function values of the KGC1 node: f1(1)=9, f1(2)=14, f1(3)=21, f1(4)=30, and f1(5)=41; among them, f1(1)=9 is the function value of the KGC1 node itself, and f1(2)=14, f1(3)=21, f1(4)=30, and f1(5)=41 are all associated function values of the KGC1 node; and f1(2)=14, f1(3)=21, f1(4)=30, and f1(5)=41 are broadcast to the KGC2 node to the KGC5 node respectively.

[0083] The KGC2 node substitutes x=1, 2, 3, 4, and 5 into the above f2(x) respectively, and calculates the five objective function values of the KGC2 node: f2(1)=9, f2(2)=13, f2(3)=19, f2(4)=27, and f2(5)=37; among them, f2(2)=13 is the function value of the KGC2 node itself, and f2(1)=9, f2(3)=19, f2(4)=27, and f2(5)=37 are all associated function values of the KGC2 node; and f2(1)=9, f2(3)=19, f2(4)=27, and f2(5)=37 are broadcast to the KGC1 node, the KGC3 node, and the KGC5 node respectively.

[0084] The KGC3 node substitutes x=1, 2, 3, 4, and 5 into the above f3(x) respectively, and calculates the five objective function values of the KGC3 node: f3(1)=6, f3(2)=11, f3(3)=20, f3(4)=33, and f3(5)=50; among them, f3(3)=20 is the function value of the KGC3 node itself, and f3(1)=6, f3(2)=11, f3(4)=33, and f3(5)=50 are all associated function values of the KGC3 node; and f3(1)=6, f3(2)=11, f3(4)=33, and f3(5)=50 are broadcast to the KGC1 node, KGC2 node, KGC4 node, and KGC5 node respectively.

[0085] The KGC4 node substitutes x=1, 2, 3, 4, and 5 into the above f4(x) respectively, and calculates the five objective function values of the KGC4 node: f4(1)=3, f4(2)=4, f4(3)=7, f4(4)=12, and f4(5)=19; among them, f4(4)=12 is the function value of the KGC4 node itself, and f4(1)=3, f4(2)=4, f4(3)=7, and f4(5)=19 are all associated function values of the KGC4 node; and f4(1)=3, f4(2)=4, f4(3)=7, and f4(5)=19 are broadcast to the KGC1 node, KGC2 node, KGC3 node, and KGC5 node respectively.

[0086] The KGC5 node substitutes x=1, 2, 3, 4, 5 into the above f5(x) respectively, and calculates the five objective function values of the KGC5 node: f5(1)=11, f5(2)=18, f5(3)=29, f5(4)=44, f5(5)=63; among which, f5(5)=63 is the function value of the KGC5 node itself, and f5(1)=11, f5(2)=18, f5(3)=29, f5(4)=44 are all the associated function values of the KGC5 node; and f5(1)=11, f5(2)=18, f5(3)=29, f5(4)=44 are broadcasted to the KGC1 node to the KGC4 node respectively.

[0087] Thus, each KGC j Each node will obtain n objective function values corresponding to its X value, among which one objective function value (i.e., its own function value) is determined by the current KGC. j Node generation, the remaining n-1 objective function values (i.e., associated function values) are generated by the remaining KGC j For example, the KGC1 node will obtain f1(1)=9, f2(1)=9, f3(1)=6, f4(1)=3, and f5(1)=11, where f1(1)=9 is generated by the KGC1 node, and f2(1)=9, f3(1)=6, f4(1)=3, and f5(1)=11 are sent by the other four KGC nodes.

[0088] The target key generation center node sums its own function value and the associated function values of other key generation center nodes to determine the target value.

[0089] In one embodiment, any KGC j Node (j∈[1,n]) calculates the target value according to the following formula (3):

[0090]

[0091] In the above formula (3), L is the target value, and f(X) is a random polynomial with X as the independent variable.

[0092] For nodes KGC1 to KGC5, each node is calculated according to the above formula (3), and the corresponding target values are:

[0093]

[0094] The target participating node multiplies the ratio corresponding to the value of the independent variable of the random polynomial by the target value to obtain the master private key shard.

[0095] In one embodiment, when the number of online KGC nodes in the blockchain is greater than or equal to a preset number, the online KGC nodes in the blockchain i Node (i∈[1, t]) (target participating node) calculates the master private key shard according to the following formula (4):

[0096]

[0097] In the above formula (4), s i is the master private key shard, X is the independent variable of the random polynomial, is the ratio of the values of the independent variables of the random polynomial, L i is the target value, and t is the preset quantity.

[0098] For a certain moment KGC i Node's master private key shards i , where L i The value of is fixed, and The value of will change with the change of the value of the independent variable of the random polynomial of the other online KGC nodes (the value of X). The number of online KGC nodes at different times may be different, but as long as the number of online KGC nodes is greater than or equal to t, each KGC node in any t KGC nodes in the online KGC nodes can generate the corresponding master private key shard s according to the above formula (4). i .

[0099] Assume that the preset number t is 3, that is, any three online KGC nodes in the blockchain system can determine the master private key. For example, when a user makes a request to issue a user private key, the only online KGC nodes in the blockchain system are KGC1, KGC2, and KGC3. Based on the calculated target values of KGC1, KGC2, and KGC3, respectively: L1 = 38, L2 = 60, L3 = 96, for KGC1, KGC2, and KGC3, each node is calculated according to the above formula (4), and the corresponding master private key shards are:

[0100]

[0101] For another example, when a user makes a request to issue a user private key, the only online KGC nodes in the blockchain system are KGC2, KGC3, and KGC4. Based on the calculated target values of KGC2, KGC3, and KGC4, respectively: L2 = 60, L3 = 96, L4 = 146, for each KGC2, KGC3, and KGC4 node, the corresponding master private key shards are calculated according to the above formula (4):

[0102]

[0103] Since s1+s2+s3=30, s2+s3+s4=30, that is, the master private key 30 of the blockchain key system, is the same as the master private key of the blockchain key system obtained by summing the constant terms of the random polynomials corresponding to all KGC nodes in the blockchain. Therefore, at this time, these t KGC i Node's master private key shards i The sum of the two gets the master private key s. Moreover, these three KGC nodes also only know their own master private key shard i , the master private key s cannot be known.

[0104] The following describes how to update the KGC node.

[0105] L of each KGC node j The value is the key to find the master private key s. In order to ensure the security and openness of the blockchain system, it is necessary to implement the KGC node L j The updated value of L j The value can still correctly calculate the master private key s. When each KGC node in the blockchain system regularly updates L j When the value is set, it is called a regular update; when a KGC node exits, L is also required. j Value update; when a KGC node joins or data is lost, you need to obtain the corresponding L j value.

[0106] In one embodiment, step 102, when the blockchain system is updated regularly, updating the target value of the target key generation center node includes the following steps:

[0107] Step 201: The target key generation center node generates a first polynomial function, where the constant term of the first polynomial function is zero.

[0108] Step 202: The target key generation center node takes values of the target number of independent variables (i.e., the values of the independent variables x of the n random polynomials in the above formula (2): X1, X2, ..., X n-1 、X n ) and a first polynomial function, calculating a target number of first function values, the target number of first function values including a first self function value and a first plurality (i.e., n-1) of first associated function values;

[0109] Step 203: The target key generation central node broadcasts the first plurality of first correlation function values to the remaining key generation central nodes respectively;

[0110] In step 204, the target key generation center node obtains an updated target value according to its first self function value, the first associated function values of the other key generation center nodes, and the target value.

[0111] L of all KGC nodes j The value (i.e. target value) needs to be updated regularly (the period of regular updates can be set by the blockchain system). If an attacker obtains the L of some KGC nodes in the previous period, j value, then in this cycle these L j Unless the attacker can obtain the target value of more than or equal to t KGC nodes within one cycle, the master private key s cannot be obtained.

[0112] Exemplarily, upon receiving a new user private key issuance request, starting to execute a new cycle of user private key issuance includes the following steps:

[0113] 1) KGC j A node (j∈[1,n]) generates its own t-1 degree first polynomial function:

[0114] g j (x) = a t-1 x t-1 +a t-2 x t-2 +…+a2x 2 +a1x formula (5)

[0115] In the above formula (5), the constant term is 0, a t-1 、a t-2 , ..., a2, and a1 are all constants and can be generated by a random number generator.

[0116] 2) Then KGC j Node calculation g j (X1),g j (X2),g j (X3),…g j (X n ) A total of n first function values are distributed to the KGC node corresponding to this X value, such as KGC j Node g j (X1) (i.e. the first correlation function value) is sent to KGC1, and g j (X j ) (that is, the first self-function value) is retained by itself.

[0117] 3) In this way, KGC j The node obtains n first function values corresponding to its X value, one of which is obtained by itself and the other n-1 are sent by other KGC nodes. j Add the obtained n first function values and then add them to the L of the previous cycle j Add the values together to get the L of the new cycle j Value (i.e. updated target value):

[0118]

[0119] In the above formula (6), L j is the target value of the new cycle, L′ j is the target value of the previous period.

[0120] To make it easier to understand, here are some examples:

[0121] Assume n=5, t=3, X1=1, X2=2, X3=3, X4=4, X5=5.

[0122] Furthermore, it is known that s=30, L1=38, L2=60, L3=96, L4=146, and L5=210.

[0123] For KGC1 node, let g1(x)=x 2 +2x;

[0124] The first function value is calculated as follows: g1(1)=3, g1(2)=8, g1(3)=15, g1(4)=24, g1(5)=35.

[0125] For KGC2 nodes, let g2(x)=2x 2 +3x;

[0126] The first function value is calculated as follows: g2(1)=5, g2(2)=14, g2(3)=27, g2(4)=44, g2(5)=65.

[0127] For KGC3 node, let g3(x)=2x 2 -x;

[0128] The first function value is calculated as follows: g3(1)=1, g3(2)=6, g3(3)=15, g3(4)=28, g3(5)=45.

[0129] For KGC4 nodes, let g4(x)=3x 2 +x;

[0130] The first function values are calculated as follows: g4(1)=4, g4(2)=14, g4(3)=30, g4(4)=52, g4(5)=80.

[0131] For KGC5 node, let g5(x)=x 2 -x;

[0132] The first function value is calculated as follows: g5(1)=0, g5(2)=2, g5(3)=6, g5(4)=12, g5(5)=20.

[0133] Then, the KGC1 node to the KGC5 node sends the calculated first function value to the KGC node corresponding to the X value. For example, the KGC1 node will obtain g1(1), g2(1), g3(1), g4(1), and g5(1).

[0134] Finally, each node from KGC1 to KGC5 is calculated according to the above formula (6) to complete the target value update. The updated target values are: L1 = 51, L2 = 104, L3 = 189, L4 = 306, L5 = 455.

[0135] Assume that when a user submits a new private key issuance request, the only online KGC nodes in the blockchain system are KGC1, KGC2, and KGC3. Based on the calculated updated target values of L1 = 51, L2 = 104, and L3 = 189 for these three KGC nodes, the new master private key shard can be calculated:

[0136]

[0137]

[0138] The sum of the master private key shards of KGC1, KGC2, and KGC3 is 30, which is the same as the master private key s.

[0139] It can be seen that although L1, L2, and L3 corresponding to these three KGC nodes have been updated, the correct master private key s can still be obtained.

[0140] In one embodiment, step 102, when the blockchain system is updated and at least one key generation center node exits the blockchain system, updating the target value of the target key generation center node includes the following steps:

[0141] Step 301: A designated node generates a second polynomial function, where the constant term of the second polynomial function is zero. The designated node is any online key generation center node in the blockchain system (excluding a KGC node that has exited the blockchain system).

[0142] Step 302: assign nodes to take values based on the remaining independent variables (i.e., n values in the above formula (2): X1, X2, ..., X n-1 、X n , the value of the independent variable x of the random polynomial excluding the value x of the KGC node that exits the blockchain system) and the second polynomial function are calculated to obtain the remaining number (assuming that the number of KGC nodes that exit the blockchain system is 1, that is, n-1) of second function values, the remaining number of second function values including a second self function value and a second number (that is, n-2) of second associated function values;

[0143] Step 303: The assigning node broadcasts the second plurality of second correlation function values to each key generation center node except the assigning node.

[0144] Step 304: The assigned node obtains an updated target value based on its second self-function value and the target value; each key generation center node except the assigned node obtains an updated target value based on the second associated function value and the target value of the assigned node.

[0145] KGC nodes can voluntarily exit or be kicked out of the blockchain system due to malicious behavior. In this case, L j The value is updated to ensure that the L of the exit node j The value is no longer valid.

[0146] Exemplarily, upon receiving a new user private key issuance request, starting to execute a new cycle of user private key issuance includes the following steps:

[0147] 1) The blockchain system randomly assigns a KGC node as the assigned node, and the assigned node randomly generates its own t-1 second-order polynomial function.

[0148] Assume that the assigned KGC node is KGC w Node, the exited KGC node is KGC z Node,w,z∈[1,n],KGC w The t-1 degree second polynomial function generated by the node is:

[0149] g w (x) = a t-1 x t-1 +a t-2 x t-2 +…+a2x 2 +a1x formula (7)

[0150] In the above formula (7), the constant term is 0, a t-1 、a t-2 , ..., a2, and a1 are all constants and can be generated by a random number generator.

[0151] 2) Then KGC w Node calculation g w (X1),g w (X2),g w (X3),…g w (X n ) A total of n-1 (i.e. the remaining number) second function values (excluding g w (X z )) and distribute it to the KGC node corresponding to this X value, such as KGC w Node g w (X1) (i.e. the second correlation function value) is sent to KGC1, and g w (X w) (that is, the second self-function value) is retained by itself.

[0152] 3) In this way, each KGC j Node (excluding g w (X z ) obtain a second function value g corresponding to its X value w (X j ), put g w (X j ) and the L of the previous cycle j Value (set as L′ j ) are added together to obtain the L of the new cycle j Value (i.e. updated target value):

[0153] L j =g w (X j )+L′ j Formula (8)

[0154] To make it easier to understand, here are some examples:

[0155] Assume n=5, t=3, X1=1, X2=2, X3=3, X4=4, X5=5.

[0156] Furthermore, it is known that s=30, L1=38, L2=60, L3=96, L4=146, and L5=210.

[0157] Assume that the assigned KGC node is KGC5, the exited KGC node is KGC4, and the quadratic second polynomial function generated by KGC5 is:

[0158] g5(x)=x 2 +2x

[0159] For the KGC5 node, the second function value is calculated:

[0160] g5(1)=3, g5(2)=8, g5(3)=15, g5(5)=35.

[0161] Then, the KGC5 node distributes g5(1) to the KGC1 node, distributes g5(2) to the KGC2 node, distributes g5(3) to the KGC3 node, and retains g5(5) for itself.

[0162] Finally, each of the nodes KGC1, KGC2, KGC3, and KGC5 is calculated according to the above formula (8) to complete the target value update. The updated target values are: L1 = 41, L2 = 68, L3 = 111, and L5 = 245.

[0163] Assume that when a user requests a new private key, the only online KGC nodes in the blockchain system are KGC1, KGC2, and KGC3. Based on the calculated updated target values of L1 = 41, L2 = 68, and L3 = 111 for these three KGC nodes, the new master private key shard can be calculated:

[0164]

[0165]

[0166] The sum of the master private key shards of KGC1, KGC2, and KGC3 is 30, which is the same as the master private key s.

[0167] It can be seen that although L1, L2, and L3 corresponding to these three KGC nodes have been updated, the correct master private key s can still be obtained.

[0168] In one embodiment, step 102, when the blockchain system is updated and at least one new key generation center node is added to the blockchain system, updating the target value of the target key generation center node includes the following steps:

[0169] Step 401: The new key generation center node generates a new independent variable value and broadcasts the new independent variable value to each key generation center node in the blockchain system;

[0170] Step 402: Select a preset number of online key generation center nodes from the blockchain system (excluding the new key generation center node) to obtain a preset number of assisting nodes.

[0171] Step 403: The new key generation center node generates a preset number of first random positive integers and broadcasts the preset number of first random positive integers to corresponding assisting nodes.

[0172] Step 404: The new key generation center node calculates the sum of a preset number of first random positive integers;

[0173] In step 405, the target assisting node decomposes the corresponding first random positive integer to generate a preset number (t) of second random positive integers, where the preset number of second random positive integers include a random value of the node itself and a third number (t-1) of associated random values. The target assisting node is any one of the preset number of assisting nodes.

[0174] Step 406: The target assisting node broadcasts the third plurality of associated random values to the remaining assisting nodes respectively; the remaining assisting nodes are assisting nodes other than the target assisting node among the preset number of assisting nodes;

[0175] Step 407: The target assisting node obtains a third random positive integer according to its own random value and the associated random values of the other assisting nodes.

[0176] Blockchain nodes can apply to the blockchain system, and after the system approves, they become newly joined KGC nodes. w node.

[0177] Exemplarily, upon receiving a new user private key issuance request, starting to execute a new cycle of user private key issuance includes the following steps:

[0178] 1) KGC w The node generates its own X value (set to X w ) (i.e. the new independent variable value) and submit it secretly to the blockchain system. The system verifies that the X value cannot be the same as the X value of other KGC nodes. After the review is passed, the KGC w Node X w Send to other KGC nodes.

[0179] 2) KGC w The node randomly selects t online KGC nodes to assist it in obtaining L w Let the X values of these t online KGC nodes (also called assisting nodes) be X1, X2, X3, ... X t , where a KGC node is KGC i Node (i∈[1, t]). These t KGC nodes can be assisted by the following process without exposing themselves L i Assist KGC on the premise of value w Node obtains its L w value.

[0180] 3) KGC w The node generates t random positive integers r i (i.e., a preset number of first random positive integers), i∈[1, t], and calculate the sum r of the preset number of first random positive integers:

[0181] 4) KGC w The node takes these t random positive integers r i Distribute to the corresponding KGC i Node, for example, r1 is sent to KGC1 node.

[0182] 5) KGC i (ie, the target assisting node) receives r i Then, divide it into t random positive integers r im (i.e., a preset number of second random positive integers), m∈[1, t], i.e.

[0183] 6) Then KGC i The node takes these t random positive integers r im Distribute to the corresponding KGC m (i.e. other assisting nodes), such as KGC3 node r 31 (i.e., the associated random value) is sent to the KGC1 node, and the 33 (ie its own random value) is retained by itself.

[0184] 7) Thus, KGC i Each node will receive t r im , one of which is obtained by itself, and the other t-1 (i.e. the third number) are sent by the rest of the KGC nodes. i The node will take this t r im Add and calculate the third random positive integer r' m :

[0185] In one embodiment, after obtaining the third random positive integer in step 407, step 102, when the blockchain system is updated and at least one new key generation center node is added to the blockchain system, updates the target value of the target key generation center node, further comprising the following steps:

[0186] Step 501: The target assisting node generates a third polynomial function, wherein a constant term of the third polynomial function is calculated based on a third random positive integer and a new independent variable value.

[0187] In step 502, the target assisting node calculates a preset number of third function values based on a preset number of independent variable values (i.e., the independent variable value of each node in the preset number of assisting nodes) and a third polynomial function, where the preset number of third function values includes a third self-function value and a third number (i.e., t-1) of third associated function values.

[0188] Step 503: The target assisting node broadcasts the third plurality of third correlation function values to the remaining assisting nodes respectively.

[0189] Step 504: The target assisting node obtains a pseudo target value based on its third self function value, the third correlation function values of the other assisting nodes, and the target value, and sends the pseudo target value to the new key generation central node.

[0190] Step 505: The new key generation center node determines a target value of the new key generation center node based on the sum of a preset number of pseudo target values, a preset number of independent variable values, the new independent variable value, and a first random positive integer.

[0191] For example, in KGCi The node will take this t r im Add and calculate to get the third random positive integer r' m : After that, the following steps are also included:

[0192] 8) KGC i The node randomly generates its own t-1 degree third polynomial function, let KGC i The third polynomial function generated by the node is f i (x):

[0193] f i (x) = a t-1 x t-1 +a t-2 x t-2 +…+a2x 2 +a1x+a0 formula (9)

[0194] In the above formula (9), the constant term a t-1 、a t-2 , ..., a2, and a1 are all constants and can be generated by a random number generator.

[0195] 9) KGC i Node calculation f i (X1),f i (X2),f i (X3),…f i (X t ) A total of t third function values are distributed to the KGC node corresponding to this X value, such as KGC i Node f i (X1) (that is, the third correlation function value) is sent to the KGC1 node, and f i (X i ) (that is, the third self-function value) is retained by itself.

[0196] 10) Thus, KGC i The node obtains t third function values corresponding to its X value, one of which is obtained by itself and the other t-1 are sent by other KGC nodes. i The node adds the obtained t third function values and then adds them to the L of the previous cycle. i Add the values and get a pseudo L i Value (set to F i ) and send it to KGC w node:

[0197]

[0198] 11) KGCw The node receives the t F i value, find its L w value (i.e., the target value of the new key generation center node), but it is impossible to deduce the L of these t assisting nodes from it. i value.

[0199]

[0200] To make it easier to understand, here are some examples:

[0201] Assume n=5, t=3, X1=1, X2=2, X3=3, X4=4, X5=5.

[0202] Furthermore, it is known that s=30, L1=38, L2=60, and L3=96.

[0203] Assume that the newly added KGC node is KGC6 node, and the new independent variable value is X6=10.

[0204] Assume that when a user submits a new private key issuance request, all nodes KGC1 to KGC5 in the blockchain system are online. KGC6 selects KGC1, KGC2, and KGC3 as assisting nodes to help KGC6 obtain its target value L6.

[0205] The KGC6 node generates r1=6, r2=8, r3=9, so r=23; and distributes it to the KGC1 node, KGC2 node, and KGC3 node.

[0206] KGC1 node obtains r1=6 and divides it into r 11 =3, r 12 =1, r 13 =2, and distributed to KGC1 node, KGC2 node, and KGC3 node.

[0207] KGC2 node obtains r2=8 and divides it into r 21 =2, r 22 =3, r 23 =3, and distributed to KGC1 node, KGC2 node, and KGC3 node.

[0208] KGC3 node obtains r3=9 and divides it into r 31 =3, r 32 =4, r 33 =2, and distributed to KGC1 node, KGC2 node, and KGC3 node.

[0209] The KGC1 node calculates r′1=8, the KGC2 node calculates r′2=8, and the KGC3 node calculates r′3=7.

[0210] KGC1 node generates f1(x)=x 2 + 3x + a0, we get a0 = 8 - 130 = -122, that is:

[0211] f1(x)=x 2 +3x-122.

[0212] KGC2 node generates f2(x)=x 2 -x+a0, we get a0=8-90=-82, that is:

[0213] f2(x)=x 2 -x-82.

[0214] KGC3 node generates f3(x)=2x 2 +x+a0, we get a0=7-210=-203, that is:

[0215] f3(x)=2x 2 +x-203.

[0216] The KGC1 node calculates f1(1)=-118, f1(2)=-112, f1(3)=-104, and distributes them to the KGC1 node, KGC2 node, and KGC3 node.

[0217] The KGC2 node calculates f2(1)=-82, f2(2)=-80, f2(3)=-76 and distributes it to the KGC1 node, KGC2 node, and KGC3 node.

[0218] The KGC3 node calculates f3(1)=-200, f3(2)=-193, f3(3)=-182 and distributes it to the KGC1 node, KGC2 node, and KGC3 node.

[0219] The KGC1 node calculates F1=38-118-82-200=-362 and sends it to the KGC6 node.

[0220] The KGC2 node calculates F2=60-112-80-193=-325 and sends it to the KGC6 node.

[0221] The KGC3 node calculates F3=96-104-76-182=-266 and sends it to the KGC6 node.

[0222] KGC6 node calculated:

[0223]

[0224] If we take KGC1, KGC2, and KGC6 as examples to calculate the master private key s, we can calculate the new master private key shards of the three KGC nodes: KGC1, KGC2, and KGC6.

[0225]

[0226]

[0227] The sum of the master private key shards of KGC1, KGC2, and KGC6 is 30, which is the same as the master private key s.

[0228] It can be seen that the L6 value generated by the KGC6 node is correct, but the KGC6 node cannot know the L values of the three assisting nodes KGC1, KGC2, and KGC3.

[0229] If a KGC node loses data, you may need to retrieve your L j When the blockchain system is updated and at least one key generation center node applies for data recovery, the target value of the target key generation center node is updated. First, the key generation center node that experienced data loss needs to apply for data recovery to the blockchain system. After the system approves the application, the key generation center node that experienced data loss sends its independent variable value (X value) to the remaining key generation center nodes. The method for updating the target value of the target key generation center node is the same as that for updating the target value of the target key generation center node when the blockchain system is updated and at least one new key generation center node is added to the blockchain system.

[0230] In one embodiment, the user public key is the user ID of the user to whom the resource sending client belongs, and the user private key issuance request also provides a user random number. Step 105, through the target participating node, determines the preliminary user private key based on the master private key shard and the user ID, receives the preliminary user private key through the resource sending client, and issues the target user private key, including:

[0231] Step 1051: Generate a second shard and a user private key shard based on the master private key shard and the user public key through the target participating node, and broadcast the second shard and the user private key shard to the remaining participating nodes in the blockchain system;

[0232] Step 1052: Determine, by the target participating node, the preliminary user private key based on the second shard, the user private key shard, and the second shards and user private key shards received from the remaining participating nodes;

[0233] Step 1053: Send the blockchain resource to the resource receiving client via the resource sending client, and generate blockchain resource transfer information;

[0234] Step 1054: The resource sending client signs the blockchain resource transfer information based on the prepared user private key and the user random number to obtain encrypted resource transfer information, and sends the encrypted resource transfer information to the target participating node.

[0235] Step 1055: Verify the encrypted resource transfer information based on the user's public key through the target participating node, and record the blockchain resource transfer information that has passed the verification.

[0236] In order to issue user private keys, users can choose different international standards for identification cryptographic algorithms as needed, such as the SM9 standard or the IEEEE P1363.IBS standard.

[0237] It should be noted that since the user private key is used for user signature, and the user signature method based on the existing international standards for identification cryptographic algorithms has higher security, this embodiment chooses to generate user private keys corresponding to these international standards for identification cryptographic algorithms. In this way, the user signature methods of these international standards are directly applied in the subsequent user signature process.

[0238] Taking the SM9 signature standard as an example, the calculation formula for the user's private key is:

[0239]

[0240] In the above formula (12), D ID is the user's private key (i.e., the target user's private key in the above embodiment), s is the master private key, ID is the user's public key, and Q1 is the generator of the q-order additive cyclic group G1.

[0241] In the traditional SM9 signature standard, the master private key s is directly held by a centralized KGC organization, and the user private key D is directly calculated according to the above formula ID This embodiment is based on t participating nodes issuing the target user private key D in a distributed manner. ID .

[0242] In one embodiment, step 1051, generating a second shard and a user private key shard based on the master private key shard and the user public key by the target participating node, and broadcasting the second shard and the user private key shard to the remaining participating nodes in the blockchain system, includes:

[0243] Step 601: Determine a second user value through a target participating node based on the master private key shard and the user public key.

[0244] Exemplarily, the target participating node calculates the second user value from the master private key shard and the user public key according to the following formula (13).

[0245]

[0246] In the above formula (13), b i is the second user value, s i The H1(ID) is the hash value of the user's public key. The H1 function is an encryption function derived from the standard hash function. t is a preset number. The H1 function and the H2 function are applicable to bit strings of different lengths. For any bit string of different lengths, the output values of the H1 function and the H2 function are both

[0247] The master private key shard is kept secret by the target participating node and is not disclosed to other participating nodes in the blockchain system.

[0248] It should be noted that since the master private key of each KGC node is sharded i It is kept secret from other KGC nodes. Therefore, the second user value b of each KGC node is i It is also kept confidential to other KGC nodes.

[0249] Step 602: Determine a first difference based on the first node random number and the second node random number; determine a second difference based on the master private key shard and the third node random number; and broadcast the first difference and the second difference to the remaining participating nodes in the blockchain system.

[0250] The first node random number is a random integer generated by the target participating node.

[0251] Each participating node generates a first node random number a i The blockchain system secretly generates random positive integers x and y, and calculates z = x·y. Then, x, y, and z are randomly divided into a preset number t of shares, and secretly distributed to each KGC node. For security reasons, the blockchain system will regenerate x and y every time it receives a user private key issuance request, and only the KGC nodes participating in the issuance (i.e., participating nodes) can receive the corresponding x, y, and z shards: The second node random number x i , the third node random number y i , the fourth node random number z i , and for these t participating nodes, there exists

[0252] The target participating node receives the second node random number x from the blockchain system i and the third node random number y i; According to the following formula (14), the first difference is calculated from the first node random number and the second node random number; According to the following formula (15), the second difference is determined from the master private key shard and the third node random number; The first difference and the second difference are broadcast to the remaining participating nodes respectively, and then each participating node in the blockchain system obtains the first difference and the second difference of all participating nodes in the blockchain system.

[0253] e i =a i -x i Formula (14)

[0254] g i =s i -y i Formula (15)

[0255] In formula (14), a i is the random number of the first node, x i is the random number of the second node, e i is the first difference. In formula (15), s i Shard for the master private key, y i is the random number of the third node, g i is the second difference.

[0256] It should be noted that since each participating node generates its own first difference e i and the second difference g i Broadcast to the rest of the participating nodes respectively, so this process will not expose each participating node’s own first node random number a i , Master private key shards i , the second node random number x i , the third node random number y i .

[0257] The target participating node receives the first difference and the second difference sent by the other participating nodes; according to the summation formula Sum the first difference generated by itself and the first difference received from other participating nodes to obtain the first total difference e, and e = ax; according to the summation formula The second difference value generated by itself and the second difference values received from other participating nodes are summed to obtain a second total difference value g, and g=sy.

[0258] Step 603: Determine the first shard, determine the second shard based on the first shard and the first user value, and broadcast the second shard to the remaining participating nodes in the blockchain system.

[0259] Since each participating node generates a first node random number a i ,set up Then we need to find a·s mod q. For security reasons, the values of a and the master private key s cannot be made public, so each participating node cannot broadcast its own a i and s i Then perform the summation.

[0260] Using the following distributed method, each participating node can i and s i Find the first fragment k i , and meet

[0261] Assume e = ax, g = sy, and transform k = a·s mod q:

[0262] k=a·s mod q=(a-x+x)·(s-y+y)mod q

[0263] =(e+x)·(g+y)mod q

[0264] Finally, we can obtain: k = a·s mod q = e·g + e·y + g·x + x·y mod q.

[0265] Since the first total difference e and the second total difference g are already public constant values, each participating node can calculate its own first shard k i for:

[0266]

[0267] To make it easier to understand, a simple example is given below:

[0268] Assume t=3. For the three participating nodes KGC1, KGC2, and KGC3, assume:

[0269] a1=3, a2=2, a3=4, s1=4, s2=6, s3=6,

[0270] a=9, s=16, a·s mod q=144;

[0271] The blockchain system generates x=7, y=13, z=x·y=91, and then randomly divides x, y, and z into t parts and secretly distributes them to each participating node. Let:

[0272] x1=2, x2=3, x3=2, y1=5, y2=2, y3=6, z1=21, z2=30, z3=40;

[0273] Each participating node can then individually compute:

[0274] e1=1, e2=-1, e3=2, g1=-1, g2=4, g3=0;

[0275] The three participating nodes jointly calculate:

[0276] e=2,g=3;

[0277] Finally, each participating node can calculate: k1=39, k2=45, k3=60.

[0278] The sum of the first shards of the three participating nodes KGC1, KGC2, and KGC3 is equal to 144, which is the same as a·s mod q. During the entire process of finding their own first shards, these three participating nodes did not reveal their own a i 、s i 、x i 、y i .

[0279] Each participating node calculates the second shard K i :K i =k i ·R ID Due to the characteristics of cyclic groups, we know that K i and R ID , and cannot infer the first shard k i .

[0280] Each participating node will split its second shard K i Broadcast to the rest of the participating nodes in the blockchain system, so that each participating node can calculate the second shard and value K:

[0281] Step 604: Determine a third difference based on the second user value and the third node random number; broadcast the third difference to the remaining participating nodes in the blockchain system; determine the user private key shard, and broadcast the user private key shard to the remaining participating nodes in the blockchain system.

[0282] As in steps 402 and 403 above, each participating node can use a distributed approach without exposing itself. i and b i Under the condition of finding a user private key fragment c i , and meet

[0283]

[0284] The target participating node receives the second node random number x from the blockchain system i and the third node random number y i; According to the following formula (16), the second difference is determined by the second user value and the third node random number; the first difference and the third difference are broadcast to the remaining participating nodes respectively, and then each participating node in the blockchain system obtains the first difference and the third difference of all participating nodes in the blockchain system.

[0285] e i =a i -x i Formula (14)

[0286] f i =b i -y i Formula (16)

[0287] In formula (14), a i is the random number of the first node, x i is the random number of the second node, e i is the first difference. In formula (16), b i is the second user value, y i is the random number of the third node, f i The third difference.

[0288] Assume the random number and value of the first node is a, and the random number and value of the second user is b, then:

[0289]

[0290] Assume that the user's private key shard is c i , the user's private key shard and value is c, then:

[0291]

[0292] Since the first node random number a of each participating node i , and master private key shards i It is kept secret from other participating nodes, so each participating node cannot broadcast its own a i and b i Then sum a and b to calculate the user private key shard and value c. In order to calculate the user private key shard and value c, this embodiment can use a distributed method to calculate the user private key shard c by each participating node. i , and then calculate the user's private key shard and value c.

[0293] According to e = ax and f = by, c = a·b mod q is converted:

[0294] c=a·b mod q=(a-x+x)·(b-y+y)mod q

[0295] =(e+x)·(f+y)mod q

[0296] Finally, we can obtain: c = a·b mod q = e·f + e·y + f·x + x·y mod q.

[0297] The target participating node receives the first total difference e and the third total difference f sent by the other participating nodes; calculates the user private key shard according to the following formula (17), and broadcasts the user private key shard to the other participating nodes.

[0298]

[0299] In the above formula (17), c i is the user's private key shard, and c is the user's private key shard and value.

[0300] In one embodiment, let t=3. For the three participating nodes KGC1, KGC2, and KGC3, let:

[0301] a1=2, a2=4, a3=6, b1=3, b2=6, b3=9, a=12, b=18, a·b mod q=216;

[0302] Assume that the blockchain system generates x = 9, y = 15, z = x·y = 135, randomly divides x, y, and z into three parts, and distributes them to the three participating nodes, obtaining:

[0303] x1=2, x2=3, x3=4, y1=4, y2=5, y3=6, z1=40, z2=45, z3=50.

[0304] The three participating nodes calculate separately and get:

[0305] e1=0, e2=1, e3=2, f1=-1, f2=1, f3=3;

[0306] The three participating nodes jointly calculate and obtain: e = 3, f = 3;

[0307] Finally, each participating node calculates according to formula (17): c1 = 61, c2 = 72, c3 = 83.

[0308] Since the sum of the shards of KGC1, KGC2, and KGC3 is equal to 216, which is the same as a·b mod q, and these three participating nodes do not expose their own a in the entire process of determining their own user private key shards. i 、b i 、x i 、y i , that is, for the current participating node, only the current participating node knows its own a i、b i 、x i 、y i , and the rest of the participating nodes in the blockchain system except the current participating nodes cannot know it.

[0309] In one embodiment, step 1052, determining, by the target participating node, the preliminary user private key based on the second shard, the user private key shard, and the second shards and user private key shards received from the remaining participating nodes, includes:

[0310] Step 701: The target participating node sums the second shard and the second shards received from the remaining participating nodes to obtain a second shard sum value.

[0311] Each participating node can calculate the second shard and value K:

[0312]

[0313] Step 702: Sum the user private key shards and the user private key shards received from other participating nodes to obtain the user private key shard sum value.

[0314] Each participating node can calculate the user's private key shard and value c:

[0315]

[0316] Step 703: The target participating node uses the ratio of the second shard sum value to the user private key shard sum value as the preliminary user private key.

[0317] The target participating node calculates the prepared user private key according to the following formula (18):

[0318]

[0319] In the above formula (18), K is the second shard sum value, c is the user private key shard sum value, D′ ID To prepare the user's private key.

[0320]

[0321] The user private key of the SM9 signature standard is:

[0322]

[0323] Therefore, what the target participating node issues is the private key of the preparation user, not the private key of the target user.

[0324] In this embodiment, provisional user private keys are issued in a distributed manner. The master private key used for issuance is no longer stored by a centralized KGC organization. Instead, it is secretly stored in the form of master private key shards across multiple participating nodes. During the distributed issuance of provisional user private keys, individual nodes are unable to access the master private key, thus achieving higher security and improving the security of the user private key issuance process.

[0325] In step 1053, the blockchain address of the resource receiving client is the user ID of the user to whom the resource receiving client belongs, and the blockchain address of the resource sending client is the user's public key. The blockchain address of the resource receiving client is the address used by the resource receiving client to receive blockchain resources, and the blockchain address of the resource sending client is the address used by the resource sending client to send blockchain resources.

[0326] In traditional blockchain-based signature verification schemes, each user who sends a resource has a pair of public and private keys. The public key characters are irregular, typically a 512-bit string, while the blockchain address of the receiving client is typically a 160-bit random, meaningless string, making it difficult for users to remember and use. In this embodiment, however, the user's public key and blockchain address are unified, serving both as a public key for verifying digital signatures and as a blockchain address for sending and receiving blockchain resources. Furthermore, user identifiers that are easy to remember and identify are used as both the user's public key and blockchain address, thereby improving their user-friendliness.

[0327] In one embodiment, the above step 1054, through the resource sending client, signs the blockchain resource transfer information according to the prepared user private key and the user random number to obtain encrypted resource transfer information, and sends the encrypted resource transfer information to the target participating node, including: issuing the target user private key according to the prepared user private key and the user random number through the resource sending client; using the master public key and the target user private key to sign the blockchain resource transfer information to obtain encrypted resource transfer information, and sending the encrypted resource transfer information to the target participating node.

[0328] Exemplarily, after receiving the preliminary user private key, the resource sending client determines the target user private key according to the following formula (19).

[0329]

[0330] In formula (19), D ID is the target user’s private key, D′ ID To prepare the user's private key, r is the user's random number.

[0331] Because r is a secret random number generated by the user before, the entire issuance process is known only to the user himself. Therefore, even if all KGC nodes act maliciously or are attacked, or the network transmission of the preliminary user private key is intercepted, the attacker cannot obtain the final target user private key, thereby improving the security of the user private key issuance process.

[0332] The target user's private key is compatible with various international standards for identification cryptographic algorithms, such as SM9 and IEEE P1363.IBS. Therefore, this embodiment can directly use digital signature methods based on these international standards during user signing and verification. The following describes the process of signing blockchain resource transfer information by the resource sending client and verifying the encrypted resource transfer information by the target participating node, based on the SM9 standard digital signature method.

[0333] (1) Signature

[0334] The blockchain user who uses the resource to send the client obtains the target user's private key D ID After that, you can sign various businesses in the blockchain (such as blockchain transactions). Let the transaction information to be signed be M, g=e(Q1,P pub ), where Q1 is the generator of the q-order additive cyclic group G1, P pub Is the master public key of the blockchain system. For any bilinear pair e(x,y), the SM9 signature standard chooses the R-Ate pair. For the specific solution method, please refer to the standard document GBT 38635.2-2020. G T is a q-order multiplicative cyclic group, e(x,y) is based on G1×G2→G T where x and y represent the elements in G1 and G2 respectively.

[0335] 1) Blockchain users use resources to send clients to randomly generate positive integers And calculate w=g d .

[0336] 2) Calculate h = H2(M||w), where || is a bit string concatenation symbol and the H2 function is an encryption function derived from a standard hash function.

[0337] 3) If (dh) modq ≠ 0, calculate S = (dh) · D ID modq; otherwise, return to step 1) and regenerate the random number d.

[0338] 4) Output transaction information M and its digital signature (h, S).

[0339] (2) Verify the signature

[0340] 1) After receiving the transaction information M′ and its digital signature (h′, S′) from the resource sending client, the target participating node confirms whether h′ belongs to And whether S′ belongs to the additive cyclic group G1. If so, continue verification; otherwise, reject the signature.

[0341] 2) Calculate w′=e(S′,H1(ID)·Q2+P pub )·g h′ .

[0342] 3) Calculate h2=H2(M′||w′). If h′=h2, the signature verification is successful, and the target participating node can put the user transaction record into the transaction pool and then package it into the block. Otherwise, the transaction record is rejected.

[0343] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0344] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0345] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0346] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for issuing user private keys based on blockchain, characterized in that: include: The target key generation center node in the blockchain system receives a user private key issuance request sent by a resource sending client, wherein the user private key issuance request provides a user identifier; When the blockchain system is updated, the target value of the target key generation center node is updated; the blockchain system update includes at least one of regular updates, at least one key generation center node exiting the blockchain system, at least one new key generation center node joining the blockchain system, and at least one key generation center node applying for data recovery; Selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of participating nodes; Generate master private key shards based on the updated target value through the target participating nodes; The target participating node determines the preliminary user private key according to the master private key shard and the user identifier, so that the preliminary user private key is received by the resource sending client and the target user private key is issued.

2. The method according to claim 1, wherein When the blockchain system is updated regularly, the target value of the target key generation center node is updated, including: Generate a first polynomial function through the target key generation central node, where a constant term of the first polynomial function is zero; By the target key generation central node, based on a target number of independent variable values and the first polynomial function, a target number of first function values is calculated, wherein the target number of first function values include a first self function value and a first associated function value; broadcasting the first association function value to the remaining key generation central nodes respectively through the target key generation central node; The target key generation central node obtains an updated target value according to the first self function value, the first associated function values of the other key generation central nodes, and the target value.

3. The method according to claim 1, wherein In the case where the blockchain system is updated and at least one key generation center node exits the blockchain system, updating the target value of the target key generation center node includes: Generate a second polynomial function by assigning a node, wherein the constant term of the second polynomial function is zero, and the assigning node is any online key generation center node in the blockchain system; By means of the assignment node, a remaining number of second function values is calculated according to the remaining independent variable values and the second polynomial function, wherein the remaining number of second function values includes a second self function value and a second associated function value; broadcasting the second association function value to each key generation center node except the assigning node through the assigning node; Through the assignment node, an updated target value is obtained according to the second self-function value and the target value; through each key generation center node except the assignment node, an updated target value is obtained according to the second associated function value and the target value of the assignment node.

4. The method according to claim 1, wherein When the blockchain system is updated by at least one new key generation center node being added to the blockchain system, updating the target value of the target key generation center node includes: Generate a new independent variable value through a new key generation center node, and broadcast the new independent variable value to each key generation center node in the blockchain system; Selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of assisting nodes; Generate a third polynomial function through the target assisting node, wherein a constant term of the third polynomial function is calculated by taking a third random positive integer and the new independent variable value; By means of the target assisting node, a preset number of third function values are calculated based on a preset number of independent variable values and the third polynomial function, where the preset number of third function values include a third self function value and a third associated function value; broadcasting the third correlation function value to the remaining assisting nodes respectively through the target assisting node; Obtaining a pseudo target value through the target assisting node according to the third self-function value, the third associated function values of the remaining assisting nodes, and the target value, and sending the pseudo target value to the new key generation central node; The target value of the new key generation center node is determined through the new key generation center node according to the sum of a preset number of pseudo target values, a preset number of independent variable values, the new independent variable value, and a first random positive integer.

5. The method according to claim 4, wherein The method further comprises: Generate a preset number of first random positive integers through the new key generation central node, and broadcast the preset number of first random positive integers to corresponding assisting nodes; Calculating, by the new key generation central node, the sum of a preset number of first random positive integers; Decomposing the corresponding first random positive integer through the target assisting node to generate a preset number of second random positive integers, where the preset number of second random positive integers include the own random value and the associated random value; Broadcasting the associated random value to the remaining assisting nodes respectively through the target assisting node; A third random positive integer is obtained by the target assisting node according to the target assisting node's own random value and the associated random values of the remaining assisting nodes.

6. The method according to claim 1, wherein When the blockchain system is updated and at least one key generation center node applies for data recovery, the target value of the target key generation center node is updated, including: The key generation center node where data loss occurs broadcasts the value of its independent variable to each key generation center node in the blockchain system; Selecting a preset number of online key generation center nodes from the blockchain system to obtain a preset number of assisting nodes; Generate a third polynomial function through the target assisting node, where a constant term of the third polynomial function is calculated by a third random positive integer and an independent variable value of the key generation central node where data loss occurs; By means of the target assisting node, a preset number of third function values are calculated based on a preset number of independent variable values and the third polynomial function, where the preset number of third function values include a third self function value and a third associated function value; broadcasting the third correlation function value to the remaining assisting nodes respectively through the target assisting node; Obtaining a pseudo target value through the target assisting node according to the third self-function value, the third correlation function values of the remaining assisting nodes, and the target value, and sending the pseudo target value to the key generation central node where data loss occurs; Through the key generation central node where data loss occurs, the target value of the key generation central node where data loss occurs is determined according to the sum of a preset number of pseudo target values, a preset number of independent variable values, the independent variable values of the key generation central node where data loss occurs, and a first random positive integer.

7. The method according to claim 4, wherein The constant term of the third polynomial function is calculated by taking a third random positive integer and the new independent variable value, including: Calculate the constant term of the third polynomial function according to the following formula: Where a0 is the constant term of the third polynomial function, a v is the non-constant coefficient of the third polynomial function, r m ' is the third random positive integer, X w is the new value of the independent variable, and t is the preset number.

8. The method according to claim 4, wherein The determining, by the new key generation central node, a target value of the new key generation central node according to a sum of a preset number of pseudo target values, a preset number of independent variable values, the new independent variable value, and a first random positive integer, includes: Calculate the target value of the new key generation center node according to the following formula: Where, L w The target value of the central node for generating new keys, F i is the pseudo target value, r is the sum of the first random positive integers, X w is the new value of the independent variable, and t is the preset number.

9. The method according to claim 1, wherein The target participating node generates a master private key shard according to the updated target value, including: Through the target participating node, a master private key shard is generated according to the updated target value of the target participating node and a preset number of independent variable values. The sum of the master private key shards of the preset number of participating nodes is the master private key of the blockchain system.

10. The method according to claim 1, wherein The user public key is the user ID of the user to whom the resource sending client belongs. The user private key issuance request also provides a user random number. The target participating node determines the preliminary user private key according to the master private key shard and the user ID, receives the preliminary user private key through the resource sending client, and issues the target user private key, including: Generate, by the target participating node, a second shard and a user private key shard based on the master private key shard and the user public key, and broadcast the second shard and the user private key shard to the remaining participating nodes in the blockchain system; Determine, by the target participating node, a preliminary user private key based on the second shard, the user private key shard, and the second shards and user private key shards received from other participating nodes; Sending blockchain resources to the resource receiving client through the resource sending client to generate blockchain resource transfer information, wherein the blockchain address of the resource receiving client is the user identifier of the user to which the resource receiving client belongs, and the blockchain address of the resource sending client is the user public key; The resource sending client signs the blockchain resource transfer information according to the provisioned user private key and the user random number to obtain encrypted resource transfer information, and sends the encrypted resource transfer information to the target participating node; The encrypted resource transfer information is verified by the target participating node according to the user public key, and the blockchain resource transfer information that has passed the verification is recorded.

Citation Information

Patent Citations

  • Method for managing dispersed keys based on identities in wireless sensor network

    CN101711027A

  • Digital signature method and device based on block chain, equipment and storage medium

    CN109905247A