Hash-based quantum-resistant digital signature method
By improving the OTS scheme and transforming the Merkle tree structure into an m-fork Huffman tree, the efficiency and security of signature verification are enhanced, solving the security problem of blockchain systems under quantum computer attacks and ensuring the immutability of transaction content.
Patent Information
- Application Number
- CN202310767426.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-06-27
AI Technical Summary
In existing blockchain systems, the traditional elliptic curve signature algorithm ECDSA has security vulnerabilities when facing quantum computer attacks, and the existing Lamport signature method and WOTS signature scheme are insufficient in terms of signature length and computational efficiency, and cannot effectively resist quantum attacks.
An improved OTS scheme is used to generate public-private key pairs, and the improved Merkle tree structure is changed to an m-fork Huffman tree structure to improve hash processing efficiency and enhance the security and efficiency of signature verification.
While resisting quantum computer attacks, it optimizes key and signature sizes, improves the time efficiency of signature verification, and ensures the security of the blockchain system and the immutability of transaction content.
Smart Images

Figure CN116707766B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security, specifically relating to a hash-based method for quantum-resistant digital signatures. Background Technology
[0002] Quantum computers are physical devices that perform high-speed mathematical and logical operations, store and process quantum information according to the laws of quantum mechanics. One of their most direct applications is cryptography. The development of quantum computers has far exceeded expectations. In July 2018, the team led by Pan Jianwei at the University of Science and Technology of China achieved the world's first entanglement of 18 photonic qubits. The speed of quantum computing will increase exponentially with the number of manipulable entangled qubits. Once quantum computers become a reality, existing information security systems based on public-key cryptography technologies such as RSA and ECC will face a devastating threat. Therefore, researching quantum-resistant public-key cryptography technologies is imperative.
[0003] Digital Signature Algorithm (DSA) is a variant of the Schnorr and ElGamal signature algorithms, adopted by the National Institute of Standards and Technology (NIST) as the Digital Signature Standard (DSS). Elliptic Curve Digital Signature Algorithm (ECDSA) is a simulation of the DSA algorithm using elliptic curve cryptography (ECC). ECDSA became an ANSI standard in 1999 and an IEEE and NIST standard in 2000. It was accepted by ISO in 1998, and several other standards incorporating it are under consideration by ISO. Unlike the ordinary discrete logarithm problem (DLP) and the integer factorization problem (IFP), the elliptic curve discrete logarithm problem (ECDLP) does not have a sub-exponential time solution. Therefore, the bit strength of elliptic curve cryptography is higher than other public-key cryptosystems.
[0004] However, with the development of quantum computers, classical public-key cryptography will no longer be secure. Regardless of encryption / decryption or key exchange methods, quantum computers can calculate the private key from the public key. Therefore, the asymmetric key-based signature methods currently used in digital signatures will have significant security risks in the quantum era.
[0005] Since 2016, the National Institute of Standards and Technology (NIST) in the United States has been soliciting submissions globally for a new generation of public-key cryptographic algorithms resistant to quantum computer attacks. Currently, most mainstream blockchain systems use the traditional elliptic curve signature algorithm ECDSA (P-256), which uses the P-256 curve. Companies such as NASA, D-WAVE, IBM, and Intel have invested heavily in quantum computer research and development. At the 2018 Consumer Electronics Show, Intel showcased a 49-qubit processor. To address the looming quantum crisis, the underlying signature methods in blockchain systems need to utilize post-quantum cryptographic algorithms.
[0006] Existing Lamport signature methods require a single Lamport signature key to securely sign only one message, and both the Lamport public key and the Lamport signature are too long. Meanwhile, existing WOTS methods significantly reduce the size of signatures compared to Lamport signatures due to increased computation during signature generation and verification. However, WOTS is still a one-time signature scheme, so repeated use of WOTS can lead to insecurity. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention proposes a hash-based quantum-resistant digital signature method, comprising the following steps:
[0008] S1: A user joins the blockchain through a node A in the blockchain network. The blockchain system uses the improved OTS scheme to generate a unique public-private key pair (pk1, sk1) for this user.
[0009] S2: When node A initiates a transaction, it uses the generated unique private key sk1 to sign the transaction content and packages the signed content and the corresponding public key pk1 into a file;
[0010] S3: Node A publishes the transaction to other nodes in the blockchain network;
[0011] S4: After receiving the transaction file, other nodes in the blockchain network use the improved Merkle tree scheme to sign and verify the transaction file;
[0012] S5: Once all verifications are successful, the node receiving the transaction acknowledges the transaction, indicating that the transaction is complete.
[0013] The beneficial effects of this invention are:
[0014] This invention improves the structure of a full m-ary tree by transforming the Merkle tree into an m-ary Huffman tree. This allows for fewer hash operations during signature tree construction and verification, thus increasing efficiency. Furthermore, it maintains overall efficiency even when increasing the input and output of subsequent hash operations. The improved solution, based on existing technology, can withstand attacks from quantum computers, thereby ensuring the security of the blockchain system.
[0015] This invention, by using an improved OTS scheme, has made significant improvements in key and signature size as well as the time required for signature verification. It has been optimized in both space and time. Therefore, by increasing the input and output of hash processing on this basis, it is possible to ensure that the transaction content cannot be tampered with under quantum attacks while maintaining the efficiency of the blockchain, thereby further improving the security of the blockchain system. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0017] Figure 2 This is a diagram of the multiple digital signature framework used in this invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] A hash-based quantum-resistant digital signature method, such as Figure 1 As shown, it includes:
[0020] S1: A user joins the blockchain through a node A in the blockchain network. The blockchain system uses the improved OTS scheme to generate a unique public-private key pair (pk1, sk1) for this user.
[0021] S2: When node A initiates a transaction, it uses the generated unique private key sk1 to sign the transaction content and packages the signed content and the corresponding public key pk1 into a file;
[0022] S3: Node A publishes the transaction to other nodes in the blockchain network;
[0023] S4: After receiving the transaction file, other nodes in the blockchain network use the improved Merkle tree scheme to sign and verify the transaction file;
[0024] S5: Once all verifications are successful, the node receiving the transaction acknowledges the transaction, indicating that the transaction is complete.
[0025] Most signature schemes based on small-time hashing use Merkle trees. A basic Merkle tree signature scheme can sign a maximum of 2h messages, where h is the height of the tree. Furthermore, all leaves (keys) should be computed during key generation to form the root. For these reasons, constructing a tree of height h = 40 would be impractical for key generation, as we would need to compute 2... 40 There are multiple OTS keys, and each OTS key internally requires many hash calls (i.e., 512 hash calls using Lamport OTS or 67 hash calls using WOTS (w=16) with SHA256). A trick to keeping key generation time practical while allowing a large number of signatures is to use a multi-level tree. Extensions to Merkle tree-based signature schemes can theoretically be signed multiple times, but they are designed for short, fast one-time signatures with the additional option of re-signing if needed. The above requirements are typical for blockchains or DLTs, as one-time keys are recommended for maintaining anonymity. However, many things can go wrong; for example, a transaction might fail to pass, or there might be a fork in the chain. In such cases, one should be able to sign multiple times without compromising security or freezing assets. Improvements to Merkle tree-based schemes are subsets of XMSS designed for fast first-signature. The key difference is that XMSS overcomes the limitation of one message per key by using a hash tree, reducing the authenticity of many OTS verification keys to a single public XMSS root key. In contrast, the improved scheme uses a chain of small 2-leaf Merkle trees (Huffman tree structure). Geometrically, XMSS increases in both width and height, while the improved scheme only increases in chain height.
[0026] Using the SHA512 hash function, the randomly generated 64B seed is hashed iteratively 17 times, generating a 512B private key element sk[i] each time, resulting in a private key set sk, where i∈[0-16]. Each public key element is generated from the corresponding private key element. Before generating the public key, each private key element sk[i] is divided into two parts of length 256B, denoted as fsk[i] and lsk[i], respectively. The first 16 private key elements fsk[i] are hashed iteratively 17 times using the SHA256 function, where the second iteration... In the 16th iteration, a substring extraction operation is added to generate the first 16 fpk[i] of length 256B. The first 16 lsk[i] elements are hashed and iterated 129 times using the SHA256 function to generate the first 16 lpk[i] of length 256B. The 17th fpk
[16] and lpk
[16] of length 256B are generated by hashing and iterating fsk
[16] and lsk
[16] 1921 times respectively. Each fpk[i] and lpk[i] is merged to generate each public key element pk[i], resulting in the public key set pk.
[0027] After receiving the transaction file, other nodes in the blockchain network use the public key pk1 corresponding to node A to verify node A's identity information. The specific signature verification process is as follows: Figure 2 The actions performed in the tree structure shown are, for example: using pk3 to verify the identity information of a node, then... Figure 2 The black nodes in the middle represent the entire signature verification process.
[0028] After receiving the transaction file, other nodes in the blockchain network construct an improved Merkle tree based on the hash value of the data block storing the transaction content. Using the public key pk1 of node A member, they perform hash processing layer by layer in the improved Merkle tree, starting from the leaf nodes. Finally, the hash processing result is compared with the root node value to obtain the verification result.
[0029] A Merkle tree is composed of the hash values of different transaction blocks. As a summary of all transactions in a block, it can effectively and securely verify the content of large amounts of data. Each leaf node is marked with the hash value of the data block storing the transaction content, while non-leaf nodes are marked with the hash values of their encrypted child node labels. The Merkle tree is created from bottom to top by repeatedly calculating the hash values of the nodes.
[0030] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A hash-based quantum-resistant digital signature method, characterized in that, include: S1: A user joins the blockchain through a node A in the blockchain network. The blockchain system uses the improved OTS scheme to generate a pair of independent public and private keys for this user. The blockchain system uses an improved OTS scheme to generate a unique public and private key pair for this user, including: The random seed of 64B is hashed and iterated 17 times using the hash function SHA512. Each time, a private key element sk[i] of length 512B is generated, resulting in the private key set sk, where i∈[0-16]. Each public key element is generated from the corresponding private key element. Before generating the public key, each private key element sk[i] is divided into two parts of length 256B, denoted as fsk[i] and lsk[i], respectively. The first 16 private key elements fsk[i] are hashed and iterated 17 times using the SHA256 function. In the 2nd to 16th iterations, a substring extraction operation is added to generate the corresponding first 16 length 256B fpk[i]. The first 16 lsk[i] elements are hashed and iterated 129 times using the SHA256 function to generate the corresponding first 16 length 256B lpk[i]. The 17th length 256B fpk[16] and lpk[16] are generated by hashing and iterating fsk[16] and lsk[16] 1921 times respectively. Each fpk[i] and lpk[i] are merged to generate each public key element pk[i], resulting in the public key set pk. The substring extraction operation includes: taking a substring of the previous hash result as the input value of the current hash operation; S2: When node A initiates a transaction, it uses the generated unique private key to sign the transaction content and packages the signed content and the corresponding public key into a file. S3: Node A publishes the transaction to other nodes in the blockchain network; S4: After receiving the transaction file, other nodes in the blockchain network use an improved Merkle tree scheme to sign and verify the transaction file; The improved Merkle tree scheme includes: The full m-ary tree is replaced by an m-ary Huffman tree, and the longer key is stored closer to the root node, resulting in an improved Merkle tree scheme. S5: Once all verifications are successful, the node receiving the transaction acknowledges the transaction, indicating that the transaction is complete.
2. The hash-based quantum-resistant digital signature method according to claim 1, characterized in that, The transaction file is signed and verified using an improved Merkle tree scheme, including: After receiving the transaction file, other nodes in the blockchain network construct an improved Merkle tree based on the hash value of the data block storing the transaction content. Using the public key of node A, they perform hash processing layer by layer in the improved Merkle tree, starting from the leaf nodes. Finally, the hash processing result is compared with the root node value to obtain the verification result.
3. The hash-based quantum-resistant digital signature method according to claim 2, characterized in that, An improved Merkle tree is constructed based on the signed transaction content, including: In the improved Merkle tree, each leaf node is labeled with the hash value of the data block storing the transaction content, while non-leaf nodes are labeled with the hash value of the encrypted child node labels.
Citation Information
Patent Citations
Quantum-attack-resistant alliance block chain digital signature encryption method
CN112953728A
Anti-quantum attack threshold signature scheme oriented to block chain cross-chain and asset hosting
CN113129001A
