Cross-alliance node authentication method, device, computer equipment and storage medium

Through the cross-consortium node authentication method, the certificate chain is used to verify the node public key certificate, which solves the data islands and trust islands caused by independence between alliance chains, realizes information transmission and trust transmission between alliance networks, and improves information transmission Efficiency and transaction security.

CN115514504BActive Publication Date: 2024-11-19SF TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110627257.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2024-11-19
Estimated Expiration
2041-06-04

AI Technical Summary

Technical Problem

The independence between different alliance chains leads to data islands and trust islands, hindering the transmission of information between nodes.

Method used

Through the cross-family node authentication method, the preset certificate chain is used to obtain the root certificate of each alliance network, verify the node public key certificate, and realize cross-family node authentication and trust delivery.

Benefits of technology

It realizes mutual authentication between nodes of different alliance networks, improves information transmission efficiency, and enhances the security and reliability of cross-alliance transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514504B_ABST
    Figure CN115514504B_ABST
Patent Text Reader

Abstract

The present application relates to a cross-alliance node authentication method, apparatus, computer equipment and storage medium, the method comprising: receiving a node authentication request sent by a first node in a first alliance network, the node authentication request comprising a first public key certificate corresponding to the first node; obtaining a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain comprising a plurality of blocks, each block comprising a root certificate corresponding to at least one different alliance network; performing certificate verification on the first public key certificate using the first root certificate to obtain a certificate verification result; determining whether the first node is authenticated based on the certificate authentication result, thereby achieving cross-alliance node authentication and cross-alliance trust transfer, and enabling nodes belonging to different alliances to authenticate each other, effectively improving the information transfer efficiency of nodes in different alliances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a cross-alliance node authentication method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of computer technology and cryptography, blockchain has become increasingly widely used due to its characteristics of decentralization, strong security consensus mechanism, openness, transparency and immutability. As one of the blockchains, alliance chain has the characteristics of high performance, high security and privacy, and easy supervision, making alliance chain gradually become the main force in the development of blockchain industry.

[0003] In the existing technology, different alliance chains are independent of each other. After authentication, nodes can join the corresponding alliance chain and obtain information from the alliance chain to which the node belongs. However, the independence between alliances makes each alliance an isolated data island and trust island, which hinders the information transmission of nodes in different alliances. Summary of the invention

[0004] Based on this, it is necessary to provide a cross-alliance node authentication method, device, computer equipment and storage medium to address the above technical issues.

[0005] A cross-alliance node authentication method is applied to a second node in a second alliance network, the method comprising:

[0006] receiving a node authentication request sent by a first node in a first alliance network, where the node authentication request includes a first public key certificate corresponding to the first node;

[0007] Obtaining a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0008] Using the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result;

[0009] According to the certificate authentication result, it is determined whether the first node is authenticated.

[0010] In one embodiment, determining whether the first node is authenticated according to the certificate verification result includes:

[0011] When the certificate verification result is verification passed, obtaining a first digital signature corresponding to the first node from the node authentication request;

[0012] Performing node verification on the first node according to the first digital signature and the first public key certificate;

[0013] When the node verification result is verification passed, the first node is authenticated successfully.

[0014] In one embodiment, performing node verification on the first node according to the first digital signature and the first public key certificate includes:

[0015] Obtaining a first public key corresponding to the first node from the first public key certificate, and using the first public key to decrypt the first digital signature to obtain a first random number corresponding to the first node;

[0016] Obtain a second random number, and use the private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature;

[0017] sending the second digital signature to the first node, and receiving a third digital signature returned by the first node for the second digital signature; the first node is configured to decrypt the received second digital signature to obtain a first decryption result, and encrypt the decryption result using a private key corresponding to the first node to obtain the third digital signature;

[0018] Perform node verification on the first node according to the third digital signature and the first public key.

[0019] In one embodiment, sending the second digital signature to the first node includes:

[0020] Obtaining a second public key certificate corresponding to the second node, and sending the second digital signature and the second public key certificate to the first node;

[0021] The first node is used to obtain a second root certificate corresponding to the second alliance network from the certificate chain, perform certificate verification on the second public key certificate based on the second root certificate, and after the verification passes, obtain a decryption result corresponding to the second digital signature according to the second public key certificate.

[0022] In one embodiment, performing node verification on the first node according to the third digital signature and the first public key includes:

[0023] Decrypting the third digital signature using the first public key to obtain the first decryption result;

[0024] When the first decryption result matches the second random number, it is determined that the node verification result of the first node is verification passed.

[0025] A method for alliance joining authentication, the method comprising:

[0026] Obtain the root certificate corresponding to the candidate alliance network to be joined;

[0027] Determining multiple alliance networks corresponding to the current certificate chain; the certificate chain includes multiple blocks, each block including a root certificate corresponding to at least one different alliance network;

[0028] Sending a certificate authentication request to each of the multiple alliance networks; the certificate authentication request includes the root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network;

[0029] Upon receiving feedback information of certificate authentication passed returned by a target number of alliance networks among the multiple alliance networks, an up-chain operation is performed on the root certificate of the candidate alliance network in the certificate chain.

[0030] In one embodiment, sending a certificate authentication request to each of the plurality of alliance networks includes:

[0031] Obtain block data corresponding to a preset block in the current certificate chain, and obtain a first hash value corresponding to the block data;

[0032] Signing the block data using the private key corresponding to the candidate alliance network to obtain a fourth digital signature;

[0033] generating a certificate authentication request according to the fourth digital signature, the first hash value, and the root certificate of the candidate alliance network;

[0034] Based on a Byzantine fault tolerance algorithm, sending the certificate authentication request to each of the multiple alliance networks;

[0035] Each alliance network among the multiple alliance networks is used to, when receiving the certificate authentication request and agreeing to the candidate alliance network to join, extract the third public key corresponding to the candidate alliance network from the root certificate of the candidate alliance network, use the third public key to decrypt the fourth digital signature to obtain a second decryption result, obtain a second hash value corresponding to the second decryption result, and determine that the certificate authentication of the candidate alliance network is passed when the second hash value matches the first hash value.

[0036] A cross-alliance node authentication device is applied to a second node in a second alliance network, the device comprising:

[0037] a node authentication request receiving module, configured to receive a node authentication request sent by a first node in a first alliance network, wherein the node authentication request includes a first public key certificate corresponding to the first node;

[0038] A first root certificate acquisition module, configured to acquire a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0039] A certificate verification module, used to perform certificate verification on the first public key certificate using the first root certificate to obtain a certificate verification result;

[0040] The node authentication module is used to determine whether the first node is authenticated according to the certificate authentication result.

[0041] An alliance joining authentication device, the device comprising:

[0042] A candidate root certificate acquisition module is used to obtain the root certificate corresponding to the candidate alliance network to be joined;

[0043] A network determination module, used to determine a plurality of alliance networks corresponding to a current certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0044] a certificate authentication request sending module, configured to send a certificate authentication request to each of the multiple alliance networks; the certificate authentication request includes a root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network;

[0045] The chaining module is used to perform a chaining operation on the root certificate of the candidate alliance network in the certificate chain when receiving feedback information of certificate authentication returned by a target number of alliance networks among the multiple alliance networks.

[0046] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0047] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.

[0048] The above-mentioned cross-alliance node authentication method, device, computer equipment and storage medium, when receiving a node authentication request sent by a first node in a first alliance network, the node authentication request includes a first public key certificate corresponding to the first node, and the second node in the second alliance network can obtain the first root certificate corresponding to the first alliance network from the preset certificate chain, and use the first root certificate to verify the first public key certificate to obtain a certificate verification result, and determine whether the first node is authenticated based on the certificate verification result, thereby realizing cross-alliance node authentication and cross-alliance trust transfer, and nodes belonging to different alliances can authenticate each other, effectively improving the information transmission efficiency of nodes in different alliances. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 An application environment diagram of a cross-alliance node authentication method in an embodiment;

[0050] Figure 2 A schematic diagram of a process of a cross-alliance node authentication method in an embodiment;

[0051] Figure 3 is a schematic diagram of a certificate chain in one embodiment;

[0052] Figure 4 A schematic diagram of a flow chart of a method for joining an alliance in an embodiment;

[0053] Figure 5 is a structural block diagram of a cross-alliance node authentication device in one embodiment;

[0054] Figure 6 It is a structural block diagram of a federation joining authentication device in one embodiment;

[0055] Figure 7 is an internal structure diagram of a computer device in one embodiment;

[0056] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] This application provides a cross-alliance node authentication method that can be applied to Figure 1In the application environment shown, the application environment may include multiple alliance networks, such as the first alliance network and the second alliance network; each alliance network may include multiple nodes, multiple nodes in the same alliance network may jointly maintain the alliance chain in the alliance network, multiple nodes in the same alliance network may share data on the alliance chain, and multiple nodes may conduct transactions or communicate with each other. Among them, the nodes in the alliance network may be terminal devices or servers, and the servers may be implemented as independent servers or server clusters consisting of multiple servers.

[0059] In one embodiment, Figure 2 As shown in the figure, a cross-alliance node authentication method is provided, which is applied to Figure 1 The second node in the second alliance network in the example is used for explanation, and the second node may be any node in the second alliance network. Specifically, this embodiment may include the following steps:

[0060] Step 201: receiving a node authentication request sent by a first node in a first alliance network.

[0061] As an example, the first node may be any node in the first alliance network, and the node authentication request may include a first public key certificate corresponding to the first node.

[0062] In actual applications, the first node in the first alliance network and the second node in the second alliance network belong to different alliance networks. When the first node intends to conduct a cross-alliance transaction with the second node, the first node can obtain the first public key certificate corresponding to the first node, generate a node authentication request containing the first public key certificate, and send it to the second node in the second alliance network, so that the second node receives the node authentication request.

[0063] Step 202: Obtain a first root certificate corresponding to the first alliance network from a preset certificate chain.

[0064] The certificate chain includes multiple blocks, each of which may contain at least one different root certificate corresponding to the alliance network, that is, the root certificates contained in each block are different, and each block may contain one or more root certificates.

[0065] In the specific implementation, each alliance network can have a corresponding certificate authority (CA), which can be an authoritative organization responsible for issuing and managing digital certificates. As a trusted third party in electronic transactions, it is responsible for verifying the legitimacy of public keys in the public key system. Among them, each certificate authority can issue a root certificate for the alliance network. The root certificate is associated with the identity information of the certificate authority, and the root certificate can correspond to the alliance network one by one.

[0066] For the root certificates corresponding to multiple alliance networks, in actual applications, the certificate chain can be pre-built, such as Figure 3 As shown in the figure, the certificate chain can contain multiple blocks, and each block can contain at least one root certificate corresponding to the alliance network. As a type of blockchain, the certificate chain has the characteristics of decentralization, immutability, full traceability, traceability, collective maintenance, openness and transparency, etc., making each root certificate on the certificate chain authentic and credible. The alliance networks corresponding to each root certificate on the certificate chain can have a trust relationship with each other.

[0067] After receiving a node authentication request from a first node in a first alliance network, a block corresponding to the first alliance network can be determined from the certificate chain, and a first root certificate corresponding to the first alliance network can be obtained from the block.

[0068] Step 203: Use the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result.

[0069] After obtaining the first root certificate of the first alliance network, the first root certificate can be used to verify the first public key certificate of the first node to obtain the corresponding certificate verification result. Specifically, since the public key certificates corresponding to each node in the first alliance network are issued by the certificate authority corresponding to the first alliance network, and the first root certificate is associated with the identity of the certificate issuing structure, based on this, the first root certificate can be used to verify the legitimacy of the certificate of the first public key certificate.

[0070] Step 204: Determine whether the first node is authenticated based on the certificate verification result.

[0071] After obtaining the certificate verification structure, it can be determined whether the first node is authenticated based on the certificate verification result. Specifically, when the certificate verification result is authentication failure, the first node is not authenticated; if the certificate verification result is authentication success, it can be determined that the public key certificate corresponding to the first node is authenticated, and based on the public key certificate of the first node, it is further determined whether the first node is authenticated.

[0072] In this embodiment, when a node authentication request is received from a first node in a first alliance network, the node authentication request includes a first public key certificate corresponding to the first node, and the second node in the second alliance network can obtain a first root certificate corresponding to the first alliance network from a preset certificate chain, and use the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result, and determine whether the first node is authenticated based on the certificate verification result, thereby realizing cross-alliance node authentication and cross-alliance trust transfer, and nodes belonging to different alliances can authenticate each other, effectively improving the information transmission efficiency of nodes in different alliances.

[0073] In one embodiment, determining whether the first node is authenticated according to the certificate verification result may include the following steps:

[0074] When the certificate verification result is verification passed, obtain the first digital signature corresponding to the first node from the node authentication request; perform node verification on the first node based on the first digital signature and the first public key certificate; when the node verification result is verification passed, the first node is authenticated.

[0075] In a specific implementation, the first node may obtain a random number, and use the private key corresponding to the first node to sign the random number to obtain a first digital signature, and then generate a node authentication request based on the first digital signature and the first public key certificate.

[0076] When the second node verifies the first public key certificate and confirms that the certificate authentication result is authentication passed, it is determined that the first public key certificate provided by the first node is legal. The first digital signature pre-generated by the first node can be obtained from the node authentication request, and the first node can be verified based on the first digital signature and the first public key certificate. When the node verification result is authentication passed, the first node can be authenticated.

[0077] In this embodiment, when the certificate verification result is verification passed, the first digital signature corresponding to the first node can be obtained from the node authentication request, and node verification is performed on the first node based on the first digital signature and the first public key certificate. When the node verification result is verification passed, the first node is authenticated, and node authentication can be performed on nodes in different alliance networks, thereby improving the security and reliability of cross-alliance transactions.

[0078] In one embodiment, performing node verification on the first node according to the first digital signature and the first public key certificate may include:

[0079] Obtain a first public key corresponding to the first node from the first public key certificate, and use the first public key to decrypt the first digital signature to obtain a first random number corresponding to the first node; obtain a second random number, and use the private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature; send the second digital signature to the first node, and receive a third digital signature returned by the first node for the second digital signature; perform node verification on the first node based on the third digital signature and the first public key.

[0080] The first node is used to decrypt the received second digital signature to obtain a first decryption result, and encrypt the decryption result using a private key corresponding to the first node, the third digital signature;

[0081] In actual applications, since the first digital signature is obtained by encrypting a random number using the private key of the first node, and the private key and public key of the first node are paired with each other, the second node can obtain the first public key corresponding to the first node from the first public key certificate, and use the first public key to decrypt the first digital signature. If the decryption is successful and the first random number corresponding to the first node is obtained, it can be determined that the first digital signature is generated by the first node.

[0082] After obtaining the first random number, the second node can further randomly generate a second random number, and use the private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature, and send the second digital signature to the first node.

[0083] After receiving the second digital signature, the first node can decrypt the second digital signature to obtain the corresponding first decryption result. After obtaining the first decryption result, the first node can encrypt the decryption result using the private key corresponding to the first node to obtain the third digital signature, and return the third digital signature to the second node. After receiving the third digital signature, the second node can perform node verification on the first node based on the third digital signature and the first public key.

[0084] In this embodiment, the first public key corresponding to the first node can be obtained from the first public key certificate, and the first digital signature can be decrypted using the first public key to obtain the first random number corresponding to the first node, and the second random number can be obtained. The private key corresponding to the second node can be used to sign the first random number and the second random number to obtain the second digital signature, and the second digital signature can be sent to the first node. The third digital signature returned by the first node for the second digital signature can be received, and the first node can be verified based on the third digital signature and the first public key, thereby realizing mutual verification of nodes in different alliance networks and providing a basis for realizing information flow and trust transfer among nodes in different alliance networks.

[0085] In one embodiment, sending the second digital signature to the first node may include the following steps:

[0086] Obtain a second public key certificate corresponding to the second node, and send the second digital signature and the second public key certificate to the first node.

[0087] Among them, the first node is used to obtain the second root certificate corresponding to the second alliance network from the certificate chain, perform certificate verification on the second public key certificate based on the second root certificate, and after the verification is passed, obtain the decryption result corresponding to the second digital signature according to the second public key certificate.

[0088] In a specific implementation, the second node can send the second public key certificate corresponding to the second node, and the second digital signature and the second public key certificate to the first node. After receiving the second digital signature and the second public key certificate, the first node can determine the block corresponding to the second alliance network from the certificate chain, and obtain the second root certificate corresponding to the second alliance network from the block, and use the second root certificate to verify the second public key certificate. The verification process is similar to the verification process of the first public key certificate, which will not be repeated here.

[0089] After the verification is successful, the first node can determine that the second node is a node in multiple alliance networks corresponding to the certificate chain, and if the second public key certificate is legal, the second digital signature can be decrypted based on the second public key certificate to obtain the decryption result corresponding to the second digital signature.

[0090] In this embodiment, the second node can obtain the second public key certificate corresponding to the second node, and send the second digital signature and the second public key certificate to the first node. The first node obtains the second root certificate corresponding to the second alliance network from the certificate chain, verifies the second public key certificate based on the second root certificate, and obtains the decryption result corresponding to the second digital signature according to the second public key certificate after the verification is passed, thereby realizing mutual verification of public key certificates by nodes in different alliance networks, and providing a basis for realizing information flow and trust transfer among nodes in different alliance networks.

[0091] In one embodiment, performing node verification on the first node according to the third digital signature and the first public key may include the following steps:

[0092] The first public key is used to decrypt the third digital signature to obtain the first decryption result; when the first decryption result matches the second random number, it is determined that the node verification result of the first node is verification passed.

[0093] In actual applications, although the first digital signature is generated by the first node, due to the existence of replay attacks, there is a situation where the first digital signature is generated by the first node but resent by the attacked party. Replay attacks, also known as replay attacks, can refer to an attacker sending a data packet that has been received by the destination host to achieve the purpose of deception. In the identity authentication process, replay attacks will destroy the correctness of the authentication. Replay attacks can be carried out by the initiator or by the enemy who intercepts and resends the data. The attacker steals the authentication credentials through network monitoring or other means, and then resends it to the authentication server.

[0094] Based on this, after obtaining the decryption result of the second digital signature, the first node can generate a third digital signature and send the third digital signature to the second node. After receiving the third digital signature, the second node can use the first public key certificate of the first node to decrypt the third digital signature, obtain the first decryption result, and determine whether the first decryption result matches the second random number, for example, whether the first decryption result is equal to the second random number.

[0095] When the first decryption result matches the second random number, it can be determined that the first digital signature and the third digital signature are indeed generated and issued by the first node, and the node verification result of the first node can be determined to be verified. When the first decryption result does not match the second random number, it can be determined that the node verification result is verified unsuccessfully, and the second node can send a rejection message to the first node.

[0096] In this embodiment, the third digital signature is decrypted using the first public key to obtain a first decryption result. When the first decryption result matches the second random number, the node verification result of the first node is determined to be verified passed, which can effectively prevent replay supply and improve the reliability of node verification.

[0097] In order to enable those skilled in the art to better understand the above steps, the embodiment of the present application is illustrated below by using an example, but it should be understood that the embodiment of the present application is not limited to this.

[0098] In practical applications, a certificate chain containing root certificates corresponding to multiple alliance networks can be pre-set. Among them, the i-th alliance network has node A, and the public key, private key and public key certificate corresponding to node A are: PK A SK A and Cert A , Certificate A Issued by the certificate authority of the i-th alliance network; the j-th alliance network has node B, and the public key, private key and public key certificate corresponding to node B are: PK B SK B and CertB , public key certificate Cert B Issued by the certificate authority of its jth alliance network. When nodes A and B intend to conduct cross-alliance transactions, node authentication of the alliance can be achieved in the following ways:

[0099] 1. Node A selects the first random number R A , calculate the first digital signature σ A =sign(SK A ,R A ), and the first digital signature σ A and the first public key certificate Cert A Sent to Node B.

[0100] 2. Node B receives σ A and Cert A Then, obtain the first root certificate Cert of the i-th alliance network from the certificate chain root(i) , and use the first root certificate Cert root(i) Verify the legitimacy of the first public key certificate of node A. If the verification is successful, A Extract the public key of node A and A Decrypt and get R A Then select the second random number R B , calculate the second digital signature σ B =sign(SK B ,R A ,R B ), and the second digital signature σ B and the second public key certificate Cert B Sent to node A.

[0101] 3. Node A receives the second digital signature σ B and the second public key certificate Cert B Then, obtain the second root certificate Cert of the jth alliance from the certificate chain root(j) , and use the second root certificate Cert root(j) Second public key certificate Cert for node B B If the verification is successful, the second public key certificate Cert B Extract the public key of node B and B Decrypt and get R A’ and R B , if R A’ and R A If they are not equal, a rejection message is sent to node B, ending the node authentication of both parties. A’ and R A If they are equal, then for the random number RB Sign to get the third digital signature σ A1 =sign(SK A ,R B ), and the third digital signature σ A1 Sent to Node B.

[0102] 4. Node B receives the third digital signature σ A1 Then, use the public key PK of node A A Decrypt it and get R B’ , and judge R B’ With R B Are they equal? ​​If not, a rejection message is sent to node A to end the node authentication of both parties; if so, node A and node B authenticate each other and can proceed to the next transaction.

[0103] In one embodiment, Figure 4 As shown in the figure, a cross-alliance node authentication method is provided, which is applied to Figure 1 The alliance network in is used as an example for explanation. Specifically, this embodiment may include the following steps:

[0104] Step 401: Obtain the root certificate corresponding to the candidate alliance network to be joined.

[0105] In actual applications, multiple alliance networks can have a trusted relationship with each other. For multiple alliance networks with a trusted relationship, nodes in different alliance networks can perform cross-alliance node authentication and node transactions. When a candidate alliance network intends to join multiple alliance networks and establish a trusted relationship with multiple alliance networks, it can obtain the root certificate corresponding to the candidate alliance network to be joined.

[0106] Step 402: Determine multiple alliance networks corresponding to the current certificate chain.

[0107] The certificate chain includes multiple blocks, and each block may contain at least one root certificate corresponding to a different alliance network. Specifically, each alliance network may have a corresponding certificate authority, and each certificate authority may issue a root certificate for the alliance network. The root certificate is associated with the identity information of the certificate authority, and the root certificate may correspond to the alliance network one by one. For the root certificates corresponding to multiple alliance networks, a corresponding certificate chain may be constructed, and the certificate chain may contain multiple blocks, and the root certificates in each block are different, and each block may contain one or more root certificates.

[0108] When a candidate federation network intends to establish a trusted relationship with a federation network corresponding to a certificate chain, multiple federation networks corresponding to the current certificate chain may be determined.

[0109] Step 403: Send a certificate authentication request to each of the multiple alliance networks.

[0110] The certificate authentication request includes the root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network.

[0111] In actual applications, the candidate alliance network can generate a certificate authentication request containing the root certificate corresponding to the candidate alliance network, and send the certificate authentication request to each alliance network in the multiple alliance networks corresponding to the certificate chain. After receiving the certificate authentication request, if each alliance network allows the candidate alliance network to join, it can determine whether to pass the certificate authentication of the candidate alliance network based on the root certificate in the certificate authentication request.

[0112] Step 404: upon receiving feedback information of certificate authentication passed returned by a target number of alliance networks among the multiple alliance networks, performing a chaining operation on the root certificate of the candidate alliance network in the certificate chain.

[0113] As an example, the feedback information may include feedback information of passing certificate authentication or feedback information of refusing to pass certificate authentication. The target number may be a number exceeding a preset threshold. The preset threshold may be determined based on the corresponding numbers of multiple alliance networks. In one example, the preset threshold may be 2f-1, where f is a positive integer, f=(n-1) / 3, and n is the total number corresponding to multiple alliance networks.

[0114] After receiving the certificate authentication request, each alliance may generate corresponding feedback information regarding whether to allow the candidate alliance network to join and pass the certificate authentication of the candidate alliance network, and return the feedback information to the candidate alliance network.

[0115] After receiving feedback information from multiple alliance networks, feedback information that has passed certificate authentication can be determined from the multiple feedback information, and when the corresponding number of feedback information that has passed certificate authentication reaches the target number, an up-chain operation is performed on the root certificate of the candidate alliance network in the certificate chain to add the root certificate of the candidate alliance network to the certificate chain.

[0116] In this embodiment, by obtaining the root certificate corresponding to the candidate alliance network to be joined, multiple alliance networks corresponding to the current certificate chain are determined, and the certificate chain includes multiple blocks, each block contains the root certificate corresponding to at least one different alliance network, and then a certificate authentication request containing the root certificate of the candidate alliance network can be sent to each alliance network in the multiple alliance networks. Each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network. When feedback information of passing the certificate authentication is received from the target number of alliance networks in the multiple alliance networks, the root certificate of the candidate alliance network can be chained in the certificate chain. A trusted relationship between different alliance networks can be established through the certificate chain, providing a basis for cross-alliance node authentication and trust transmission, and effectively improving the information transmission efficiency of nodes in different alliances.

[0117] In one embodiment, sending a certificate authentication request to each of the plurality of alliance networks may include the following steps:

[0118] Obtain block data corresponding to a preset block in the current certificate chain, and obtain a first hash value corresponding to the block data; use the private key corresponding to the candidate alliance network to sign the block data to obtain a fourth digital signature; generate a certificate authentication request based on the fourth digital signature, the first hash value and the root certificate of the candidate alliance network; based on the Byzantine fault tolerance algorithm, send the certificate authentication request to each of the multiple alliance networks.

[0119] Among them, when each alliance network in the multiple alliance networks receives the certificate authentication request and agrees to the candidate alliance network to join, it extracts the third public key corresponding to the candidate alliance network from the root certificate of the candidate alliance network, uses the third public key to decrypt the fourth digital signature to obtain a second decryption result, obtains the second hash value corresponding to the second decryption result, and when the second hash value matches the first hash value, it is determined that the certificate authentication of the candidate alliance network has passed.

[0120] In a specific implementation, the candidate alliance network may determine a preset block in the current certificate chain, and the preset block may be the last block of the current certificate chain. After determining the preset block, the block data corresponding to the preset block may be obtained, and a hash value corresponding to the block data may be determined as the first hash value.

[0121] After obtaining the block data, the private key corresponding to the candidate alliance network can be used to sign the block data to obtain the corresponding fourth digital signature. After obtaining the fourth digital signature, the fourth digital signature, the first hash value and the root certificate of the candidate alliance network can be used to generate a certificate authentication request, and the certificate authentication request can be sent to multiple alliance networks based on the Byzantine fault tolerance algorithm.

[0122] After receiving the certificate authentication request, each of the multiple alliance networks can determine whether to agree to the candidate alliance to join and add its corresponding root certificate to the certificate chain. If the candidate alliance network is not agreed to join, feedback information of refusing to pass the authentication can be generated and returned to the candidate alliance network. If the candidate alliance network is agreed to join, the alliance network can obtain the root certificate of the candidate alliance network from the certificate authentication request, and use the root certificate to decrypt the fourth digital signature to obtain a second decryption result. After obtaining the second decryption result, the second hash value corresponding to the second decryption result can be obtained, and it can be determined whether the second hash value matches the first hash value. If the two match, the certificate authentication of the candidate alliance network can be passed, feedback information of passing the certificate authentication can be generated, and information feedback can be performed based on the Byzantine fault tolerance algorithm.

[0123] In this embodiment, based on the voting mechanism of the Byzantine fault-tolerant algorithm, multiple alliance networks can jointly determine whether to allow a candidate alliance network to join. Adding a valid and legal root certificate to the certificate chain can improve the consistency and authenticity of multiple alliance networks when making decisions and enhance the reliability of the certificate chain.

[0124] In one embodiment, a cross-alliance node authentication method in the present application can also be applied to an authentication platform, which sends certificate authentication requests for candidate alliance networks to multiple alliance networks and obtains corresponding feedback information to determine whether the root certificate of the candidate alliance network is in the current certificate chain and performs an up-chain operation on the root certificate of the candidate alliance network.

[0125] In order to enable those skilled in the art to better understand the above steps, the embodiment of the present application is illustrated below by using an example, but it should be understood that the embodiment of the present application is not limited to this.

[0126] The current certificate chain includes the root certificates corresponding to n alliance networks (such as Figure 3 As shown in Figure 2, the root certificate, public key, and private key corresponding to the n+1th alliance network are: Cert root(n+1) ,PK n+1 and SK n+1 When the n+1th alliance network is to be added and its corresponding root certificate is appended to the certificate chain, the following steps can be performed:

[0127] 1. The (n+1)th alliance network can calculate the first hash value h of the nth block of the certificate chain and obtain the fourth digital signature σ corresponding to the nth block in the following manner.

[0128] h=hash(block n )

[0129] σ=sign(SK n+1 ,blockn )

[0130] Among them, hash can be sha236 algorithm, block n The block data of the nth block.

[0131] After obtaining the first hash value and the fourth digital signature, a Cert root(n+1) , h and σ, and sends the certificate authentication request to the n alliance networks of the certificate chain through the Byzantine fault tolerance algorithm.

[0132] 2. After receiving the certificate authentication request, the n alliance networks can run the Byzantine Fault Tolerance algorithm to reach a consensus on whether to agree to the n+1 alliance to join the certificate chain. If 2f+1 (f = (n-1) / 3) alliance networks vote in favor, the n+1 alliance will be allowed to join and the root certificate Cert root(n+1) Append to the certificate chain; otherwise, reject the n+1th alliance from joining.

[0133] In actual applications, after receiving a certificate authentication request, if each alliance network disagrees with the joining of the n+1th alliance network, it can cast a dissenting vote when running the Byzantine fault tolerance algorithm.

[0134] If you agree to the n+1th alliance to join, you can verify the root certificate Cert of the n+1th alliance network root(n+1) Is it valid? Specifically, the alliance network can obtain the root certificate Cert root(n+1) Extract the public key PK n+1 , and then use the public key PK n+1 Decrypt the fourth digital signature σ and get block n , and block n Perform a hash operation to obtain a second hash value. After obtaining the second hash value, the second hash value can be compared with h in the certificate authentication request. If they are equal, you can vote in favor when running the Byzantine fault tolerance algorithm (corresponding to the feedback information of passing the authentication in this application), otherwise you can vote against it (corresponding to the feedback information of rejecting the authentication in this application).

[0135] It should be understood that although Figure 2 , Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 4At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0136] In one embodiment, Figure 5 As shown, a cross-alliance node authentication device is provided, which can be applied to a second node in a second alliance network, and the device includes:

[0137] A node authentication request receiving module 501 is configured to receive a node authentication request sent by a first node in a first alliance network, wherein the node authentication request includes a first public key certificate corresponding to the first node;

[0138] A first root certificate acquisition module 502 is used to acquire a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0139] The certificate verification module 503 is used to perform certificate verification on the first public key certificate using the first root certificate to obtain a certificate verification result;

[0140] The node authentication module 504 is used to determine whether the first node is authenticated according to the certificate authentication result.

[0141] In one embodiment, the node authentication module 504 includes:

[0142] A first digital signature acquisition submodule, configured to acquire a first digital signature corresponding to the first node from the node authentication request when the certificate verification result is verification passed;

[0143] A node verification submodule, used to perform node verification on the first node according to the first digital signature and the first public key certificate;

[0144] The authentication pass submodule is used to authenticate the first node when the node authentication result is authentication pass.

[0145] In one embodiment, the node verification submodule includes:

[0146] a first random number obtaining unit, configured to obtain a first public key corresponding to the first node from the first public key certificate, and use the first public key to decrypt the first digital signature to obtain a first random number corresponding to the first node;

[0147] A second digital signature acquisition unit, configured to acquire a second random number, and use a private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature;

[0148] a third digital signature acquisition unit, configured to send the second digital signature to the first node, and receive a third digital signature returned by the first node for the second digital signature; the first node is configured to decrypt the received second digital signature to obtain a first decryption result, and encrypt the decryption result using a private key corresponding to the first node to obtain the third digital signature;

[0149] A third digital signature verification unit is used to perform node verification on the first node according to the third digital signature and the first public key.

[0150] In one embodiment, the third digital signature obtaining unit is specifically configured to obtain a second public key certificate corresponding to the second node, and send the second digital signature and the second public key certificate to the first node;

[0151] The first node is used to obtain a second root certificate corresponding to the second alliance network from the certificate chain, perform certificate verification on the second public key certificate based on the second root certificate, and after the verification passes, obtain a decryption result corresponding to the second digital signature according to the second public key certificate.

[0152] In one embodiment, the third digital signature verification unit includes:

[0153] A first decryption result obtaining subunit is used to use the first public key to decrypt the third digital signature to obtain the first decryption result;

[0154] The matching subunit is used to determine that the node verification result of the first node is verification passed when the first decryption result matches the second random number.

[0155] For the specific definition of a cross-alliance node authentication device, please refer to the definition of a cross-alliance node authentication method above, which will not be repeated here. Each module in the above-mentioned cross-alliance node authentication device can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0156] In one embodiment, Figure 6 As shown, a cross-alliance node authentication device is provided, the device comprising:

[0157] A candidate root certificate acquisition module 601 is used to acquire a root certificate corresponding to a candidate alliance network to be joined;

[0158] The alliance network determination module 602 is used to determine multiple alliance networks corresponding to the current certificate chain; the certificate chain includes multiple blocks, each block contains a root certificate corresponding to at least one different alliance network;

[0159] The certificate authentication request sending module 603 is used to send a certificate authentication request to each of the multiple alliance networks; the certificate authentication request includes the root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network;

[0160] The chaining module 604 is configured to perform a chaining operation on the root certificate of the candidate alliance network in the certificate chain upon receiving feedback information of certificate authentication returned by a target number of alliance networks among the multiple alliance networks.

[0161] In one embodiment, the certificate authentication request sending module 603 includes:

[0162] A first hash value acquisition submodule, used to acquire block data corresponding to a preset block in the current certificate chain, and acquire a first hash value corresponding to the block data;

[0163] A fourth digital signature acquisition submodule, configured to sign the block data using a private key corresponding to the candidate alliance network to obtain a fourth digital signature;

[0164] a certificate authentication request generation submodule, configured to generate a certificate authentication request according to the fourth digital signature, the first hash value, and the root certificate of the candidate alliance network;

[0165] A Byzantine fault tolerance algorithm triggering submodule, configured to send the certificate authentication to each of the multiple alliance networks based on the Byzantine fault tolerance algorithm;

[0166] Each alliance network among the multiple alliance networks is used to, when receiving the certificate authentication request and agreeing to the candidate alliance network to join, extract the third public key corresponding to the candidate alliance network from the root certificate of the candidate alliance network, use the third public key to decrypt the fourth digital signature to obtain a second decryption result, obtain a second hash value corresponding to the second decryption result, and determine that the certificate authentication of the candidate alliance network is passed when the second hash value matches the first hash value.

[0167] For the specific definition of an alliance joining authentication device, please refer to the definition of an alliance joining authentication method above, which will not be repeated here. Each module in the above-mentioned alliance joining authentication device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0168] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a cross-alliance node authentication method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0169] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the root certificate of the candidate alliance network. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for alliance joining authentication is implemented.

[0170] Those skilled in the art will understand that Figure 7 , Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0171] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0172] receiving a node authentication request sent by a first node in a first alliance network, where the node authentication request includes a first public key certificate corresponding to the first node;

[0173] Obtaining a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0174] Using the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result;

[0175] According to the certificate authentication result, it is determined whether the first node is authenticated.

[0176] In one embodiment, when the processor executes the computer program, the steps in the other embodiments described above are also implemented.

[0177] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0178] receiving a node authentication request sent by a first node in a first alliance network, where the node authentication request includes a first public key certificate corresponding to the first node;

[0179] Obtaining a first root certificate corresponding to the first alliance network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a root certificate corresponding to at least one different alliance network;

[0180] Using the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result;

[0181] According to the certificate authentication result, it is determined whether the first node is authenticated.

[0182] In one embodiment, when the computer program is executed by a processor, the steps in the other embodiments described above are also implemented.

[0183] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0184] Obtain the root certificate corresponding to the candidate alliance network to be joined;

[0185] Determining multiple alliance networks corresponding to the current certificate chain; the certificate chain includes multiple blocks, each block including a root certificate corresponding to at least one different alliance network;

[0186] Sending a certificate authentication request to each of the multiple alliance networks; the certificate authentication request includes the root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network;

[0187] Upon receiving feedback information of certificate authentication passed returned by a target number of alliance networks among the multiple alliance networks, an up-chain operation is performed on the root certificate of the candidate alliance network in the certificate chain.

[0188] In one embodiment, when the processor executes the computer program, the steps in the other embodiments described above are also implemented.

[0189] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0190] Obtain the root certificate corresponding to the candidate alliance network to be joined;

[0191] Determining multiple alliance networks corresponding to the current certificate chain; the certificate chain includes multiple blocks, each block including a root certificate corresponding to at least one different alliance network;

[0192] Sending a certificate authentication request to each of the multiple alliance networks; the certificate authentication request includes the root certificate of the candidate alliance network, and each alliance network determines whether to pass the certificate authentication of the candidate alliance network based on the root certificate of the candidate alliance network;

[0193] Upon receiving feedback information of certificate authentication passed returned by a target number of alliance networks among the multiple alliance networks, an up-chain operation is performed on the root certificate of the candidate alliance network in the certificate chain.

[0194] In one embodiment, when the computer program is executed by a processor, the steps in the other embodiments described above are also implemented.

[0195] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

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

[0197] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A node authentication method across alliance chains, characterized in that: Applied to a second node in a second alliance chain network, the method includes: Receiving a node authentication request sent by a first node in a first alliance chain network, wherein the node authentication request includes a first public key certificate corresponding to the first node; Obtaining a first root certificate corresponding to the first alliance chain network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block including a different root certificate corresponding to at least one alliance chain network; Using the first root certificate to perform certificate verification on the first public key certificate to obtain a certificate verification result; When the certificate verification result is verification passed, obtaining a first public key corresponding to the first node from the first public key certificate, and using the first public key to decrypt a first digital signature corresponding to the first node to obtain a first random number corresponding to the first node; Obtain a second random number, and use the private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature; sending the second digital signature to the first node, and receiving a third digital signature returned by the first node for the second digital signature; the first node is configured to decrypt the received second digital signature to obtain a first decryption result, and encrypt the decryption result using a private key corresponding to the first node to obtain the third digital signature; Performing node verification on the first node according to the third digital signature and the first public key; When the node verification result is verification passed, the first node is authenticated successfully.

2. The method according to claim 1, characterized in that The first digital signature corresponding to the first node is obtained by the following steps: A first digital signature corresponding to the first node is obtained from the node authentication request.

3. The method according to claim 1, characterized in that The sending the second digital signature to the first node includes: Obtaining a second public key certificate corresponding to the second node, and sending the second digital signature and the second public key certificate to the first node; The first node is used to obtain the second root certificate corresponding to the second alliance chain network from the certificate chain, perform certificate verification on the second public key certificate based on the second root certificate, and after the verification is passed, obtain the decryption result corresponding to the second digital signature according to the second public key certificate.

4. The method according to claim 3, characterized in that: The performing node verification on the first node according to the third digital signature and the first public key includes: Decrypting the third digital signature using the first public key to obtain the first decryption result; When the first decryption result matches the second random number, it is determined that the node verification result of the first node is verification passed.

5. A node authentication device across alliance chains, characterized in that: Applied to a second node in a second alliance chain network, the device includes: A node authentication request receiving module, configured to receive a node authentication request sent by a first node in a first alliance chain network, wherein the node authentication request includes a first public key certificate corresponding to the first node; A first root certificate acquisition module, used to obtain a first root certificate corresponding to the first alliance chain network from a preset certificate chain; the certificate chain includes a plurality of blocks, each block containing a root certificate corresponding to at least one different alliance chain network; A certificate verification module, used to perform certificate verification on the first public key certificate using the first root certificate to obtain a certificate verification result; A node authentication module is used to obtain the first public key corresponding to the first node from the first public key certificate when the certificate verification result is verification passed, and use the first public key to decrypt the first digital signature corresponding to the first node to obtain the first random number corresponding to the first node; obtain the second random number, and use the private key corresponding to the second node to sign the first random number and the second random number to obtain a second digital signature; send the second digital signature to the first node, and receive the third digital signature returned by the first node for the second digital signature; perform node verification on the first node according to the third digital signature and the first public key; when the node verification result is verification passed, the first node is authenticated; the first node is used to decrypt the received second digital signature to obtain a first decryption result, and use the private key corresponding to the first node to encrypt the decryption result to obtain the third digital signature.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Federation chain-based authentication method, device, equipment, and readable storage medium

    CN109167771A

  • Method and device for cross-chain transmission of authenticable message

    CN110430162A

  • Authentication method and related equipment

    CN110611569A

  • Method and device for node authentication based on block chain network

    CN111131171A

  • Configuration method of digital certificate for alliance block chain, terminal and root certificate server

    CN111340485A