Signature method and apparatus, verification method and apparatus, device, storage medium, and program product
By adopting a hybrid signature method in the blockchain system, the client performs quantum signature first and then traditional signature when the quantum signature algorithm is supported. This solves the problem of transaction verification interruption during the transition of the blockchain system and realizes secure transaction verification under different signature algorithm versions.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-04-02
AI Technical Summary
During the transition from traditional blockchain to quantum blockchain, existing blockchain systems experience transaction verification interruptions due to inconsistencies in the signature algorithm versions between clients and nodes.
A hybrid signature approach is adopted, where the client performs a quantum signature first and then a traditional signature when the quantum signature algorithm is supported; when the quantum signature algorithm is not supported, only a traditional signature is performed, ensuring that the traditional signature algorithm is used for verification in the end.
Even if the signature algorithm versions of the client and the transaction verification node are inconsistent, verification can still be performed using traditional signature algorithms, reducing transaction verification interruptions, improving transaction security, and resisting downgrade attacks.
Smart Images

Figure CN2025122097_02042026_PF_FP_ABST
Abstract
Description
Signature method, verification method, device, equipment, storage medium and program product
[0001] Cross-reference to Related Applications
[0002] The present disclosure claims priority from Chinese Patent Application No. 202411378730.5 filed on September 30, 2024 in China, the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The present disclosure relates to the technical field of data processing, and in particular, to a signature method, a verification method, a device, an equipment, a storage medium and a program product. BACKGROUND
[0004] Blockchain technology (Distributed Ledger Technology) is a technology that enables some untrusted participants to reach a transaction without relying on a centralized authority by using cryptographic algorithms and consensus algorithms. Due to its traceability and transparency in transactions, it can be widely applied in various 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. A blockchain system contains clients and network nodes, and the transaction process of the blockchain system involves the use of signature algorithms (i.e. cryptographic algorithms). Signature algorithms are used in multiple transaction steps of the blockchain system, for example, signature algorithms are used in the transaction generation step to ensure that the transaction is initiated by the digital asset holder, signature algorithms are used in the consensus mechanism step to ensure that the exchanged messages are not tampered with, hash functions are used in the consensus mechanism step for mining to determine the accounting node, hash functions are used in the block formation step to ensure the integrity of the transaction, and hash functions are used in the update ledger step to ensure the linkage between blocks.
[0005] Blockchain systems rely 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 low. Existing blockchains need to be upgraded to quantum-safe blockchains. The simplest way is to replace the signature algorithms in the clients and nodes in the existing blockchain network with quantum-safe signature algorithms at the same time. However, the clients and nodes need to be upgraded at the same time (i.e. signature algorithm upgrade). However, the existing blockchain system lacks a software version synchronization mechanism. Therefore, during the transition from the existing blockchain to the quantum blockchain, there is a situation where the signature algorithm versions of the clients and nodes of the blockchain network are inconsistent, i.e. some clients and nodes have been upgraded to support quantum-safe signature algorithms, while some clients and nodes have not been upgraded to support quantum-safe signature algorithms, which can easily lead to transaction verification interruption. SUMMARY
[0006] Embodiments of the present disclosure provide a signature method, a verification method, an apparatus, a device, a storage medium and a program product to solve the problem that the transaction verification is interrupted due to inconsistent signature algorithm versions.
[0007] To solve the above technical problems, the present disclosure is implemented as follows:
[0008] In a first aspect, the embodiments of the present disclosure provide a signature method applied to a client, and the method comprises:
[0009] In a case where the client supports a quantum signature algorithm, signing a transaction request based on a hybrid signature manner, the hybrid signature manner being a manner of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm;
[0010] In a case where the client does not support the quantum signature algorithm, signing the transaction request based on the traditional signature algorithm.
[0011] In a second aspect, the embodiments of the present disclosure provide a verification method applied to a transaction verification node, and the method comprises:
[0012] Receiving a signed transaction request sent by a client, the signed transaction request being a transaction request signed based on a hybrid signature manner in a case where the client supports a quantum signature algorithm, the hybrid signature manner being a manner of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm, or the transaction request being a transaction request signed based on the traditional signature algorithm in a case where the client does not support the quantum signature algorithm;
[0013] Verifying the signed transaction request.
[0014] In a third aspect, the embodiments of the present disclosure provide a signature apparatus applied to a client, and the apparatus comprises:
[0015] A signature module configured to, in a case where the client supports a quantum signature algorithm, sign a transaction request based on a hybrid signature manner, the hybrid signature manner being a manner of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm;
[0016] In a case where the client does not support the quantum signature algorithm, sign the transaction request based on the traditional signature algorithm.
[0017] In a fourth aspect, the embodiments of the present disclosure provide a verification apparatus applied to a transaction verification node, and the apparatus comprises:
[0018] The 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 in a case where the client supports a quantum signature algorithm, and 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 the traditional signature algorithm in a case where the client does not support the quantum signature algorithm.
[0019] The verification module is configured to verify the signed transaction request.
[0020] In a fifth aspect, an electronic device is provided, which includes a transceiver and a processor,
[0021] The processor is configured to:
[0022] sign a transaction request based on a hybrid signature method in a case where the client supports a quantum signature algorithm, and the hybrid signature method is a method of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm;
[0023] sign the transaction request based on the traditional signature algorithm in a case where the client does not support the quantum signature algorithm.
[0024] In a sixth aspect, an electronic device is provided, which includes a transceiver and a processor,
[0025] 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 in a case where the client supports a quantum signature algorithm, and 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 the traditional signature algorithm in a case where the client does not support the quantum signature algorithm.
[0026] verify the signed transaction request.
[0027] In a seventh aspect, an electronic device is provided, which includes a processor, a memory, and a program stored in the memory and executable on the processor, and the program, when executed by the processor, implements the steps of the above method.
[0028] In an eighth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the above method.
[0029] In a ninth aspect, the embodiments of the present disclosure further provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the above method.
[0030] In the method of the present embodiment, the client can adopt different ways of signing according to whether the quantum signature algorithm is supported, that is, if the client supports the quantum signature algorithm, the hybrid signature method is adopted to sign the transaction request, that is, the quantum signature algorithm is first used for signing, and then the traditional signature algorithm is continued to be used for signing, and if the client does not support the quantum signature algorithm, the traditional signature method is adopted, that is, the transaction request is signed by using the traditional signature algorithm. Since in the embodiments of the present disclosure, the hybrid signature method is to continue to use the traditional signature algorithm for signing after using the quantum signature algorithm for signing, and the traditional signature method is to use the traditional signature algorithm for signing, both of the two signature methods finally use the traditional signature algorithm, so that even if the signature algorithm versions of the client and the transaction verification node are inconsistent, the traditional signature algorithm can be used for verification, and the occurrence of the interruption of verification is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed in the description of the embodiments of the present disclosure will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can also be obtained according to these drawings without creative labor.
[0032] FIG. 1 is a flowchart of one of the verification methods provided by the embodiments of the present disclosure;
[0033] FIG. 2 is a flowchart of another of the verification methods provided by the embodiments of the present disclosure;
[0034] FIG. 3 is a structural diagram of a blockchain;
[0035] FIG. 4 is a transaction flowchart in a blockchain;
[0036] FIG. 5 is an example diagram of four transaction situations provided by the embodiments of the present disclosure;
[0037] FIG. 6 is a flowchart of one of the verification devices provided by the embodiments of the present disclosure;
[0038] FIG. 7 is a flowchart of another of the verification devices provided by the embodiments of the present disclosure;
[0039] FIG. 8 is a flowchart of one of the electronic devices provided by the embodiments of the present disclosure;
[0040] FIG. 9 is a flowchart of another of the electronic devices provided by the embodiments of the present disclosure. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below in combination with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present disclosure.
[0042] Referring to FIG. 1, FIG. 1 is a flowchart of a verification method provided by an embodiment of the present disclosure, which is executed by a client. As shown in FIG. 1, the verification method provided by the embodiment includes the following steps:
[0043] In the case that the client supports a quantum signature algorithm, the transaction request is signed based on a hybrid signature manner, which is a manner of signing based on a traditional signature algorithm after signing based on a quantum 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.
[0044] It should be understood that the traditional signature algorithm is a non-quantum signature algorithm, and there are many types of the traditional signature algorithm adopted by the present disclosure, which are not limited in the present disclosure, for example, it can be any one of the existing traditional signature algorithms. It should be noted that the client can support or not support the quantum signature algorithm, and the client can adopt different manners for signing according to whether the client supports the quantum signature algorithm, that is, if the quantum signature algorithm is supported, the transaction request is first signed based on the quantum signature algorithm, and then based on the traditional signature algorithm, and if the quantum signature algorithm is not supported, the transaction request is signed based on the traditional signature algorithm.
[0045] In addition, the method can also include that the client can send the signed transaction request to the transaction verification node for verification, i.e., the transaction verification node can verify the signed transaction request. It should be noted that the client and the transaction verification node both support the traditional signature algorithm, and the transaction verification node can support or not support the quantum signature algorithm. If the client supports the quantum algorithm and the transaction verification node supports the quantum signature algorithm, the transaction verification node can verify the signed transaction request by using the traditional signature algorithm and the quantum signature algorithm after receiving the signed transaction request, so as to ensure the transaction security. If the client supports and the transaction verification node does not support the quantum signature algorithm, the transaction verification node can verify by using the traditional signature algorithm. If the client does not support and the transaction verification node supports the quantum signature algorithm, the transaction verification node can verify by using the traditional signature algorithm. If the client does not support and the transaction verification node does not support the quantum signature algorithm, the transaction verification node can verify by using the traditional signature algorithm. Even if the signature algorithm versions of 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), the transaction verification node can still verify through the above signature process of the client, reduce the transaction verification interruption, improve the transaction verification effect, and improve the transaction security.
[0046] In the method of the embodiment, the client can sign in different ways according to whether the quantum signature algorithm is supported, i.e., if the client supports the quantum signature algorithm, the hybrid signature method is used to sign the transaction request, i.e., the quantum signature algorithm is used first and then the traditional signature algorithm is used to continue signing. If the client does not support the quantum signature algorithm, the traditional signature method, i.e., the traditional signature algorithm, is used to sign the transaction request. In the embodiment of the disclosure, the hybrid signature method is to use the quantum signature algorithm to sign and then use the traditional signature algorithm to continue signing, and the traditional signature method is to use the traditional signature algorithm to sign. Both of the two signature methods use the traditional signature algorithm at last. Therefore, even if the signature algorithm versions of the client and the transaction verification node are inconsistent, the traditional signature algorithm can be used for verification, and the occurrence of the verification interruption can be reduced.
[0047] In some embodiments, signing the transaction request based on the hybrid signature method includes:
[0048] Signing the information included in the transaction request based on the quantum signature algorithm to generate a first signature;
[0049] Signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
[0050] During the transition to the quantum blockchain, an attacker can implement a downgrade attack, i.e., downgrade the hybrid signature method to the traditional signature method. If the hybrid signature scheme that first signs using the traditional signature method and then signs using the quantum signature algorithm is vulnerable to the downgrade attack, the transaction verifier cannot perceive after the attacker deletes the quantum signature related information. However, in the process of signing the transaction request using the hybrid signature method in the embodiment of the present disclosure, 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. In this way, the downgrade attack can be resisted, and even if the attacker deletes the quantum signature related information, the transaction verifier can discover the existence of the attack by verifying the signature generated by the traditional signature algorithm, thereby improving the transaction security.
[0051] In some embodiments, in the permissionless blockchain scenario, the signed transaction request includes a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a designated signature algorithm on the blockchain.
[0052] 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, i.e., permissionless blockchain scenario and permissioned blockchain scenario. There is a difference in the management of public keys between permissionless blockchain and permissioned blockchain. The permissionless blockchain does not manage the public key using a certificate, while the permissioned blockchain manages the public key based on a certificate, so that the processing of transactions is different in the permissionless blockchain and permissioned blockchain scenarios. In the present embodiment, in the permissionless blockchain scenario, a traditional signature algorithm can be predetermined on the blockchain, and the traditional signature algorithm used for signing is the algorithm predetermined on the blockchain, and the transaction request can carry the traditional public key of the traditional signature algorithm. In addition, in the permissionless blockchain scenario, the transaction request can carry at least one of the following, but is not limited to: transaction content; address (Address, AD) of the transaction receiver.
[0053] In addition, the signed transaction request can 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 can be: a signature generated by signing the information included in the transaction request based on the traditional signature algorithm and the signature generated by signing the information included in the transaction request based on the quantum signature algorithm (also referred to as a first signature). If the client does not support the quantum signature algorithm, the signature based on the traditional signature algorithm carried can be: a signature generated by signing the information included in the transaction request based on the traditional signature algorithm (also referred to as a third signature).
[0054] The traditional public key can also be referred to as a sender's traditional public key. It should be noted that the sender here refers to a party that generates and sends a transaction request, that is, a party that requests a transaction. The receiver can be a party that performs a transaction operation. For example, for a money transfer transaction from account A to account B, the terminal of account A (such as the terminal logged in by account A) can be understood as the sender, such as the client in the embodiment. The money transfer operation needs to be performed through a transaction node. For example, the transaction verification node forwards the transaction request to the transaction node after verifying the transaction request. 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.
[0055] In the embodiment, the signed transaction request can carry the traditional public key, so that the transaction verification node can verify the signature generated based on the traditional signature algorithm after receiving the signed transaction request.
[0056] In some embodiments, in the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0057] The quantum signature algorithm indication indicates the quantum signature algorithm;
[0058] The quantum public key;
[0059] The first signature generated by signing the information included in the transaction request based on the quantum signature algorithm;
[0060] The second signature generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
[0061] In the permissionless blockchain scenario, if the client supports the quantum signature algorithm, the hybrid signature method is used to sign the transaction request, and the obtained signed transaction request can further carry at least one of the quantum signature algorithm indication, the quantum public key of the quantum signature algorithm, the first signature generated by signing the information included in the transaction request based on the quantum signature algorithm, and the 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, and 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 verified 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, and after receiving the signed transaction request, the second signature can still be verified based on the traditional public key. To reduce the occurrence of transaction verification interruption and improve transaction security.
[0062] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0063] A third signature generated by signing the information included in the transaction request based on the traditional signature algorithm.
[0064] In the permissionless blockchain scenario, if the client does not support the quantum signature algorithm, the traditional signature method is used to sign the transaction request, and the obtained signed transaction request can further 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, and after receiving the signed transaction request sent by the client, the third signature can be verified 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, and after receiving the signed transaction request, the third signature can still be verified based on the traditional public key. To reduce the occurrence of transaction verification interruption and improve transaction security.
[0065] In some embodiments, in the permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information:
[0066] The traditional public key of the traditional signature algorithm;
[0067] The traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
[0068] That is, in the embodiment, the traditional signature algorithm can be indicated by the traditional signature algorithm indication in the certificate, and the traditional public key of the traditional signature algorithm can also be included in the certificate, and the traditional public key can also be referred to as the traditional public key of the sender, that is, the traditional public key of the party requesting the transaction. Unlike the designated manner on the block chain in the above-mentioned embodiments, the traditional signature algorithm in the embodiment is indicated by the traditional signature algorithm indication in the certificate.
[0069] In addition, in the permission block chain scenario, in addition to at least one of the traditional public key and the traditional signature algorithm indication carried in the transaction request, the transaction request can also carry a transaction proposal (TP) and the like. In addition, in the permission block chain scenario, the transaction request after signing can also carry a signature based on the traditional signature algorithm. Since the client adopts different signature manners 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 can be a signature generated by signing the information included in the transaction request and the fifth signature (generated by signing the information included in the transaction request based on the quantum signature algorithm) based on the traditional signature algorithm indicated by the traditional signature algorithm indication indicated by the certificate. If the client does not support the quantum signature algorithm, the signature based on the traditional signature algorithm carried can 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.
[0070] In the embodiment, at least one of the traditional public key and the traditional signature algorithm indication can be carried in the transaction request after signing, so that the traditional public key is used by the subsequent transaction verification node to verify the signature generated based on the indicated traditional signature algorithm after receiving the transaction request after signing.
[0071] In some embodiments, 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:
[0072] The quantum signature algorithm indication is used to indicate the quantum signature algorithm;
[0073] The quantum public key;
[0074] The fourth signature generated by signing the first content in the certificate based on the quantum signature algorithm, and the first content is content included in the certificate except the fourth signature.
[0075] Compared with the certificate in the related art, in the embodiment of the disclosure, in the case where the client supports the quantum signature algorithm, the certificate is extended, that is, the certificate can also include an extension item, and the extension item can include at least one of the quantum signature algorithm indication, the quantum public key, and the fourth signature.
[0076] In addition, it should be noted that the signature method adopted by the client can be determined according to the certificate. There are various schemes for determining the signature method according to the certificate, which are not limited in the embodiment. For example, the signature method can be determined by the content length of the certificate. For example, in the case where the content length of the certificate is greater than a preset length, it is determined that the signature method is a hybrid signature method. In the case where 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, since in the permission blockchain scenario, in the case where the client supports the quantum signature algorithm, the client signs by the hybrid signature method. Correspondingly, the certificate is expanded, so that 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 is determined that the hybrid signature method is adopted. If the certificate does not include an extension item, it is determined that the traditional signature method is adopted.
[0077] In the embodiment, at least one of the above quantum signature algorithm indication, quantum public key and fourth signature can be expanded in the certificate. In this way, the signature method can be determined according to whether the certificate includes an extension item in the subsequent, so as to verify in the corresponding way, and improve the transaction verification flexibility.
[0078] In some embodiments, in the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0079] The fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm, the quantum signature algorithm being the quantum signature algorithm indicated by the certificate;
[0080] 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.
[0081] In the permissioned blockchain scenario, if the client supports the quantum signature algorithm, the hybrid signature method is used to sign the transaction request, and at least one of the quantum signature algorithm indication, the quantum public key of the quantum signature algorithm, and the fourth signature in the obtained signed transaction request certificate can be carried. In addition, the signed transaction request can carry at least one of the fifth signature and the signature (which can be referred to as the seventh signature) generated by signing the information included in the transaction request and the fifth signature based on the indication of 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 fifth signature can be verified based on the quantum public key, and the seventh signature can be verified 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 verified based on the traditional public key. To reduce the occurrence of transaction verification interruption and improve transaction security.
[0082] In some embodiments, in the case where the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0083] The signature generated by signing the information included in the transaction request based on the indication of the traditional signature algorithm.
[0084] In the permissioned blockchain scenario, if the client does not support the quantum signature algorithm, the traditional signature method is used to sign the transaction request, and the signature (which can be referred to as the sixth signature) generated by signing the information included in the transaction request based on the indication of the traditional signature algorithm in the obtained signed transaction request can be carried. 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 verified 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 verified based on the traditional public key. To reduce the occurrence of transaction verification interruption and improve transaction security.
[0085] Referring to FIG. 2, FIG. 2 is a flowchart of a verification method provided by an embodiment of the present disclosure, which is executed by a transaction verification node. As shown in FIG. 2, the verification method provided by the embodiment includes the following steps:
[0086] Step 201: receiving a signed transaction request sent by a client;
[0087] The signed transaction request is a transaction request signed based on a hybrid signature mode in the case that the client supports the quantum signature algorithm, and the hybrid signature mode is a signature mode based on the quantum signature algorithm and then based on the traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm in the case that the client does not support the quantum signature algorithm.
[0088] Step 202: verifying the signed transaction request.
[0089] It should be noted that the client and the transaction verification node both support the traditional signature algorithm, the client can support the quantum signature algorithm or not support the quantum signature algorithm, and the transaction verification node can support the quantum signature algorithm or not support the quantum signature algorithm. If the client supports the quantum signature algorithm, the transaction request is first signed by using the quantum signature algorithm, and then signed based on the traditional signature algorithm, and if the client does not support the quantum signature algorithm, the transaction request is signed by using the traditional signature algorithm. If the client supports the quantum algorithm and the transaction verification node supports the quantum signature algorithm, the transaction verification node can not only verify the signed transaction request by using the traditional signature algorithm, but also verify the signed transaction request by using the quantum signature algorithm to ensure the security of the transaction. If the client supports and the transaction verification node does not support the quantum signature algorithm, the transaction verification node can verify the signed transaction request by using the traditional signature algorithm. 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 verify the signed transaction request by using the traditional signature algorithm. If the client does not support the quantum signature algorithm and the transaction verification node does not support the quantum signature algorithm, the transaction verification node can verify the signed transaction request by using the traditional signature algorithm. Even if the versions of the signature algorithms 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 verify the signed transaction request sent by the client, reduce the interruption of transaction verification, improve the effect of transaction verification, and improve the security of the transaction.
[0090] In some embodiments, in the case of 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.
[0091] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0092] The quantum signature algorithm indication is used to indicate the quantum signature algorithm.
[0093] quantum public key;
[0094] a first signature generated by signing information included in the transaction request based on a quantum signature algorithm;
[0095] a second signature generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0096] In some embodiments, verifying the signed transaction request comprises at least one of:
[0097] In the case that the transaction verification node supports the quantum signature algorithm, verifying the first signature based on the quantum signature algorithm based on the quantum public key, and verifying the second signature based on the traditional public key;
[0098] In the case that the transaction verification node does not support the quantum signature algorithm, verifying the second signature based on the traditional public key.
[0099] That is, in the permissionless blockchain scenario, in the case that the client supports the quantum signature algorithm, if the transaction verification node supports the quantum signature algorithm, verifying the first signature based on the quantum signature algorithm based on the quantum public key, and verifying the second signature based on the traditional public key, and if the transaction verification node does not support the quantum signature algorithm, verifying the second signature based on the traditional public key.
[0100] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further comprises:
[0101] a third signature generated by signing the information included in the transaction request based on the traditional signature algorithm.
[0102] In some embodiments, verifying the signed transaction request comprises:
[0103] In the case that the transaction verification node supports or does not support the quantum signature algorithm, verifying the third signature based on the traditional public key.
[0104] That is, in the permissionless blockchain scenario, in the case that the client does not support the quantum signature algorithm, the transaction verification node supports or does not support the quantum signature algorithm, and the third signature is verified based on the traditional public key.
[0105] In some embodiments, in the permissioned blockchain scenario, the signed transaction request comprises a certificate, and the certificate comprises at least one of the following information:
[0106] a traditional public key of the traditional signature algorithm;
[0107] The traditional signature algorithm indication is used to indicate the traditional signature algorithm.
[0108] In some embodiments, in the case that 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:
[0109] The quantum signature algorithm indication is used to indicate the quantum signature algorithm.
[0110] The quantum public key.
[0111] The fourth signature generated by signing the first content in the certificate based on the quantum signature algorithm, the first content being content included in the certificate except the fourth signature.
[0112] That is, in the permission blockchain scenario, in the case that the client supports the quantum signature algorithm, the client adopts the hybrid signature mode, and in the case that the client does not support the quantum signature algorithm, the client adopts the traditional signature mode. If the client supports the quantum signature algorithm, the certificate can further include the above extension item, so as to facilitate subsequent transaction verification nodes to verify based on the certificate. In addition, whether the client adopts the signature mode can also be determined according to whether the extension item is included in the certificate.
[0113] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0114] The fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm, the quantum signature algorithm being the quantum signature algorithm indicated by the certificate.
[0115] 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.
[0116] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0117] 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 indication.
[0118] In some embodiments, verifying the signed transaction request includes at least one of the following:
[0119] Determining a target signature mode according to the certificate, the target signature mode being the hybrid signature mode or the traditional signature mode.
[0120] Verifying the transaction request according to the target signature mode.
[0121] That is, the signature method adopted by the client can be determined through the certificate, and the hybrid signature method is to first sign based on the quantum signature algorithm and then sign based on the traditional signature algorithm, and 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 adopted by the client according to the certificate in it, and then verifies it using the target signature method.
[0122] It should be noted that the signature method adopted by the client can be determined according to the certificate, and there are many ways to determine the signature method according to the certificate, which are not limited in this embodiment. For example, the signature method can be determined by the content length of the certificate. For example, in the case where the content length of the certificate is greater than a preset length, it is determined that the signature method is a hybrid signature method, and in the case where 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, in the case where the client supports the quantum signature algorithm, the client signs by the hybrid signature method. Correspondingly, the certificate is extended, so that 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 is determined that the hybrid signature method is adopted, and if the certificate does not include an extension item, it is determined that the traditional signature method is adopted.
[0123] In some embodiments, determining the target signature method according to the certificate comprises:
[0124] In the case where the certificate includes an extension item, the target signature method is determined to be a hybrid signature method;
[0125] In the case where the certificate does not include an extension item, the target signature method is determined to be a traditional signature method.
[0126] In some embodiments, verifying the signed transaction request according to the target signature method comprises at least one of the following:
[0127] In the case where the target signature method is a hybrid signature method, 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 verified based on the traditional public key;
[0128] In the case where the target signature method is a hybrid signature method, if the transaction verification node does not support the quantum signature algorithm, 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 verified based on the traditional public key;
[0129] In the case that the target signature mode is the traditional signature mode, the sixth signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication based on the information included in the transaction request is notarized based on the traditional public key.
[0130] That is, in the permission blockchain scenario, in the case that the client supports the quantum signature algorithm, if the transaction verification node supports the quantum signature algorithm, the first signature based on the quantum signature algorithm is verified based on the quantum public key, and the second signature is notarized based on the traditional public key, and if the transaction verification node does not support the quantum signature algorithm, the second signature is notarized based on the traditional public key.
[0131] It can be understood that in the case that the client supports the quantum signature algorithm, the hybrid signature mode is used, and in the case that the client does not support the quantum signature algorithm, the traditional signature mode is used. The transaction verification node can determine the target signature mode used by the client based on the certificate. If the target signature mode is the hybrid signature mode, it can also be determined that the client supports the quantum signature algorithm. The transaction verification node verifies according to whether it supports the quantum signature algorithm, that is, if the transaction verification node supports the quantum signature algorithm, the fifth signature generated by the quantum signature algorithm based on the information included in the transaction request is verified based on the quantum public key in the extension, and the signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication based on the information included in the transaction request and the fifth signature is notarized based on the traditional public key. If the transaction verification node does not support the quantum signature algorithm, the signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication based on the information included in the transaction request and the fifth signature is notarized based on the traditional public key. In addition, if the transaction verification node determines that the target signature mode used by the client is the traditional signature mode based on the certificate, it can also be determined that the client does not support the quantum signature algorithm. In the case that the target signature mode is the traditional signature mode, the transaction verification node can notarize the sixth signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication based on the information included in the transaction request based on the traditional public key.
[0132] The process of the above method is described in detail below with some specific embodiments.
[0133] Introduction to related technology:
[0134] Blockchain technology (Distributed Ledger Technology) is a technology that enables some untrusted participants to reach a transaction without relying on centralized authority by using cryptographic algorithms and consensus algorithms. Due to its traceability and transparency in transactions, it can be widely applied in various scenarios such as finance, manufacturing and healthcare. Blockchain and distributed ledger are equivalent concepts.
[0135] 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. In a permissionless blockchain system, any participant can access the system without authorization, while participants are untrusted. Bitcoin and Ethereum are typical permissionless blockchain systems. In a permissioned blockchain system, only authorized participants can access the system, and participants are not completely trusted among them. Hyperledger Fabric is a typical permissioned blockchain system.
[0136] Each block consists of a block header and a block body, as shown in FIG. 3. The block header contains the hash value of the previous block (i.e., the previous block) header, version information, nonce (a parameter for ensuring 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, which is used to connect the previous block. The version information is used to indicate the software version used to generate the block. The nonce, timestamp, and target difficulty coefficient are used in the proof of work (POW) algorithm of the consensus mechanism to determine a node to generate the block. The Merkle root is obtained by hashing all transactions in the block body according to the Merkle arrangement, which effectively summarizes all transactions in the block.
[0137] FIG. 3 is a blockchain structure of Bitcoin in an embodiment. Other types of blockchains (such as Ethereum, Hyperledger) have similar structures. Since different types of blockchains can use different consensus algorithms, some parameters in the block header also differ. Bitcoin and Ethereum use a mining consensus algorithm, and both have nonce, timestamp, and target difficulty coefficient parameters in the block header, while Hyperledger uses a reliable and available distributed fault-tolerant consensus (RAFT) consensus algorithm that does not require mining, so its block header does not contain nonce, timestamp, and target difficulty coefficient.
[0138] The first block of each blockchain is called the genesis block, which is hardcoded into the application. The link between block 1 and the genesis block is achieved by including the header hash value of the genesis block in block 1. The link between block 1 and block 2 is also achieved based on the same principle. By analogy, all blocks are linked together by hashing. 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 in the blockchain and also determines the order of the block.
[0139] For permissionless blockchain, each transaction (Tx) in a block contains transaction content, sender's public key, receiver's address, and signature of the transaction.
[0140] For permissioned blockchain system, each transaction (Tx) in a block contains sender's certificate, transaction proposal, and signature of the transaction.
[0141] Cryptographic algorithms used in blockchain include:
[0142] A blockchain system contains clients and network nodes. The transaction process of a blockchain system involves the use of cryptographic algorithms. Permissionless blockchain system and permissioned blockchain system are basically the same in transaction process except for the difference in accessing the system, as shown in FIG. 4.
[0143] Cryptographic algorithms (signature algorithms) are used in multiple transaction steps of a blockchain system. For example, a digital signature algorithm is used in the transaction generation step to ensure that the transaction is initiated by the digital asset holder. A digital signature algorithm is used in the consensus mechanism step to ensure that the exchanged message is not tampered with. A hash function is used in the consensus mechanism step for mining to determine the accounting node. A hash function is used in the block formation step to ensure the integrity of the transaction, and a hash function is used in the ledger update step to ensure the linkage between blocks.
[0144] The digital signature algorithm commonly used in the related art cannot resist quantum computing attacks because the SHOR quantum algorithm can break the digital signature algorithm. The commonly used symmetric encryption algorithm needs to double its key length to resist quantum computing attacks because the GROVER quantum algorithm can double the speed of searching for the key. At present, the hash function in the related art can resist quantum computing attacks because the quantum algorithm for finding hash collisions has not yet run faster than the existing computer algorithm for finding hash collisions.
[0145] Quantum secure cryptographic algorithms (i.e., quantum cryptographic algorithms or quantum signature algorithms) include:
[0146] By doubling the key size of the currently used symmetric cryptographic algorithm, it is easy to realize a quantum-secure symmetric cryptographic algorithm. In contrast, quantum-secure asymmetric encryption algorithms must be designed from scratch. The current consensus is that even using a quantum computer, NP-hard problems and NP-complete problems cannot be solved in polynomial time. Quantum-secure asymmetric cryptographic algorithms are basically designed based on NP-hard problems, including: lattice-based algorithms, code-based algorithms, multivariate algorithms, and super-singular isogeny-based algorithms. In recent years, standards for promoting post-quantum algorithms (Post-Quantum Cryptography, PQC), i.e., quantum-secure asymmetric cryptographic algorithms, have been proposed. Post-quantum algorithms ready for standardization have also been published, including 3 digital signature schemes, namely Crystals-Dilithium, FALCON and SPHINCS+, a post-quantum key encapsulation mechanism (Post-Quantum Key Encapsulation, PKE) and a key establishment scheme. In the context of asymmetric cryptographic algorithms, blockchain systems usually only involve signature algorithms.
[0147] Blockchain systems rely on cryptographic algorithms to ensure the security of digital assets on the blockchain. In the quantum era, the signature algorithms currently in use are no longer secure. Existing blockchains need to be upgraded to quantum-secure blockchains, and the simplest way is to replace the signature algorithms in the clients and nodes in the existing blockchain network with quantum-secure signature algorithms at the same time. This requires the clients and nodes to upgrade the signature algorithms at the same time. However, existing blockchain systems lack algorithm version synchronization mechanisms. Therefore, during the transition from existing blockchains to quantum blockchains, there is a situation where the signature algorithm versions of the clients and nodes in the blockchain network are inconsistent, i.e., some clients and nodes have been upgraded to support quantum-secure signature algorithms, while some clients and nodes have not been upgraded. How to ensure that in the case of inconsistent software versions of clients and nodes, effective signature verification can still be performed, and the blockchain system can still continue uninterrupted transactions is a problem that needs to be solved. The present disclosure provides a signature verification method for a blockchain to achieve a smooth transition from an existing blockchain to a quantum-secure blockchain.
[0148] The basic idea of the embodiment scheme of the present disclosure is that during the transition from the existing blockchain to the quantum blockchain, there are situations where the signature algorithm versions of the clients and nodes of the blockchain network are inconsistent. Therefore, when the client initiates a transaction to the node, there are the following four situations: (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 has supported 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. The four situations are shown in FIG. 5.
[0149] In order to enable the transaction to be verified by the node in the blockchain that does not support the quantum secure algorithm, when the client signs the transaction, a hybrid signature method needs to be used. The basic idea is that the client first signs the transaction using the quantum secure signature algorithm, and then signs the transaction and the signature generated based on the quantum secure signature algorithm using the designated traditional signature algorithm on the existing blockchain system. When the node that does not support the quantum secure algorithm receives the 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 signed using the quantum secure signature algorithm. Thus, the transaction verification of the blockchain network is not interrupted, even if the signature algorithms of the nodes in the network are inconsistent.
[0150] There is a difference in the management of public keys between permissionless blockchains and permissioned blockchains. Permissionless blockchains do not use certificates to manage public keys, while permissioned blockchains manage public keys based on certificates. This results in differences in the processing of transaction information when the existing permissionless blockchains and permissioned blockchains transition to quantum secure blockchains using hybrid signature technology. The following describes the transition schemes of the existing permissionless blockchains and permissioned blockchains to quantum secure blockchains, respectively.
[0151] For permissionless blockchains:
[0152] The transaction request initiated by the client of the permissionless blockchain can include the transaction content (Transaction Content, TC), the conventional public key (Conventional Public Key, CPK) of the sender, the address (Address, AD) of the recipient, and the signature based on the conventional algorithm (Conventional Signature, CSign).
[0153] During the transition to quantum secure blockchain, an attacker can implement a downgrade attack, i.e., downgrade the hybrid signature method to a traditional signature method. The hybrid signature scheme that first uses the traditional signature method for signature and then uses the quantum secure algorithm for signature is vulnerable to the downgrade attack, and after the attacker deletes the quantum signature related information, the transaction verifier cannot perceive. However, the present scheme first uses the quantum secure algorithm for signature and then uses the traditional signature algorithm for signature, and can resist the downgrade attack. After the attacker deletes the quantum signature related information, the transaction verifier can discover the existence of the attack by verifying the received signature generated by the traditional signature algorithm.
[0154] (1) The first transaction scenario: when the client initiates a transaction request (for example, a first transaction request) to the transaction verification node, neither the client nor the transaction verification node supports the quantum secure signature algorithm.
[0155] The transaction request initiated by the client can include transaction content (TC), a conventional public key (CPK) of the sender, an address (AD) of the receiver, and a signature (CSign) based on the traditional signature algorithm. In this case, the CSign is the third signature. The calculation of the CSign is to sign all the information in the first transaction request, which can be expressed as follows:
[0156] CSign = Signc (TC, CPK, AD);
[0157] Wherein, Signc represents the designated traditional signature algorithm on the blockchain (for example, the existing blockchain).
[0158] After receiving the transaction request, the transaction verification node verifies the signature CSign based on the traditional signature algorithm using the conventional public key of the sender.
[0159] (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 has supported the quantum secure signature algorithm.
[0160] In this case, the generation of the transaction request at the client and the verification at the network node are the same as the first transaction scenario.
[0161] (3) The third transaction scenario: when the client initiates a transaction request to the node, the client supports the quantum secure signature algorithm, but the transaction verification node does not support the quantum secure signature algorithm.
[0162] The transaction request initiated by the client contains transaction content (TC), a conventional public key (CPK) of the sender, an address (AD) of the recipient, a signature based on a conventional signature algorithm (CSign), a quantum signature algorithm identifier (QSSAI), a quantum-safe public key (QPK) of the sender, i.e., a quantum public key, and a signature based on a 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 represented as follows:
[0163] QSign = Signq (TC, CPK, AD, QSSAI, QPK)
[0164] CSign = Signc (TC, CPK, AD, QSSAI, QPK, QSign)
[0165] Wherein, Signc is a conventional signature algorithm specified on a blockchain (e.g., an existing blockchain), and Signq is a quantum signature algorithm specified by the QSSAI.
[0166] After receiving the transaction request, the transaction verification node only uses the conventional public key to verify the CSign because the transaction verification node does not support the quantum-safe signature algorithm.
[0167] (4) The fourth transaction scenario: the client and the transaction verification node both support the quantum-safe signature algorithm when the client initiates a transaction request to the node.
[0168] In this case, the generation of the transaction request at the client is the same as in the third transaction scenario.
[0169] After receiving the transaction request, the transaction verification node first uses the quantum public key QPK to verify the QSign using the quantum signature algorithm specified by the QSSAI, and then uses the conventional public key CPK to verify the second signature CSign based on the conventional signature algorithm.
[0170] For permissioned blockchains:
[0171] The transaction request initiated by the existing permissioned blockchain client contains the sender's certificate (Certificate, Cert), transaction proposal (Transaction Proposal, TP) and signature based on conventional signature algorithm (Conventional Signature, CSign).
[0172] When the client supports the method of hybrid signature, for example, an X.509 certificate supporting multiple cryptographic algorithms can be used. In addition to containing the information of the conventional cryptographic algorithm (such as the indication information of the conventional cryptographic algorithm, that is, the conventional signature algorithm indication, and the public key of the conventional cryptographic algorithm, that is, the conventional public key of the conventional signature algorithm, etc.), the certificate is extended in the certificate, that is, the certificate can also include an extension item, which can contain the related information of the backup cryptographic algorithm, for example, the backup public key information, that is, the quantum public key, the backup signature algorithm value in the altSignatureAlgorithm extension, that is, the quantum signature algorithm indication, and the backup signature in the altSignitureValue extension, that is, the fourth signature. Here, the backup cryptographic algorithm can be a certain quantum secure signature algorithm (that is, a certain quantum signature algorithm).
[0173] The conventional certificate Cert or the certificate with extension item CertE can be carried in the transaction request. The former indicates that the transaction uses the conventional signature method, and the latter indicates that the transaction uses the hybrid signature method. The certificate in the transaction request is protected by the signature Csign or the signature Qsign and will not be tampered with or replaced by the attacker.
[0174] (1) The first transaction scenario: when the client initiates a transaction request (for example, a second transaction request) to the node, neither the client nor the transaction verification node supports the quantum secure signature algorithm.
[0175] The second transaction request initiated by the client contains the sender's certificate (Certificate, Cert), transaction proposal (Transaction Proposal, TP) and signature based on conventional signature algorithm (Conventional Signature, CSign). In this case, CSign is the sixth signature, and the calculation of CSign is to sign all the information in the transaction request, which can be represented as follows:
[0176] CSign=Signc(Cert,TP);
[0177] Wherein, Signc here is the conventional signature algorithm indicated in Cert.
[0178] The transaction verification node receives the transaction request, first detects that the certificate is a traditional certificate, and thus determines that it is a traditional signature method. The traditional public key is obtained from the certificate Cert, and the signature is verified based on the traditional signature algorithm using this public key.
[0179] (2) The second transaction scenario: the client does not support the quantum-safe signature algorithm when initiating the transaction request to the node, but the transaction verification node supports the quantum-safe signature algorithm.
[0180] 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 scenario.
[0181] (3) The third transaction scenario: the client supports the quantum-safe signature algorithm when initiating the transaction request to the node, but the transaction verification node does not support the quantum-safe signature algorithm.
[0182] The transaction request initiated by the client includes the sender's certificate with an extension (CertE), a transaction proposal (TP), a signature based on a conventional signature algorithm (CSign), and a signature based on a quantum-safe algorithm (QSign). In this case, QSign is the fifth signature, and CSign is the signature generated by the conventional signature algorithm indicated by the conventional signature algorithm indication based on the information included in the transaction request and the fifth signature. 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 represented as follows:
[0183] QSign = Signq(CertE, TP);
[0184] CSign = Signc(CertE, TP, QSign);
[0185] Where Signc here is the conventional signature algorithm indicated by the certificate CertE, and Signq is the quantum-safe signature algorithm indicated by the certificate CertE. The certificate CertE contains a conventional public key and a quantum-safe public key, i.e., a quantum public key.
[0186] The transaction verification node receives the transaction request, first detects that the certificate with an extension (CertE) is a hybrid signature method. However, since the transaction verification node does not support the quantum-safe signature algorithm, the transaction verification node only obtains the conventional public key from the certificate CertE, and verifies the signature CSign based on the conventional signature algorithm using this public key.
[0187] (4) The fourth transaction scenario: the client and the transaction verification node both support the quantum secure signature algorithm when the client initiates a transaction request to the node.
[0188] In this case, the generation of the transaction request at the client is the same as in the third transaction scenario.
[0189] After receiving the transaction request, the transaction verification node first detects the certificate with the extension (CertE) to determine that it is a hybrid signature mode. The transaction verification node obtains the conventional public key and the quantum secure public key from the certificate CertE, first verifies the signature QSign based on the quantum secure public key based on the quantum secure signature algorithm indicated in the certificate, and then verifies the signature CSign based on the conventional public key based on the conventional signature algorithm indicated in the certificate.
[0190] During the transition from the existing blockchain to the quantum blockchain, it is necessary to ensure that the blockchain system can still conduct transactions in the case of software version inconsistency between the client and the node. The scheme of the embodiment of the present disclosure can effectively verify the signature of the transaction during this period to ensure the normal transaction of the blockchain system.
[0191] As shown in FIG. 6, FIG. 6 is a structural schematic diagram of a signature device 600 provided by an embodiment of the present disclosure, which is applied to a client. As shown in FIG. 6, the signature device 600 includes:
[0192] The signature module 601 is configured to, in the case that the client supports the quantum signature algorithm, sign the transaction request based on a hybrid signature mode, the hybrid signature mode being a mode of signing based on the quantum signature algorithm and then signing based on the conventional signature algorithm.
[0193] In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the conventional signature algorithm.
[0194] In some embodiments, the signature module 601 includes:
[0195] The first sub-signature unit is configured to sign the information included in the transaction request based on the quantum signature algorithm to generate a first signature.
[0196] The second sub-signature unit is configured to sign the information included in the transaction request and the first signature based on the conventional signature algorithm.
[0197] In some embodiments, in the case of an unlicensed blockchain scenario, the signed transaction request includes a conventional public key of a conventional signature algorithm, wherein the conventional signature algorithm is a designated signature algorithm on the blockchain.
[0198] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0199] a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate a quantum signature algorithm;
[0200] a quantum public key;
[0201] a first signature generated based on the quantum signature algorithm on information included in the transaction request;
[0202] a second signature generated based on a traditional signature algorithm on the information included in the transaction request and the first signature.
[0203] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0204] a third signature generated based on the traditional signature algorithm on the information included in the transaction request.
[0205] In some embodiments, in the case of a permissioned blockchain scenario, the transaction request includes a certificate, the certificate including at least one of the following information:
[0206] a traditional public key of the traditional signature algorithm;
[0207] a traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate a traditional signature algorithm.
[0208] In some embodiments, in the case that the client supports the quantum signature algorithm, the certificate further includes an extension, the extension including at least one of the following:
[0209] a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate a quantum signature algorithm;
[0210] a quantum public key;
[0211] a fourth signature generated based on the quantum signature algorithm on a first content in the certificate, the first content being content included in the certificate other than the fourth signature.
[0212] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0213] a fifth signature generated based on the quantum signature algorithm on information included in the transaction request, the quantum signature algorithm being the quantum signature algorithm indicated by the certificate;
[0214] a signature generated based on the traditional signature algorithm indicated by the traditional signature algorithm indication on the information included in the transaction request and the fifth signature.
[0215] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0216] The signature generation signature of the information included in the transaction request by the indicated traditional signature algorithm based on the indicated traditional signature algorithm.
[0217] The verification device 600 provided by the embodiment can implement each process of each embodiment of the signature method applied to the client, and the technical features are one-to-one correspondence and can achieve the same technical effects. To avoid repetition, it will not be described here.
[0218] As shown in FIG. 7, FIG. 7 is a structural schematic diagram of a verification device 700 provided by an embodiment of the disclosure, which is applied to a transaction verification node. As shown in FIG. 7, the verification device 700 includes:
[0219] The first receiving module 701 is configured to receive the signed transaction request sent by the client. The signed transaction request is a transaction request signed based on a hybrid signature method in the case that the client supports a quantum signature algorithm. The hybrid signature method is a signature method based on a quantum signature algorithm and then based on a traditional signature algorithm. Alternatively, the transaction request is a transaction request signed based on a traditional signature algorithm in the case that the client does not support a quantum signature algorithm.
[0220] The verification module 702 is configured to verify the signed transaction request.
[0221] In some embodiments, in the case of a permissionless block chain, the signed transaction request includes a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a designated signature algorithm on the block chain.
[0222] In some embodiments, in the case that the client supports a quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0223] A quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate a quantum signature algorithm;
[0224] A quantum public key;
[0225] A first signature generated by signing the information included in the transaction request based on a quantum signature algorithm;
[0226] A second signature generated by signing the information included in the transaction request and the first signature based on a traditional signature algorithm.
[0227] In some embodiments, the verification module 702 includes at least one of the following:
[0228] The first sub-verification unit is configured to, in a case where the transaction verification node supports the quantum signature algorithm, verify the first signature based on the quantum signature algorithm based on the quantum public key, and verify the second signature based on the traditional public key based on the traditional public key.
[0229] The second sub-verification unit is configured to, in a case where the transaction verification node does not support the quantum signature algorithm, verify the second signature based on the traditional public key.
[0230] In some embodiments, in a case where the client does not support the quantum signature algorithm, the signed transaction request further comprises:
[0231] A third signature generated by signing information included in the transaction request based on the traditional signature algorithm.
[0232] In some embodiments, the verification module 702 comprises:
[0233] The third sub-verification unit is configured to, in a case where the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, verify the third signature based on the traditional public key.
[0234] In some embodiments, in a case where the client supports the quantum signature algorithm, the certificate further comprises an extension item, and the extension item comprises at least one of:
[0235] The traditional public key of the traditional signature algorithm;
[0236] A traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
[0237] In some embodiments, in a case where the client supports the quantum signature algorithm, the certificate further comprises an extension item, and the extension item comprises at least one of:
[0238] A quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm;
[0239] The quantum public key;
[0240] A fourth signature generated by signing first content in the certificate based on the quantum signature algorithm, the first content being content included in the certificate except the fourth signature.
[0241] In some embodiments, in a case where the client supports the quantum signature algorithm, the signed transaction request further comprises at least one of:
[0242] A fifth signature generated by signing information included in the transaction request based on the quantum signature algorithm, the quantum signature algorithm being the quantum signature algorithm indicated by the certificate;
[0243] The signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication signs the information included in the transaction request and the fifth signature.
[0244] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0245] The sixth signature generated by the traditional signature algorithm indicated by the traditional signature algorithm indication signs the information included in the transaction request.
[0246] In some embodiments, the signature module 702 includes at least one of the following:
[0247] The determining unit is configured to determine the target signature mode according to the certificate, the target signature mode being the hybrid signature mode or the traditional signature mode.
[0248] The fourth verification unit is configured to verify the transaction request according to the target signature mode.
[0249] In some embodiments, the determining unit is specifically configured to:
[0250] In the case that the certificate includes the extension item, the target signature mode is determined to be the hybrid signature mode.
[0251] In the case that the certificate does not include the extension item, the target signature mode is determined to be the traditional signature mode.
[0252] In some embodiments, the fourth verification unit is specifically configured to at least one of the following:
[0253] In the case that the target signature mode is the 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 indication is verified based on the traditional public key.
[0254] In the case that the target signature mode is the hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, 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 is verified based on the traditional public key.
[0255] In the case that the target signature mode is the traditional signature mode, 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 indication is verified based on the traditional public key.
[0256] The verification device 700 provided by the embodiment can implement the processes of each of the embodiments of the verification method applied to the transaction verification node, and the technical features correspond one by one and can achieve the same technical effects. To avoid repetition, details are not described herein.
[0257] The embodiment of the present disclosure also provides an electronic device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the processes of each of the embodiments of the signature method applied to the client, and can achieve the same technical effects. To avoid repetition, details are not described herein.
[0258] Specifically, referring to FIG. 8, the embodiment of the present disclosure also provides an electronic device, comprising a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805 and a memory 806.
[0259] The processor 805 is configured to:
[0260] In the case that the client supports the quantum signature algorithm, the transaction request is signed based on a hybrid signature method, 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.
[0261] In the case that the client does not support the quantum signature algorithm, the transaction request is signed based on the traditional signature algorithm.
[0262] In some embodiments, the processor 805 is specifically configured to:
[0263] Sign the information included in the transaction request based on the quantum signature algorithm to generate a first signature;
[0264] Sign the information included in the transaction request and the first signature based on the traditional signature algorithm.
[0265] In some embodiments, in the case of 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 designated signature algorithm on the blockchain.
[0266] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of the following:
[0267] A quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm;
[0268] A quantum public key;
[0269] The first signature generated by signing the information included in the transaction request based on the quantum signature algorithm;
[0270] a second signature generated based on a traditional signature algorithm on information included in the transaction request and the first signature.
[0271] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0272] a third signature generated based on a traditional signature algorithm on information included in the transaction request.
[0273] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0274] a traditional public key of the traditional signature algorithm;
[0275] a traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
[0276] In some embodiments, in the case that the client supports the quantum signature algorithm, the certificate further includes an extension, the extension including at least one of:
[0277] a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm;
[0278] a quantum public key;
[0279] a fourth signature generated based on a quantum signature algorithm on first content in the certificate, the first content being content included in the certificate other than the fourth signature.
[0280] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further includes at least one of:
[0281] a fifth signature generated based on a quantum signature algorithm on information included in the transaction request, the quantum signature algorithm being the quantum signature algorithm indicated by the certificate;
[0282] a signature generated based on a traditional signature algorithm indicated by the traditional signature algorithm indication on information included in the transaction request and the fifth signature.
[0283] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further includes:
[0284] a signature generated based on a traditional signature algorithm indicated by the traditional signature algorithm indication on information included in the transaction request.
[0285] In FIG. 8, a bus architecture (represented by bus 801) can include any number of interconnecting buses and bridges, and the bus 801 links together various circuits such as one or more processors represented by processor 805, and memory represented by memory 806. The bus 801 can also link together various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further. Bus interface 804 provides an interface between the bus 801 and transceiver 802. The transceiver 802 can be a single element or multiple elements, such as a plurality of receivers and transmitters, which provide a means for communicating with various other apparatus over a transmission medium. Data processed by the processor 805 is transmitted over a wireless medium via antenna 803, and further, the antenna 803 receives data and communicates the data to the processor 805.
[0286] 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 during execution of operations.
[0287] Optionally, the processor 805 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD).
[0288] The processor of the electronic device provided in the embodiment can implement each process of each embodiment of the signature method applied to the client described above, and the technical features correspond one by one and achieve the same technical effects. To avoid repetition, details are not described here.
[0289] The disclosure also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by the processor to implement each process of the signature method applied to the client described above, and achieve the same technical effects. To avoid repetition, details are not described here. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0290] The electronic device provided by the embodiment of the present disclosure comprises a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, each process of the above-mentioned verification method applied to the transaction verification node is implemented, and the same technical effects are achieved. To avoid repetition, details are not described here.
[0291] Specifically, referring to FIG. 9, the embodiment of the present disclosure further provides an electronic device comprising a bus 901, a transceiver 902, an antenna 903, a bus interface 904, a processor 905 and a memory 906.
[0292] The processor 905 is configured to:
[0293] receive a signed transaction request sent by the client, the signed transaction request being a transaction request signed based on a hybrid signature method in a case where the client supports a quantum signature algorithm, the hybrid signature method being a signature method based on signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm, or the transaction request being a transaction request signed based on a traditional signature algorithm in a case where the client does not support the quantum signature algorithm;
[0294] verify the signed transaction request.
[0295] In some embodiments, in a permissionless blockchain scenario, the signed transaction request comprises a traditional public key of a traditional signature algorithm, wherein the traditional signature algorithm is a designated signature algorithm on the blockchain.
[0296] In some embodiments, in a case where the client supports the quantum signature algorithm, the signed transaction request further comprises at least one of the following:
[0297] a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm;
[0298] a quantum public key;
[0299] a first signature generated by signing information included in the transaction request based on the quantum signature algorithm;
[0300] a second signature generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
[0301] In some embodiments, the processor 905 is specifically configured to perform at least one of the following:
[0302] in a case where the transaction verification node supports the quantum signature algorithm, verifying the first signature based on the quantum signature algorithm based on the quantum public key, and verifying the second signature based on the traditional public key;
[0303] In the case that the transaction verification node does not support the quantum signature algorithm, the second signature is signed based on a traditional public key.
[0304] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further comprises:
[0305] A third signature generated by signing information included in the transaction request based on a traditional signature algorithm.
[0306] In some embodiments, the processor 905 is specifically configured to:
[0307] In the case that the transaction verification node supports the quantum signature algorithm or does not support the quantum signature algorithm, the third signature is signed based on a traditional public key.
[0308] In some embodiments, in the case of a permissioned blockchain scenario, the signed transaction request comprises a certificate, and the certificate comprises at least one of the following information:
[0309] A traditional public key of a traditional signature algorithm;
[0310] A traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
[0311] In some embodiments, in the case that the client supports the quantum signature algorithm, the certificate further comprises an extension, and the extension comprises at least one of the following:
[0312] A quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm;
[0313] A quantum public key;
[0314] A fourth signature generated by signing first content in the certificate based on a quantum signature algorithm, the first content being content included in the certificate except the fourth signature.
[0315] In some embodiments, in the case that the client supports the quantum signature algorithm, the signed transaction request further comprises at least one of the following:
[0316] A fifth signature generated by signing information included in the transaction request based on a quantum signature algorithm, the quantum signature algorithm being indicated by the certificate;
[0317] A signature generated by signing the information included in the transaction request and the fifth signature based on a traditional signature algorithm indicated by the traditional signature algorithm indication.
[0318] In some embodiments, in the case that the client does not support the quantum signature algorithm, the signed transaction request further comprises:
[0319] The sixth signature generated by a traditional signature algorithm indicated by the indication of the traditional signature algorithm on information included in the transaction request.
[0320] In some embodiments, the processor 905 is specifically configured to perform at least one of:
[0321] determine a target signature mode according to the certificate, the target signature mode being a hybrid signature mode or a traditional signature mode;
[0322] verify the transaction request according to the target signature mode.
[0323] In some embodiments, the processor 905 is specifically configured to perform at least one of:
[0324] In a case where the certificate includes an extension item, determine that the target signature mode is the hybrid signature mode;
[0325] In a case where the certificate does not include the extension item, determine that the target signature mode is the traditional signature mode.
[0326] In some embodiments, the processor 905 is specifically configured to perform at least one of:
[0327] In a case where the target signature mode is the hybrid signature mode, if the transaction verification node supports a quantum signature algorithm, verify a fifth signature generated by the quantum signature algorithm on information included in the transaction request based on a quantum public key in the extension item, and verify a signature generated by a traditional signature algorithm indicated by the indication of the traditional signature algorithm on the information included in the transaction request and the fifth signature based on a traditional public key;
[0328] In a case where the target signature mode is the hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, verify the signature generated by the traditional signature algorithm indicated by the indication of the traditional signature algorithm on the information included in the transaction request and the fifth signature based on the traditional public key;
[0329] In a case where the target signature mode is the traditional signature mode, verify a sixth signature generated by a traditional signature algorithm indicated by the indication of the traditional signature algorithm on information included in the transaction request based on a traditional public key.
[0330] In FIG. 9, a bus architecture (represented by bus 901) can include any number of interconnected buses and bridges, the bus 901 linking together various circuits including one or more processors represented by processor 905, and memory represented by memory 906. The bus 901 can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art, and therefore, not further described herein. Bus interface 904 provides an interface between bus 901 and transceiver 902. Transceiver 902, which can be a single element or multiple elements such as multiple receivers and transmitters, provides a means for communicating with various other apparatus over a transmission medium. Data processed by processor 905 is transmitted over a wireless medium via antenna 903, which further receives data and communicates the data to processor 905.
[0331] 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. Memory 906 can be used for storing data used by processor 905 in executing its operations.
[0332] Optionally, the processor 905 can be a CPU, an ASIC, an FPGA, or a CPLD.
[0333] The processor of the electronic device provided by the embodiment can implement each process of each embodiment of the above-mentioned verification method applied to the transaction verification node, and the technical features are one-to-one correspondence and can achieve the same technical effects. To avoid repetition, it will not be described here.
[0334] The embodiment of the present disclosure also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement each process of the above-mentioned verification method applied to the transaction verification node embodiment, and can achieve the same technical effects. To avoid repetition, it will not be described here. The computer readable storage medium includes a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
[0335] The embodiment of the present disclosure also provides a computer program product, including a computer program. The computer program is executed by a processor to implement each process of the above-mentioned method embodiment, and can achieve the same technical effects. To avoid repetition, it will not be described here.
[0336] It should be noted that, in the present document, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can also include other elements not expressly listed, or inherent to such processes, methods, articles, or apparatuses. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0337] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and a necessary general hardware platform, and of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of a software product in essence or in the form of a part that contributes to the prior art. The computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing 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 various embodiments of the present disclosure.
[0338] The embodiments of the present disclosure are described above in combination with the accompanying drawings, but the present disclosure is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not limiting. Those skilled in the art can make many forms under the inspiration of the present disclosure without departing from the scope of the present disclosure and the scope of protection of the claims.
Claims
1. A signature method applied to a client, the method comprising: in a case where the client supports a quantum signature algorithm, signing a transaction request based on a hybrid signature manner, the hybrid signature manner being a manner of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm; in a case where the client does not support the quantum signature algorithm, signing the transaction request based on the traditional signature algorithm.
2. The method of claim 1, wherein, the signing of the transaction request based on the hybrid signature manner comprises: signing information included in the transaction request based on the quantum signature algorithm to generate a first signature; signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
3. The method of claim 1, wherein, 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 designated signature algorithm on a blockchain.
4. The method of claim 3, wherein, in the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of: a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm; a quantum public key; the first signature generated by signing the information included in the transaction request based on the quantum signature algorithm; a second signature generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
5. The method of claim 3, wherein, in the case where the client does not support the quantum signature algorithm, the signed transaction request further includes: a third signature generated by signing the information included in the transaction request based on the traditional signature algorithm.
6. The method of claim 1, wherein, in a permissioned blockchain scenario, the transaction request includes a certificate, and the certificate includes at least one of the following information: the traditional public key of the traditional signature algorithm; a traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
7. The method of claim 6, wherein, 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 quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm; the quantum public key; a fourth signature generated by signing first content in the certificate based on the quantum signature algorithm, the first content being content included in the certificate except the fourth signature.
8. The method of claim 6, wherein, in the case where the client supports the quantum signature algorithm, the signed transaction request further includes at least one of: a fifth signature generated by signing information included in the transaction request based on the quantum signature algorithm, the quantum signature algorithm being a quantum signature algorithm indicated by the certificate; a signature generated by signing the information included in the transaction request and the fifth signature based on a traditional signature algorithm indicated by the traditional signature algorithm indication.
9. The method of claim 6, wherein, in the case where the client does not support the quantum signature algorithm, the signed transaction request further includes: a signature generated by signing the information included in the transaction request based on a traditional signature algorithm indicated by the traditional signature algorithm indication. 10.A verification method applied to a transaction verification node, the method comprising: receiving a signed transaction request sent by a client, the signed transaction request being a transaction request signed based on a hybrid signature mode in a case that the client supports a quantum signature algorithm, the hybrid signature mode being a mode of signing based on a quantum signature algorithm and then signing based on a traditional signature algorithm, or the signed transaction request being a transaction request signed based on the traditional signature algorithm in a case that the client does not support the quantum signature algorithm; verifying the signed transaction request.
11. The method of claim 10, wherein, In a permissionless blockchain scenario, the signed transaction request comprises a traditional public key of the traditional signature algorithm, wherein the traditional signature algorithm is a designated signature algorithm on a blockchain.
12. The method of claim 11, wherein, In the case that the client supports the quantum signature algorithm, the signed transaction request further comprises at least one of: a quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm; a quantum public key; a first signature generated by signing information included in the transaction request based on the quantum signature algorithm; a second signature generated by signing the information included in the transaction request and the first signature based on the traditional signature algorithm.
13. The method of claim 12, wherein, The verifying of the signed transaction request comprises at least one of: in a case that the transaction verification node supports the quantum signature algorithm, verifying the first signature based on the quantum signature algorithm based on the quantum public key, and verifying the second signature based on the traditional public key; in a case that the transaction verification node does not support the quantum signature algorithm, verifying the second signature based on the traditional public key.
14. The method of claim 11, wherein, In the case that the client does not support the quantum signature algorithm, the signed transaction request further comprises: a third signature generated by signing information included in the transaction request based on the traditional signature algorithm.
15. The method of claim 14, wherein, The verifying of the signed transaction request comprises: in a case that the transaction verification node supports or does not support the quantum signature algorithm, verifying the third signature based on the traditional public key.
16. The method of claim 10, wherein, In a permissioned blockchain scenario, the signed transaction request comprises a certificate, and the certificate comprises at least one of: the traditional public key of the traditional signature algorithm; a traditional signature algorithm indication, the traditional signature algorithm indication being used to indicate the traditional signature algorithm.
17. The method of claim 16, wherein, In the case that the client supports the quantum signature algorithm, the certificate further comprises an extension item, and the extension item comprises at least one of: the quantum signature algorithm indication, the quantum signature algorithm indication being used to indicate the quantum signature algorithm; the quantum public key; a fourth signature generated by signing first content in the certificate based on the quantum signature algorithm, the first content being content included in the certificate except the fourth signature.
18. The method of claim 16, wherein, In the case that the client supports the quantum signature algorithm, the signed transaction request further comprises at least one of: a fifth signature generated by signing information included in the transaction request based on the quantum signature algorithm indicated by the certificate; a signature generated by signing the information included in the transaction request and the fifth signature based on the indicated traditional signature algorithm indicated by the traditional signature algorithm.
19. The method of claim 16, wherein, In the case where the client does not support the quantum signature algorithm, the signed transaction request further includes: a sixth signature generated by signing the information included in the transaction request based on the indicated traditional signature algorithm indicated by the traditional signature algorithm.
20. The method of claim 16, wherein, The verification of the signed transaction request includes at least one of: determining a target signature mode according to the certificate, the target signature mode being a hybrid signature mode or a traditional signature mode; verifying the transaction request according to the target signature mode.
21. The method of claim 20, wherein, The determination 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 the case where the certificate does not include the extension item, determining that the target signature mode is the traditional signature mode.
22. The method of claim 20 or 21, wherein, The verification of the signed transaction request according to the target signature mode includes at least one of: in the case where the target signature mode is the hybrid signature mode, if the transaction verification node supports the quantum signature algorithm, verifying the fifth signature generated by signing the information included in the transaction request based on the quantum signature algorithm based on the quantum public key in the extension item of the certificate, and verifying the signature generated by signing the information included in the transaction request and the fifth signature based on the indicated traditional signature algorithm indicated by the traditional signature algorithm based on the traditional public key; in the case where the target signature mode is the hybrid signature mode, if the transaction verification node does not support the quantum signature algorithm, verifying the signature generated by signing the information included in the transaction request and the fifth signature based on the indicated traditional signature algorithm indicated by the traditional signature algorithm based on the traditional public key; in the case where the target signature mode is the traditional signature mode, verifying the sixth signature generated by signing the information included in the transaction request based on the indicated traditional signature algorithm indicated by the traditional signature algorithm based on the traditional public key.
23. A signature device applied to a client, the device comprising: a signature module configured to, in the case where the client supports a quantum signature algorithm, sign a transaction request based on a hybrid signature mode, the hybrid signature mode being a mode of signing based on a traditional signature algorithm after signing based on a quantum signature algorithm; in the case where the client does not support the quantum signature algorithm, sign the transaction request based on the traditional signature algorithm.
24. A verification device applied to a transaction verification node, the device comprising: The 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 in a case where the client supports a quantum signature algorithm, and the hybrid signature method is a signature method based on a quantum signature algorithm followed by a signature method based on a traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm in a case where the client does not support the quantum signature algorithm. The verifying module is configured to verify the signed transaction request.
25. An electronic device, comprising a transceiver and a processor, The processor is configured to: sign a transaction request based on a hybrid signature method in a case where a client supports a quantum signature algorithm, and the hybrid signature method is a signature method based on a quantum signature algorithm followed by a signature method based on a traditional signature algorithm; or sign the transaction request based on the traditional signature algorithm in a case where the client does not support the quantum signature algorithm.
26. An electronic device, comprising a transceiver and a processor, The processor 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 in a case where the client supports a quantum signature algorithm, and the hybrid signature method is a signature method based on a quantum signature algorithm followed by a signature method based on a traditional signature algorithm; or the transaction request is a transaction request signed based on the traditional signature algorithm in a case where the client does not support the quantum signature algorithm; and verify the signed transaction request. The processor, the memory, and a program stored on the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method according to any one of claims 1-9, or the steps of the method according to any one of claims 10-22.
28. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1-9, or the steps of the method according to any one of claims 10-22.
27. An electronic device, comprising:
29. A computer program product, comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the steps of the method according to any one of claims 1-22.
Citation Information
Patent Citations
Block chain transaction verification method and system based on mixed quantum digital signature
CN115345618A
Anti-quantum hybrid certificate combination method and system, and electronic equipment
CN117650898A
Block chain transaction processing method and device, node and storage medium
CN118473669A
TLCP communication method and system for resisting quantum attack
CN118631447A
Commercial password digital certificate generation method supporting anti-quantum cryptography
CN118631449A