Signature method, verification method and device, electronic equipment, computer readable storage medium and computer program product
By adopting a hybrid signature method in the blockchain system, the transaction verification interrupt problem caused by the signature algorithm version of the blockchain system during the transition of the vector blockchain is solved, and the continuity and security of transaction verification is realized.
Patent Information
- Application Number
- CN202411378730.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
AI Technical Summary
During the transition from classic blockchain to quantum blockchain, the existing blockchain system lacks a software version synchronization mechanism, resulting in inconsistent versions of the signature algorithm between the client and the node, which easily leads to interruption of transaction verification.
Using the hybrid signature method, when the client supports the quantum signature algorithm, it first uses the quantum signature algorithm to sign the transaction request, and then uses the traditional signature algorithm to sign; when it does not support the quantum signature algorithm, it only uses the traditional signature algorithm to sign. After receiving the signed transaction request, the transaction verification node verifies it through the traditional signature algorithm to ensure the continuity of transaction verification.
Through the mixed signature method, when the version of the signature algorithm between the client and the transaction verification node is not consistent, it can ensure that the transaction verification is carried out normally, reducing the risk of transaction verification interruption, and improving the security of transaction.
Smart Images

Figure CN119359303A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a signature method, a verification method, a device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Blockchain technology (distributed ledger technology) is a technology that uses cryptographic algorithms and consensus algorithms to enable some untrusted participants to reach transactions without relying on centralized authority. Due to its traceability and transparency in transactions, it can be widely used in a variety of scenarios, such as finance, manufacturing, and healthcare. Blockchain and distributed ledger are equivalent concepts. According to the method of granting participants access to the system, blockchain systems can be divided into two categories: permissionless blockchain systems and permissioned blockchain systems. Blockchain systems contain clients and network nodes. The transaction process of blockchain systems involves the use of signature algorithms (i.e., cryptographic algorithms). Signature algorithms are used in multiple transaction links of blockchain systems. For example, signature algorithms are used in the transaction generation link to ensure that the transaction is initiated by the digital asset holder, signature algorithms are used in the consensus mechanism link to ensure that the exchanged messages have not been tampered with, hash functions are used in the consensus mechanism link to mine to determine the accounting node, hash functions are used in the block formation link to ensure the integrity of the transaction, and hash functions are used in the update of the ledger link to ensure the link between blocks, etc.
[0003] The blockchain system relies on signature algorithms to ensure the security of digital assets on the blockchain. In the quantum era, the security of the signature algorithms used in related technologies is relatively low. The existing blockchain needs to transition to a quantum-safe blockchain. The simplest way is to replace the signature algorithms in both the clients and nodes in the existing blockchain network with quantum-safe signature algorithms. However, both the clients and nodes need to perform software upgrades (i.e., signature algorithm upgrades) at the same time. However, the existing blockchain system lacks a software version synchronization mechanism. Therefore, during the transition from the existing blockchain to the quantum blockchain, there are inconsistencies in the signature algorithm versions of the clients and nodes of the blockchain network, that is, some clients and nodes have been upgraded to support quantum-safe signature algorithms, while some clients and nodes have not yet upgraded their signature algorithms, which can easily lead to interruptions in transaction verification. Summary of the invention
[0004] The embodiments of the present application provide a signature method, a verification method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product to solve the existing problem that transaction verification is easily interrupted due to inconsistent signature algorithm versions.
[0005] To solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a signing method, which is applied to a client, and the method includes:
[0007] In the case where the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm;
[0008] In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0009] In a second aspect, an embodiment of the present application provides a verification method, which is applied to a transaction verification node, and the method includes:
[0010] receiving a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm; or the transaction request is a transaction request signed based on a traditional signature algorithm when the client does not support a quantum signature algorithm;
[0011] The signed transaction request is verified.
[0012] In a third aspect, an embodiment of the present application provides a signature device, applied to a client, the device comprising:
[0013] A signature module, used to sign the transaction request based on a hybrid signature method when the client supports the quantum signature algorithm, wherein the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm;
[0014] In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0015] In a fourth aspect, an embodiment of the present application provides a verification device, which is applied to a transaction verification node, and the device includes:
[0016] A first receiving module is configured to receive a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a traditional signature algorithm after signing based on a quantum signature algorithm; or the transaction request is a transaction request signed based on a traditional signature algorithm when the client does not support a quantum signature algorithm;
[0017] The verification module is used to verify the transaction request after signing.
[0018] In a fifth aspect, an embodiment of the present application provides an electronic device, including a transceiver and a processor.
[0019] The processor is configured to:
[0020] In the case where the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm;
[0021] In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0022] In a sixth aspect, an embodiment of the present application provides an electronic device, including a transceiver and a processor.
[0023] receiving a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a traditional signature algorithm after signing based on the quantum signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm;
[0024] The signed transaction request is verified.
[0025] In a seventh aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the above method when executed by the processor.
[0026] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0027] In a ninth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program, which implements the steps in the above method when executed by a processor.
[0028] In the method of this embodiment, the client can sign in different ways according to whether it supports the quantum signature algorithm. That is, if the client supports the quantum signature algorithm, the transaction request is signed by a hybrid signature method, that is, the quantum signature algorithm is first used to sign and then the traditional signature algorithm is used to sign. If the client does not support the quantum signature algorithm, the transaction request is signed by the traditional signature method, that is, the traditional signature algorithm. In the embodiment of the present application, the hybrid signature method is to sign by the quantum signature algorithm and then continue to sign by the traditional signature algorithm, and the traditional signature method is to sign by the traditional signature algorithm. Both signature methods use the traditional signature algorithm at the end. In this way, even if the signature algorithm versions between the client and the transaction verification node are inconsistent, the traditional signature algorithm can be used for verification, reducing the occurrence of verification interruption. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 This is one of the flow charts of a verification method provided in an embodiment of the present application;
[0031] Figure 2 This is the second flowchart of a verification method provided in an embodiment of the present application;
[0032] Figure 3 It is a structural diagram of a blockchain;
[0033] Figure 4 It is a transaction flow chart in blockchain;
[0034] Figure 5 This is an example diagram of four transaction scenarios provided by an embodiment of the present application;
[0035] Figure 6 This is one of the flow charts of a verification device provided in an embodiment of the present application;
[0036] Figure 7 This is the second flowchart of a verification device provided in an embodiment of the present application;
[0037] Figure 8 This is one of the flow charts of an electronic device provided in an embodiment of the present application;
[0038] Fig. 9 This is the second flowchart of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] See also Figure 1 , Figure 1 This is a flow chart of a verification method provided by an embodiment of the present application, which is executed by the client. Figure 1 As shown, the verification method provided in this embodiment includes the following steps:
[0041] Step 101: When the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; when the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0042] It should be understood that the traditional signature algorithm is a non-quantum signature algorithm. There are many types of traditional signature algorithms used in this application, and this application does not make specific restrictions. For example, it can be any of the existing traditional signature algorithms. It should be noted that the client can support the quantum signature algorithm or not. The client can sign in different ways according to whether it supports the quantum signature algorithm. That is, if it supports the quantum signature algorithm, it first uses the quantum signature algorithm to sign the transaction request, and then based on the traditional signature algorithm, if it does not support the quantum signature algorithm, it can use the traditional signature algorithm to sign.
[0043] In addition, illustratively, the method may further include: the client may send a signed transaction request to the transaction verification node for verification by the transaction verification node, that is, the transaction verification node may verify the signed transaction request. It should be noted that both the client and the transaction verification node support the traditional signature algorithm, and the transaction verification node may support the quantum signature algorithm or not support the quantum signature algorithm. If the client supports the quantum algorithm and the transaction verification node supports the quantum signature algorithm, after the transaction verification node receives the signed transaction request, it may not only use the traditional signature algorithm for signature verification, but also use the quantum signature algorithm for verification to ensure transaction security. If the client supports it and the transaction verification node does not support the quantum signature algorithm, the transaction verification node may also use the traditional signature algorithm for verification. If the client does not support it and the transaction verification node supports the quantum signature algorithm, the transaction verification node may use the traditional signature algorithm for verification. If the client does not support it and the transaction verification node supports the quantum signature algorithm, the transaction verification node may use the traditional signature algorithm for verification. If the client does not support it and the transaction verification node does not support the quantum signature algorithm, the transaction verification node may use the traditional signature algorithm for verification. Even if the signature algorithm versions between the client and the transaction verification node are inconsistent (for example, the client has been upgraded to the quantum signature algorithm, while the transaction verification node still supports the traditional signature algorithm and has not been upgraded to the quantum signature algorithm; or, the client still supports the traditional signature algorithm and has not been upgraded to the quantum signature algorithm, while the transaction verification node has been upgraded to the quantum signature algorithm, etc.), through the above-mentioned signature process of the client, the transaction verification node can still perform verification, reduce transaction verification interruptions, improve transaction verification results, and enhance transaction security.
[0044] In the method of this embodiment, the client can sign in different ways according to whether it supports the quantum signature algorithm. That is, if the client supports the quantum signature algorithm, the transaction request is signed by a hybrid signature method, that is, the quantum signature algorithm is first used to sign and then the traditional signature algorithm is used to sign. If the client does not support the quantum signature algorithm, the transaction request can be signed by a traditional signature method, that is, a traditional signature algorithm. In the embodiment of the present application, the hybrid signature method is to sign by the quantum signature algorithm and then continue to sign by the traditional signature algorithm, and the traditional signature method is to sign by the traditional signature algorithm. Both signature methods use the traditional signature algorithm at the end. In this way, even if the signature algorithm versions between the client and the transaction verification node are inconsistent, the traditional signature algorithm can be used for verification, reducing the occurrence of verification interruption.
[0045] In some embodiments, signing a transaction request based on a hybrid signature method includes:
[0046] Signing the information included in the transaction request based on the quantum signature algorithm to generate a first signature;
[0047] The information included in the transaction request and the first signature are signed based on a traditional signature algorithm.
[0048] During the transition to quantum blockchain, attackers may implement downgrade attacks, that is, downgrade the hybrid signature method to the traditional signature method. If the hybrid signature scheme is signed by the traditional signature method first and then signed by the quantum signature algorithm, it is vulnerable to downgrade attacks. After the attacker deletes the information related to the quantum signature, the transaction verifier cannot perceive it. In the embodiment of the present application, in the process of signing the transaction request using a hybrid signature method, the information included in the transaction request is first signed using the quantum signature algorithm to generate a first signature, and then the information included in the transaction request and the first signature are further signed using the traditional signature algorithm. This can resist downgrade attacks. Even if the attacker deletes the information related to the quantum signature, the transaction verifier can detect the existence of the attack by verifying the signature generated by the traditional signature algorithm received, thereby improving transaction security.
[0049] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0050] Since the blockchain system can be divided into two categories: permissionless blockchain system (i.e. permissionless blockchain or non-permissioned blockchain) and permissioned blockchain system (i.e. permissioned blockchain), it can be divided into two scenarios, namely permissionless blockchain scenario and permissioned blockchain scenario. There is a difference between permissionless blockchain and permissioned blockchain in the management of public keys. Permissionless blockchain does not use certificates to manage public keys, while permissioned blockchain manages public keys based on certificates. Therefore, the processing of transactions in permissionless blockchain and permissioned blockchain scenarios is different. In this embodiment, in the permissionless blockchain scenario, the traditional signature algorithm can be pre-agreed on the blockchain, and the traditional signature algorithm used for signing is the algorithm pre-agreed on the blockchain. The traditional public key of the traditional signature algorithm can be carried in the transaction request. In addition, illustratively, in the permissionless blockchain scenario, in addition to carrying the traditional public key in the transaction request, the transaction request can also carry but is not limited to at least one of the following: transaction content; address (AD) of the transaction recipient.
[0051] In addition, illustratively, the signed transaction request may also carry a signature based on a traditional signature algorithm. Since the client uses different signature methods to sign according to different results of whether the quantum signature algorithm is supported, different situations can be distinguished. For example, if the client supports the quantum signature algorithm, the signature based on the traditional signature algorithm carried may be: a signature generated by signing the information included in the transaction request based on the traditional signature algorithm and the information included in the transaction request based on the quantum signature algorithm (also called the first signature) (also called the second signature). If the client does not support the quantum signature algorithm, the signature based on the traditional signature algorithm carried may be: a signature generated by signing the information included in the transaction request based on the traditional signature algorithm (also called the third signature).
[0052] The traditional public key can also be called the traditional public key of the sender. It should be noted that the sender here refers to the party that generates and sends the transaction request, that is, the party that requests the transaction. The receiver can be the party that performs the transaction operation. For example, for a money transfer transaction from account A to account B, the terminal where account A is located (such as the terminal where account A logs in) can be understood as the sender, such as the client in this embodiment. The money transfer transaction operation needs to be performed through a transaction node. For example, the transaction verification node verifies the transaction request and then forwards it to the transaction node. The transaction node can perform the transaction operation corresponding to the transaction request, such as transferring part of the amount corresponding to account A to account B. The transaction node is the transaction receiver.
[0053] In this embodiment, the signed transaction request may carry a traditional public key, so that a subsequent transaction verification node can use the traditional public key to verify the signature generated based on the traditional signature algorithm after receiving the signed transaction request.
[0054] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0055] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0056] Quantum public key;
[0057] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0058] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0059] In the unlicensed blockchain scenario, if the client supports the quantum signature algorithm, a hybrid signature method is used to sign the transaction request. The signed transaction request may also carry at least one of the following: a quantum signature algorithm indication, a quantum public key of the quantum signature algorithm, a first signature generated by signing the information included in the transaction request based on the quantum signature algorithm, and a second signature generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm. It should be noted that in this embodiment, if the transaction verification node supports the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has been upgraded to the quantum signature algorithm. After receiving the signed transaction request sent by the client, the first signature can be verified based on the quantum public key, and the second signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has not been upgraded to the quantum signature algorithm. After receiving the signed transaction request, the second signature can still be signed based on the traditional public key. This can reduce the occurrence of transaction verification interruptions and improve transaction security.
[0060] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0061] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0062] In the unlicensed blockchain scenario, if the client does not support the quantum signature algorithm, the transaction request is signed using the traditional signature method. The signed transaction request may also carry a third signature generated by signing the information included in the transaction request based on the traditional signature algorithm. It should be noted that in this embodiment, if the transaction verification node supports the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has been upgraded to the quantum signature algorithm. After receiving the signed transaction request sent by the client, the third signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has not been upgraded to the quantum signature algorithm. After receiving the signed transaction request, the third signature can still be signed based on the traditional public key. This can reduce the occurrence of transaction verification interruptions and improve transaction security.
[0063] In some embodiments, in a permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information:
[0064] Traditional public keys for traditional signature algorithms;
[0065] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0066] That is, in this embodiment, the traditional signature algorithm can be indicated by the traditional signature algorithm indication in the certificate, and the certificate can also include the traditional public key of the traditional signature algorithm, which can also be called the traditional public key of the sender, that is, the traditional public key of the party requesting the transaction. Different from the method specified on the blockchain in the above embodiment, the traditional signature algorithm in this embodiment is indicated by the traditional signature algorithm indication in the certificate.
[0067] In addition, exemplarily, in the permission blockchain scenario, in addition to carrying at least one of the traditional public key and the traditional signature algorithm indication in the transaction request, the transaction request may also carry a transaction proposal (TP) and the like. In addition, exemplarily, in the permission blockchain scenario, the signed transaction request may also carry a signature based on the traditional signature algorithm. Since the client uses different signature methods to sign according to different results of whether the quantum signature algorithm is supported, different situations can be distinguished. For example, if the client supports the quantum signature algorithm, the signature based on the traditional signature algorithm carried may be: a signature generated by signing the information included in the transaction request and the fifth signature (the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm) using the traditional signature algorithm indicated by the traditional signature algorithm indicated by the certificate. If the client does not support the quantum signature algorithm, the signature based on the traditional signature algorithm carried may be: a signature generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0068] In this embodiment, the signed transaction request may carry at least one of a traditional public key and a traditional signature algorithm indication, so that a subsequent transaction verification node can use the traditional public key to verify the signature generated by signing based on the indicated traditional signature algorithm after receiving the signed transaction request.
[0069] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0070] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0071] Quantum public key;
[0072] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0073] Compared with the certificate in the related art, in the embodiment of the present application, when the client supports the quantum signature algorithm, the certificate is extended, that is, the certificate may also include an extension item, and the extension item may include at least one of the quantum signature algorithm indication, the quantum public key and the fourth signature.
[0074] In addition, it should be noted that the signature method adopted by the client can be determined according to the certificate. There are many schemes for determining the signature method according to the certificate, which are not specifically limited in this embodiment. For example, the signature method can be determined by the content length of the certificate. For example, when the content length of the certificate is greater than the preset length, it is determined that the signature method is a hybrid signature method. When the content length of the certificate is less than or equal to the preset length, it is determined that the signature method is a traditional signature method. In addition, in the permission blockchain scenario, when the client supports the quantum signature algorithm, the client signs by a hybrid signature method. Correspondingly, the certificate is extended, so the signature method can also be determined by detecting whether the certificate includes an extension item. For example, if the certificate includes an extension item, it can be determined that a hybrid signature method is adopted. If the certificate does not include an extension item, it can be determined that a traditional signature method is adopted.
[0075] In this implementation, at least one of the above quantum signature algorithm indication, quantum public key and fourth signature can be extended in the certificate, so that the signature method can be determined in the subsequent process according to whether the certificate includes the extension item, so as to adopt the corresponding method for verification, thereby improving the flexibility of transaction verification.
[0076] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0077] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0078] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0079] In the permission blockchain scenario, if the client supports the quantum signature algorithm, the transaction request is signed using a hybrid signature method. The certificate of the signed transaction request may also carry at least one of the quantum signature algorithm indication, the quantum public key of the quantum signature algorithm, and the fourth signature. In addition, the signed transaction request may also carry at least one of the fifth signature and the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication (which may be referred to as the seventh signature). It should be noted that in this embodiment, if the transaction verification node supports the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has been upgraded to the quantum signature algorithm. After receiving the signed transaction request sent by the client, the fifth signature can be verified based on the quantum public key, and the seventh signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has not been upgraded to the quantum signature algorithm. After receiving the signed transaction request, the seventh signature can still be signed based on the traditional public key. This reduces the occurrence of transaction verification interruptions and improves transaction security.
[0080] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0081] A signature generated by signing information included in the transaction request based on a traditional signature algorithm indicated by the traditional signature algorithm indication.
[0082] In the permission blockchain scenario, if the client does not support the quantum signature algorithm, the transaction request is signed using the traditional signature method. The signed transaction request may also carry a signature (which may be referred to as the sixth signature) generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm. It should be noted that in this embodiment, if the transaction verification node supports the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has been upgraded to the quantum signature algorithm. After receiving the signed transaction request sent by the client, the sixth signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, it can be understood that the signature algorithm of the transaction verification node has not been upgraded to the quantum signature algorithm. After receiving the signed transaction request, the sixth signature can still be signed based on the traditional public key. This reduces the occurrence of transaction verification interruptions and improves transaction security.
[0083] See also Figure 2 , Figure 2 is a flow chart of a verification method provided in an embodiment of the present application, which is executed by a transaction verification node, such as Figure 2 As shown, the verification method provided in this embodiment includes the following steps:
[0084] Step 201: receiving a signed transaction request sent by a client;
[0085] The transaction request after signing is a transaction request signed based on a hybrid signature method when the client supports the quantum signature algorithm, and the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm;
[0086] Step 202: Verify the signed transaction request.
[0087] It should be noted that both the client and the transaction verification node support the traditional signature algorithm. The client may support the quantum signature algorithm or not, and the transaction verification node may support the quantum signature algorithm or not. If the client supports the quantum signature algorithm, the transaction request is first signed using the quantum signature algorithm, and then based on the traditional signature algorithm. If the client does not support the quantum signature algorithm, the traditional signature algorithm can be used for signing. If the client supports the quantum algorithm and the transaction verification node supports the quantum signature algorithm, after receiving the signed transaction request, the transaction verification node can not only use the traditional signature algorithm for signature verification, but also use the quantum signature algorithm for verification to ensure transaction security. If the client supports it and the transaction verification node does not support the quantum signature algorithm, the transaction verification node can also use the traditional signature algorithm for verification. If the client does not support the quantum signature algorithm and the transaction verification node supports the quantum signature algorithm, the transaction verification node can use the traditional signature algorithm for verification. The client does not support the quantum signature algorithm and the transaction verification node does not support the quantum signature algorithm, and the transaction verification node can use the traditional signature algorithm for verification. Even if the signature algorithm versions between the client and the transaction verification node are inconsistent (for example, the client has been upgraded to the quantum signature algorithm, while the transaction verification node still supports the traditional signature algorithm and has not been upgraded to the quantum signature algorithm; or, the client still supports the traditional signature algorithm and has not been upgraded to the quantum signature algorithm, while the transaction verification node has been upgraded to the quantum signature algorithm, etc.), the transaction verification node can still perform verification after receiving the signed transaction request sent by the client, thereby reducing transaction verification interruptions, improving transaction verification results, and enhancing transaction security.
[0088] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0089] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0090] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0091] Quantum public key;
[0092] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0093] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0094] In some embodiments, verifying the signed transaction request includes at least one of the following:
[0095] When the transaction verification node supports the quantum signature algorithm, the first signature is verified based on the quantum signature algorithm based on the quantum public key, and the second signature is signed based on the traditional public key;
[0096] When the transaction verification node does not support the quantum signature algorithm, the second signature is signed based on the traditional public key.
[0097] That is, in an unlicensed blockchain scenario, when the client supports the quantum signature algorithm, if the transaction verification node supports the quantum signature algorithm, the quantum public key can be used to verify the first signature based on the quantum signature algorithm, and the second signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, the second signature can be signed based on the traditional public key.
[0098] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0099] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0100] In some embodiments, verifying the signed transaction request includes:
[0101] When the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, the third signature is signed based on the traditional public key.
[0102] That is, in the permissionless blockchain scenario, when the client does not support the quantum signature algorithm, the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, and the third signature is signed based on the traditional public key.
[0103] In some embodiments, in a permissioned blockchain scenario, the signed transaction request includes a certificate, and the certificate includes at least one of the following information:
[0104] Traditional public keys for traditional signature algorithms;
[0105] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0106] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0107] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0108] Quantum public key;
[0109] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0110] That is, in the permission block chain scenario, if the client supports the quantum signature algorithm, the client uses a hybrid signature method, and if the client does not support the quantum signature algorithm, the client uses a traditional signature method. If the client supports the quantum signature algorithm, the certificate can also include the above extensions to facilitate subsequent transaction verification nodes to verify based on the certificate. In addition, the signature method used by the client can also be determined based on whether the certificate includes extensions.
[0111] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0112] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0113] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0114] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0115] A sixth signature is generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0116] In some embodiments, verifying the signed transaction request includes at least one of the following:
[0117] Determine the target signature method according to the certificate, and the target signature method can be a hybrid signature method or a traditional signature method;
[0118] Verify the transaction request based on the target signature method.
[0119] That is, the signature method used by the client can be determined through the certificate. The hybrid signature method is to sign based on the quantum signature algorithm first and then the traditional signature algorithm, while the traditional signature method is to sign based on the traditional signature algorithm. In this way, after the transaction verification node receives the signed transaction request, it determines the target signature method used by the client based on the certificate, and then uses the target signature method for verification.
[0120] It should be noted that the signature method adopted by the client can be determined according to the certificate. There are many schemes for determining the signature method according to the certificate, which are not specifically limited in this embodiment. For example, the signature method can be determined by the content length of the certificate. For example, when the content length of the certificate is greater than the preset length, it is determined that the signature method is a hybrid signature method. When the content length of the certificate is less than or equal to the preset length, it is determined that the signature method is a traditional signature method. In addition, in the permission blockchain scenario, when the client supports the quantum signature algorithm, the client signs by a hybrid signature method. Correspondingly, the certificate is extended, so the signature method can also be determined by detecting whether the certificate includes an extension item. For example, if the certificate includes an extension item, it can be determined that a hybrid signature method is adopted. If the certificate does not include an extension item, it can be determined that a traditional signature method is adopted.
[0121] In some embodiments, determining the target signing method according to the certificate includes:
[0122] In the case where the certificate includes an extension item, the target signature mode is determined to be a hybrid signature mode;
[0123] When the certificate does not include an extension, the target signature mode is determined to be a traditional signature mode.
[0124] In some embodiments, verifying the signed transaction request according to the target signature method includes at least one of the following:
[0125] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node supports the quantum signature algorithm, the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm is verified based on the quantum public key in the extension item, and the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed based on the traditional public key;
[0126] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, a signature generated by signing the information included in the transaction request and the fifth signature using the traditional signature algorithm indicated by the traditional signature algorithm indication is signed based on the traditional public key;
[0127] When the target signature method is a traditional signature method, based on the traditional public key, a sixth signature generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication is signed.
[0128] That is, in the permissioned blockchain scenario, when the client supports the quantum signature algorithm, if the transaction verification node supports the quantum signature algorithm, the quantum public key can be used to verify the first signature based on the quantum signature algorithm, and the second signature can be signed based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, the second signature can be signed based on the traditional public key.
[0129] It can be understood that when the client supports the quantum signature algorithm, a hybrid signature method is adopted. When the client does not support the quantum signature algorithm, a traditional signature method is adopted. The transaction verification node can determine the target signature method adopted by the client based on the certificate. If the target signature method is a hybrid signature method, it can also be made clear that the client supports the quantum signature algorithm. The transaction verification node verifies whether it supports the quantum signature algorithm. That is, if the transaction verification node supports the quantum signature algorithm, based on the quantum public key in the extension item, the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm is verified, and based on the traditional public key, the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed. If the transaction verification node does not support the quantum signature algorithm, then the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed based on the traditional public key. In addition, if the transaction verification node determines based on the certificate that the target signature method adopted by the client is a traditional signature method, it can also be made clear that the client does not support the quantum signature algorithm. When the target signature method is a traditional signature method, the transaction verification node can, based on the traditional public key, sign the sixth signature generated by signing the information included in the transaction request using the traditional signature algorithm indicated by the traditional signature algorithm.
[0130] The process of the above method is described in detail below with some specific embodiments.
[0131] Introduction to related technologies:
[0132] Blockchain technology (distributed ledger technology) is a technology that uses cryptographic algorithms and consensus algorithms to enable some untrusted participants to reach transactions without relying on centralized authority. Due to its traceability and transparency in transactions, it can be widely used in a variety of scenarios, such as finance, manufacturing, and healthcare. Blockchain and distributed ledger are equivalent concepts.
[0133] Based on the method of granting participants access to the system, blockchain systems can be divided into two categories: permissionless blockchain systems and permissioned blockchain systems. In a permissionless blockchain system, any participant can access the system without authorization, and the participants are untrusted. Bitcoin and Ethereum are typical permissionless blockchain systems. In a permissioned blockchain system, only authorized participants can access the system, and there is no complete trust between the participants. Hyperledger Fabric is a typical permissioned blockchain system.
[0134] Each block consists of a block header and a block body, such as Figure 3 As shown. The block header contains the hash value of the previous block (i.e. the previous block) header, version information, nonce (a parameter used to ensure the order and uniqueness of transactions), timestamp, target difficulty coefficient and Merkle root. The hash value of the previous block header is the value obtained by hashing the previous block header and is used to connect to the previous block. The version information is used to indicate the software version used to generate the block. Nonce, timestamp, and target difficulty coefficient are used in the proof of work algorithm (POW) of the consensus mechanism to determine a node to generate a block. The Merkle root is obtained by hashing all transactions in the block body according to the Merkle arrangement, which effectively aggregates all transactions in the block.
[0135] Figure 3 It is an implementation of the Bitcoin blockchain structure. Other types of blockchains (such as Ethereum, Hyperledger) have similar structures. Since different types of blockchains may use different consensus algorithms, some parameters in the block header are also different. Bitcoin and Ethereum use mining consensus algorithms, and there are parameters such as nonce, timestamp, and target difficulty coefficient in the block header, while Hyperledger uses the RAFT consensus algorithm and does not require mining, so its block header does not contain nonce, timestamp, and target difficulty coefficient.
[0136] The first block of each blockchain is called the genesis block, which is hard-coded into the application. Block 1 is linked to the genesis block by including the header hash value of the genesis block in block 1. Block 1 is linked to block 2 in the same way. And so on, all blocks are linked together through hash operations. The timestamp in the block header (such as Bitcoin, Ethereum) or the block number in the block header (such as Ethereum, Hyperledger) determines the uniqueness of the block on the blockchain and also determines the order of the blocks.
[0137] For a permissionless blockchain, each transaction (Tx) in a block contains the transaction content, the sender's public key, the receiver's address, and a signature on the transaction.
[0138] For permissioned blockchain systems, each transaction (Tx) in a block contains the sender’s certificate, the transaction proposal, and a signature on the transaction.
[0139] Cryptographic algorithms used in blockchain:
[0140] The blockchain system includes clients and network nodes. The transaction process of the blockchain system involves the use of cryptographic algorithms. The transaction processes of the permissionless blockchain system and the permissioned blockchain system are basically the same except for the difference in accessing the system. Figure 4 shown.
[0141] Cryptographic algorithms (signature algorithms) are used in multiple transaction links of the blockchain system. For example, digital signature algorithms are used in the transaction generation link to ensure that the transaction is initiated by the digital asset holder. Digital signature algorithms are used in the consensus mechanism link to ensure that the exchanged messages have not been tampered with. Hash functions are used in the consensus mechanism link to mine to determine the accounting node. Hash functions are used in the block formation link to ensure the integrity of the transaction, and hash functions are used in the update of the ledger link to ensure the link between blocks.
[0142] The digital signature algorithm commonly used in the related art cannot resist quantum computing attacks, because the SHOR quantum algorithm can crack the digital signature algorithm. The commonly used symmetric encryption algorithm now needs to double its key length to resist quantum computing attacks, because the GROVER quantum algorithm can double the speed of searching for keys. At present, the hash function in the related art can resist quantum computing attacks, because the quantum algorithm for finding hash collisions is not as fast as the algorithm for finding hash collisions running on existing computers.
[0143] Quantum-safe cryptographic algorithms (i.e. quantum cryptographic algorithms or quantum signature algorithms):
[0144] It is easy to implement quantum-safe symmetric cryptographic algorithms by doubling the key size of the currently used symmetric cryptographic algorithms. In contrast, quantum-safe asymmetric cryptographic algorithms must be designed from scratch. The current consensus is that NP-hard problems and NP-complete problems cannot be solved in polynomial time, even with quantum computers. Quantum-safe asymmetric cryptographic algorithms are basically designed based on NP-hard problems, including: lattice-based algorithms, code-based algorithms, multivariate algorithms, and algorithms based on supersingular homology. In recent years, it has been proposed to promote the standardization of post-quantum algorithms (PQC), namely quantum-safe asymmetric cryptographic algorithms. Post-quantum algorithms that are ready for standardization have also been announced, including 3 digital signature schemes, namely Crystals-Dilithium, FALCON, and SPHINCS+, a PKE and key establishment scheme. In the context of asymmetric cryptographic algorithms, blockchain systems usually only involve signature algorithms.
[0145] The blockchain system relies on cryptographic algorithms to ensure the security of digital assets on the blockchain. In the quantum era, the signature algorithms currently used are no longer safe. The existing blockchain needs to transition to a quantum-safe blockchain. The simplest way is to replace the signature algorithms in the clients and nodes of the existing blockchain network with quantum-safe signature algorithms at the same time. This requires both the client and the node to upgrade the signature algorithm at the same time. However, the existing blockchain system lacks an algorithm version synchronization mechanism. Therefore, during the transition from the existing blockchain to the quantum blockchain, there is an inconsistency in the signature algorithm versions between the clients and nodes of the blockchain network, that is, some clients and nodes have been upgraded to support quantum-safe signature algorithms, while some clients and nodes have not yet been upgraded. How to ensure that valid signature verification can still be performed when there is a software version inconsistency between the client and the node, and that the blockchain system still does not interrupt transactions is a problem that needs to be solved. The embodiment of the present application proposes a signature verification method for a blockchain to achieve a smooth transition from an existing blockchain to a quantum-safe blockchain.
[0146] The basic idea of the embodiment of the present application is: during the transition from the existing blockchain to the quantum blockchain, there is a situation where the signature algorithm versions of the client and the node of the blockchain network are inconsistent. Therefore, there are four situations when the client initiates a transaction to the node: (1) Neither the client nor the node that verifies the transaction (i.e., the transaction verification node) supports the quantum secure signature algorithm (quantum signature algorithm); (2) The client does not support the quantum signature algorithm, but the node that verifies the transaction already supports the quantum signature algorithm; (3) The client supports the quantum signature algorithm, but the node that verifies the transaction does not support the quantum signature algorithm; (3) The client supports the quantum signature algorithm, but the node that verifies the transaction does not support the quantum signature algorithm; (4) Both the client and the node that verifies the transaction support the quantum signature algorithm. These four situations are as follows: Figure 5 shown.
[0147] In order to enable transactions to be verified by nodes in the blockchain that do not support quantum-safe algorithms, the client needs to use a hybrid signature method when signing transactions. The basic idea is that the client first signs the transaction using a quantum-safe signature algorithm, and then signs the transaction and the signature generated based on the quantum-safe signature algorithm using the traditional signature algorithm specified on the existing blockchain system. When a node that does not support the quantum-safe algorithm receives a transaction request generated based on the hybrid signature method, it only needs to verify the signature generated based on the traditional signature algorithm, and ignores the signature using the quantum-safe signature algorithm. This ensures that transaction verification in the blockchain network is not interrupted, even if the signature algorithms of the nodes in the network are inconsistent.
[0148] There are differences in the management of public keys between permissionless blockchain and permissioned blockchain. Permissionless blockchain does not use certificates to manage public keys, while permissioned blockchain manages public keys based on certificates. This leads to differences in the processing of transaction information when existing permissionless blockchain and permissioned blockchain use hybrid signature technology to transition to quantum secure blockchain. The following introduces the transition solutions of existing permissionless blockchain and permissioned blockchain to quantum secure blockchain.
[0149] For permissionless blockchains:
[0150] The transaction request initiated by the permissionless blockchain client may include transaction content (TC), the sender's conventional public key (CPK), the receiver's address (AD), and a signature based on a traditional algorithm (CSign).
[0151] During the transition to quantum-secure blockchain, attackers may implement downgrade attacks, that is, downgrade the hybrid signature method to the traditional signature method. The hybrid signature scheme that first signs with the traditional signature method and then signs with the quantum-secure algorithm is vulnerable to downgrade attacks. After the attacker deletes the information related to the quantum signature, the transaction verifier cannot perceive it. However, this scheme is that the transaction is first signed with the quantum-secure algorithm and then signed with the traditional signature algorithm, which can resist downgrade attacks. After the attacker deletes the information related to the quantum signature, the transaction verifier can detect the existence of the attack by verifying the signature generated by the traditional signature algorithm received.
[0152] (1) The first transaction scenario: When the client initiates a transaction request (e.g., the first transaction request) to the transaction verification node, neither the client nor the transaction verification node supports the quantum secure signature algorithm.
[0153] The transaction request initiated by the client may include transaction content (TC), the sender's conventional public key (CPK), the receiver's address (AD), and a signature based on a conventional signature algorithm (CSign). In this case, CSign is the third signature. The calculation of CSign is to sign all the information in the first transaction request, which can be expressed as follows:
[0154] CSign=Signc(TC,CPK,AD);
[0155] Here, Signc represents a traditional signature algorithm specified on a blockchain (eg, an existing blockchain).
[0156] After receiving the transaction request, the transaction verification node verifies the signature CSign using the sender's traditional public key based on the traditional signature algorithm.
[0157] (2) The second transaction scenario: When the client initiates a transaction request to the node, the client does not support the quantum secure signature algorithm, but the transaction verification node already supports the quantum secure signature algorithm.
[0158] In this case, the generation of the transaction request at the client and the verification at the network node are the same as in the first transaction case.
[0159] (3) The third transaction scenario: When the client initiates a transaction request to the node, the client supports the quantum-safe signature algorithm, but the transaction verification node does not support the quantum-safe signature algorithm.
[0160] The transaction request initiated by the client contains the transaction content (TC), the sender's conventional public key (CPK), the receiver's address (AD), the signature based on the conventional signature algorithm (CSign), the quantum signature algorithm indicator (QSSAI), the sender's quantum safe public key (QPK), i.e., the quantum public key, and the signature based on the quantum signature algorithm (QSign). In this case, the QSign is the first signature, and the CSign is the second signature. In this case, the calculation of the QSign is to sign all the information in the transaction request, and the calculation of the CSign is to sign all the information in the transaction request and the QSign, which are respectively expressed as follows:
[0161] QSign=Signq(TC,CPK,AD,QSSAI,QPK,)
[0162] CSign=Signc(TC,CPK,AD,QSSAI,QPK,QSign)
[0163] Among them, Signc is the traditional signature algorithm specified on the blockchain (for example, the existing blockchain), and Signq is the quantum signature algorithm specified by QSSAI.
[0164] After the transaction verification node receives the transaction request, because the transaction verification node does not support the quantum secure signature algorithm, the transaction verification node only uses the traditional public key to verify CSign.
[0165] (4) The fourth transaction scenario: When the client initiates a transaction request to the node, both the client and the transaction verification node support the quantum secure signature algorithm.
[0166] In this case, the generation of the transaction request on the client side is the same as in the third transaction case.
[0167] After receiving the transaction request, the transaction verification node first uses the quantum secure public key QPK, that is, the quantum public key uses the quantum secure signature algorithm specified by QSSAI to verify QSign, and then uses the traditional public key CPK to verify the second signature CSign based on the traditional signature algorithm.
[0168] For permissioned blockchains:
[0169] The transaction request initiated by the existing permissioned blockchain client includes the sender's certificate (Certificate, Cert), a transaction proposal (Transaction Proposal, TP) and a signature based on the traditional signature algorithm (CSign: Conventional Signature).
[0170] When the client supports the hybrid signature method, for example, an X.509 certificate that supports multiple cryptographic algorithms can be used. In addition to containing information about traditional cryptographic algorithms (e.g., indication information of traditional cryptographic algorithms, i.e., indication of traditional signature algorithms, and public keys of traditional cryptographic algorithms, i.e., traditional public keys of traditional signature algorithms, etc.), it is also extended in the certificate, i.e., the certificate may also include extensions, which may contain relevant information about alternate cryptographic algorithms, for example, the alternate public key information, i.e., quantum public key, the alternate signature algorithm value, i.e., quantum signature algorithm indication, in the AltPublicKeyInfo extension, and the alternate signature, i.e., the fourth signature, in the altSignatureAlgorithm extension. Here, the alternate cryptographic algorithm may be a certain quantum secure signature algorithm (i.e., a certain quantum signature algorithm).
[0171] The transaction request can carry a traditional certificate Cert or a certificate with extension CertE. The former indicates that the transaction uses a traditional signature method, while the latter indicates that the transaction uses a hybrid signature method. The certificate in the transaction request is protected by the signature Csign or the signature Qsign and cannot be tampered with or replaced by an attacker.
[0172] (1) The first transaction scenario: When the client initiates a transaction request (e.g., the second transaction request) to the node, neither the client nor the transaction verification node supports the quantum secure signature algorithm.
[0173] The second transaction request initiated by the client contains the sender's certificate (Certificate, Cert), transaction proposal (Transaction Proposal, TP), and a signature based on the conventional signature algorithm (Conventional Signature, CSign). In this case, CSign is the sixth signature. The calculation of CSign is to sign all the information in the transaction request, which can be expressed as follows:
[0174] CSign = Signc(Cert, TP);
[0175] Here, Signc is the traditional signature algorithm indicated in Cert.
[0176] After receiving the transaction request, the transaction verification node first detects that the certificate is a traditional certificate and determines that it is a traditional signature method. The traditional public key is obtained from the certificate Cert and the signature is verified using this public key based on the traditional signature algorithm.
[0177] (2) The second transaction scenario: When the client initiates a transaction request to the node, the client does not support the quantum secure signature algorithm, but the transaction verification node already supports the quantum secure signature algorithm.
[0178] In this case, the generation of the transaction request at the client and the verification at the network node are the same as in the first transaction case.
[0179] (3) The third transaction scenario: When the client initiates a transaction request to the node, the client supports the quantum-safe signature algorithm, but the transaction verification node does not support the quantum-safe signature algorithm.
[0180] The transaction request initiated by the client includes the sender's certificate with extensions (CertE), transaction proposal (TP), signature based on the conventional signature algorithm (CSign), and signature based on the quantum-safe algorithm (QSign). In this case, QSign is the fifth signature, and CSign is the signature generated by signing the information included in the transaction request and the fifth signature based on the conventional signature algorithm indicated by the conventional signature algorithm indication. The calculation of QSign is to sign all the information in the transaction request, and the calculation of CSign is to sign all the information in the transaction request and QSign, which are respectively expressed as follows:
[0181] QSign = Signq(CertE, TP);
[0182] CSign=Signc(CertE, TP, QSign);
[0183] Here, Signc is the traditional signature algorithm indicated by the certificate CertE, and Signq is the quantum security signature algorithm indicated by the certificate CertE. The certificate CertE contains the traditional public key and the quantum security public key, i.e., the quantum public key.
[0184] After receiving the transaction request, the transaction verification node first detects the certificate with extensions (CertE) to determine that it is a hybrid signature method. However, because the transaction verification node does not support the quantum security signature algorithm, the transaction verification node only obtains the traditional public key from the certificate CertE and uses this public key to verify the signature CSign based on the traditional signature algorithm.
[0185] (4) The fourth transaction scenario: When the client initiates a transaction request to the node, both the client and the transaction verification node support the quantum secure signature algorithm.
[0186] In this case, the generation of the transaction request on the client side is the same as in the third transaction case.
[0187] After receiving the transaction request, the transaction verification node first detects the certificate with extensions (CertE) to determine that it is a hybrid signature method. The transaction verification node obtains the traditional public key and quantum-safe public key from the certificate CertE, first uses the quantum-safe public key to verify the signature QSign based on the quantum-safe signature algorithm indicated in the certificate, and then uses the traditional public key to verify the signature CSign based on the traditional signature algorithm indicated in the certificate.
[0188] During the transition from the existing blockchain to the quantum blockchain, it is necessary to ensure that the blockchain system can still conduct transactions even if there are inconsistencies in the software versions of the client and the node. The solution of the embodiment of the present application can solve the problem of effectively verifying the signature of the transaction during this period to ensure the normal transactions of the blockchain system.
[0189] like Figure 6 As shown, Figure 6 600 is a schematic diagram of a signature device 600 provided in an embodiment of the present application, which is applied to a client, such as Figure 6 As shown, the signature device 600 includes:
[0190] The signature module 601 is used to sign the transaction request based on a hybrid signature method when the client supports the quantum signature algorithm. The hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm;
[0191] If the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0192] In some embodiments, the signature module 601 includes:
[0193] A first sub-signature unit, configured to sign the information included in the transaction request based on a quantum signature algorithm to generate a first signature;
[0194] The second sub-signature unit is used to sign the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0195] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0196] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0197] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0198] Quantum public key;
[0199] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0200] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0201] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0202] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0203] In some embodiments, in a permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information:
[0204] Traditional public keys for traditional signature algorithms;
[0205] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0206] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0207] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0208] Quantum public key;
[0209] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0210] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0211] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0212] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0213] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0214] A signature generated by signing information included in the transaction request based on a traditional signature algorithm indicated by the traditional signature algorithm indication.
[0215] The verification device 600 provided in this embodiment can implement each process of each embodiment of the above-mentioned signature method applied to the client, the technical features correspond one to one, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0216] like Figure 7 As shown, Figure 7 is a schematic diagram of the structure of a verification device 700 provided in an embodiment of the present application, which is applied to a transaction verification node, such as Figure 7 As shown, the verification device 700 includes:
[0217] The first receiving module 701 is used to receive a signed transaction request sent by a client, where the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports the quantum signature algorithm, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm;
[0218] The verification module 702 is used to verify the transaction request after the transaction is performed.
[0219] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0220] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0221] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0222] Quantum public key;
[0223] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0224] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0225] In some embodiments, the verification module 702 includes at least one of the following:
[0226] A first sub-verification unit is used to verify the first signature based on the quantum signature algorithm based on the quantum public key, and to sign the second signature based on the traditional public key when the transaction verification node supports the quantum signature algorithm;
[0227] The second sub-verification unit is used to sign the second signature based on the traditional public key when the transaction verification node does not support the quantum signature algorithm.
[0228] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0229] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0230] In some embodiments, the verification module 702 includes:
[0231] The third sub-verification unit is used to sign the third signature based on the traditional public key when the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm.
[0232] In some embodiments, in a permissioned blockchain scenario, the signed transaction request includes a certificate, and the certificate includes at least one of the following information:
[0233] Traditional public keys for traditional signature algorithms;
[0234] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0235] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0236] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0237] Quantum public key;
[0238] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0239] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0240] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0241] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0242] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0243] A sixth signature is generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0244] In some embodiments, the signature module 702 includes at least one of the following:
[0245] A determination unit, used to determine a target signature mode according to the certificate, where the target signature mode is a hybrid signature mode or a traditional signature mode;
[0246] The fourth verification unit is used to verify the transaction request according to the target signature method.
[0247] In some embodiments, the determining unit is specifically configured to:
[0248] In the case where the certificate includes an extension item, the target signature mode is determined to be a hybrid signature mode;
[0249] When the certificate does not include an extension, the target signature mode is determined to be a traditional signature mode.
[0250] In some embodiments, the fourth verification unit is specifically used for at least one of the following:
[0251] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node supports the quantum signature algorithm, the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm is verified based on the quantum public key in the extension item, and the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed based on the traditional public key;
[0252] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, a signature generated by signing the information included in the transaction request and the fifth signature using the traditional signature algorithm indicated by the traditional signature algorithm indication is signed based on the traditional public key;
[0253] When the target signature method is a traditional signature method, based on the traditional public key, a sixth signature generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication is signed.
[0254] The verification device 700 provided in this embodiment can implement each process of each embodiment of the above-mentioned verification method applied to the transaction verification node. The technical features correspond one to one and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0255] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the various processes of the above-mentioned signature method embodiment applied to the client are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0256] For details, see Figure 8 An embodiment of the present application further provides an electronic device, including a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805 and a memory 806.
[0257] The processor 805 is used for:
[0258] If the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, which is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm;
[0259] If the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0260] In some embodiments, the processor 805 is specifically configured to:
[0261] Signing the information included in the transaction request based on the quantum signature algorithm to generate a first signature;
[0262] The information included in the transaction request and the first signature are signed based on a traditional signature algorithm.
[0263] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0264] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0265] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0266] Quantum public key;
[0267] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0268] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0269] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0270] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0271] In some embodiments, in a permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information:
[0272] Traditional public keys for traditional signature algorithms;
[0273] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0274] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0275] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0276] Quantum public key;
[0277] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0278] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0279] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0280] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0281] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0282] A signature generated by signing information included in the transaction request based on a traditional signature algorithm indicated by the traditional signature algorithm indication.
[0283] exist Figure 8 In the embodiment, the bus architecture (represented by bus 801) is shown, and bus 801 may include any number of interconnected buses and bridges, and bus 801 links various circuits including one or more processors represented by processor 805 and memory represented by memory 806. Bus 801 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 804 provides an interface between bus 801 and transceiver 802. Transceiver 802 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 805 is transmitted on a wireless medium via antenna 803, and further, antenna 803 also receives data and transmits the data to processor 805.
[0284] The processor 805 is responsible for managing the bus 801 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 806 can be used to store data used by the processor 805 when performing operations.
[0285] Optionally, the processor 805 may be a CPU, an ASIC, an FPGA or a CPLD.
[0286] The processor of the electronic device provided in this embodiment can implement each process of each embodiment of the above-mentioned signature method applied to the client, the technical features correspond one to one, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0287] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned application client signature method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0288] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the various processes of the above-mentioned verification method embodiment applied to a transaction verification node are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0289] For details, see Fig. 9 An embodiment of the present application further provides an electronic device, including a bus 901, a transceiver 902, an antenna 903, a bus interface 904, a processor 905 and a memory 906.
[0290] The processor 905 is used for:
[0291] Receive a signed transaction request sent by a client, where the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports the quantum signature algorithm, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm;
[0292] Verify the signed transaction request.
[0293] In some embodiments, in a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
[0294] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0295] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0296] Quantum public key;
[0297] A first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0298] The second signature is generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0299] In some embodiments, the processor 905 is specifically configured to:
[0300] When the transaction verification node supports the quantum signature algorithm, the first signature is verified based on the quantum signature algorithm based on the quantum public key, and the second signature is signed based on the traditional public key;
[0301] When the transaction verification node does not support the quantum signature algorithm, the second signature is signed based on the traditional public key.
[0302] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0303] The third signature is generated by signing the information included in the transaction request based on a traditional signature algorithm.
[0304] In some embodiments, the processor 905 is specifically configured to:
[0305] When the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, the third signature is signed based on the traditional public key.
[0306] In some embodiments, in a permissioned blockchain scenario, the signed transaction request includes a certificate, and the certificate includes at least one of the following information:
[0307] Traditional public keys for traditional signature algorithms;
[0308] Traditional signature algorithm indication: Traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0309] In some embodiments, when the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following:
[0310] Quantum signature algorithm indication, which is used to indicate the quantum signature algorithm;
[0311] Quantum public key;
[0312] The fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is the content included in the certificate except the fourth signature.
[0313] In some embodiments, when the client supports the quantum signature algorithm, the signed transaction request also includes at least one of the following:
[0314] A fifth signature generated by signing the information included in the transaction request based on a quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate;
[0315] A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0316] In some embodiments, when the client does not support the quantum signature algorithm, the signed transaction request also includes:
[0317] A sixth signature is generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
[0318] In some embodiments, the processor 905 is specifically configured to:
[0319] Determine the target signature method according to the certificate, and the target signature method can be a hybrid signature method or a traditional signature method;
[0320] Verify the transaction request based on the target signature method.
[0321] In some embodiments, the processor 905 is specifically configured to:
[0322] In the case where the certificate includes an extension item, the target signature mode is determined to be a hybrid signature mode;
[0323] When the certificate does not include an extension, the target signature mode is determined to be a traditional signature mode.
[0324] In some embodiments, the processor 905 is specifically configured to:
[0325] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node supports the quantum signature algorithm, the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm is verified based on the quantum public key in the extension item, and the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed based on the traditional public key;
[0326] In the case where the target signature mode is a hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, a signature generated by signing the information included in the transaction request and the fifth signature using the traditional signature algorithm indicated by the traditional signature algorithm indication is signed based on the traditional public key;
[0327] When the target signature method is a traditional signature method, based on the traditional public key, a sixth signature generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication is signed.
[0328] exist Fig. 9 In the embodiment, the bus architecture (represented by bus 901) may include any number of interconnected buses and bridges, and bus 901 links various circuits including one or more processors represented by processor 905 and memory represented by memory 906. Bus 901 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 904 provides an interface between bus 901 and transceiver 902. Transceiver 902 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 905 is transmitted on a wireless medium via antenna 903, and further, antenna 903 also receives data and transmits the data to processor 905.
[0329] The processor 905 is responsible for managing the bus 901 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 906 can be used to store data used by the processor 905 when performing operations.
[0330] Optionally, the processor 905 may be a CPU, an ASIC, an FPGA or a CPLD.
[0331] The processor of the electronic device provided in this embodiment can implement each process of each embodiment of the above-mentioned verification method applied to the transaction verification node. The technical features correspond one to one and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0332] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned verification method embodiment of the application transaction verification node is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0333] The embodiments of the present application also provide a computer program product, including a computer program. When the computer program is executed by a processor, the various processes of the above-mentioned method embodiments are implemented and the same technical effects can be achieved. To avoid repetition, they are not described here.
[0334] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0335] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0336] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A signature method, characterized in that: Applied to a client, the method comprises: In the case where the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
2. The method according to claim 1, characterized in that The step of signing the transaction request based on the hybrid signature method includes: Signing the information included in the transaction request based on the quantum signature algorithm to generate a first signature; The information included in the transaction request and the first signature are signed based on the traditional signature algorithm.
3. The method according to claim 1, characterized in that In a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of the traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
4. The method according to claim 3, characterized in that In the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following: A quantum signature algorithm indication, wherein the quantum signature algorithm indication is used to indicate the quantum signature algorithm; Quantum public key; A first signature generated by signing the information included in the transaction request based on the quantum signature algorithm; A second signature is generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
5. The method according to claim 3, characterized in that: In the case where the client does not support the quantum signature algorithm, the signed transaction request also includes: A third signature is generated by signing the information included in the transaction request based on the traditional signature algorithm.
6. The method according to claim 1, characterized in that In the permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information: A traditional public key of the traditional signature algorithm; A traditional signature algorithm indication is used to indicate the traditional signature algorithm.
7. The method according to claim 6, characterized in that In the case where the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following: A quantum signature algorithm indication, wherein the quantum signature algorithm indication is used to indicate the quantum signature algorithm; Quantum public key; A fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, where the first content is the content included in the certificate except the fourth signature.
8. The method according to claim 6, characterized in that In the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following: a fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate; A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
9. The method according to claim 6, characterized in that In the case where the client does not support the quantum signature algorithm, the signed transaction request also includes: A signature is generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
10. A verification method, characterized in that: Applied to a transaction verification node, the method comprises: receiving a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a traditional signature algorithm after signing based on the quantum signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm; The signed transaction request is verified.
11. The method according to claim 10, characterized in that In a permissionless blockchain scenario, the signed transaction request includes: a traditional public key of the traditional signature algorithm, wherein the traditional signature algorithm is a signature algorithm specified on the blockchain.
12. The method according to claim 11, characterized in that In the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following: A quantum signature algorithm indication, wherein the quantum signature algorithm indication is used to indicate the quantum signature algorithm; Quantum public key; A first signature generated by signing the information included in the transaction request based on the quantum signature algorithm; A second signature is generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
13. The method according to claim 12, characterized in that The verifying of the signed transaction request includes at least one of the following: In the case where the transaction verification node supports the quantum signature algorithm, based on the quantum public key, verifying the first signature based on the quantum signature algorithm, and signing the second signature based on the traditional public key; In the case that the transaction verification node does not support the quantum signature algorithm, the second signature is signed based on the traditional public key.
14. The method according to claim 11, characterized in that In the case where the client does not support the quantum signature algorithm, the signed transaction request also includes: A third signature is generated by signing the information included in the transaction request based on the traditional signature algorithm.
15. The method according to claim 14, characterized in that The verifying the signed transaction request includes: In a case where the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, the third signature is signed based on the traditional public key.
16. The method according to claim 10, characterized in that In the permissioned blockchain scenario, the signed transaction request includes a certificate, and the certificate includes at least one of the following information: A traditional public key of the traditional signature algorithm; A traditional signature algorithm indication is used to indicate the traditional signature algorithm.
17. The method according to claim 16, characterized in that In the case where the client supports the quantum signature algorithm, the certificate further includes an extension item, and the extension item includes at least one of the following: A quantum signature algorithm indication, wherein the quantum signature algorithm indication is used to indicate the quantum signature algorithm; Quantum public key; A fourth signature is generated by signing the first content in the certificate based on the quantum signature algorithm, where the first content is the content included in the certificate except the fourth signature.
18. The method according to claim 16, characterized in that In the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following: a fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm, where the quantum signature algorithm is the quantum signature algorithm indicated by the certificate; A signature is generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
19. The method according to claim 16, characterized in that In the case where the client does not support the quantum signature algorithm, the signed transaction request also includes: A sixth signature is generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication.
20. The method according to claim 16, characterized in that The verifying of the signed transaction request includes at least one of the following: Determine a target signature method according to the certificate, where the target signature method is a hybrid signature method or a traditional signature method; The transaction request is verified according to the target signature method.
21. The method according to claim 20, characterized in that The determining of the target signature mode according to the certificate includes: In the case where the certificate includes an extension item, determining that the target signature mode is the hybrid signature mode; In a case where the certificate does not include the extension item, the target signature mode is determined to be the traditional signature mode.
22. The method according to claim 20 or 21, characterized in that The verifying the signed transaction request according to the target signature method includes at least one of the following: In the case where the target signature mode is a hybrid signature mode, if the transaction verification node supports the quantum signature algorithm, then based on the quantum public key in the extended item of the certificate, the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm is verified, and based on the traditional public key, the signature generated by signing the information included in the transaction request and the fifth signature based on the traditional signature algorithm indicated by the traditional signature algorithm is signed; In the case where the target signature mode is a hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, a signature is signed based on the traditional public key for a signature generated by signing the information included in the transaction request and the fifth signature using the traditional signature algorithm indicated by the traditional signature algorithm indication; In the case where the target signature method is a traditional signature method, based on the traditional public key, a sixth signature generated by signing the information included in the transaction request based on the traditional signature algorithm indicated by the traditional signature algorithm indication is signed.
23. A signature device, characterized in that: Applied to a client, the device comprises: A signature module, used to sign the transaction request based on a hybrid signature method when the client supports the quantum signature algorithm, wherein the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
24. A verification device, characterized in that: Applied to a transaction verification node, the device comprises: A first receiving module is configured to receive a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a traditional signature algorithm after signing based on a quantum signature algorithm; or the transaction request is a transaction request signed based on a traditional signature algorithm when the client does not support a quantum signature algorithm; The verification module is used to verify the transaction request after signing.
25. An electronic device, characterized in that: Including transceiver and processor, The processor is configured to: If the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, where the hybrid signature method is a method of signing based on the quantum signature algorithm and then signing based on the traditional signature algorithm; In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
26. An electronic device, characterized in that: Including transceiver and processor, The processor is configured to: receiving a signed transaction request sent by a client, wherein the signed transaction request is a transaction request signed based on a hybrid signature method when the client supports a quantum signature algorithm, wherein the hybrid signature method is a method of signing based on a traditional signature algorithm after signing based on the quantum signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm when the client does not support the quantum signature algorithm; The signed transaction request is verified.
27. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method described in any one of claims 1 to 9 are implemented, or the steps of the method described in any one of claims 10 to 22 are implemented.
28. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 9, or implements the steps of the method according to any one of claims 10 to 22.
29. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 22.
Citation Information
Cited By
Digital signature method and system, electronic equipment, storage medium and program product
CN120090809A
Signature method and apparatus, verification method and apparatus, device, storage medium, and program product
WO2026067177A1
