A method for merging a blockchain account with a quantum-resistant encryption algorithm

By generating quantum-resistant encryption algorithm-based account keys and unified signature verification logic, the problems of quantum-resistant encryption compatibility and smooth upgrades of blockchain accounts are solved, realizing the security of blockchain accounts and the stability of the ecosystem in a quantum computing environment.

CN121256833BActive Publication Date: 2026-02-24SHANGHAI TEGAO INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511822019.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-24
Estimated Expiration
2045-12-05

AI Technical Summary

Technical Problem

Existing quantum-resistant encryption schemes for blockchain accounts suffer from incompatibility with traditional encrypted accounts, lack of smooth upgrades, lack of determinism in quantum-resistant signatures, and inconsistent verification logic, resulting in insufficient account security and a fragmented ecosystem under the threat of quantum computing.

Method used

By generating account keys resistant to quantum encryption algorithms and combining them with traditional asymmetric encryption algorithms to generate blockchain account IDs, the system supports transaction signing and verification using quantum-resistant encryption algorithms. It also adds an interface to store the quantum-resistant public keys of traditional accounts, enabling smooth upgrades and deterministic signatures for traditional accounts and unifying the verification logic.

Benefits of technology

It achieves compatibility and coexistence between quantum-resistant encrypted accounts and traditional accounts, supports smooth upgrades, ensures the determinism of signature results, reduces verification complexity, adapts to multiple quantum-resistant algorithms, and safeguards the security and ecological continuity of blockchain accounts in the era of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256833B_ABST
    Figure CN121256833B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of blockchains, in particular to a method for fusing a quantum-resistant encryption algorithm for a blockchain account, which comprises the following steps: first, generating a quantum-resistant account key; then, deriving a quantum-resistant public and private key based on the key; further, generating a corresponding blockchain account identifier; subsequently, realizing the transaction signature and verification signature operation of the quantum-resistant account, and providing the adaptation support of the quantum-resistant encryption algorithm for the blockchain account generated by the traditional encryption algorithm. The whole method is processed by multiple modules in cooperation, which realizes the coexistence and interoperation of the quantum-resistant encryption account and the traditional account, and also enables the traditional account to complete the quantum-resistant upgrade without migration, the transaction signature has determinacy and supports offline operation, the verification signature logic is unified and efficient, and finally, the safety of the blockchain account in the quantum era is ensured, and the feasibility of the technology landing and the continuity of the blockchain ecology are taken into account.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a method for integrating quantum-resistant encryption algorithms into blockchain accounts. Background Technology

[0002] Blockchain is the core of modern digital cryptocurrencies and trusted data infrastructure. Currently, most blockchain signature algorithms are based on the Elliptic Curve Digital Subtraction Anonymous (ECDSA), which is the most secure asymmetric encryption algorithm with the same key length. It is difficult to crack with current computing hardware; that is, as long as the key generation is sufficiently secure and not leaked, brute-force attacks cannot compromise accounts. However, this security is only based on the capabilities of the current computing paradigm. The emergence of quantum technology has fundamentally changed this situation: quantum algorithms have been proven to be able to crack traditional asymmetric encryption algorithms such as ECDSA. However, because quantum computing hardware technology is not yet mature enough to meet the minimum requirements for successfully running these quantum algorithms, it does not currently pose a real threat to blockchain account security. But technological development is not linear; quantum computing technology is constantly advancing, and breakthroughs could occur at any time. Therefore, it is urgent to address the potential quantum security issues facing blockchain accounts to ensure their continued security.

[0003] Existing technologies for quantum-resistant encryption transformation of blockchain accounts have significant drawbacks: either they simply replace the encryption algorithm, making quantum-resistant encrypted accounts incompatible with traditional encrypted accounts and disrupting the existing blockchain ecosystem; or they fail to achieve a smooth upgrade of traditional accounts, forcing users to migrate to new quantum-resistant accounts, increasing user operating costs and ecosystem migration risks; at the same time, some solutions lack determinism in quantum-resistant transaction signatures, making transactions impossible to verify repeatedly, which does not meet the consistency requirements of blockchain transaction verification.

[0004] Therefore, there is an urgent need for a blockchain account solution that can balance quantum security, ecological compatibility, smooth upgrades, and verifiability. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems of the prior art and provide a method for integrating quantum-resistant encryption algorithms into blockchain accounts. This method can effectively solve the security risks of traditional blockchain accounts relying on algorithms such as ECDSA being easily cracked by quantum computing. At the same time, it overcomes the shortcomings of existing solutions, such as the incompatibility of quantum-resistant encryption with the existing account system, the inability of traditional accounts to be smoothly upgraded, the lack of determinism in quantum-resistant signatures, and the inconsistent verification logic, so as to ensure the security of blockchain accounts and the continuation of the ecosystem in the quantum era.

[0006] The above objectives are achieved through the following technical solutions:

[0007] A method for integrating quantum-resistant cryptographic algorithms into blockchain accounts includes the following steps:

[0008] Step (1) Generate a quantum-resistant encryption algorithm account key: Receive the key length, quantum-resistant encryption algorithm type and key generation method input by the user, generate key data according to the key generation method, combine the quantum-resistant encryption algorithm type and the key data into a complete account key, and encode the complete account key to obtain the encoded account key;

[0009] Step (2) Generate a public-private key pair for the quantum-resistant encryption algorithm based on the account key: Decode the encoded account key to obtain algorithm type A and original key data S. Determine the Seed length required to generate the public and private keys according to the algorithm type A. Perform a hash calculation on the original key data S. If the length of the hash result does not meet the Seed length, iterate the hash until it does. Select the corresponding length data as the Seed from the final hash byte sequence. Call the public-private key generation function of the quantum-resistant encryption algorithm to generate the public-private key pair.

[0010] Step (3) Generate a quantum-resistant blockchain account based on the public-private key pair: Use the same hash algorithm as the traditional asymmetric encryption algorithm to generate the blockchain account ID, process the public key in the public-private key pair to generate a 20-byte blockchain account ID, and use the public key as the basis for verifying the identity of the blockchain account.

[0011] Step (4) Blockchain account transaction signing based on quantum-resistant encryption algorithm: Receive the account key provided by the user, execute step (2) to generate public and private key pair, add the public key to the transaction to be signed, call the corresponding signature algorithm according to the quantum-resistant encryption algorithm type in the account key, use the private key to sign the transaction, and do not add uncertain random data in the signing process to ensure the determinism of the signature result;

[0012] Step (5) Blockchain account transaction verification based on quantum-resistant encryption algorithm: Receive the signed transaction submitted by the user, verify whether the public key carried in the transaction can generate an account ID consistent with the transaction. If consistent, identify the encryption algorithm type, call the corresponding verification algorithm to verify the validity of the signature using the public key. If invalid, the verification fails.

[0013] As a further optimization of this method, it also includes step (6) supporting quantum-resistant encryption algorithm for blockchain accounts generated by traditional asymmetric encryption algorithms: adding an interface for setting the authentication public key to the blockchain account, and adding a field to store the public key in the on-chain account information; after the traditional account generates the public and private keys of the quantum-resistant encryption algorithm, it sets and stores the corresponding quantum-resistant public key through the interface; the subsequent transactions of the traditional account execute the signing process of step (4), and when verifying the signature, it first obtains the quantum-resistant public key stored on the chain according to the account ID, verifies the consistency between the public key carried in the transaction and the stored public key, and then executes the signature verification logic of step (5).

[0014] As a further optimization of this method, the key length in step (1) is 128 to 256 bits, and is an integer multiple of 32 bits, with the specific length specified by the user.

[0015] As a further optimization of this method, the key generation method in step (1) includes any of the following:

[0016] (a) The user enters a password or a piece of text, and the SHA512 algorithm is used to calculate the hash value. Data with the same length as the user-specified key is extracted from the hash value as the key data.

[0017] (b) The user directly inputs key data that matches the specified key length;

[0018] (c) The user instruction system randomly generates key data with the same length as the specified key.

[0019] As a further optimization of this method, the encoding process in step (1) is Base58 encoding, and the encoded complete account key is used for user records and input when generating public and private keys.

[0020] As a further optimization of this method, the specific process of performing Hash calculation on the original key data S in step (2) is as follows: the original key data S is calculated using the SHA512 algorithm to obtain a 64-byte Hash value; if the required Seed length is > 64 bytes, the current Hash value is used as input, and the SHA512 algorithm is used again to generate a new 64-byte Hash value. This iterative process is repeated until the total length of the accumulated Hash value meets the requirement of the Seed length.

[0021] As a further optimization of this method, after generating the public-private key pair in step (2), feature information for uniquely identifying the type of quantum-resistant encryption algorithm is added to the header of the public key. The feature information is a preset byte identifier, and different types of quantum-resistant encryption algorithms correspond to different byte identifiers.

[0022] As a further optimization of this method, the hash algorithm used in step (3) to generate the blockchain account ID is the SHA-256 algorithm, and the traditional asymmetric encryption algorithm is the Elliptic Curve Signature Algorithm (ECDSA).

[0023] As a further optimization of this method, step (4) supports offline signature based on quantum-resistant encryption algorithm, that is, users can perform transaction signing operations in an offline environment, and then submit the signed transaction to the blockchain network after the signing is completed.

[0024] As a further optimization of this method, the interface mentioned in step (6) is the API interface provided by the blockchain node, and the field is the quantum-resistant verification public key field newly added in the on-chain account information structure. The storage format of this field is consistent with the encoding format of the public key.

[0025] As a further optimization of this method, the signature verification process of traditional accounts in step (6) does not support offline signature verification. The blockchain network node must obtain the quantum-resistant public key stored on the chain and then perform online signature verification. If the quantum-resistant public key is not stored in the account information, it will be processed according to the signature verification logic of the traditional asymmetric encryption algorithm: verify whether the public key carried by the transaction can generate an account ID consistent with the transaction. If they are consistent, the traditional signature verification algorithm will be called to verify the signature; otherwise, it will be judged as an illegal transaction.

[0026] This invention provides a method for integrating quantum-resistant encryption algorithms into blockchain accounts. By integrating these algorithms, it effectively resists the risk of quantum computing breaking traditional blockchain account encryption algorithms, ensuring account security in the quantum era. By maintaining compatibility with the account ID generation logic and transaction processes of traditional accounts, it achieves coexistence and interoperability between quantum-resistant and traditional accounts, avoiding fragmentation of the blockchain ecosystem. By adding a mechanism for setting and storing quantum-resistant public keys to traditional accounts, it enables smooth upgrades where traditional accounts can be bound to quantum-resistant public keys without migration, preserving users' original operating habits. By excluding uncertain random data in quantum-resistant transaction signatures, it achieves determinism in signature results, meeting the repeated verification requirements of blockchain transactions. Through public key-based algorithm type identification and corresponding signature verification logic calls, it achieves unified signature verification logic, reducing the verification complexity of blockchain nodes. Ultimately, through the synergy of these methods, a balance between security protection and ecosystem continuity is achieved, significantly improving the feasibility of technology implementation and user acceptance. Compared with existing technologies, the specific beneficial effects are as follows:

[0027] 1. Resisting quantum computing security threats: By introducing quantum-resistant encryption algorithms (such as lattice base and hash base algorithms), the risk of quantum cracking of traditional ECDSA algorithms is solved from the encryption layer, ensuring that blockchain account keys cannot be cracked even after quantum computing hardware matures, thus guaranteeing the security and stability of the blockchain trust system.

[0028] 2. Achieve compatibility and coexistence between new and old accounts: Quantum-resistant encrypted accounts and traditional ECDSA accounts can coexist in the blockchain network and support interoperability such as mutual transfers, without the need to reconstruct the existing blockchain ecosystem, reducing the cost of technology upgrades and the risk of ecosystem fragmentation;

[0029] 3. Supports smooth upgrade of traditional accounts: Traditional accounts can be bound to quantum-resistant public keys by "adding interfaces + field storage" without migrating to a new account, preserving the user's original account system and operating habits, improving the feasibility of technology implementation and user acceptance;

[0030] 4. Guarantee the verifiability of transaction signatures: The quantum-resistant transaction signature process does not incorporate random data, ensuring that the signature result of the same transaction is unique, meeting the duplicate verification requirements of blockchain transactions, and also supporting offline signature mode, improving user operation flexibility and privacy;

[0031] 5. High efficiency of unified signature verification logic: Both quantum-resistant accounts and upgraded traditional accounts are verified through a unified logic of "public key identification algorithm type + corresponding signature verification function", avoiding the need for blockchain nodes to maintain multiple signature verification systems, reducing verification complexity and security vulnerability risks;

[0032] 6. Adaptable to multiple quantum-resistant algorithms: Through the design of "algorithm type encoding + public key feature information", it supports access to multiple quantum-resistant encryption algorithms such as CRYSTALS-Kyber and SPHINCS+, has good scalability, and can be dynamically updated as the standardization process of quantum-resistant algorithms progresses. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating a method for integrating a quantum-resistant encryption algorithm for blockchain accounts, as described in this invention.

[0034] Figure 2 This is a flowchart and module interaction diagram of a method for integrating a quantum-resistant encryption algorithm into a blockchain account, as described in this invention. Detailed Implementation

[0035] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. 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.

[0036] like Figure 1 As shown, this solution provides a method for integrating quantum-resistant encryption algorithms into blockchain accounts, specifically including the following steps:

[0037] Step (1): Generate an account key resistant to quantum encryption algorithms

[0038] This step is used to generate quantum-resistant account keys for the user that can be used for subsequent public-private key generation. The specific process is as follows:

[0039] Step (101) Key length specification: The user specifies the key length in the range of 128 bits to 256 bits (and in multiples of 32 bits) according to their own security needs. For example, the user can choose a key length of 128 bits, 160 bits, 192 bits, 224 bits or 256 bits.

[0040] Step (102) Algorithm type selection: The user selects the required quantum-resistant encryption algorithm type (such as CRYSTALS-Kyber, CRYSTALS-Dilithium, SPHINCS+, etc.). The system uses integers to uniformly encode the quantum-resistant encryption algorithm type. The encoding rules are designed by the system itself. For example, one-byte integer encoding is used (such as encoding "1" for CRYSTALS-Kyber algorithm and encoding "2" for CRYSTALS-Dilithium algorithm) to achieve fast identification and calling of algorithm type;

[0041] Step (103) Key Data Generation: The user selects any of the following methods to generate key data:

[0042] (a) Password / text derivation: The user enters a password or any text (such as "user_quantum_key_2025"). The system uses the SHA512 algorithm to perform a hash calculation on the password / text, and obtains a 64-byte hash value. Then, it extracts data from the hash value that is consistent with the key length specified by the user as the key data (for example, if the user specifies a 128-bit key length, the first 16 bytes of data are extracted).

[0043] (b) Direct input: The user directly and manually inputs key data that is consistent with the specified key length (e.g., if the user specifies a 256-bit key length, then 32 bytes of hexadecimal data are input).

[0044] (c) Random generation: The user instruction system is based on a cryptographically secure random number generator to randomly generate key data with the same length as the specified key. The generation process ensures randomness to avoid key predictability.

[0045] Step (104) Account Key Encoding: The system combines the "algorithm type encoding" determined in step (102) with the "key data" generated in step (103) to form a complete account key in the format of "algorithm type encoding + key data". The complete account key is then Base58 encoded. Base58 encoding can remove easily confused characters (such as the number "0" and the letter "O", the number "1" and the letter "I"), which is convenient for users to record, store and use for subsequent input. The encoded account key is returned to the user. For example, "algorithm type encoding 1 (1 byte) + 128-bit key data (16 bytes)" is Base58 encoded to form a user-recognizable string.

[0046] Step (2): Generate public and private keys for quantum-resistant encryption algorithms based on the account key.

[0047] This step takes the Base58 encoded account key generated in step (1) as input to generate a public-private key pair for account authentication and transaction signing. The specific process is as follows:

[0048] Step (201) Account key decoding: The user inputs the Base58 encoded account key into the system, and the system decodes the encoding to separate the "algorithm type encoding A" and the "original key data S", which is the key data generated in step (103);

[0049] Step (202) Seed length determination: The system queries the preset algorithm-seed length mapping table according to the algorithm type code A obtained by decoding to determine the seed length required to generate the public and private keys corresponding to the quantum-resistant encryption algorithm. For example, the CRYSTALS-Kyber algorithm requires 64 bytes of seed, and the CRYSTALS-Dilithium algorithm requires 96 bytes of seed.

[0050] Step (203) Hash Calculation and Iteration: The system uses the SHA512 algorithm to perform a hash calculation on the original key data S to obtain an initial hash value of 64 bytes. If the Seed length determined in step (202) is ≤64 bytes, the initial hash value is directly used as the basic data of the Seed. If the Seed length is >64 bytes (e.g., 96 bytes), the current hash value is used as input, and the SHA512 algorithm is used again to generate a new 64-byte hash value. This iterative process is repeated until the total length of the accumulated hash value meets the Seed length requirement. For example, a 96-byte Seed needs to be iterated twice, accumulating 128 bytes of hash value, and the first 96 bytes are taken.

[0051] Step (204) Seed selection: From the cumulative hash byte sequence generated in step (203), select byte data with the same length as the seed according to the rule of "low byte priority" to be used as the seed for generating public and private keys. For example, if the seed length is 96 bytes, then select the first 96 low bytes of the cumulative hash byte sequence.

[0052] Step (205) Public and private key generation: The system calls the public and private key generation function of the quantum-resistant encryption algorithm corresponding to the algorithm type code A. The Seed selected in step (204) is input into the function to generate a pair of public and private keys; wherein, the private key is used for transaction signing and the public key is used for account authentication and transaction signature verification.

[0053] Step (206) Adding public key feature information: To facilitate quick identification of the algorithm type during subsequent signature verification, feature information for uniquely identifying the quantum-resistant encryption algorithm type is added to the header of the generated public key; the feature information is a preset byte identifier, such as a 1-byte identifier, "0x01" corresponds to the CRYSTALS-Kyber algorithm public key, and "0x02" corresponds to the CRYSTALS-Dilithium algorithm public key, forming the final public key data, in the format of "algorithm type feature information + original public key".

[0054] Step (3): Generation of blockchain accounts based on quantum-resistant encryption algorithms

[0055] This step is used to generate the blockchain account ID corresponding to the quantum-resistant encryption algorithm, ensuring compatibility with the generation logic of traditional account IDs. The specific process is as follows:

[0056] The system uses the same hash algorithm (preferably SHA-256) as traditional asymmetric encryption algorithms (such as ECDSA) to generate blockchain account IDs. It performs hash calculation on the "public key containing algorithm type feature information" generated in step (206) and extracts 20 bytes of data from the calculation result as the blockchain account ID corresponding to the quantum-resistant encryption algorithm. At the same time, the public key generated in step (206) is used as the basis for verifying the identity of the blockchain account and stored locally on the user (private key) and on the blockchain node (public key can be submitted with the transaction) to ensure that the account ID can be associated with the public key during subsequent transaction verification.

[0057] Step (4): Blockchain account transaction signing based on quantum-resistant encryption algorithm

[0058] This step is used to generate deterministic signatures for transactions in quantum-resistant cryptographic accounts, and the specific process is as follows:

[0059] Step (401) Key Input: When a user initiates a transaction, they provide the system with the Base58 encoded account key generated in step (1);

[0060] Step (402) Public and private key generation: The system executes the process of step (2), such as decoding, seed calculation, and public and private key generation, to obtain the public and private key pair corresponding to the account;

[0061] Step (403) Public Key Embedding: The system embeds the "public key containing algorithm type feature information" generated in step (206) into the specified field of the transaction to be signed, so that the transaction recipient (blockchain node) can obtain the public key information;

[0062] Step (404) Deterministic Signature: The system calls the corresponding quantum-resistant encryption algorithm signature function based on the algorithm type code A obtained by decoding the account key, and uses the private key generated in step (402) to sign the "hash value of the transaction to be signed"; during the signing process, any uncertain random data is strictly avoided (such as not using random numbers as signature parameters) to ensure that for the same transaction to be signed, the same signature result is obtained each time, which satisfies the duplicate verification requirement of blockchain transactions;

[0063] Step (405) Offline Signature Support: This step supports offline signature mode. Users can perform the signature operations of steps (401) to (404) in an offline environment where they are not connected to the blockchain network. After the signature is completed, the combined data of "transaction to be signed + signature result + public key" is saved locally (such as a USB flash drive). When connected to the network later, it is submitted to the blockchain node to improve the privacy and anti-attack capabilities of the transaction.

[0064] Step (5): Verification of blockchain account transactions based on quantum-resistant encryption algorithm

[0065] This step is used by blockchain nodes to verify the validity of signed transactions submitted by quantum-resistant cryptographic accounts. The specific process is as follows:

[0066] Step (501) Transaction Reception: The blockchain node receives the user's submitted combination of "signed transaction + signature result + public key" data;

[0067] Step (502) Account ID verification: The node uses the Hash algorithm (SHA-256) in step (3) to calculate the public key carried in the transaction and generate a 20-byte verification account ID. The verification account ID is compared with the "sender account ID" carried in the transaction. If the two are inconsistent, the signature verification is directly determined to be unsuccessful and the transaction is rejected. If the two are consistent, the algorithm type feature information in the public key header is extracted to determine the type of quantum-resistant encryption algorithm used in the transaction.

[0068] Step (503) Signature validity verification: The node calls the signature verification function corresponding to the determined quantum-resistant encryption algorithm type, and takes the "hash value of the transaction to be signed", "public key carried in the transaction" and "signature result" as input parameters to perform signature verification calculation; if the signature verification result is "valid", the transaction is allowed to be executed; if the signature verification result is "invalid", it is determined to be an illegal transaction and is refused to be executed.

[0069] Step (6): Quantum-resistant encryption algorithm support for blockchain accounts generated by traditional asymmetric encryption algorithms.

[0070] This step is used to achieve a smooth quantum-resistant upgrade of traditional ECDSA accounts, gaining quantum-resistant security capabilities without migrating the account. The specific process is as follows:

[0071] Step (601) Interface and Field Addition: The blockchain system adds an API interface for setting a "quantum-resistant public key" for all traditional accounts (such as the "set_quantum_pubkey(addr,pubkey)" interface, where "addr" is the traditional account ID and "pubkey" is the quantum-resistant public key). At the same time, a "quantum_pubkey" field is added to the on-chain account information structure to store the quantum-resistant public key corresponding to the traditional account. The field storage format is consistent with the public key encoding format, such as Base64 encoding.

[0072] Step (602) Setting up the quantum-resistant public key: Traditional account users first execute steps (1) to (2) to generate a public-private key pair for the quantum-resistant encryption algorithm (a public key containing algorithm type feature information), and then call the API interface added in step (601) to submit the "traditional account ID" and "quantum-resistant public key" as parameters to the blockchain node; after the node verifies the user's identity (through traditional ECDSA signature verification), it writes the quantum-resistant public key into the "quantum_pubkey" field of the traditional account to complete the on-chain storage of the quantum-resistant public key;

[0073] Step (603) Upgraded transaction signature: When the traditional account initiates a transaction in the future, it will no longer use the traditional ECDSA private key to sign, but will execute the process of step (1), use the quantum-resistant account key generated in step (1), generate a quantum-resistant public-private key pair and perform deterministic signing on the transaction to ensure that the transaction has quantum-resistant security properties;

[0074] Step (604) Transaction Verification After Upgrade: After receiving the signed transaction from the upgraded account, the blockchain node executes the following verification logic:

[0075] Step (6041) Account Information Acquisition: The node queries the information of the account on the chain based on the "sender account ID" in the transaction and extracts the stored value of the "quantum_pubkey" field;

[0076] Step (6042) Public key existence check: If the “quantum_pubkey” field is empty (i.e. no quantum-resistant public key is set), then the signature verification logic of the traditional ECDSA account is followed: verify whether the ECDSA public key carried by the transaction can generate a result that is consistent with the sender’s account ID. If they are consistent, call the ECDSA signature verification algorithm to verify the signature; otherwise, it is determined to be an illegal transaction.

[0077] Step (6043) Public key consistency verification: If the “quantum_pubkey” field is not empty, the quantum-resistant public key carried in the transaction is compared with the quantum-resistant public key stored in this field; if the two are inconsistent, the signature verification is deemed to have failed and the transaction is rejected; if the two are consistent, the algorithm type feature information in the public key header is extracted to determine the quantum-resistant encryption algorithm type.

[0078] Step (6044) Quantum-resistant signature verification execution: The node calls the signature verification function of the corresponding quantum-resistant encryption algorithm to execute the signature validity verification logic in step 5.3; if the signature verification is valid, the transaction is executed; otherwise, execution is rejected.

[0079] Step (6045) Online signature verification restrictions: The signature verification process in this step does not support offline signature verification. The online verification must be performed after the nodes of the blockchain network obtain the stored value of the "quantum_pubkey" field on the chain to avoid signature verification errors or security vulnerabilities caused by the inability to obtain the on-chain public key in the offline environment.

[0080] like Figure 2 As shown, this is a specific embodiment of the solution used to integrate blockchain accounts with quantum-resistant encryption algorithms. The overall process revolves around two main lines: the full lifecycle processing of quantum-resistant encrypted accounts and the quantum-resistant upgrade support for traditional encrypted accounts. The interaction and processing logic of each module is as follows:

[0081] 1. Process starting point: Information input by blockchain users

[0082] As the initiator of the process, blockchain users provide the system with four types of core information:

[0083] Types of quantum-resistant encryption algorithms;

[0084] The length of quantum-resistant encryption keys;

[0085] Methods for generating quantum-resistant encryption keys;

[0086] The raw data used to generate the key.

[0087] 2. Key generation for quantum-resistant encryption algorithms

[0088] The information entered by the user is transmitted to the key generation module of the quantum-resistant encryption algorithm:

[0089] This module generates a key that carries encryption algorithm type information (i.e., the key contains the corresponding quantum-resistant encryption algorithm identifier) ​​based on the "algorithm type, key length, key generation method, and original data" provided by the user.

[0090] The generated key will be output synchronously to two downstream modules: a public / private key generation module for quantum-resistant encryption and a transaction signature module for quantum-resistant encryption.

[0091] 3. Public and private key generation for quantum-resistant encryption algorithms

[0092] The public / private key generation module of the quantum-resistant encryption algorithm receives a key carrying encryption algorithm type information from the key generation module of the quantum-resistant encryption algorithm, and performs the following processing:

[0093] Based on this key, a corresponding public-private key pair is generated;

[0094] Finally, a public key carrying encryption algorithm type information (containing the corresponding quantum-resistant encryption algorithm identifier) ​​is output and passed to two downstream modules: the quantum-resistant encryption algorithm account generation module and the traditional encryption algorithm account quantum-resistant algorithm support module.

[0095] 4. Account generation resistant to quantum encryption algorithms

[0096] The quantum-resistant encryption algorithm's account generation module receives a public key carrying encryption algorithm type information from the quantum-resistant encryption algorithm's public-private key generation module, processes it, and generates a quantum-resistant encryption account. The transaction to be submitted corresponding to this quantum-resistant encryption account is then transmitted to the quantum-resistant encryption algorithm's transaction signature module.

[0097] 5. Transaction signatures resistant to quantum cryptography algorithms

[0098] The quantum-resistant encryption algorithm's transaction signature module receives two types of input:

[0099] A key from the key generation module of the quantum-resistant encryption algorithm, carrying information about the encryption algorithm type;

[0100] Transactions pending submission from the quantum-resistant encrypted account generation module of the quantum-resistant encryption algorithm.

[0101] Based on the above input, this module performs a signing operation on the transaction and finally outputs a transaction signed using a quantum-resistant encryption algorithm, which is then passed to the quantum-resistant transaction verification module.

[0102] 6. Quantum-resistant algorithm support for traditional encryption algorithm accounts

[0103] Traditional encryption algorithm account quantum-resistant algorithm support module receives two types of input:

[0104] A public key carrying encryption algorithm type information from the public / private key generation module of the quantum-resistant encryption algorithm;

[0105] "Transactions pending submission" for traditional encrypted accounts.

[0106] The core processing of this module is to set and store the quantum-resistant public key corresponding to the traditional encrypted account, and synchronize this information to the "blockchain", that is, to store the quantum-resistant public key information of the traditional encrypted account on the chain.

[0107] Once the storage is complete, the traditional encrypted account information (including the quantum-resistant encryption public key) recorded in the "blockchain" will be transferred to the transaction verification module of the quantum-resistant encryption algorithm.

[0108] 7. Transaction signature verification resistant to quantum encryption algorithms

[0109] The quantum-resistant transaction signature verification module receives two types of input:

[0110] Transactions signed using quantum-resistant encryption algorithms, derived from a transaction signing module.

[0111] Traditional encrypted account information from the “blockchain” (including quantum-resistant cryptographic public keys).

[0112] Based on the above input, this module completes the validity verification of the transaction signature and is the final step in the entire process.

[0113] In summary, this process, through information transfer and collaborative processing between modules, simultaneously achieves the creation, transaction signing and verification of quantum-resistant encrypted accounts, as well as the binding of quantum-resistant public keys and transaction verification of traditional encrypted accounts, thus achieving the goal of integrating blockchain accounts with quantum-resistant encryption algorithms.

[0114] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for integrating quantum-resistant encryption algorithms into blockchain accounts, characterized in that, Includes the following steps: Step (1) Generate a quantum-resistant encryption algorithm account key: Receive the key length, quantum-resistant encryption algorithm type and key generation method input by the user, generate key data according to the key generation method, combine the quantum-resistant encryption algorithm type and the key data into a complete account key, and encode the complete account key to obtain the encoded account key; Step (2) Generate a public-private key pair for the quantum-resistant encryption algorithm based on the account key: Decode the encoded account key to obtain algorithm type A and original key data S. Determine the Seed length required to generate the public and private keys according to the algorithm type A. Perform a hash calculation on the original key data S. If the length of the hash result does not meet the Seed length, iterate the hash until it does. Select the corresponding length data as the Seed from the final hash byte sequence. Call the public-private key generation function of the quantum-resistant encryption algorithm to generate the public-private key pair. Step (3) Generate a quantum-resistant blockchain account based on the public-private key pair: Use the same hash algorithm as the traditional asymmetric encryption algorithm to generate the blockchain account ID, process the public key in the public-private key pair to generate the blockchain account ID, and use the public key as the basis for verifying the identity of the blockchain account. Step (4) Blockchain account transaction signing based on quantum-resistant encryption algorithm: Receive the account key provided by the user, execute step (2) to generate a public-private key pair, add the public key to the transaction to be signed, call the corresponding signature algorithm according to the quantum-resistant encryption algorithm type in the account key, and sign the transaction using the private key; Step (5) Blockchain account transaction verification based on quantum-resistant encryption algorithm: Receive the signed transaction submitted by the user, verify whether the public key carried in the transaction can generate an account ID consistent with the transaction. If consistent, identify the encryption algorithm type, call the corresponding verification algorithm to verify the validity of the signature using the public key. If invalid, the verification fails.

2. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, It also includes support for quantum-resistant encryption algorithms for blockchain accounts generated by traditional asymmetric encryption algorithms in step (6): adding an interface for setting the public key for identity verification to the blockchain account, and adding a field for storing the public key in the on-chain account information; after the traditional account generates the public and private keys of the quantum-resistant encryption algorithm, it sets and stores the corresponding quantum-resistant public key through the interface; the subsequent transactions of the traditional account execute the signature process of step (4), and when verifying the signature, it first obtains the quantum-resistant public key stored on the chain according to the account ID, verifies the consistency between the public key carried in the transaction and the stored public key, and then executes the signature verification logic of step (5).

3. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, The key generation method described in step (1) includes any of the following: (a) The user enters a password or a piece of text, and the SHA512 algorithm is used to calculate the hash value. Data with the same length as the user-specified key is extracted from the hash value as the key data. (b) The user directly inputs key data that matches the specified key length; (c) The user instruction system randomly generates key data with the same length as the specified key.

4. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, The encoding process described in step (1) is Base58 encoding. The encoded complete account key is used for user records and as input when generating public and private keys.

5. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, The specific process of performing Hash calculation on the original key data S in step (2) is as follows: the SHA512 algorithm is used to calculate the original key data S to obtain a 64-byte Hash value; if the required Seed length is > 64 bytes, the current Hash value is used as input, and the SHA512 algorithm is used again to generate a new 64-byte Hash value. This iterative process is repeated until the total length of the accumulated Hash value meets the requirement of the Seed length.

6. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, After generating the public-private key pair in step (2), feature information for uniquely identifying the type of quantum-resistant encryption algorithm is added to the header of the public key. The feature information is a preset byte identifier, and different quantum-resistant encryption algorithm types correspond to different byte identifiers.

7. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, The hash algorithm used in step (3) that generates the blockchain account ID in the same way as the traditional asymmetric encryption algorithm is the SHA-256 algorithm, and the traditional asymmetric encryption algorithm is the Elliptic Curve Signature Algorithm (ECDSA).

8. The method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 1, characterized in that, Step (4) supports offline signing based on quantum-resistant encryption algorithms, meaning that users can perform transaction signing operations in an offline environment and then submit the signed transaction to the blockchain network after the signing is completed.

9. A method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 2, characterized in that, The interface mentioned in step (6) is the API interface provided by the blockchain node, and the field is the quantum-resistant verification public key field newly added in the on-chain account information structure. The storage format of this field is consistent with the encoding format of the public key.

10. A method for integrating a quantum-resistant encryption algorithm for blockchain accounts according to claim 2 or 9, characterized in that, In step (6), the signature verification process of traditional accounts does not support offline signature verification. The blockchain network node must obtain the quantum-resistant public key stored on the chain and then perform online signature verification. If the quantum-resistant public key is not stored in the account information, the signature verification logic of the traditional asymmetric encryption algorithm will be followed: verify whether the public key carried by the transaction can generate an account ID that is consistent with the transaction. If they are consistent, the traditional signature verification algorithm will be called to verify the signature; otherwise, it will be judged as an illegal transaction.

Citation Information

Patent Citations

  • An anti-quantum computing block chain transaction method based on a symmetric key pool

    CN109670827A

  • Anti-quantum transaction processing method and device based on block chain, medium and equipment

    CN120128317A