A method and system for providing user-friendly addresses and public keys for blockchain.
By generating a preliminary user private key through the target key generation central node in the blockchain system and issuing the user private key in a distributed manner, the key custody and secure channel issues in IBC are solved, user-friendly blockchain addresses and public keys are realized, and the security and compatibility of the private key issuance process are improved.
Patent Information
- Application Number
- CN202310438741.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing identifier-based cryptography (IBC) suffers from key escrow and secure channel issues. Centralized key generation centers (KGCs) know all users' private keys, making it difficult to guarantee the security of the private key issuance process and the transmission channel.
The target key generation central node in the blockchain system receives user private key issuance requests, generates a preliminary user private key, and issues the user private key in a distributed manner. The user private key fragment is determined using the master private key fragment and the user public key. An easy-to-remember user identifier is used as the public key and blockchain address, and signature and verification are performed in accordance with the international standard of identifier cryptography algorithm.
It improves the security of the user's private key issuance process, implements user-friendly blockchain addresses and public keys, has strong compatibility, can complete issuance when some key generation center nodes are offline, and is compatible with multiple blockchain systems.
Smart Images

Figure CN116582253B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital signature technology, and more specifically, to a method and system for providing user-friendly addresses and public keys for blockchain. Background Technology
[0002] With the development of digital signature technology, identity-based cryptography (IBC) has emerged. It allows user identifiers such as names, email addresses, and domain names to be used as public keys. Private keys are generated by a centralized key generation center (KGC) and sent to users through a secure transmission channel. IBC can solve the problems existing in public key cryptography based on public key infrastructure (PKI) certificate management, such as the security issues of storing and distributing user certificates, and the issues of updating and maintaining the qualifications of certificate authorities (CAs).
[0003] However, IBC still faces the following problems: key escrow and secure channel issues. The key escrow problem refers to the fact that the centralized KGC (Key Controller Group) knows all users' private keys, which could become a weak point for security attacks. The secure channel problem refers to the difficulty in ensuring the transmission channel is free from interception or eavesdropping after the KGC generates the user key and sends it to the user. Therefore, improving the security of the private key issuance process is a pressing issue when using private keys for signing and matching public keys for signature verification. Summary of the Invention
[0004] To address at least one deficiency or improvement need in the prior art, the present invention provides a method and system for providing user-friendly blockchain addresses and public keys, which can improve the user-friendliness of user public keys and blockchain addresses, and also improve the security of the user private key issuance process.
[0005] To achieve the above objectives, according to a first aspect of the present invention, a method for providing a blockchain user-friendly address and public key is provided, the method comprising:
[0006] The target key generation center node in the blockchain system receives user private key issuance requests sent by resource sending clients. The user private key issuance request includes the user public key and the user random number. The user public key is the user identifier of the user to which the resource sending client belongs.
[0007] The target key generation center node determines the backup user private key based on the master private key fragment and the user public key, and sends the backup user private key to the resource sending client;
[0008] The resource sending client sends blockchain resources to the resource receiving client, generating blockchain resource transfer information. 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's public key.
[0009] 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 then sends the encrypted resource transfer information to the target key generation center node.
[0010] The target key generation center verifies the encrypted resource transfer information based on the user's public key and records the verified blockchain resource transfer information.
[0011] Furthermore, based on the prepared user private key and the user random number, the blockchain resource transfer information is signed to obtain encrypted resource transfer information. This includes issuing the target user private key based on the prepared user private key and the user random number; and signing the blockchain resource transfer information using the master public key and the target user private key to obtain encrypted resource transfer information.
[0012] Furthermore, the method also includes generating a master public key fragment through the target key generation center node, broadcasting the master public key fragment to the other key generation center nodes in the blockchain system; summing the master public key fragment and the master public key fragments received from the other key generation center nodes to obtain the master public key; and sending the master public key to the resource sending client.
[0013] Further, based on the master private key shard and the user public key, a preliminary user private key is determined, including generating a master private key shard; based on the master private key shard and the user public key, a user private key shard is generated using an identifier cryptographic algorithm, and the user private key shard is broadcast to the other key generation central nodes in the blockchain system; based on the user private key shard and the user private key shards received from the other key generation central nodes, a preliminary user private key is determined.
[0014] Furthermore, with all key generation center nodes in the blockchain system online, the generation of master private key shards includes: generating random integers and using the random integers as master private key shards.
[0015] Furthermore, when some key generation center nodes in the blockchain system are online, and the target key generation center node is online, the generation of master private key shards includes: generating a random polynomial; calculating the target function value based on the random polynomial, and broadcasting the associated function values in the target function value to the remaining key generation center nodes respectively; determining the target sum value based on the self-function value in the target function value and the associated function values of the remaining key generation center nodes; and determining the master private key shard based on the independent variable of the random polynomial and the target sum value.
[0016] Further, based on the master private key fragment and the user public key, a user private key fragment is generated using an identifier cryptography algorithm, and the user private key fragment is broadcast to the remaining key generation center nodes. This includes: determining a second user value based on the master private key fragment and the user public key; determining a first difference based on the first node's random number and the second node's random number; determining a second difference based on the second user value and the third node's random number; broadcasting the first difference and the second difference to the remaining key generation center nodes respectively; determining the user private key fragment based on the first difference, the second difference, the second node's random number, the third node's random number, and the fourth node's random number, and broadcasting the user private key fragment to the remaining key generation center nodes.
[0017] Further, based on the user's private key fragments and the user's private key fragments received from the other key generation center nodes, a preliminary user private key is determined, including: summing the user's private key fragments and the user's private key fragments received from the other key generation center nodes to obtain a user private key fragment sum value; determining a third user value based on the first node's random number and the first user value, and broadcasting the third user value to the other key generation center nodes; summing the third user value and the third user value received from the other key generation center nodes to obtain a third user value sum value; and using the ratio of the third user value sum value to the user private key fragment sum value as the preliminary user private key.
[0018] Furthermore, the target key generation center node is determined by updating at least one of the following: blockchain, smart contract, or cross-chain compatibility.
[0019] According to a second aspect of the present invention, a system for providing user-friendly blockchain addresses and public keys is also provided, comprising:
[0020] The target key generation center node in the blockchain system is configured to receive user private key issuance requests sent by resource sending clients. The user private key issuance request includes the user public key and the user random number. The user public key is the user identifier of the user to which the resource sending client belongs.
[0021] The target key generation center node is also configured to determine the provisional user private key based on the master private key fragment and the user public key, and send the provisional user private key to the resource sending client;
[0022] A resource sending client is configured to send blockchain resources to a resource receiving client and generate blockchain resource transfer information. 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's public key.
[0023] The resource sending client is also configured to sign the blockchain resource transfer information based on 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 key generation center node;
[0024] The target key generation center is also configured to verify encrypted resource transfer information based on the user's public key and record the verified blockchain resource transfer information.
[0025] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0026] (1) This invention provides a method for providing user-friendly blockchain addresses and public keys, enabling blockchain users to access user-friendly blockchain addresses and public keys. The user 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, it employs user identifiers that are easy to remember and recognize, allowing for personalized user public key and blockchain address services for individuals and enterprises. For example, personal or enterprise names, email addresses, and domain names can be used as the user public key and blockchain address. Therefore, this method improves the user-friendliness of the user public key and blockchain address.
[0027] (2) The target key generation center node only issues a preliminary user private key. After receiving the preliminary user private key, the blockchain user generates the official target user private key based on the preliminary user private key and the user random number. This can effectively solve the problem of the issuing node or transmission channel being attacked and broken, thereby achieving the goal of ensuring the security of the user private key issuance process.
[0028] (3) The pre-issued user private key is issued in a distributed manner. The master private key used for issuance is no longer stored by a centralized KGC institution, but is secretly stored in multiple key generation center nodes in the form of master private key shards. During the distributed issuance of the pre-issued user private key, each node cannot know the master private key, thus having higher security and achieving the goal of improving the security of the user private key issuance process.
[0029] (4) Use a threshold scheme to ensure that user private key issuance can still be completed when some key generation center nodes are offline.
[0030] (5) It has strong compatibility, allowing the construction of new blockchains based on this method, as well as implementation through existing blockchain smart contracts. Furthermore, it can provide user-friendly address (public key) services for the vast majority of blockchain systems through blockchain adapters built on protocols such as Distributed Threshold ECDSA. Simultaneously, it can distribute and issue user private keys conforming to international standards for identifier cryptography algorithms such as SM9 and IEEE P1363.IBS. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 A flowchart illustrating a method for providing a user-friendly blockchain address and public key, provided as an embodiment of this application;
[0033] Figure 2 A flowchart illustrating the steps of signing and verifying transaction information, provided in an embodiment of this application;
[0034] Figure 3 A flowchart illustrating the steps for generating master private key fragments provided in this application embodiment;
[0035] Figure 4 A schematic diagram illustrating the process of generating user private key fragments provided in an embodiment of this application;
[0036] Figure 5 A flowchart illustrating the steps for determining the prepared user private key provided in an embodiment of this application;
[0037] Figure 6 This is an application environment diagram illustrating a method for providing user-friendly blockchain addresses and public keys, as provided in an embodiment of this application. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be 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 illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0039] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0040] like Figure 1 As shown, this application provides a method for providing a user-friendly address and public key for a blockchain. This method is jointly executed by a target key generation center node and a resource sending client in the blockchain system. The blockchain system includes multiple blockchain nodes, which are used to record resource transfer information, including information on the receipt and transmission of blockchain resources (e.g., transaction information generated from blockchain currency transactions). At least two of the multiple blockchain nodes include key generation center nodes (KGC nodes), which are used both to record resource transfer information and to issue user private keys. The target key generation center node can be any one of the key generation center nodes 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 the terminal used by the user acting as the initiator of the blockchain business. The resource sending client and the computer device or server deployed on the target key generation center node are connected via a network. The blockchain business can be at least one of receiving or sending blockchain resources, and the blockchain resources can be blockchain currency; this application does not limit this.
[0041] A method for providing user-friendly blockchain addresses and public keys includes the following steps:
[0042] Step 101: The target key generation center node in the blockchain system receives the user private key issuance request sent by the resource sending client. The user private key issuance request includes the user public key and the user random number. The user public key is the user identifier of the user to which the resource sending client belongs.
[0043] The user identifier can be a user's name, domain name, or email address, etc. The user random number is a random integer generated by the resource sending client and corresponding to the user's public key. It is secretly stored by the resource sending client and is not exposed to any KGC node in the blockchain system.
[0044] For example, after selecting a user identifier as the user public key (ID), the user generates a user random number through the resource sending client, and calculates the 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 the user private key issuance request, and the user private key issuance request is sent to the blockchain system.
[0045] R ID =r·Q1 Formula (1)
[0046] In the above formula (1), R ID Let r be the first user value, r be a user random number, and Q1 be the generator of the q-order additive cyclic group G1. Q1 is used... The coordinates are represented.
[0047] It should be noted that, due to the properties of additive cyclic groups, although the user-generated random number r satisfies R... ID = r·Q1, but any KGC node obtains R ID In the case of Q1, r cannot be derived. Therefore, by secretly storing the user's random number r corresponding to each user private key issuance request by the resource sending client and not disclosing it to any KGC node in the blockchain system, the security of the user private key issuance process can be improved. A user private key issuance request can be (ID, R...). ID During calculation, it will be converted into the corresponding bit string.
[0048] The blockchain system receives user private key issuance requests (ID, R) ID Check its validity. If the user's private key issuance request is valid, then issue the user's private key issuance request (ID, R). ID The broadcast is sent to every KGC node in the blockchain system.
[0049] Step 102: The target key generation center node determines the preparation user private key based on the master private key fragment and the user public key, and sends the preparation user private key to the resource sending client.
[0050] To issue user private keys, a blockchain system first needs to generate a master private key and a master public key that matches the master private key in a distributed manner. The master private key shards are generated by the target key generation central node, and the master private key shards of all key generation central nodes in the blockchain system jointly determine the blockchain system's master private key. The master private key and the master public key together form the blockchain system's master key, which is used to issue user private keys.
[0051] The prepared user private key is generated by the target key generation central node and made public to the remaining KGC nodes in the blockchain system, used 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.
[0052] Step 103: Send blockchain resources to the resource receiving client through the resource sending client to generate blockchain resource transfer information. 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's public key.
[0053] Among them, 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.
[0054] Step 104: Through the resource sending client, the blockchain resource transfer information is signed based on the prepared user private key and the user random number to obtain encrypted resource transfer information, and then the encrypted resource transfer information is sent to the target key generation center node.
[0055] Among them, encrypted resource transfer information includes blockchain resource transfer information and digital signatures.
[0056] Step 105: The target key generation center verifies the encrypted resource transfer information based on the user's public key and records the verified blockchain resource transfer information.
[0057] In one embodiment, such as Figure 2 As shown, both User A and User B use their email addresses as their public key IDs (denoted as IDs respectively). A and ID B When user A sends blockchain currency to user B's resource receiving client using a resource sending client, user A only needs to fill in user B's email address (i.e., ID). B The recipient's address is sufficient; after user A successfully sends blockchain currency to user B, transaction information is generated. Then, user A signs the transaction information using their prepared private key and a random number, obtaining a transaction record. The transaction record includes the transaction information and the digital signature, and is then broadcast to the blockchain nodes (also known as ledger nodes). The ledger nodes only need to use user A's email address (i.e., ID) from the transaction record. A This allows for the verification of digital signatures, eliminating the need for user A to send their public key information to the ledger nodes. This reduces the amount of field data in transaction records, significantly improving the overall operational efficiency of the blockchain system. If verification passes, the transaction is considered compliant and can be added to the blockchain system. Ledger nodes then record verified transactions.
[0058] In traditional blockchain-based signature verification schemes, each resource-sending client has a public and private key pair. The public key is typically a 512-bit string with no fixed pattern, while the resource-receiving client's blockchain address is usually a 160-bit random, meaningless string, making it inconvenient for users to remember and use. In this embodiment, the user's public key and blockchain address are unified. It can be used both as a public key to verify digital signatures and as a blockchain address to send and receive blockchain resources. Furthermore, an easy-to-remember and recognizable user identifier is used for both the user's public key and blockchain address. Therefore, the user-friendliness of the user's public key and blockchain address is improved, providing blockchain users with a user-friendly blockchain address and public key.
[0059] In one embodiment, step 104 above, signing the blockchain resource transfer information based on the prepared user private key and the user random number to obtain encrypted resource transfer information, includes issuing the target user private key based on the prepared user private key and the user random number; and signing the blockchain resource transfer information using the master public key and the target user private key to obtain encrypted resource transfer information.
[0060] For example, after receiving the prepared user private key, the resource sending client determines the target user private key according to the following formula (2).
[0061]
[0062] In the formula, D ID For the target user's private key, D′ ID To prepare the user's private key, r is the user's random number.
[0063] The target user's private key is compatible with various international standards for identifier cryptography algorithms, such as SM9 and IEEE P1363.IBS. Therefore, this embodiment can directly use the digital signature methods of these international standards in the user signing and verification process. The following describes the process of signing blockchain resource transfer information through the resource sending client and verifying encrypted resource transfer information through the target key generation center, based on the digital signature method of the SM9 standard.
[0064] (1) Signature
[0065] Blockchain users obtain user private key D ID Then, you can sign various transactions you perform on the blockchain (such as blockchain currency transactions). Let the transaction information to be signed be M, g = e(Q1, P... pub ), where Q1 is a generator of the q-order additive cyclic group G1, P pubThis is the master public key of the blockchain system. For any bilinear pair e(x,y), SM9 chooses the R-Ate pair; for specific solution methods, please refer to the national standard document GB / T 38635.2-2020. T It is a q-order multiplicative cyclic group, e(x,y) is based on G1×G2→G T The bilinear pairs, x and y, represent elements in G1 and G2, respectively.
[0066] 1) User randomly generates positive integers. And calculate w = g d .
[0067] 2) Calculate h = H2(M||w), where || is the bit string concatenation symbol, and the H2 function is an encryption function derived from the standard hash function.
[0068] 3) If (dh) mod q ≠ 0, calculate S = (dh) · D ID mod q; otherwise return to step 1) and regenerate the random number d.
[0069] 4) Output the transaction information M and its digital signature (h, S).
[0070] (2) Verify signature
[0071] 1) After receiving the user's transaction information M′ and its digital signature (h′, S′), the blockchain ledger node confirms whether h′ belongs to the user. And whether S′ belongs to the additive cyclic group G1. If both are correct, continue verification; otherwise, reject the signature.
[0072] 2) Calculate w′=e(S′,H1(ID)·Q2+P pub )·g h′ .
[0073] 3) Calculate h2 = H2(M′||w′). If h′ = h2, the signature verification is successful, and the blockchain ledger node can put the user transaction record into the transaction pool and then package it into a block. Otherwise, the transaction record is rejected.
[0074] In this embodiment, the target key generation center node only issues a preliminary user private key. After receiving the preliminary user private key, the blockchain user generates the official target user private key based on the preliminary user private key and the user's random number. This can effectively solve problems such as the issuing node or transmission channel being attacked and compromised. That is, since the user's random number is secretly stored by the user, only the user knows the target user private key. Therefore, even if all KGC nodes are attacked or the preliminary user private key is intercepted during network transmission, the attacker cannot obtain the final target user private key, thereby achieving the goal of ensuring the security of the user private key issuance process.
[0075] In one embodiment, the method for providing a user-friendly blockchain address and public key further includes generating a master public key shard through a target key generation center node, broadcasting the master public key shard to the other key generation center nodes in the blockchain system; summing the master public key shard and the master public key shards received from the other key generation center nodes to obtain the master public key; and sending the master public key to a resource sending client.
[0076] In this system, the master public key shards of all KGC nodes jointly determine the master public key of the blockchain system. The master public key is determined by the master private key and the system parameters of the blockchain system, and is used for user signatures and signature verification. There is a one-to-one correspondence between the master public key shards and the master private key shards. The master public key shard is determined by the master private key shard and the system parameters of the blockchain system. The master private key shard is an integer, and the system parameters of the blockchain system are pre-set integers.
[0077] The remaining key generation centers are all KGC nodes in the blockchain system other than the target key generation center. The master public key shard is public to the remaining key generation centers in the blockchain system, while the master private key shard is secretly kept by the target key generation center and is not public to the remaining key generation centers in the blockchain system.
[0078] For example, the target key generation center node obtains the master private key shard and the system parameters of the blockchain system, calculates the product of the master private key shard and the system parameters to obtain the master public key shard corresponding to the master private key shard, and broadcasts the master public key shard to the other key generation center nodes in the blockchain system; sums the master public key shard and the master public key shards received from the other key generation center nodes to obtain the master public key of the blockchain system; and sends the master public key to the resource sending client.
[0079] In one embodiment, step 102 above, which determines the preliminary user private key based on the master private key fragment and the user public key, includes: generating a master private key fragment; generating a user private key fragment using an identifier cryptographic algorithm based on the master private key fragment and the user public key, and broadcasting the user private key fragment to the other key generation center nodes in the blockchain system; and determining the preliminary user private key based on the user private key fragment and the user private key fragments received from the other key generation center nodes.
[0080] The identifier cryptography algorithm is an international standard for identifier cryptography algorithms, which can be either the SM9 standard or the IEEE EP1363.IBS standard. Users can choose different international standards as needed to issue corresponding user private keys.
[0081] It should be noted that, since the user's private key is used for user signature, and the user signature method based on the existing international standard of identity cryptography algorithms has high security, this embodiment chooses to generate a user's private key corresponding to these international standards of identity cryptography algorithms. In this way, the user signature method of these international standards can be directly applied in the subsequent user signature process.
[0082] The following uses the IEEE P1363.IBS standard as an example; the formula for calculating the user's private key is as follows:
[0083]
[0084] In the above formula (3), D ID s 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.
[0085] In the IEEE P1363.IBS standard, the master private key s is directly held by a centralized KGC organization, while this embodiment issues the target user's private key D in a distributed manner. ID That is, the user private key fragment is determined based on the master private key fragment generated by each KGC node and the user public key, and the user private key fragment is made public to the other KGC nodes; then, each KGC node obtains the user private key fragments of all KGC nodes in the blockchain system to determine the preparation user private key.
[0086] In this embodiment, the provisional user private key is issued in a distributed manner. The master private key used for issuance is no longer stored by a centralized KGC organization, but is secretly stored on multiple KGC nodes in the form of master private key shards. During the distributed issuance of the provisional user private key, none of the nodes can obtain the master private key, thus providing higher security and achieving the goal of improving the security of the user private key issuance process.
[0087] In one embodiment, when all key generation central nodes in the blockchain system are online, generating a master private key shard includes: generating a random integer and using the random integer as a master private key shard.
[0088] For example, the target key generation center node generates a random positive integer using a random number generator, and uses this random positive integer as a shard of the master private key. Where 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 constitutes the master private key of the blockchain system, and the sum of the master public key shards of all key generation center nodes constitutes the master public key of the blockchain system.
[0089] Let the target key generation center node be KGC jNodes (j∈[1, n]), where n is the number of key generation center nodes in the blockchain system (n is an integer greater than 1). KGC j The node generates a random positive integer u j The master public key is sharded as The master private key of the blockchain system is s. The system parameter of the blockchain system is Q2, where Q2 is of order q (q is a random prime number, usually greater than 2). 191 The generator of the additive cyclic group G2, Q2 is... The coordinates represent the master public key of the blockchain system, P. pub ,but
[0090] Then, KGC j Node computing The obtained master key is then fragmented. The message is broadcast throughout the entire blockchain system so that every KGC node in the blockchain system can obtain the master public key shards of the other KGC nodes. Then, each KGC node calculates... Obtain the public key P of the blockchain system pub Because Q2 is used The coordinates represented by the master public key shard. and the master public key P pub All are two-dimensional coordinates.
[0091] It should be noted that, due to the properties of additive cyclic groups, 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 derived. Therefore, the master private key s is kept secret from all KGC nodes, thereby improving the security of the user's private key issuance process.
[0092] Because the master private key of each KGC node is fragmented... j All are confidential (KGC) j A node only knows its own u j Therefore, the blockchain system cannot actually perform the step of calculating the sum of the master private key fragments of all KGC nodes to obtain the blockchain's master private key. Thus, the master private key *s* is kept secret, and no single KGC node knows it. Furthermore, a complete master private key *s* can only be formed when all KGC nodes are online, enabling the issuance of user private keys. When some KGC nodes are offline, a complete master private key *s* cannot be formed, thus preventing distributed issuance of user private keys.
[0093] In this embodiment, the master private key of the blockchain system can be determined when all key generation center nodes are online, thereby enabling the issuance of private keys to users. Furthermore, the master private key shards of any KGC node are kept secret from the other KGC nodes, and the master private key of the blockchain system is kept secret from all KGC nodes.
[0094] In one embodiment, such as Figure 3 As shown, in a blockchain system where some key generation center nodes are online and the target key generation center node is online, generating master private key shards includes:
[0095] Step 301: Generate a random polynomial.
[0096] For example, the blockchain system uses an (t,n) threshold algorithm to ensure that when there are t or more (t < n) KGC nodes online (in practical 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 will use t KGC nodes as an example), the threshold is set to t. i (Taking an online node as an example) Generate master private key s fragments. i (i∈[1,t]), and satisfy these t master private key fragments s i The sum of the additions is the primary private key s, i.e.
[0097]
[0098] To implement the (t,n) threshold algorithm, n KGC nodes first need to randomly generate their own t-1 degree polynomials.
[0099] The number of values that the independent variable of the random polynomial can take is the target number, which is the total number of KGC nodes in the blockchain system.
[0100] In a blockchain system where some key generation central nodes are online, and the number of online key generation central nodes is greater than or equal to a preset number, the master private key shards of any preset number of key generation central nodes in the blockchain system jointly determine the master private key of the blockchain system. For example, if the target number is 8 and the preset number is 5, then when there are 6 online KGC nodes in the blockchain system, 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 for the determination of the master private key of the blockchain system even when some KGC nodes are online, while also saving the computing resources of the blockchain system.
[0101] Furthermore, the random polynomial also satisfies the following conditions: the degree of any random polynomial is one less than the preset number, and the sum of the constant terms of the random polynomials corresponding to all KGC nodes in the blockchain is the master private key of the blockchain system.
[0102] For example, if the number of online KGC nodes in the blockchain system is greater than or equal to a preset number but less than a target number, and the target key generation center node is online, the target key generation center node generates a random polynomial.
[0103] Let n be the total number of KGC nodes in the blockchain system, with a preset number of t. Each KGC... j The random polynomial generated by node (j∈[1,n]) is:
[0104] f j (x)=a t-1 x t-1 +a t-2 x t-2 +…+a2x 2 +a1x+a0 formula (4)
[0105] In the above formula (4), the constant term a0 = u j a t-1 a t-2 a1, ..., a2, and a1 are all constants that can be generated using 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 for x is n, namely X1, X2, ..., X... n-1 X n .
[0106] In one embodiment, let n = 5, t = 3, and for node KGC1, let f1(x) = x 2 +x+5; For the KGC2 node, let f2(x) = x 2 +3x+8; For node KGC3, let f3(x) = 2x 2 +x+6; For the KGC4 node, let f4(x) = x 2 -x+7; For the KGC4 node, let f4(x) = x 2 -x+7; For the KGC5 node, let f5(x) = x 2 +2x+4.
[0107] As can be seen, the constant terms of f1(x) to f5(x) are 5, 8, 6, 7, and 4 respectively. Therefore, the master private key of the blockchain system is the sum of the constant terms of these five polynomials f1(x) to f5(x), which is 30.
[0108] Step 302: Calculate the objective function value based on the random polynomial, and broadcast the associated function values in the objective function value to the other key generation center nodes respectively.
[0109] The objective function value is the function value obtained by the target KGC node by substituting the independent variable into the random polynomial. It includes the associated function value and the self-function value. The self-function value is the function value corresponding to the target set value, which is a positive integer corresponding to the target KGC node, where the independent variable of the random polynomial takes values other than the target set value.
[0110] There are two ways to determine the target setting value. The first method is: the blockchain system randomly generates a target number of positive integers, assigns one to each KGC node as its target setting value, and broadcasts each KGC node's target setting value to the other KGC nodes. The second method is: each KGC node generates its own random positive integer, uses this integer as its own target setting value, and broadcasts its own target setting value to the other KGC nodes. Thus, each KGC node uses its own target setting value and the target setting values of the other KGC nodes as the independent variable of its random polynomial.
[0111] For example, if the target quantity is 3, the random polynomial of the first node KGC1 is f1(x), the random polynomial of the second node KGC2 is f2(x), and the random polynomial of the third node KGC3 is f3(x). The blockchain system randomly generates three positive integers: 44, 55, and 66, and designates 44 as the target setting value for node KGC1, 55 as the target setting value for node KGC2, and 66 as the target setting value for node KGC3. The system then broadcasts the target setting value of node KGC1 (44) to nodes KGC2 and KGC3, the target setting value of node KGC2 (55) to nodes KGC1 and KGC3, and the target setting value of node KGC3 (66) to nodes KGC1 and KGC2. The self-function value of node KGC1 is f1(44), and the associated function values are f1(55) and f1(66); the self-function value of node KGC2 is f2(55), and the associated function values are f2(44) and f2(66); the self-function value of node KGC3 is f3(66), and the associated function values are f3(44) and f3(55).
[0112] For example, the target key generation center node substitutes the values of the independent variables into a random polynomial to calculate the target function value, and then broadcasts the associated function values in the target function value to the other key generation center nodes.
[0113] In one embodiment, assuming the target quantity is 5, and the blockchain system randomly generates the target quantity of positive integers as follows: X1 = 1, X2 = 2, X3 = 3, X4 = 4, X5 = 5, then:
[0114] The KGC1 node substitutes x = 1, 2, 3, 4, 5 into the above f1(x) to calculate the five objective function values of the KGC1 node: f1(1) = 7, f1(2) = 11, f1(3) = 17, f1(4) = 25, f1(5) = 35; where f1(1) = 7 is the KGC1 node's own function value, and f1(2) = 11, f1(3) = 17, f1(4) = 25, f1(5) = 35 are all the KGC1 node's associated function values; and broadcasts f1(2) = 11, f1(3) = 17, f1(4) = 25, f1(5) = 35 to the KGC2 node and then to the KGC5 node.
[0115] The KGC2 node substitutes x = 1, 2, 3, 4, 5 into the above f2(x) to calculate the five objective function values of the KGC2 node: f2(1) = 12, f2(2) = 18, f2(3) = 26, f2(4) = 36, f2(5) = 48; where f2(2) = 18 is the KGC2 node's own function value, and f2(1) = 12, f2(3) = 26, f2(4) = 36, f2(5) = 48 are all the KGC2 node's associated function values; and broadcasts f2(1) = 12, f2(3) = 26, f2(4) = 36, f2(5) = 48 to the KGC1 node, KGC3 node and KGC5 node respectively.
[0116] The KGC3 node substitutes x = 1, 2, 3, 4, 5 into the above f3(x) to calculate the five objective function values of the KGC3 node: f3(1) = 9, f3(2) = 16, f3(3) = 27, f3(4) = 42, f3(5) = 61; where f3(3) = 27 is the KGC3 node's own function value, and f3(1) = 9, f3(2) = 16, f3(4) = 42, f3(5) = 61 are all the KGC3 node's associated function values; and broadcasts f3(1) = 9, f3(2) = 16, f3(4) = 42, f3(5) = 61 to the KGC1 node, KGC2 node, KGC4 node, and KGC5 node respectively.
[0117] The KGC4 node substitutes x = 1, 2, 3, 4, 5 into the above f4(x) to calculate the five objective function values of the KGC4 node: f4(1) = 7, f4(2) = 9, f4(3) = 13, f4(4) = 19, f4(5) = 27; where f4(4) = 19 is the KGC4 node's own function value, and f4(1) = 7, f4(2) = 9, f4(3) = 13, f4(5) = 27 are all the KGC4 node's associated function values; and broadcasts f4(1) = 7, f4(2) = 9, f4(3) = 13, f4(5) = 27 to the KGC1 node, KGC2 node, KGC3 node, and KGC5 node respectively.
[0118] The KGC5 node substitutes x = 1, 2, 3, 4, 5 into the above f5(x) to calculate the five objective function values of the KGC5 node: f5(1) = 7, f5(2) = 12, f5(3) = 19, f5(4) = 28, f5(5) = 34; where f5(5) = 34 is the KGC5 node's own function value, and f5(1) = 7, f5(2) = 12, f5(3) = 19, f5(4) = 28 are all the KGC5 node's associated function values; and broadcasts f5(1) = 7, f5(2) = 12, f5(3) = 19, f5(4) = 28 to the KGC1 node to the KGC4 node respectively.
[0119] Therefore, each KGC j Each node receives n objective function values corresponding to its X, of 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 nodes. j The nodes send the data. For example, node KGC1 will receive f1(1) = 7, f2(1) = 12, f3(1) = 9, f4(1) = 7 and f5(1) = 7. Among them, f1(1) = 7 is generated by node KGC1, and f2(1) = 12, f3(1) = 9, f4(1) = 7 and f5(1) = 7 are sent by the other 4 KGC nodes.
[0120] To prevent malicious KGC nodes from sending incorrect association function values, each KGC... j Nodes need to attach a commit when distributing association function values. j This is used to verify whether the value of the correlation function is genuine.
[0121] Let p be a large prime factor of q-1. And given that KGC is a generator of a p-order cyclic group, let KGC be... j Node commitment j for:
[0122]
[0123] KGC j Node commitment j It contains t elements and is sent to other KGC nodes.
[0124] When a KGC node receives a correlation function value and commitment from other nodes, it needs to verify them. If the verification passes, it accepts the correlation function value; otherwise, it requests the blockchain system to invalidate all distributions in this round and start a new round of distribution. The verification method is as follows:
[0125] KGC z (z∈[1,n]) for the received data from KGC j The function value f associated with the node j =(X z ) commitment j Calculate whether the following equation is true:
[0126]
[0127] If the condition is not met, the verification fails. This is due to the commitment to commit. j The polynomial coefficients are bound, if KGC j If the given commitment is not generated from the true coefficients of its polynomial function, the verification will fail. Furthermore, due to the nature of the discrete logarithm modulo operation, the polynomial coefficients cannot be derived from the commitment.
[0128] For example, let n = 5, t = 3, g = 7, and the polynomial f1(x) = 2x for node KGC1. 2 +3x+5, then:
[0129] commit1 = {α0 = g 5 α1=g 3 α2=g 2}
[0130] p and q are both large prime numbers, while the example numbers are relatively small, so their values remain unchanged after the modulo operation.
[0131] If the value of X for node KGC2 is X2 = 2, then f1(X2) = 19.
[0132] KGC1 node sends f1(X2) and commit1 to KGC2 node, and KGC2 node calculates... as well as The equation holds true.
[0133] Step 303: Generate the associated function value of the central node based on its own function value and the remaining keys in the target function value, and determine the target and value.
[0134] Among them, the correlation function value of the remaining key generation center nodes is the function value corresponding to the target setting value, where the independent variable of the random polynomial of the remaining key generation center nodes takes the value. The target sum value is the sum of the target KGC node's own function value and the correlation function values of the remaining KGC nodes.
[0135] For example, if the target number is 3, the self-function value of node KGC1 is f1(44), and the associated function values are f1(55) and f1(66); the self-function value of node KGC2 is f2(55), and the associated function values are f2(44) and f2(66); the self-function value of node KGC3 is f3(66), and the associated function values are f3(44) and f3(55). Then, for node KGC1, the target sum is the sum of the self-function value f1(44) of node KGC1, the associated function value f2(44) of node KGC2, and the associated function value f3(44) of node KGC3.
[0136] For example, after the commitment verification is successful, the target key generation center node sums its own function value in the target function value with the associated function values of the other key generation center nodes to obtain the target sum value.
[0137] In one embodiment, any KGC j The node (j∈[1,n]) calculates the target and value according to the following formula (5):
[0138]
[0139] In the above formula (5), L is the target sum, and f(X) is a random polynomial with X as the independent variable.
[0140] Assuming a preset quantity t is 3, when a user submits a request for the issuance of a user's private key, the only online KGC nodes in the blockchain system are KGC1, KGC2, and KGC3. For each of the KGC1, KGC2, and KGC3 nodes, the corresponding target and value are calculated according to the above formula (5):
[0141]
[0142] Step 304: Determine the master private key fragments based on the independent variables and target sum of the random polynomial.
[0143] For example, the target key generation center node multiplies the ratios corresponding to the values of the independent variables of the random polynomial, and then multiplies them with the target sum to obtain the master private key fragment.
[0144] In one embodiment, if the number of online KGC nodes in the blockchain is greater than or equal to a preset number, then the online KGC nodes in the blockchain... i Nodes (i∈[1,t]) calculate the master private key fragments according to the following formula (6):
[0145]
[0146] In the above formula (6), s i It is a master private key fragment, where X is the independent variable of a random polynomial. L is the ratio corresponding to the values of the independent variable of the random polynomial, t is the target sum, and t is the preset quantity.
[0147] For a certain moment, KGC i Node's master private key s i L i The value is fixed, while The value will change with the values (X values) of the independent variable of the random polynomial of other online KGC nodes. The number of online KGC nodes may vary at different times, but as long as the number of online KGC nodes is greater than or equal to t, each of the t online KGC nodes can generate the corresponding master private key fragment S according to the above formula (6). i .
[0148] Based on the calculated target sums for nodes KGC1, KGC2, and KGC3 as L1 = 42, L2 = 66, and L3 = 102, for each node, the corresponding master-private key fragments are calculated according to the above formula (6):
[0149]
[0150] Since s1 + s2 + s3 = 30, meaning 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 (5 + 8 + 6 + 7 + 4 = 30), therefore, at this point, these t KGCs... i Node's master private key s i The sum of these values yields the master private key 's'. Furthermore, these three KGC nodes only know their own master private key fragment 's'. i The master private key s cannot be determined.
[0151] In this embodiment, considering the uncertainty and openness of blockchain nodes (the online time of participating signing nodes cannot be guaranteed), a threshold scheme is used to support the issuance of user private keys even when some nodes are offline. This means that even when some key generation central nodes in the blockchain system are online, the master private key of the blockchain system can be determined, thereby enabling the issuance of private keys to users. Furthermore, the master private key shards of a predetermined number of online KGC nodes are kept secret from the remaining KGC nodes, and the master private key of the blockchain system is kept secret from all online KGC nodes.
[0152] In one embodiment, such as Figure 4 As shown, based on the master private key fragment and the user's public key, a user private key fragment is generated using an identifier cryptography algorithm, and then broadcast to the other key generation center nodes, including:
[0153] Step 401: Determine the second user value based on the master private key fragment and the user's public key.
[0154] For example, the target key generation center node calculates the second user value from the master private key fragment and the user public key according to the following formula (7).
[0155]
[0156] In the above formula (7), b i For the second user value, s i The master private key is fragmented, 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, and t is a preset number. The H1 and H2 functions are applicable to bit strings of different lengths, and for any bit string of different lengths, the output values of both the H1 and H2 functions belong to...
[0157] It should be noted that, due to the master private key being s fragmented into s by each KGC node i This is kept secret from the other KGC nodes; therefore, the second user value b for each KGC node is... i It is also kept secret from the other KGC nodes.
[0158] In another embodiment, when all key generation central nodes in the blockchain system are online, the formula corresponding to formula (7) is as follows: formula (8).
[0159]
[0160] In the formula, u i The main private key is sharded, H1(ID) is the hash value of the user's public key, and n is the target number.
[0161] Step 402: Determine the first difference based on the first node's random number and the second node's random number; determine the second difference based on the second user value and the third node's random number; broadcast the first difference and the second difference to the remaining key generation center nodes respectively.
[0162] The first node random number is a random integer generated by the target key generation center node.
[0163] Taking a scenario where some key generation central nodes in a blockchain system are online as an example, 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 predetermined number t parts, and secretly distributed to each KGC node. For security reasons, each time the blockchain system receives a user's private key issuance request, it regenerates x and y, and only the KGC nodes involved in the issuance receive their respective x, y, and z shards, i.e., the second node's random number x. i The third node random number y i The fourth node random number x i And for these t KGC nodes, there exists
[0164] The target key generation center node receives the random number x from the second node in the blockchain system. i and the third node random number y i According to the following formula (9), the first difference is calculated by the first node random number and the second node random number; according to the following formula (10), the second difference is determined by the second user value and the third node random number; the first difference and the second difference are broadcast to the remaining key generation center nodes respectively, so that each KGC node in the blockchain system obtains the first difference and the second difference of all KGC nodes in the blockchain system.
[0165] e i =a i -x i Formula (9)
[0166] f i =b i -y i Formula (10)
[0167] In equation (9), a i Let x be a random number for the first node. i e is a random number for the second node. i This is the first difference. In equation (10), b i For the second user value, y i f is a random number for the third node. i This is the second difference.
[0168] It should be noted that, since each KGC node generates its own first difference e i The second difference f i This is broadcast to the remaining KGC nodes respectively; therefore, this process does not expose each KGC node's own first node random number 'a'. i Second user value b i The second node random number x i The third node random number y i .
[0169] Step 403: Based on the first difference, the second difference, the second node random number, the third node random number, and the fourth node random number, determine the user private key fragment and broadcast the user private key fragment to the other key generation center nodes.
[0170] The user's private key fragment is determined by the sum of the first node's random number and the sum of the third user's value.
[0171] Let the sum of the random numbers in the first node be 'a', and the sum of the user values in the second node be 'b', then:
[0172]
[0173] Let c be the fragment of the user's private key. i If the user's private key fragment sum is c, then:
[0174]
[0175] Because the first node random number 'a' of each KGC node i and master private key fragments s i All of these are kept secret from the other KGC nodes, so each KGC node cannot broadcast its own a i and b i Then, summing these values yields a and b, which are then used to calculate the user's private key fragment sum c. To calculate the user's private key fragment sum c, this embodiment can use a distributed method, with each KGC node calculating the user's private key fragment c. i Then, the method for calculating the user's private key fragments and value c.
[0176] For example, the target key generation center node receives the first difference and the second difference sent by the other key generation center nodes; according to the summation formula... Summing the first difference value generated by oneself and the first difference values received from the other key generation center nodes yields the first total difference value e, where e = ax; according to the summation formula... The second difference value generated by the user is summed with the second difference value received from the other key generation center nodes to obtain the second total difference value f, and f = by.
[0177] Based on e = ax and f = by, we can transform c = a·bmodq:
[0178] c=a·bmodq=(a-x+x)·(b-y+y)modq
[0179] = (e+x)·(f+y)modq
[0180] = e·f + e·y + f·x + x·y mod q
[0181] Taking the case where some key generation center nodes in a blockchain system are online as an example. The target key generation center node receives the first total difference e and the second total difference f sent by the other key generation center nodes; according to the following formula (11), it calculates the user's private key fragment and broadcasts the user's private key fragment to the other key generation center nodes.
[0182]
[0183] In the above formula (11), c i c represents the fragment of the user's private key, and c represents the fragment and value of the user's private key.
[0184] In one embodiment, let t = 3. For the three nodes KGC1, KGC2, and KGC3, let:
[0185] a1=2, a2=4, a3=6, b1=3, b2=6, b3=9, a=12, b=18, a·bmodq=216;
[0186] Suppose the blockchain system generates x = 9, y = 15, z = x·y = 135. We randomly divide x, y, and z into three parts and distribute them to three KGC nodes, resulting in:
[0187] x1=2, x2=3, x3=4, y1=4, y2=5, y3=6, z1=40, z2=45, z3=50;
[0188] The calculations were performed on the three KGC nodes respectively, and the results were as follows:
[0189] e1=0, e2=1, e3=2, f1=-1, f2=1, f3=3;
[0190] The three KGC nodes jointly calculated and obtained the following:
[0191] e = 3, f = 3;
[0192] Finally, these three KGC nodes can calculate the user's private key fragments locally according to formula (11): c1 = 61, c2 = 72, c3 = 83.
[0193] Since the sum of the fragments of KGC1, KGC2, and KGC3 equals 2^16, which is the same as a·bmodq, and since these three KGC nodes did not expose their respective a during the entire process of determining their user private key fragments, i b i x i y i That is, for the current KGC node, only the current KGC node knows its own 'a'. i b i x i y i However, none of the other KGC nodes in the blockchain system, except for the current KGC node, can know this.
[0194] In one embodiment, such as Figure 5 As shown, based on the user's private key fragments and the user's private key fragments received from other key generation central nodes, a preliminary user private key is determined, including:
[0195] Step 501: Sum the user private key fragments and the user private key fragments received from the other key generation center nodes to obtain the user private key fragment sum value.
[0196] Taking the case where some key generation center nodes in a blockchain system are online as an example, the target key generation center node calculates the summation formula.
[0197]
[0198] The sum of the user private key fragments generated by the user and those received from other key generation centers is calculated to obtain the user private key fragment sum value c.
[0199] Step 502: Determine the third user value based on the first node's random number and the first user value, and broadcast the third user value to the other key generation center nodes; sum the third user value and the third user values received from the other key generation center nodes to obtain the sum of the third user value.
[0200] For example, the target key generation center node calculates the product of the first node random number and the first user value according to the following formula (12) to obtain the third user value, and broadcasts the third user value to the remaining key generation center nodes in the blockchain system so that each KGC node in the blockchain system can obtain the third user value of all KGC nodes in the blockchain system.
[0201] A i =a i ·R ID Formula (12)
[0202] In the formula, Ai For the third user value, a i R is a random number for the first node. ID This is the first user value.
[0203] It should be noted that, due to the characteristics of additive cyclic groups, although the first node's random number 'a'... i Satisfy A i =a i ·R ID However, any KGC node obtains R ID and A i In this case, it is impossible to deduce a. i Therefore, the first node random number 'a' of each KGC node i The private key is kept secret by this KGC node and not disclosed to other KGC nodes, thereby improving the security of the user's private key issuance process.
[0204] In a blockchain system where each KGC node can obtain the third-party user value from all KGC nodes, the target key generation center node uses a summation formula. The third user value generated by the user and the third user values received from the other key generation center nodes are summed to obtain the third user value and value A.
[0205] Step 503: Use the ratio of the third user value to the user private key fragment value as the preparation user private key.
[0206] The target key generation center node calculates the prepared user private key according to the following formula (13):
[0207]
[0208] In the above formula (13), A is the third user's value and sum, c is the user's private key fragment sum, and D′ ID To prepare the user's private key.
[0209]
[0210] The user private key for the IEEE P1363.1BS standard is:
[0211]
[0212] Therefore, the target key generation center node issues the prepared user private key, not the target user private key.
[0213] In one embodiment, the method for generating a target user's private key using the SM9 standard identifier cryptography algorithm is largely the same as the IEEE EP1363.IBS standard, except that the calculation formula for the user's private key differs from that of the IEEE EP1363.IBS standard.
[0214] For the SM9 standard, the method for calculating the user's private key DID is as follows:
[0215]
[0216] Methods for issuing user private keys in a distributed manner using SM9 include:
[0217] (1) The user sends a private key issuance request (ID, R) to the blockchain system. ID ), where ID is the user's public key, which is converted into a corresponding bit string during calculation, R ID Used to enhance security.
[0218] R ID =r·Q1
[0219] After the blockchain system verifies the legitimacy of the user request, it sets (ID, R) as the data type. ID Broadcast to each KGC i Node, i∈[1,t].
[0220] (2) Each KGC i The node generates a random positive integer a. i ,set up Then according to Calculate a partition ki that satisfies
[0221] The above calculation process does not expose each KGC. i node s i k i a i .
[0222] (3) Each KGC i Node K i =k i ·R ID as well as
[0223] (4) Each KGC i Nodes broadcast their own k i This information is then given to other KGC nodes, allowing each KGC node to calculate... Due to the properties of the additive cyclic group, knowing k i and P ID It cannot be deduced that k i .
[0224] (5) Let calculate The above calculation process does not expose each KGC. i node a i and b i .
[0225] (6) Each KGC i Nodes broadcast their own user private key fragments c i For other KGC nodes, it is possible to calculate One of the KGC nodes calculates the pre-selected user private key. And return (ID, R) ID (To the user.)
[0226] In fact,
[0227] The user private key of the SM9 standard
[0228] Therefore, the private keys issued by the KGC node are not yet official user private keys.
[0229] (7) After receiving the prepared user private key, the blockchain user calculates the target user private key.
[0230] In one embodiment, the target key generation center node is determined by updating at least one of blockchain, smart contract, or cross-chain compatibility.
[0231] Figure 6 This diagram illustrates an application environment for a method of providing user-friendly blockchain addresses and public keys, as provided in an embodiment of this application. Figure 6 As shown, the method for providing a user-friendly blockchain address and public key provided in this embodiment can be implemented in three different blockchain ways: blockchain implementation, smart contract implementation, and cross-chain compatibility implementation.
[0232] The bottom layer is the basic blockchain system. The second layer is the smart contracts or blockchain adapters used for compatibility. The third layer is the distributed KGC nodes used to implement the method of providing user-friendly blockchain addresses and public keys. The top layer blockchain users apply for blockchain addresses (user public keys). After the application is successful, the KGC nodes distribute and issue the corresponding reserve user private keys.
[0233] The implementation of blockchain technology involves embedding the method for providing user-friendly addresses and public keys into the blockchain itself. This requires integrating this method with the blockchain's transaction packaging, consensus protocol, and other functional modules. Smart contract implementation leverages the programmability of blockchain to implement the method for providing user-friendly addresses and public keys using smart contracts at the blockchain layer. Cross-chain compatibility implementation involves embedding the method for providing user-friendly addresses and public keys into the cross-chain protocol. Regarding the cross-chain protocol, a cross-chain protocol based on distributed threshold signatures is preferred.
[0234] The following is a detailed analysis of the three blockchain implementation methods mentioned above.
[0235] (1) Blockchain Implementation: The implementation of the method for providing user-friendly addresses and public keys is located within the blockchain itself, i.e., updating the main code of the blockchain. This inevitably involves a hard fork for existing blockchains. Regarding blockchain users, the existing blockchain users can remain unchanged, but a new function for providing user-friendly addresses and public keys has been added. Regarding KGC nodes, they will still be selected from the existing blockchain ledger nodes and operated according to the established blockchain protocol. In terms of compatibility, it will be compatible with the blockchain's own tokens.
[0236] (2) Smart Contract Implementation: The method for providing user-friendly addresses and public keys for the blockchain is implemented within the smart contract. This means the method itself is implemented within the smart contract, without involving updates to the main blockchain code, thus avoiding any blockchain fork issues. Regarding blockchain users, the functionality remains unchanged, but a new method for providing user-friendly addresses and public keys has been added. Regarding KGC nodes, the selection and maintenance of KGC nodes need to be redone. These KGC nodes differ significantly in business logic from the original blockchain ledger nodes, but the node maintenance method remains the same. In terms of compatibility, it will be compatible with the blockchain's own tokens, and new tokens will also be created in the smart contract for convenience.
[0237] (3) Cross-chain compatibility implementation: The implementation of the method for providing user-friendly blockchain addresses and public keys is located in the cross-chain protocol. Preferably, it is a cross-chain protocol (blockchain adapter) based on distributed threshold signature. The cross-chain method will involve updates to the cross-chain protocol code, but will not involve blockchain forks. Regarding blockchain users, it remains unchanged, but a new function for providing user-friendly blockchain addresses and public keys has been added. Regarding KGC nodes, they will still be selected from the existing cross-chain accounting nodes and operated according to the established blockchain protocol. In terms of compatibility, it will be compatible with the tokens supported by the cross-chain protocol, i.e., the vast majority of blockchains currently available. For example, it can provide a method service for providing user-friendly blockchain addresses and public keys for BTC and ETH.
[0238] Referring to Table 1, a detailed comparison of the three blockchain implementation methods is shown in Table 1:
[0239] Table 1
[0240]
[0241] Based on the same inventive concept, this application also provides a system for providing user-friendly blockchain addresses and public keys to implement the method for providing user-friendly blockchain addresses and public keys described above. The solution provided by this system is similar to the implementation described in the above method; therefore, the specific limitations of one or more system embodiments for providing user-friendly blockchain addresses and public keys provided below can be found in the limitations of the method for providing user-friendly blockchain addresses and public keys described above, and will not be repeated here.
[0242] This application also provides a system for providing user-friendly addresses and public keys for blockchain systems, comprising a target key generation central node and a resource sending client within the blockchain system. The target key generation central node is configured to receive user private key issuance requests sent by the resource sending client. The user private key issuance request includes a user public key and a user random number, where the user public key is the user identifier of the user to whom the resource sending client belongs.
[0243] The target key generation center node is also configured to determine the provisional user private key based on the master private key fragment and the user public key, and send the provisional user private key to the resource sending client.
[0244] The resource sending client is configured to send blockchain resources to the resource receiving client and generate blockchain resource transfer information. 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's public key.
[0245] The resource sending client is also configured to sign the blockchain resource transfer information based on the prepared user private key and the user random number, obtain encrypted resource transfer information, and send the encrypted resource transfer information to the target key generation center node.
[0246] The target key generation center is also configured to verify encrypted resource transfer information based on the user's public key and record the verified blockchain resource transfer information.
[0247] In one embodiment, the resource sending client is further configured to issue a target user's private key based on a prepared user's private key and a user random number; and to sign the blockchain resource transfer information using the master public key and the target user's private key to obtain encrypted resource transfer information.
[0248] In one embodiment, the target key generation center node is further configured to generate a master public key shard and broadcast the master public key shard to the other key generation center nodes in the blockchain system; sum the master public key shard and the master public key shards received from the other key generation center nodes to obtain the master public key; and send the master public key to the resource sending client.
[0249] In one embodiment, the target key generation center node is further configured to generate a master private key fragment; generate a user private key fragment using an identifier cryptographic algorithm based on the master private key fragment and the user public key, and broadcast the user private key fragment to the other key generation center nodes in the blockchain system; and determine a preliminary user private key based on the user private key fragment and the user private key fragments received from the other key generation center nodes.
[0250] In one embodiment, with all key generation central nodes in the blockchain system online, the target key generation central node is further configured to generate random integers and use these random integers as shards of the master private key.
[0251] In one embodiment, when some key generation center nodes in the blockchain system are online and the target key generation center node is online, the target key generation center node is further configured to generate a random polynomial; based on the random polynomial, the target function value is calculated, and the associated function values in the target function value are broadcast to the remaining key generation center nodes respectively; the target sum value is determined according to its own function value in the target function value and the associated function values of the remaining key generation center nodes; and the master private key sharding is determined according to the independent variable of the random polynomial and the target sum value.
[0252] In one embodiment, the target key generation center node is further configured to: determine a second user value based on the master private key fragment and the user's public key; determine a first difference based on the first node's random number and the second node's random number; determine a second difference based on the second user value and the third node's random number; broadcast the first difference and the second difference to the remaining key generation center nodes respectively; determine a user private key fragment based on the first difference, the second difference, the second node's random number, the third node's random number, and the fourth node's random number, and broadcast the user private key fragment to the remaining key generation center nodes.
[0253] In one embodiment, the target key generation center node is further configured to sum the user private key fragments and the user private key fragments received from the other key generation center nodes to obtain a user private key fragment sum value; determine a third user value based on a first node random number and a first user value, and broadcast the third user value to the other key generation center nodes; sum the third user value and the third user values received from the other key generation center nodes to obtain a third user value sum value; and use the ratio of the third user value sum value to the user private key fragment sum value as a preliminary user private key.
[0254] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0255] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0256] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0257] Those skilled in the art will readily understand 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 within the scope of protection of the present invention.
Claims
1. A method of providing a blockchain user-friendly address and public key, the method comprising: The method comprises the following steps: A target key generation center node in a blockchain system receives a user private key signing request sent by a resource sending client, the user private key signing request comprising a user public key and a user random number, the user public key being a user identifier of a user to which the resource sending client belongs; The target key generation center node generates a master private key shard, which is an integer; A second user value is determined according to the master private key shard and the user public key; A first difference value is determined based on a first node random number and a second node random number; A second difference value is determined based on the second user value and a third node random number; The first difference value and the second difference value are broadcast to the remaining key generation center nodes in the blockchain system respectively; A user private key shard is determined based on the first difference value, the second difference value, the second node random number, the third node random number and a fourth node random number, and the user private key shard is broadcast to the remaining key generation center nodes; the user private key shard and a user private key shard received from the remaining key generation center nodes are summed to obtain a user private key shard sum value; a third user value is determined according to the first node random number and a first user value, and the third user value is broadcast to the remaining key generation center nodes; The third user value and the third user value received from the remaining key generation center nodes are summed to obtain a third user value sum value; a ratio of the third user value sum value to the user private key shard sum value is taken as a preliminary user private key, and the preliminary user private key is sent to the resource sending client; The target key generation center node obtains a master private key shard and a system parameter of the blockchain system, calculates a product of the master private key shard and the system parameter, obtains a master public key shard corresponding to the master private key shard, and obtains a master public key based on the master public key shard; The master public key is sent to the resource sending client; The resource sending client sends a blockchain resource to a resource receiving client, and generates a blockchain resource transfer information, wherein a blockchain address of the resource receiving client is a user identifier of a user to which the resource receiving client belongs, and a blockchain address of the resource sending client is a user identifier of a user to which the resource sending client belongs; The resource sending client signs a target user private key according to the preliminary user private key and the user random number; the master public key and the target user private key are used to sign the blockchain resource transfer information to obtain encrypted resource transfer information, and the encrypted resource transfer information is sent to the target key generation center node; The target key generation center node verifies the encrypted resource transfer information according to the user public key, and records the blockchain resource transfer information that passes the verification.
2. The method of claim 1, wherein, The method for obtaining the master public key based on the master public key shard comprises the following steps: The target key generation center node broadcasts the master public key shard to the rest of the key generation center nodes in the blockchain system; and the master public key shard and the master public key shard received from the rest of the key generation center nodes are summed to obtain a master public key.
3. The method of claim 1, wherein, In a case where all the key generation center nodes in the blockchain system are online, the master private key shard is generated, including: generating a random integer, and taking the random integer as the master private key shard.
4. The method of claim 1, wherein, In a case where part of the key generation center nodes in the blockchain system are online and the target key generation center node is online, the master private key shard is generated, including: generating a random polynomial; based on the random polynomial, calculating a target function value, and broadcasting an associated function value in the target function value to the rest of the key generation center nodes; determining a target sum value according to a self function value in the target function value and the associated function value of the rest of the key generation center nodes; determining the master private key shard according to an independent variable of the random polynomial and the target sum value.
5. The method of claim 1, wherein, The target key generation center node is determined through at least one of updating a blockchain, a smart contract or cross-chain compatibility.
6. A system for providing a blockchain user-friendly address and a public key, the system comprising: including: a target key generation center node in a blockchain system, configured to receive a user private key issuance request sent by a resource sending client, the user private key issuance request including a user public key and a user random number, the user public key being a user identifier of a user to which the resource sending client belongs; the target key generation center node is further configured to generate a master private key shard, the master private key shard being an integer; determining a second user value according to the master private key shard and the user public key; determining a first difference value based on the first node random number and the second node random number; determining a second difference value based on the second user value and a third node random number; broadcasting the first difference value and the second difference value to the rest of the key generation center nodes in the blockchain system, respectively; determining a user private key shard based on the first difference value, the second difference value, the second node random number, the third node random number and a fourth node random number, and broadcasting the user private key shard to the rest of the key generation center nodes, summing the user private key shard and the user private key shard received from the rest of the key generation center nodes to obtain a user private key shard and value; determining a third user value according to the first node random number and the first user value, and broadcasting the third user value to the rest of the key generation center nodes; summing the third user value and the third user value received from the rest of the key generation center nodes to obtain a third user value and value; taking the ratio of the third user value and value to the user private key shard and value as a preliminary user private key, and sending the preliminary user private key to the resource sending client; the target key generation center node is further configured to obtain a master private key shard and a system parameter of the blockchain system, calculate a product of the master private key shard and the system parameter, obtain a master public key shard corresponding to the master private key shard, and obtain a master public key based on the master public key shard; sending the main public key to the resource sending client; the resource sending client is configured to send a blockchain resource to a resource receiving client, and generate blockchain resource transfer information, wherein the blockchain address of the resource receiving client is a user identifier of a user to which the resource receiving client belongs, and the blockchain address of the resource sending client is a user identifier of a user to which the resource sending client belongs; the resource sending client is further configured to issue a target user private key according to the prepared user private key and the user random number, sign the blockchain resource transfer information using the main public key and the target user private key to obtain encrypted resource transfer information, and send the encrypted resource transfer information to the target key generation center node; the target key generation center is further configured to verify the encrypted resource transfer information according to the user public key, and record the blockchain resource transfer information that passes the verification.
Citation Information
Patent Citations
Secret key generation method and device, storage medium and electronic equipment
CN112291059A
SM9 algorithm certificateless mechanism signature key generation method and device and storage medium
CN112511566A
Data protection method, device and system, electronic device and storage medium
CN113159766A