An adaptive transaction processing mechanism compatible with elliptic curve and anti-quantum signature
By employing an adaptive transaction processing mechanism that is compatible with elliptic curves and quantum-resistant signatures, the compatibility issues of blockchain systems during the transition process are resolved, enabling seamless upgrades and system stability, and ensuring the integrity and security of transaction data.
Patent Information
- Application Number
- CN202411924414.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing blockchain systems lack compatibility when transitioning to quantum-resistant signatures, making it impossible to gradually introduce quantum-resistant signature capabilities without stopping operation or clearing transaction data history, and it is difficult to maintain forward compatibility with existing systems.
An adaptive transaction processing mechanism compatible with elliptic curve signatures and quantum-resistant signatures is provided. The signature type is determined by judging the size of the transaction data list, and the transaction data is constructed and parsed according to different signature protocols, supporting the compatible processing of elliptic curve signatures and quantum-resistant signatures.
It enables seamless upgrades of blockchain systems to different signature algorithms during the transition process, ensuring system stability and scalability, and maintaining the integrity and security of transaction data.
Smart Images

Figure CN119831592B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, and particularly relates to an adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature. BACKGROUND
[0002] As a decentralized ledger technology, blockchain has shown a wide application prospect in many fields such as finance, supply chain, and Internet of Things. Blockchain relies on cryptography to ensure the security, authenticity, and non-repudiation of data. Most current blockchain systems use elliptic curve signatures to ensure the security of transactions. Elliptic curve signatures have good computational performance and short key lengths, and have been applied to mainstream blockchain platforms such as Bitcoin and Ethereum.
[0003] However, with the development of quantum computing technology, the cryptography algorithms of traditional mathematical problems (such as discrete logarithm problem and integer factorization problem) will face the threat of quantum computers. Quantum computers can effectively solve these problems in polynomial time through quantum algorithms such as Shor's algorithm, and traditional elliptic curve signatures will face the threat of quantum computing. To cope with this potential threat, quantum-resistant signatures have emerged. Quantum-resistant signatures rely on mathematical problems that are difficult for quantum computers to crack, such as lattice problems, hash functions, and coding theory, and have high computational complexity, which can resist quantum computing attacks and provide security for systems.
[0004] Existing work mainly focuses on designing blockchain systems that support quantum-resistant signatures. Academia mainly studies it from two aspects: contract application and system design. In terms of application, the North University of Technology team implements user quantum-resistant password migration through smart contracts. In terms of system design, the North University of Technology team proposes a quantum-resistant blockchain system that supports on-chain and off-chain collaboration, solving the performance problem of transaction processing. The North University of Technology team also proposes a quantum-resistant blockchain system architecture that supports algorithm pluggability, supporting dynamic parameter adjustment of multiple quantum-resistant cryptographic algorithms. Rahul Saha et al. proposed a quantum-resistant decentralized consensus suitable for blockchain. This scheme uses a lattice with polynomials for identity encryption and uses an aggregate signature to reach consensus, which can ensure its efficiency and applicability in quantum-resistant blockchain applications. Muhammed F. Esgin et al. designed MatRiCT, a blockchain confidential transaction ring signature protocol based on quantum-resistant (modular) lattice assumptions. The proof length of this protocol is about two orders of magnitude shorter than existing quantum-resistant proposals, and it can be effectively extended to large anonymous sets.
[0005] Currently, there are also some anti-quantum proposals for typical blockchain systems in the industry. For example, Bitcoin Post-Quantum is an experimental branch of the Bitcoin main blockchain, which adopts an anti-quantum digital signature scheme. Ethereum 3.0 considers incorporating quantum resistance components such as zk-STARKs (zero-knowledge scalable transparent knowledge argument). Abelian and other blockchain platforms propose to use lattice-based anti-quantum cryptography systems to prevent quantum attacks. Corda tests anti-quantum algorithms such as SPHINCS.
[0006] In the process of implementing the technical method of the embodiment of the present invention, the present inventors have found at least the following technical problems in the prior art:
[0007] The above researches are mostly focused on building anti-quantum blockchain systems. When anti-quantum signatures are gradually applied, the blockchain system needs to have compatibility to support the transition of different types of signature algorithms, while the existing blockchain systems usually only support a single signature algorithm, such as Bitcoin and Ethereum mainly using elliptic curve signatures, ignoring the transitional needs of the current system, and not considering how to gradually introduce anti-quantum signature capabilities without stopping the operation of the blockchain system and emptying the transaction and data history of the blockchain system, and ensuring forward compatibility with the existing blockchain system.
[0008] The present invention aims to provide a solution that is compatible with both elliptic curve and anti-quantum signatures. SUMMARY
[0009] The embodiment of the present invention provides an adaptive transaction processing mechanism compatible with elliptic curve and anti-quantum signatures to provide a solution that is compatible with both elliptic curve and anti-quantum signatures.
[0010] The embodiment of the present invention provides an adaptive transaction processing mechanism compatible with elliptic curve and anti-quantum signatures, which includes the following aspects:
[0011] When receiving a user's transaction request, process the user data;
[0012] Determine whether the size of the transaction data list in the transaction request meets the minimum number requirement of the corresponding signature type, thereby determining whether to use anti-quantum signature or elliptic curve signature for the transaction;
[0013] When the transaction uses anti-quantum signature, the transaction data is constructed according to the format of the anti-quantum protocol, which includes 3 data fields: unsigned transaction, signed transaction, and public key; while when the transaction uses elliptic curve signature, the transaction data is constructed according to the elliptic curve protocol, which includes 4 data fields: unsigned transaction, V value, R value, and S value;
[0014] After the transaction data is serialized and packaged, the serialized data is sent to a blockchain network.
[0015] Optionally, after the serialized data is sent to the blockchain network, the method further includes a deserialization part, specifically including:
[0016] Calculating the data field length of the transaction data list in the transaction request;
[0017] Parsing the transaction deserialization structure according to the data field length;
[0018] Packaging the parsed transaction deserialization structure into a transaction data structure;
[0019] Adding the transaction data to a transaction pool.
[0020] Optionally, the parsing of the transaction deserialization structure according to the data field length specifically includes:
[0021] Determining whether the data field length is equal to 3;
[0022] When the data field length is equal to 3, parsing the transaction deserialization structure according to the quantum-resistant signature; and when the data field length is not equal to 3, parsing the transaction deserialization structure according to the elliptic curve signature.
[0023] Optionally, after the transaction data is added to the transaction pool, the method further includes a block generation and signature verification part, specifically including:
[0024] Selecting a transaction set from the transaction pool;
[0025] Checking the signature information field of each transaction;
[0026] Verifying whether the signature of each transaction is correct until all transactions in the transaction set are traversed;
[0027] Constructing a new block for all transactions that pass the verification.
[0028] Optionally, the checking of the signature information field of each transaction specifically includes:
[0029] Checking whether the signature information field of each transaction is valid and whether the signer has the right to make the transaction.
[0030] Optionally, the verification of whether the signature of each transaction is correct specifically includes:
[0031] When the transaction uses the quantum-resistant signature, verifying whether the signature is correct using the public key in the transaction;
[0032] When the transaction uses the elliptic curve signature, calculating the public key using the V value, the R value and the S value in the transaction, and then verifying whether the signature is correct using the public key.
[0033] Optionally, after verifying whether the signature of each transaction is correct, further comprising:
[0034] When the signature verification of the transaction fails, deleting the transaction.
[0035] In another aspect, the embodiments of the present application also provide a transaction structure compatible with elliptic curve and quantum-resistant signature, which comprises:
[0036] Transaction information, including unsigned data and signature information field; when the data list size of the transaction data is 4, it indicates that the transaction is constructed by using the elliptic curve protocol, and the signature information field includes the V value, R value and S value in the elliptic curve signature; when the data list size of the transaction data is 3, it indicates that the transaction is constructed by using the quantum-resistant protocol, and the signature information field includes the public key of the quantum-resistant signature;
[0037] Hash value, indicating the fixed-length output value obtained by performing the hash function operation on the transaction data, used for transaction aggregation;
[0038] Serialized encoding size, indicating the size of the serialized and encoded transaction data, ensuring the consistency and integrity of the data.
[0039] Optionally, the unsigned data is the basic information of the transaction, including at least one of the following information: sender address, receiver address, transaction amount, transaction time, transfer amount, sending account and receiving account.
[0040] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0041] The adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature provided by the present application can adaptively process transaction data of multiple signature types, can be compatible with elliptic curve signature and quantum-resistant signature in the process of transition of the blockchain system to quantum-resistant cryptography, can successfully introduce quantum-resistant signature without stopping the operation of the blockchain system and emptying the transaction and data history of the blockchain system, ensures the forward compatibility with the existing blockchain system, supports the transition of different types of signature algorithms, realizes the seamless upgrade of the blockchain system, and ensures the stability and scalability of the blockchain system. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 FIG. 1 is a schematic diagram of a transaction structure compatible with elliptic curve and quantum-resistant signature in an embodiment of the present application;
[0043] Figure 2 FIG. 2 is a flowchart of the transaction construction part of the transaction processing mechanism compatible with elliptic curve and quantum-resistant signature in an embodiment of the present application;
[0044] Figure 3 Figure 1 is a flowchart of the serialization part of the transaction processing mechanism compatible with elliptic curve and quantum-resistant signature in an embodiment of the present application.
[0045] Figure 4 Figure 2 is a flowchart of the block signature verification part of the transaction processing mechanism compatible with elliptic curve and quantum-resistant signature in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The embodiment of the present application provides an adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature, which is used for providing a solution compatible with elliptic curve and quantum-resistant signature.
[0047] First, the terms appearing in the specification will be explained and described respectively.
[0048] (1) Blockchain
[0049] Blockchain is a distributed ledger technology that is used to record transactions and data and forms a decentralized database system, and the underlying ledger adopts a chain structure, and each block (except the genesis block) can only reference one previous block.
[0050] (2) Transaction
[0051] Transactions record any behavior or event between users, such as transfers, voting, signing contracts, etc., and each block contains multiple transaction data.
[0052] (3) Elliptic Curve Signature
[0053] Elliptic Curve Signature (ECDSA, Elliptic Curve Digital Signature Algorithm) is a digital signature algorithm based on Elliptic Curve Cryptography (ECC, Elliptic Curve Cryptography), which combines public key cryptography and hash functions to verify the integrity and authenticity of messages. It relies on the asymmetric encryption mechanism of private key and public key, and its process can be divided into two steps of signature and verification.
[0054] (4) Quantum-resistant signature
[0055] Quantum-resistant signature refers to a digital signature algorithm designed to counter the computing threat brought by quantum computers. With the continuous development of quantum computing technology, traditional digital signature algorithms (such as RSA, ECC, etc.) are at risk of being cracked by quantum algorithms (such as Shor algorithm). Its algorithm is mainly based on lattice problems, hash functions, coding theory, and some other problems that are difficult to solve on quantum computers.
[0056] For a better understanding of the above adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature, the following will be described in detail in conjunction with the drawings and specific embodiments. Obviously, the embodiments described in the present application are part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.
[0057] In a blockchain system, transaction data usually contains multiple types of information, such as the addresses of the sender and the receiver, the transaction amount, the timestamp, the signature, etc. The types and lengths of these information may vary depending on different transaction types or signature algorithms. Therefore, a transaction processing mechanism that can adapt to these differences is needed. The adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature provided by the present application aims to ensure that the blockchain system can flexibly handle both elliptic curve signature and quantum-resistant signature transactions, while maintaining the stability and security of the system.
[0058] An adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature mainly involves three parts, namely the transaction construction part, the deserialization part and the block verification part.
[0059] (I) Transaction construction part
[0060] As shown in Figure 2 , the transaction construction part of the adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature includes the following steps.
[0061] (1) After receiving the user's transaction request, process the user data. Specifically, when the user initiates a transaction request through an application or API, the blockchain system receives the user's transaction request and starts processing the user data provided by the user.
[0062] (2) Determine whether the size of the transaction data list in the transaction request meets the minimum number requirement of the corresponding signature type, so as to determine whether the transaction uses quantum-resistant signature or elliptic curve signature. Specifically, the blockchain system determines whether the transaction uses elliptic curve signature by judging whether the size of the transaction data list in the transaction request meets the minimum number requirement of the elliptic curve, i.e. whether the size of the transaction data list in the transaction request is 4; the blockchain system determines whether the transaction uses quantum-resistant signature by judging whether the size of the transaction data list in the transaction request meets the minimum number requirement of the quantum, i.e. whether the size of the transaction data list in the transaction request is 3.
[0063] (3) When the transaction uses anti-quantum signature, the transaction data is constructed according to the format of the anti-quantum protocol, which includes 3 data fields, namely unsigned transaction, signed transaction and public key; and when the transaction uses elliptic curve signature, the transaction data is constructed according to the elliptic curve protocol, which includes 4 data fields, namely unsigned transaction, V value, R value and S value.
[0064] (4) After the transaction data is serialized and packaged, the serialized data is sent to the blockchain network. Specifically, after the above information is organized into a list, serialization packaging is performed, and the serialized data is sent to the blockchain network for verification and processing by other nodes.
[0065] (II) Deserialization part
[0066] As shown in Figure 3 , a deserialization part of an adaptive transaction processing mechanism compatible with elliptic curve and anti-quantum signature includes the following steps.
[0067] (1) Calculate the data field length of the transaction data list in the transaction request. Specifically, after the blockchain system receives the serialized data, the serialized data is analyzed to calculate the data field length L of the serialized data.
[0068] (2) Parse the transaction deserialization structure according to the data field length. Specifically, first determine whether the data field length L is equal to 3; when the data field length L is equal to 3, it means that the data is organized according to the format of the anti-quantum signature, and the transaction deserialization structure is parsed according to the anti-quantum signature; and when the data field length L is not equal to 3, it means that the data is organized according to the format of the elliptic curve signature, and the transaction deserialization structure is parsed according to the elliptic curve signature.
[0069] (3) Package the parsed transaction deserialization structure to the transaction data structure. The transaction data structure can be compatible with elliptic curve and anti-quantum signature, and its structure includes:
[0070] Transaction information, including unsigned data and signature information field; when the data list size of the transaction data is 4, it means that the transaction is constructed using the elliptic curve protocol, and the signature information field includes V value, R value and S value in the elliptic curve signature; when the data list size of the transaction data is 3, it means that the transaction is constructed using the anti-quantum protocol, and the signature information field includes the public key of the anti-quantum signature;
[0071] Hash value, which represents the fixed length output value obtained by performing hash function operation on the transaction data, and is used for transaction aggregation;
[0072] Serialization encoding size, which represents the size of the serialized and encoded transaction data, ensuring the consistency and integrity of the data.
[0073] The unsigned data is basic information of the transaction, and includes at least one of the following information: sender address, receiver address, transaction amount, transaction time, transfer amount, sending account, and receiving account.
[0074] (4) Adding the transaction data to the transaction pool. Specifically, the transaction data is added to the transaction pool in the blockchain system, waiting to be packaged by the blockchain system.
[0075] (Three) Block verification part
[0076] As shown in Figure 4 , a block verification part of an adaptive transaction processing mechanism compatible with elliptic curve and quantum-resistant signature includes the following steps.
[0077] (1) Selecting a transaction set from the transaction pool. Specifically, the blockchain system selects a group of transactions from the transaction pool as a transaction set, preparing to package these transactions into a new block.
[0078] (2) Checking the signature information field of each transaction. Specifically, for each transaction, the blockchain system first checks the signature, checks whether the signature information field of each transaction is valid and whether the signer has the right to transact.
[0079] (3) Verify the correctness of the signature of each transaction until all transactions in the transaction set are traversed. Specifically, when the transaction uses quantum-resistant signature, the public key in the transaction is used to verify the correctness of the signature. When the transaction uses elliptic curve signature, the public key is calculated using the V value, R value and S value in the transaction, and then the public key is used to verify the correctness of the signature. The blockchain system will perform the signature verification process on all selected transactions until all transactions are verified.
[0080] (4) Constructing a new block for all transactions that pass the verification. Specifically, the blockchain system will package all transactions that pass the verification into a new block and perform consensus calculation.
[0081] It should be noted that after step (3) of verifying the correctness of the signature of each transaction, it also includes: when the signature verification of the transaction fails, deleting the transaction.
[0082] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. An adaptive transaction processing mechanism compatible with elliptic curve and quantum resistant signature, characterized in that, The transaction structure part includes: After receiving the transaction request of the user, processing the user data; Determine whether the size of the transaction data list in the transaction request meets the minimum number requirement of the corresponding signature type, thereby determining whether the transaction uses quantum-resistant signature or elliptic curve signature; When the transaction uses quantum-resistant signature, the transaction data is structured according to the format of the quantum-resistant protocol, which includes three data fields: unsigned transaction, signed transaction and public key; when the transaction uses elliptic curve signature, the transaction data is structured according to the elliptic curve protocol, which includes four data fields: unsigned transaction, V value, R value and S value; After serializing and packaging the transaction data, the serialized data is sent to the blockchain network.
2. The mechanism of claim 1, wherein, After the serialized data is sent to the blockchain network, the deserialization part is further included, specifically including: Calculate the data field length of the transaction data list in the transaction request; Parse the transaction deserialization structure according to the data field length; Package the parsed transaction deserialization structure to the transaction data structure; Add the transaction data to the transaction pool.
3. The mechanism of claim 2, wherein, The parsing of the transaction deserialization structure according to the data field length specifically includes: Determine whether the data field length is equal to 3; When the data field length is equal to 3, parse the transaction deserialization structure according to the quantum-resistant signature; when the data field length is not equal to 3, parse the transaction deserialization structure according to the elliptic curve signature.
4. The mechanism of claim 2, wherein, After adding the transaction data to the transaction pool, the block verification part is further included, specifically including: Select a set of transactions from the transaction pool; Check the signature information field of each transaction; Verify the signature of each transaction until all transactions in the transaction set are traversed; For all transactions that pass the verification, construct a new block.
5. The mechanism of claim 4, wherein, The checking of the signature information field of each transaction specifically includes: Check whether the signature information field of each transaction is valid and whether the signer has the right to transact.
6. The mechanism of claim 4, wherein, The verification of the signature of each transaction specifically includes: When the transaction uses quantum-resistant signature, use the public key in the transaction to verify whether the signature is correct; When the transaction uses elliptic curve signature, calculate the public key using the V value, R value and S value in the transaction, and then use the public key to verify whether the signature is correct.
7. The mechanism of claim 4, wherein, After verifying the signature of each transaction, it further includes: When the signature of the transaction fails, delete the transaction.
8. A transaction structure compatible with elliptic curve and quantum-resistant signature, the structure including: Transaction information, including unsigned data and signature information field; when the data list size of the transaction data is 4, it indicates that the transaction is structured using the elliptic curve protocol, and the signature information field includes the V value, R value and S value in the elliptic curve signature; when the data list size of the transaction data is 3, it indicates that the transaction is structured using the quantum-resistant protocol, and the signature information field includes the public key of the quantum-resistant signature; Hash value, indicating the fixed-length output value obtained by performing a hash function operation on the transaction data, used for transaction aggregation; Serialization encoding size, indicating the size of the serialized and encoded transaction data, ensuring the consistency and integrity of the data.
9. The transaction structure of claim 8, wherein, The unsigned data is basic information of the transaction, and includes at least one of the following information: a sender address, a receiver address, a transaction amount, a transaction time, a transfer amount, a sending account, and a receiving account.
Citation Information
Patent Citations
Anti-quantum computing block chain method and system based on secret sharing
CN111327419A
Financial system transaction-oriented block chain privacy protection method based on lattice password
CN113656828A