An anonymous endorsement method based on a national secret threshold ring signature algorithm
By using the national cryptographic threshold ring signature algorithm and smart contract control, a new endorsement strategy was designed to solve the problem of identity leakage of endorsement nodes in the blockchain system, realize the anonymization and efficient execution of endorsement nodes, and improve the security and efficiency of the blockchain system.
Patent Information
- Application Number
- CN202310746354.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-06-21
AI Technical Summary
In blockchain systems, the identities of endorsing nodes are easily leaked, leading to internal conflicts and attacks. Existing technologies struggle to effectively anonymize endorsing nodes.
A new endorsement strategy is designed using the threshold ring signature algorithm based on Chinese cryptography and key generation via PKG. This strategy requires at least t endorsement nodes to participate in the endorsement without revealing their identities. The signature generation and verification process is controlled by smart contracts, thus hiding the identities of the endorsement nodes.
This ensures the security and efficient execution of endorsement nodes, prevents external attacks, and improves the security and efficiency of the blockchain system.
Smart Images

Figure CN117792669B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, specifically to an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm. Background Technology
[0002] The enthusiasm for cryptocurrencies has brought unprecedented opportunities for the development of blockchain technology, which is gradually being integrated into multiple fields and a wide range of application scenarios. Today, blockchain has steadily expanded from its initial focus on financial transactions and electronic cash to many other areas, such as data storage, healthcare, electronic invoicing, logistics supply chains, and the Internet of Things. Despite the enormous development opportunities presented by blockchain, numerous challenges remain, particularly regarding security.
[0003] The most prominent feature of blockchain technology is decentralization. This allows each node in a blockchain system to negotiate data in chronological order within a mutually distrustful network environment, maintaining the normal operation of the blockchain system through collaboration. Additionally, blockchain technology possesses characteristics such as traceability, scalability, and immutability. Hyperledger Fabric is a representative distributed ledger system. Hyperledger is a blockchain development platform project sponsored by the Linux Foundation. The Fabric series is the core project within this blockchain development platform, providing a complete consortium blockchain development application platform. Currently, the project mainly includes Fabric, Fabric-SDK, and Fabric-CA. Among these components, Fabric is the foundation and core component of the entire consortium blockchain platform, providing core blockchain network functions, including deploying blockchain network nodes, building smart contract execution environments, initiating transactions, and maintaining the distributed ledger.
[0004] Fabric's complete transaction process comprises three phases: endorsement, ordering, and verification. Because the identities of endorser nodes in the original Fabric system were public, and these nodes processed sensitive transaction data during Fabric transactions, they were easy targets for attackers. Fabric, based on cryptographic techniques, implements a parallel "execution-ordering-verification" transaction model to ensure the security and immutability of Fabric platform data. Clients invoke smart contracts to execute transactions. Fabric requires transactions to be endorsed or approved by a special group of members called endorser nodes before verification.
[0005] To endorse a transaction, endorsing nodes disclose their identity during the endorsement process for subsequent verification of the endorsement signature's validity. During verification, each peer node in the network verifies the transaction result and endorsement. For some transactions, disagreements may arise among endorsing nodes, and revealing the identity of endorsing nodes could lead to internal system conflicts. Disclosing the identities and organizations of endorsing nodes involved in the endorsement process in endorsement policies and transaction response endorsements could lead to spam attacks and DDoS attacks against client nodes and endorsing nodes. Although machine learning-based methods can detect and mitigate DDoS attacks, the long-term solution remains anonymizing endorsing nodes. Summary of the Invention
[0006] To address the above issues and in accordance with the national cryptographic algorithm specifications for blockchain development issued by the Chinese government, this invention proposes an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm, which provides anonymity through ring signatures derived from digital signatures. This algorithm utilizes a key generation center (PKG) to generate keys, and then designs a new endorsement strategy based on this method. This strategy is integrated into the Fabric system, and smart contracts control the signature generation and verification process. This method requires at least t out of n endorsing nodes to participate in the endorsement without explicitly revealing their identities, thereby ensuring that external attacks cannot maliciously damage the endorsing nodes. This invention provides an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm.
[0007] The present invention provides an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm, which is implemented according to the following steps:
[0008] Step 1: The client first submits a transaction proposal to the endorsing node;
[0009] Step 2: After receiving the transaction proposal, the endorsing node first verifies the signature of the client. After successful verification, it calls the smart contract to simulate the execution of the transaction. Then, the endorsing node endorses and signs the simulated execution result and returns the anonymous endorsement result to the client.
[0010] Step 3: The client collects the endorsement results returned by the endorsement nodes;
[0011] Step 4: The client submits the endorsement result and the client's signature to the sorting node. After the sorting node completes the client signature verification, it sorts the transactions and divides them into different blocks to distribute to the accounting nodes.
[0012] Step 5: The ledger node uses a signature verification algorithm to verify the endorsement result. After successful verification, it executes the transaction in the block and updates the ledger.
[0013] Step 1 is implemented in the following steps:
[0014] The client creates a message that sends a PROPOSE transaction proposal message to a group of endorsing nodes. The PROPOSE transaction proposal message contains the client's signature clientSig and the endorsement policy id specified by the chaincode.
[0015] Step 2 is implemented in the following steps:
[0016] Step 2.1: After receiving the PROPOSE transaction proposal message sent by the client, the endorsing node first verifies the client's signature clientSig.
[0017] Step 2.2: Using the chaincode ID from the transaction information, call the relevant chaincode to simulate transaction execution. The simulated transaction execution result is recorded in the read set (readset) and write set (writeset). Define the read set (readset) and write set (writeset) as res. i ;
[0018] Step 2.3: The endorsement node internally forwards the tran-proposal transaction request to the corresponding endorsement logic of the endorsement node;
[0019] Step 2.4: After receiving the transaction request, the endorsement logic generates the signature epSig of the endorsement node using the threshold ring signature generation algorithm based on the national cryptographic algorithm.
[0020] Step 2.5: The endorsing node returns the message <TRANSACTION-ENDORSED,tid,tran-proposal,epSig> to the client. This message indicates that the endorsing node has verified the transaction and confirmed that the transaction is valid. The message contains the endorsement signature of the endorsing node.
[0021] Step 3 is implemented in the following steps:
[0022] The client collects the endorsement results returned by the endorsement nodes and adds them to set F. When enough messages that satisfy the anonymous endorsement policy have been collected, the client considers the transaction to have been endorsed and signed, and begins to prepare to send set F to the ordering node. If the message collection time exceeds the endorsement time limit T, the client will abandon the transaction and choose to retry later.
[0023] Step 4 is implemented in the following steps:
[0024] Step 4.1: The client sends set F to the sorting node, where set F includes the endorsement results of the endorsement nodes and the client's signature clientSig;
[0025] Step 4.2: After receiving the message sent by the client, the sorting node first verifies the client's signature clientSig from step 4.1. After the verification is successful, the transaction is sorted, and then the transaction is divided into different blocks and distributed to the accounting nodes.
[0026] Step 5 is implemented in the following steps:
[0027] Step 5.1: The accounting node checks whether the endorsement node meets the endorsement policy.
[0028] Step 5.2: After the check in Step 5.1, the endorsement signature result is verified using the threshold ring signature generation algorithm based on the national cryptographic algorithm in Step 2.4.
[0029] Step 5.3: If the verification is successful, execute the transactions in the block and update the ledger status; otherwise, end the process.
[0030] Preferably, the threshold ring signature generation algorithm based on the national cryptographic algorithm in step 2.4 is specifically as follows:
[0031] (1) First, assume that there are n endorsement nodes in the Fabric consortium blockchain, forming an endorsement node set I = {epID1, epID2, ..., epID}. n}, epID i This represents the identifier of the i-th endorsement node. Then, a PKG public key generator is constructed in the Fabric consortium blockchain to calculate keys for the members in the ring.
[0032] (2) Obtain the values of n and t (t < n), where n is the number of nodes and t is the threshold value. Let the system safety parameter be λ, and q be a large prime number with q > 2. 256 F q For a finite field, E(F) q ) is defined in F q Elliptic curve on G T For E(F) q Let G be the additive cyclic group formed by points on the x-axis. T The base point, N, is the order of the base point; then, a request is made to construct the ring signature;
[0033] (3) The PKG public key generator constructs a polynomial:
[0034] f(x) = a0 + a1x + a2x 2 +…+a t-1 x t-1 modq (2-1)
[0035] in, f(0) = a0 is the security value, f(x) is the threshold function, and x is the encryption factor;
[0036] (4) Using f(0) as the system master private key, calculate and publish the public key P. pub = f(0)·G, where the definition of G has been given in step (2);
[0037] (5) The PKG public key generator calculates h i =H(epID) i ||f(i)), where i∈{1,…n}, and epID i Let H represent the i-th endorsement node, and H represent the hash function for epID. i The result of ||f(i) is hashed, and the result is assigned to h. i h i epID represents the hash value of the i-th endorser node calculated by PKG when generating the public key. i The definition of f(i) has been given in step (1), and the definition of f(i) has been given in step (3);
[0038] (6) The PKG public key generator calculates the private key S for each node. i =f(i)h i Where i∈{1,…n}, the PKG public key generator calculates the public key P for each node. i = f(i)G, where i∈{1,…n}, and the public-private key pair {P} corresponding to each node is transmitted through a secure channel. i ,S i} is sent to the corresponding node i, where h i The definition step (5) has been given;
[0039] (7) Before the endorsing node obtains the corresponding private key, each endorsing node I k ={epID1, epID2,…, epID n All of these can be used to check formulas. Whether this holds true, where the Lagrange coefficient is L. i ,formula As shown, i and j represent the indices of the i-th and j-th endorsement nodes, respectively, where there are t endorsement nodes participating in the signing;
[0040] (8) Calculate the message digest e = H(m), perform hash processing on the input message m, and assign the processing result to e, where H represents the hash function;
[0041] (9) Signer's epID α Obtain the signer's epID from the PKG public key generator. α Public key P α =k αIn the SM2 algorithm, the public key is a point on the elliptic curve, so the public key P... α =k α ·G=(x α ,y α Then calculate r. α =(e+x) α mod q, if r α =0, then select again. Where k α x is the random number selected for calculating the public key. α and y α Let r be the x-coordinate and y-coordinate of the elliptic curve, respectively. α Represents a random number;
[0042] (10) Endorsement Node epID i Randomly select a number c i , Where i∈{1,…n} and i≠α. This represents the set of non-zero elements modulo q, and the signer's epID. α The public keys of the endorsement nodes participating in the signing are combined to obtain a new public key P, as shown in the formula. As shown, x p and y p Given the x and y coordinates of the elliptic curve, generate a random number r. P Formula r P =(e+x) P mod q, x p Let x be the x-coordinate of the elliptic curve, then calculate and expose it within the ring member. and Where k α The meaning of step (9) has been given, h α The meaning of step (5) has been given, x α f(x) represents the x-coordinate of the elliptic curve. α The meaning of step (3) has been given, L α The meaning of step (7) has been given, e represents a random value in the signature process, c α The signature value calculated for the α-th endorsement node, D α S represents the public key corresponding to the signature value calculated by the α-th endorser node. α The meaning of step (6) has been given. The x and y coordinates represent the public key corresponding to the signature value calculated by the α-th endorser node;
[0043] (11) Finally, output the signature δ α =(e,D α ,P α,P,c1,…,c n The ledger node receives the signature δ from the endorsing node. j =(e,D j ,P j ,P,c1,…,c n (j∈t), through The conclusion is D j 、e,D α ,P,c1,…,c n The meaning of step (10) has been given, P α Represents the public key of the α-th endorser node, used for verification. If both sides of the equation are equal, the signature is valid; if they are not equal, the signature is invalid.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0045] This invention presents an anonymous endorsement method based on a national cryptographic threshold ring signature algorithm, aiming to address the issue of easily leaked endorser identities during Fabric transactions. To further improve its efficiency and usability within the Fabric system, a threshold ring signature method based on a national cryptographic algorithm is designed with a threshold value of t. A new endorsement strategy is then designed based on this method and integrated into the Fabric system. This method requires at least t of the n endorsing nodes to participate in the endorsement without explicitly revealing their identities. Endorsing nodes sign the transaction endorsement result using the threshold ring signature algorithm based on national cryptographic algorithms. When verifying the signature, the accounting node no longer directly checks the endorser's identity but instead uses the signature verification algorithm of this method, thereby hiding the endorser's identity, ensuring the security of the endorsing nodes, and achieving high execution efficiency. Attached Figure Description
[0046] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0047] Figure 1 This is an architecture diagram of the anonymous endorsement method based on the national cryptographic algorithm in the anonymous endorsement method based on the national cryptographic threshold ring signature algorithm of the present invention;
[0048] Figure 2 This is a flowchart of the signature construction process in an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm of the present invention.
[0049] Figure 3 This is a flowchart of a Fabric transaction process for adding an anonymous endorsement method to an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm of the present invention. Detailed Implementation
[0050] The following illustrations disclose several embodiments of the present invention. For clarity, many physical details will be described in the following description. However, it should be understood that these physical details are not intended to limit the invention. That is, in some embodiments of the invention, these physical details are not essential. Furthermore, for the sake of simplicity, some conventional structures and components will be shown in the illustrations in a simple schematic manner.
[0051] Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0052] like Figure 1-3 This invention provides an anonymous endorsement method based on the national cryptographic threshold ring signature algorithm, such as... Figure 3 As shown, please follow these steps:
[0053] Step 1: The client first submits a transaction proposal to the endorsing node; this is implemented according to the following steps:
[0054] The client creates a message that sends a PROPOSE transaction proposal message to a group of endorsing nodes. The PROPOSE transaction proposal message contains the client's signature clientSig and the endorsement policy id specified by the chaincode.
[0055] Step 2: After receiving the transaction proposal, the endorsing node first verifies the client's signature. If verification is successful, it calls the smart contract to simulate the transaction execution. Then, the endorsing node endorses and signs the simulated execution result and returns the anonymous endorsement result to the client. This is implemented in the following steps:
[0056] Step 2.1: After receiving the PROPOSE transaction proposal message sent by the client, the endorsing node first verifies the client's signature clientSig.
[0057] Step 2.2: Using the chaincode ID from the transaction information, call the relevant chaincode to simulate transaction execution. The simulated transaction execution result is recorded in the read set (readset) and write set (writeset). Define the read set (readset) and write set (writeset) as res. i ;
[0058] Step 2.3: The endorsement node internally forwards the tran-proposal transaction request to the corresponding endorsement logic of the endorsement node;
[0059] Step 2.4: After receiving the transaction request, the endorsement logic generates the signature epSig of the endorsement node using the threshold ring signature generation algorithm based on the national cryptographic algorithm.
[0060] Step 2.5: The endorsing node returns the message <TRANSACTION-ENDORSED,tid,tran-proposal,epSig> to the client. This message indicates that the endorsing node has verified the transaction and confirmed that the transaction is valid. The message contains the endorsement signature of the endorsing node.
[0061] The threshold ring signature generation algorithm based on the national cryptographic algorithm in step 2.4 is as follows: Figure 2 As shown, specifically:
[0062] (1) First, assume that there are n endorsement nodes in the Fabric consortium blockchain, forming an endorsement node set I = {epID1, epID2, ..., epID}. n}, epID i This represents the identifier of the i-th endorsement node. Then, a PKG public key generator is constructed in the Fabric consortium blockchain to calculate keys for the members in the ring.
[0063] (2) Obtain the values of n and t (t < n), where n is the number of nodes and t is the threshold value. Let the system safety parameter be λ, and q be a large prime number with q > 2. 256 F q For a finite field, E(F) q ) is defined in F q Elliptic curve on G T For E(F) q Let G be the additive cyclic group formed by points on the x-axis. T The base point, N, is the order of the base point; then, a request is made to construct the ring signature;
[0064] (3) The PKG public key generator constructs a polynomial:
[0065] f(x) = a0 + a1x + a2x 2 +…+a t-1 x t-1 modq (2-1)
[0066] in, f(0) = a0 is the security value, f(x) is the threshold function, and x is the encryption factor;
[0067] (4) Using f(0) as the system master private key, calculate and publish the public key P. pub = f(0)·G, where the definition of G has been given in step (2);
[0068] (5) The PKG public key generator calculates hi =H(epID) i ||f(i)), where i∈{1,…n}, and epID i Let H represent the i-th endorsement node, and H represent the hash function for epID. i The result of ||f(i) is hashed, and the result is assigned to h. i h i epID represents the hash value of the i-th endorser node calculated by PKG when generating the public key. i The definition of f(i) has been given in step (1), and the definition of f(i) has been given in step (3);
[0069] (6) The PKG public key generator calculates the private key S for each node. i =f(i)h i Where i∈{1,…n}, the PKG public key generator calculates the public key P for each node. i = f(i)G, where i∈{1,…n}, and the public-private key pair {P} corresponding to each node is transmitted through a secure channel. i ,S i} is sent to the corresponding node i, where h i The definition step (5) has been given;
[0070] (7) Before the endorsing node obtains the corresponding private key, each endorsing node I k ={epID1, epID2,…, epID n All of these can be used to check formulas. Whether this holds true, where the Lagrange coefficient is L. i , as in the formula As shown, i and j represent the indices of the i-th and j-th endorsement nodes, respectively, where there are t endorsement nodes participating in the signing;
[0071] (8) Calculate the message digest e = H(m), perform hash processing on the input message m, and assign the processing result to e, where H represents the hash function;
[0072] (9) Signer's epID α Obtain the signer's epID from the PKG public key generator. α Public key P α =k α In the SM2 algorithm, the public key is a point on the elliptic curve, so the public key P... α =k α ·G=(x α ,y α Then calculate r. α =(e+x) α mod q, if r α=0, then select again. Where k α x is the random number selected for calculating the public key. α and y α Let r be the x-coordinate and y-coordinate of the elliptic curve, respectively. α Represents a random number;
[0073] (10) Endorsement Node epID i Randomly select a number c i , Where i∈{1,…n} and i≠α. This represents the set of non-zero elements modulo q, and the signer's epID. α The public keys of the endorsement nodes participating in the signing are combined to obtain a new public key P, as shown in the formula. As shown, x p and y p Given the x and y coordinates of the elliptic curve, generate a random number r. P , such as formula r P =(e+x) P As shown in mod q, x p Let x be the x-coordinate of the elliptic curve, then calculate and expose it within the ring member. and, Where k α The meaning of step (9) has been given, h α The meaning of step (5) has been given, x α f(x) represents the x-coordinate of the elliptic curve. α The meaning of step (3) has been given, L α The meaning of step (7) has been given, e represents a random value in the signature process, c α The signature value calculated for the α-th endorsement node, D α S represents the public key corresponding to the signature value calculated by the α-th endorser node. α The meaning of step (6) has been given. The x and y coordinates represent the public key corresponding to the signature value calculated by the α-th endorser node;
[0074] (11) Finally, output the signature δ α =(e,D α ,P α ,P,c1,…,c n The ledger node receives the signature δ from the endorsing node. j =(e,D j ,P j ,P,c1,…,c n (j∈t), through The conclusion is D j 、e,D α ,P,c1,…,c n The meaning of step (10) has been given, P α Represents the public key of the α-th endorser node, used for verification. If both sides of the equation are equal, the signature is valid; if they are not equal, the signature is invalid.
[0075] Step 3: The client collects the endorsement results returned by the endorsement nodes; this is implemented according to the following steps:
[0076] The client collects the endorsement results returned by the endorsement nodes and adds them to set F. When enough messages that satisfy the anonymous endorsement policy have been collected, the client considers the transaction to have been endorsed and signed, and begins to prepare to send set F to the ordering node. If the message collection time exceeds the endorsement time limit T, the client will abandon the transaction and choose to retry later.
[0077] Step 4: The client submits the endorsement result and its signature to the sorting node. After verifying the client's signature, the sorting node sorts the transactions and divides them into different blocks, which are then distributed to the accounting nodes. This is implemented in the following steps:
[0078] Step 4.1: The client sends set F to the sorting node, where set F includes the endorsement results of the endorsement nodes and the client's signature clientSig;
[0079] Step 4.2: After receiving the message sent by the client, the sorting node first verifies the client's signature clientSig from step 4.1. After the verification is successful, the transaction is sorted, and then the transaction is divided into different blocks and distributed to the accounting nodes.
[0080] Step 5: The ledger node verifies the endorsement result using a signature verification algorithm. Once verification is successful, the transaction in the block is executed, and the ledger is updated. This is implemented specifically according to the following steps:
[0081] Step 5.1: The accounting node checks whether the endorsement node meets the endorsement policy.
[0082] Step 5.2: After the check in Step 5.1, the endorsement signature result is verified using the threshold ring signature generation algorithm based on the national cryptographic algorithm in Step 2.4.
[0083] Step 5.3: If the verification is successful, execute the transactions in the block and update the ledger status; otherwise, end the process.
[0084] The following is a security and efficiency analysis of the anonymous endorsement method based on the national cryptographic threshold ring signature algorithm of this invention:
[0085] (1) Security Analysis
[0086] Correctness: When the signer ID j The signature δ is generated using the threshold ring signature generation algorithm based on Chinese cryptographic algorithms described in this method. j If the signature δ j If the signature verification algorithm of this method can be used for confirmation, then it proves that this method satisfies the correctness requirement.
[0087] Proof: Because there is P α =k α ·G,S α =f(x) α )h α Therefore, we can conclude that:
[0088]
[0089]
[0090]
[0091] Therefore P α =D α ,so
[0092] And because r α =(e+x) α )modq, so
[0093] Therefore, the signature verification algorithm in this method satisfies the correctness requirement.
[0094] Unconditional anonymity: All elements in the signature generated by this algorithm are public elements; therefore, outsiders cannot verify the signer's identity based on the signature content. The elements involved in the signature verification phase are also public elements, making it impossible for outsiders to establish the signer's signature D. j The hash result h of the endorsement node ID j When communicating with each other, the signer's identity is hidden. Even if the signer's identity information is leaked, it is impossible to determine which signer it is. If you want to use the ring member ID... j Signature δ j c in j and D j Reverse the ring member identity epID j It requires calculation and r P =(e+x) P )modq reversed to get h jSuccess is very difficult. Therefore, this method satisfies unconditional anonymity.
[0095] Unforgeability: The algorithm used in this method is a threshold ring signature algorithm designed based on the national cryptographic algorithm. The difficulty for an attacker to calculate the signer's private key from the signer's public key and system parameters is equivalent to the difficulty of solving the elliptic curve discrete logarithm problem. For example, assuming that attacker B can successfully forge the threshold ring signature based on the national cryptographic algorithm of this method with a non-negligible probability, then an algorithm Q is needed that can solve the ECDLP with a non-negligible probability. However, the ECDLP is a well-known difficult problem, and the probability of successfully solving the ECDLP problem is negligible. Therefore, this method is unforgeable in stochastic prediction models.
[0096] (2) Efficiency Analysis
[0097] To verify the effectiveness of the proposed anonymous endorsement method based on the national cryptographic threshold ring signature algorithm, the impact of integrating this method on the transaction efficiency of the Fabric system after the national cryptographic extension is tested.
[0098] The Fabric system with national cryptographic standard extension used in this experiment comprises two organizations, each containing four peer nodes, including ledger nodes and endorsement nodes. Through the collaborative efforts of these eight nodes, transaction endorsement is ultimately completed. The data sample in this experiment contains 275 transaction records, divided into 10 groups of five increasing numbers each. Three rounds of testing were conducted on each group of data in both the national cryptographic standard extended Fabric system and the national cryptographic standard extended Fabric system with added anonymous endorsement. After removing the minimum and maximum error terms from the experimental results, the average transaction time for each group of data was recorded. The experimental test results are shown in Table 1 (in the table, gmFabric refers to the national cryptographic standard extended Fabric).
[0099] Table 1. Comparison of transaction execution time of Fabric system before and after adding anonymous endorsement method and after national cryptographic expansion.
[0100]
[0101] As can be seen from Table 1, the transaction time of gmFabric before and after using anonymous endorsement increases with the increase of the number of transactions. The average transaction time of gmFabric before and after using the anonymous endorsement method is not much different, indicating that this method has little impact on the execution efficiency of transactions in the Fabric system after the national cryptographic extension. Therefore, after applying this method to the Fabric system after the national cryptographic extension, it can not only hide the identity of the endorser and ensure the security of the endorser node during the transaction process, but also has high execution efficiency.
[0102] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.
Claims
1. An anonymous endorsement method based on a national secret threshold ring signature algorithm, characterized in that, The specific steps are as follows: Step 1: The client first submits a transaction proposal to the endorsing node; Step 2: After receiving the transaction proposal, the endorsing node first verifies the signature of the client. After successful verification, it calls the smart contract to simulate the execution of the transaction. Then, the endorsing node endorses and signs the simulated execution result and returns the anonymous endorsement result to the client. Step 3: The client collects the endorsement results returned by the endorsement nodes; Step 4: The client submits the endorsement result and the client's signature to the sorting node. After the sorting node completes the client signature verification, it sorts the transactions and divides them into different blocks to distribute to the accounting nodes. Step 5: The ledger node uses a signature verification algorithm to verify the endorsement result. After successful verification, it executes the transaction in the block and updates the ledger. Step 1 is implemented in the following steps: The client creates a message, The transaction proposal message is sent to a group of endorsing nodes, among which, The transaction proposal message contains the client's signature. Endorsement policy specified by chaincode ; Step 2 is implemented in the following steps: Step 2.1, the endorsing node receives the transaction proposal message sent by the client, and first verifies the signature of the client in the transaction proposal message. Step 2.2, if the signature is verified, the endorsing node will endorse the transaction proposal message. Step 2.3, the endorsing node sends the endorsed transaction proposal message to the client. Step 2.2, call the chain code in the transaction information , simulate the execution of the transaction, and record the simulation transaction execution result in the read collection and the write collection , define the read collection and the write collection as ; Step 2.3, endorsement node internal forwarding transaction request to the endorsement logic corresponding to the endorsing node; Step 2.4, after the endorsement logic accepts the transaction request, the signature of the endorsement node is generated by using the threshold ring signature generation algorithm based on the national secret algorithm ; Step 2.5, the endorsement node will The message is returned to the client, indicating that the endorsing node has verified the transaction and confirmed that the transaction is valid. The message contains the endorsement signature of the endorsing node. Step 3 is implemented in the following steps: The client collects the endorsement results returned by the endorsement nodes and adds them to set F. When enough messages that satisfy the anonymous endorsement policy have been collected, the client considers the transaction to have been endorsed and signed, and begins to prepare to send set F to the ordering node. If the message collection time exceeds the endorsement time limit T, the client will abandon the transaction and choose to retry later. Step 4 is implemented in the following steps: Step 4.1: The client sends set F to the sorting node, where set F includes the endorsement results of the endorsement nodes and the client's signature. ; Step 4.2: After receiving the message sent by the client, the sorting node first checks the client's signature from Step 4.
1. The transactions are verified, sorted after verification, and then divided into different blocks and distributed to the accounting nodes. Step 5 is implemented in the following steps: Step 5.1: The accounting node checks whether the endorsement node meets the endorsement policy. Step 5.2: After the check in Step 5.1, the endorsement signature result is verified using the threshold ring signature generation algorithm based on the national cryptographic algorithm in Step 2.
4. Step 5.3: If the verification is successful, execute the transactions in the block and update the ledger status; otherwise, end the process.
2. The anonymous endorsement method based on the national cryptographic threshold ring signature algorithm according to claim 1, characterized in that: The threshold ring signature generation algorithm based on the national cryptographic algorithm in step 2.4 is as follows: (1) First, assume that the Fabric consortium blockchain has Each endorsement node constitutes an endorsement node set. , This represents the identifier of the i-th endorsement node. Then, a PKG public key generator is constructed in the Fabric consortium blockchain to calculate keys for the members in the ring. (2) Obtain and Size Where n is the number of nodes and t is the threshold value, let the system security parameters be... , It is a large prime number, and , For a finite field, It is defined in Elliptic curve on, for The addition cyclic group formed by the points on the top, For addition cyclic group The basis, It is the order of the base point; then, a request is made to construct the ring signature; (3) The PKG public key generator constructs a polynomial: (2-1) in, , As a safety value, For threshold functions, Encryption factor; (4) Put As the system's master private key, calculate and publish the public key. The definition of G has been given in step (2); (5) PKG public key generator calculation ,in ,in Let H represent the i-th endorsement node, and H represent the hash function. Perform hash processing and assign the result to... , This represents the hash value of the i-th endorser node calculated by PKG when generating the public key. The definition has been given in step (1). The definition has been given in step (3); (6) The PKG public key generator calculates the private key of each node. ,in The PKG public key generator calculates the public key for each node. ,in The public and private key pairs corresponding to each node are transmitted through a secure channel. Send to the corresponding node ,in The definition step (5) has been given; (7) Before obtaining the corresponding private key, each endorser node... Check all formulas Whether this is true or not, where the Lagrange coefficient is... ,formula As shown, i and j represent the indices of the i-th and j-th endorser nodes, respectively. The endorser nodes participating in the signing are: indivual; (8) Calculate message digest The input message m is hashed, and the result is assigned to e, where H represents the hash function. (9) Signatory Obtain the signer from the PKG public key generator. Public Key In the Chinese national cryptographic algorithm SM2, the public key is a point on an elliptic curve, therefore the public key... Then calculate ,like Then select again. ,in The random number selected for calculating the public key. and These are the x and y coordinates of the elliptic curve, respectively. Represents a random number; (10) Endorsement Node Randomly select a number , ,in and , Represents the set of non-zero elements modulo q, signer The public keys of the endorsing nodes that participated in the signing are combined to obtain a new public key. , is the formula As shown, and Given the x and y coordinates of the elliptic curve, generate random numbers. ,formula , Let x be the x-coordinate of the elliptic curve, then calculate and expose it within the ring member. and ,in The meaning of step (9) has been given. The meaning of step (5) has been given. Represents the x-coordinate of the elliptic curve. The meaning of step (3) has been given. The meaning of step (7) has been given, and e represents a random value in the signature process. For the first The signature value calculated by each endorsing node. Indicates the first The public key corresponding to the signature value calculated by each endorsing node. The meaning of step (6) has been given. Indicates the first The x and y coordinates of the public key corresponding to the signature value calculated by each endorsing node; (11) Finally, output the signature. The accounting node receives the signature from the endorsing node. ,pass The conclusion is , , , The meaning of step (10) has been given. Indicates the first The public key of each endorsing node is used for verification. If both sides of the equation are equal, the signature is valid; if they are not equal, the signature is invalid.
