Anti-quantum block construction method and electronic equipment

By structuring blockchain transaction data and generating chaotic hash fingerprints, quantum-resistant Merkle root and chaotic quantum-resistant signatures are constructed, solving the security and efficiency problems of blockchain under quantum attacks and realizing efficient and secure block construction.

CN121907445APending Publication Date: 2026-04-21XIAN TIANHE DEFENCE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN TIANHE DEFENCE TECH
Filing Date
2025-12-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing blockchain technology suffers from problems such as block bloat, insufficient computational efficiency, and weak security when facing quantum attacks, making it difficult to effectively resist quantum computing attacks.

Method used

The method of constructing chaotic hash fingerprints and quantum-resistant Merkle roots is adopted. By structuring transaction data, chaotic hash fingerprints and quantum-resistant Merkle roots are generated. Combined with the core fields of the block header, chaotic quantum-resistant signatures are generated, optimizing the block header data structure and ensuring security and computational efficiency.

Benefits of technology

While enhancing security, it reduces data bloat, improves computational efficiency, significantly reduces storage burden, and ensures the security and performance of quantum-resistant computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907445A_ABST
    Figure CN121907445A_ABST
Patent Text Reader

Abstract

The invention provides an anti-quantum block construction method and electronic equipment, and relates to the technical field of block chains. The method comprises the following steps: performing structured processing on transaction data of each transaction, and generating a chaotic hash fingerprint and an anti-quantum Merkel root of each transaction based on the structured transaction data of each transaction; generating a preorder block hash value based on the block header core field of the preorder block; according to the block header core field, the anti-quantum Merkel root and the preorder block hash value, generating a chaotic anti-quantum signature; and splicing the anti-quantum Merkel root, the preorder block hash value, the chaotic anti-quantum signature, the preset random number and the preset block header field to obtain block header data, and generating a new block based on the block header data. According to the method, chaotic mapping is used for replacing a traditional hash function, and through optimization of a data structure and application of efficient hash fingerprints, the storage burden is remarkably reduced and the calculation efficiency is improved on the premise that the security of anti-quantum calculation is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and more specifically, to a quantum-resistant block construction method and electronic device. Background Technology

[0002] As a core underlying infrastructure for building a trusted data space, blockchain technology can effectively guarantee the unforgeability, integrity, and immutability of transactions and their chain structure. Currently, mainstream blockchain technologies rely on hash algorithms and signature mechanisms, but these can be quickly cracked under quantum attacks, leading to risks such as transaction forgery and address leakage.

[0003] To address the aforementioned risks, existing block generation methods often employ post-quantum cryptography. However, when applied to blockchain systems, especially in high-throughput, high-concurrency trusted data spaces, existing block generation methods generally suffer from defects such as block bloat, insufficient computational efficiency, and weak security. Therefore, there is an urgent need for a block generation mechanism that can effectively resist quantum computing attacks while also balancing performance, efficiency, and security. Summary of the Invention

[0004] The purpose of this application is to provide a quantum-resistant block construction method and electronic device to address the shortcomings of the existing technology, thereby solving the problems of block expansion, insufficient computational efficiency, and weak security that are common in existing block generation methods.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for constructing quantum-resistant blocks, the method comprising: Obtain the transaction set of the preceding block, and perform structured processing on the transaction data of each transaction in the transaction set to obtain the structured transaction data of each transaction; Based on the structured transaction data of each transaction, a chaotic hash fingerprint of each transaction is generated, and based on the chaotic transaction fingerprint of each transaction, a quantum-resistant Merkle root of the preceding block is generated. Obtain the block header core field of the preceding block, and generate the preceding block hash value of the preceding block based on the block header core field; A chaotic quantum-resistant signature is generated based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value. The anti-quantum Merkle root, the preceding block hash value, the chaotic anti-quantum signature, the preset random number, and the preset block header field are concatenated to obtain the block header data, and a new block is generated based on the block header data.

[0006] As one possible implementation, the step of structuring the transaction data of each transaction in the transaction set to obtain structured transaction data for each transaction includes: Extract transaction summaries from the transaction data; Redundant fields are removed from the transaction summary to obtain the processed transaction summary. The transaction fields in the processed transaction summary are sorted, and the field values ​​and field types of each transaction field are normalized to obtain the structured transaction data.

[0007] As one possible implementation, generating chaotic hash fingerprints for each transaction based on the structured transaction data includes: Based on the structured transaction data and network public key parameters, a first initial state of the chaotic system is constructed, and the state variables of the chaotic system are iteratively updated multiple times based on a preset chaotic mapping function and the first initial state to generate a first set of perturbation sequences. The chaotic hash fingerprint is generated by quantizing and compressing multiple first perturbation sequences in the first perturbation sequence set.

[0008] As one possible implementation, the step of iteratively updating the state variables of the chaotic system based on a preset chaotic mapping function and the first initial state to generate a first set of perturbation sequences includes: Based on the preset chaos mapping function and the first initial state, the state variables of the chaotic system in the current iteration are determined, and the state variables of the chaotic system in the next iteration are determined according to the state variables of the chaotic system in the current iteration and the preset chaos mapping function. This process is repeated to generate a chaos generation sequence. Based on the chaotic generation sequence, the first perturbation sequence set is generated, and the first perturbation sequence set includes the first perturbation sequence corresponding to each iteration.

[0009] As one possible implementation, the step of quantizing and compressing multiple first perturbation sequences in the first perturbation sequence set to generate the chaotic hash fingerprint includes: Multiple first perturbation sequences are summed to obtain the summation result; Perform modulo operations on the accumulated result to obtain the operation result, and convert the operation result into a binary string; The chaotic hash fingerprint is generated based on the binary string and the network public key parameters.

[0010] As one possible implementation, the generation of the quantum-resistant Merkle root of the preceding block based on the chaotic transaction fingerprints of each transaction includes: The chaotic transaction fingerprints of each transaction are sorted to obtain a set of transaction fingerprints. A binary tree is constructed based on the transaction fingerprint set, and the root node of the binary tree is used as the quantum-resistant Merkle root.

[0011] As one possible implementation, generating the hash value of the preceding block based on the core field of the block header includes: The core fields of the block header are encoded to construct the second initial state of the chaotic system. Based on the preset chaotic mapping function and the second initial state, the state variables of the chaotic system are iteratively updated in multiple rounds to generate a second perturbation sequence set, which includes the second perturbation sequence corresponding to each round of iteration. According to the arrangement order of each second perturbation sequence in the second perturbation sequence set, a first preset number of second perturbation sequences are obtained from the second perturbation sequence set, and the first preset number of second perturbation sequences are encoded to generate the preceding block hash value.

[0012] As one possible implementation, generating a chaotic quantum-resistant signature based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value includes: The block header core field, the quantum-resistant Merkle root, and the preceding block hash value are combined to generate the message body to be signed; Based on the message body to be signed and the signing private key, generate the initial perturbation value of the chaotic system; Based on the initial perturbation value, the state variables of the chaotic system are updated iteratively in multiple rounds to generate a third perturbation sequence set, which includes the third perturbation sequence corresponding to each round of iteration. According to the arrangement order of each third perturbation sequence in the third perturbation sequence set, a second preset number of third perturbation sequences are obtained from the third perturbation sequence set, and the second preset number of third perturbation sequences are spliced ​​together to obtain the chaotic quantum-resistant signature.

[0013] As one possible implementation, generating a new block based on the block header data includes: A block header hash is generated based on the block header data, and the block header hash is verified according to a preset consensus mechanism to determine whether the block header hash meets the difficulty conditions corresponding to the preset consensus mechanism. If the condition is not met, the preset random number is adjusted and the block header hash is regenerated. This process is repeated iteratively until the generated block header hash meets the difficulty condition. If the conditions are met, the block header hash and the corresponding random number are written into the block header to obtain the new block.

[0014] Secondly, embodiments of this application provide a quantum-resistant block construction apparatus, the apparatus comprising: The processing module is used to obtain the transaction set of the preceding block and perform structured processing on the transaction data of each transaction in the transaction set to obtain the structured transaction data of each transaction. The first generation module is used to generate chaotic hash fingerprints of each transaction based on the structured transaction data of each transaction, and to generate the quantum-resistant Merkle root of the preceding block based on the chaotic transaction fingerprints of each transaction. The second generation module is used to obtain the block header core field of the preceding block and generate the preceding block hash value of the preceding block based on the block header core field. The third generation module is used to generate a chaotic quantum-resistant signature based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value. The fourth generation module concatenates the quantum-resistant Merkle root, the preceding block hash value, the chaotic quantum-resistant signature, the preset random number, and the preset block header field to obtain block header data, and generates a new block based on the block header data.

[0015] As one possible implementation, the processing module is specifically used for: Extract transaction summaries from the transaction data; Redundant fields are removed from the transaction summary to obtain the processed transaction summary. The transaction fields in the processed transaction summary are sorted, and the field values ​​and field types of each transaction field are normalized to obtain the structured transaction data.

[0016] As one possible implementation, the first generation module is specifically used for: Based on the structured transaction data and network public key parameters, a first initial state of the chaotic system is constructed, and the state variables of the chaotic system are iteratively updated multiple times based on a preset chaotic mapping function and the first initial state to generate a first set of perturbation sequences. The chaotic hash fingerprint is generated by quantizing and compressing multiple first perturbation sequences in the first perturbation sequence set.

[0017] As one possible implementation, the first generation module is specifically used for: Based on the preset chaos mapping function and the first initial state, the state variables of the chaotic system in the current iteration are determined, and the state variables of the chaotic system in the next iteration are determined according to the state variables of the chaotic system in the current iteration and the preset chaos mapping function. This process is repeated to generate a chaos generation sequence. Based on the chaotic generation sequence, the first perturbation sequence set is generated, and the first perturbation sequence set includes the first perturbation sequence corresponding to each iteration.

[0018] As one possible implementation, the first generation module is specifically used for: Multiple first perturbation sequences are summed to obtain the summation result; Perform modulo operations on the accumulated result to obtain the operation result, and convert the operation result into a binary string; The chaotic hash fingerprint is generated based on the binary string and the network public key parameters.

[0019] As one possible implementation, the first generation module is specifically used for: The chaotic transaction fingerprints of each transaction are sorted to obtain a set of transaction fingerprints. A binary tree is constructed based on the transaction fingerprint set, and the root node of the binary tree is used as the quantum-resistant Merkle root.

[0020] As one possible implementation, the second generation module is specifically used for: The core fields of the block header are encoded to construct the second initial state of the chaotic system. Based on the preset chaotic mapping function and the second initial state, the state variables of the chaotic system are iteratively updated in multiple rounds to generate a second perturbation sequence set, which includes the second perturbation sequence corresponding to each round of iteration. According to the arrangement order of each second perturbation sequence in the second perturbation sequence set, a first preset number of second perturbation sequences are obtained from the second perturbation sequence set, and the first preset number of second perturbation sequences are encoded to generate the preceding block hash value.

[0021] As one possible implementation, the third generation module is specifically used for: The block header core field, the quantum-resistant Merkle root, and the preceding block hash value are combined to generate the message body to be signed; Based on the message body to be signed and the signing private key, generate the initial perturbation value of the chaotic system; Based on the initial perturbation value, the state variables of the chaotic system are updated iteratively in multiple rounds to generate a third perturbation sequence set, which includes the third perturbation sequence corresponding to each round of iteration. According to the arrangement order of each third perturbation sequence in the third perturbation sequence set, a second preset number of third perturbation sequences are obtained from the third perturbation sequence set, and the second preset number of third perturbation sequences are spliced ​​together to obtain the chaotic quantum-resistant signature.

[0022] As one possible implementation, the fourth generation module is specifically used for: A block header hash is generated based on the block header data, and the block header hash is verified according to a preset consensus mechanism to determine whether the block header hash meets the difficulty conditions corresponding to the preset consensus mechanism. If the condition is not met, the preset random number is adjusted and the block header hash is regenerated. This process is repeated iteratively until the generated block header hash meets the difficulty condition. If the conditions are met, the block header hash and the corresponding random number are written into the block header to obtain the new block.

[0023] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and during operation of the electronic device, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the quantum-resistant block construction method as described in any of the first aspects above.

[0024] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the quantum-resistant block construction method as described in any of the first aspects above.

[0025] According to the quantum-resistant block construction method and electronic device of this application, a transaction set of a preceding block is obtained, and the transaction data of each transaction in the transaction set is structured to obtain structured transaction data of each transaction. Based on the structured transaction data of each transaction, a chaotic hash fingerprint of each transaction is generated, and a quantum-resistant Merkle root of the preceding block is generated based on the chaotic transaction fingerprint of each transaction. The block header core field of the preceding block is obtained, and the preceding block hash value of the preceding block is generated based on the block header core field. A chaotic quantum-resistant signature is generated based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value. The quantum-resistant Merkle root, the preceding block hash value, the chaotic quantum-resistant signature, a preset random number, and a preset block header field are concatenated to obtain block header data, and a new block is generated based on the block header data. According to the embodiments of this application, by structuring the transaction data of the preceding block and generating a compact chaotic hash fingerprint, a quantum-resistant Merkle root is constructed, thereby improving security while avoiding data bloat. Furthermore, key information such as the block header core fields, the quantum-resistant Merkle root, and the previous block hash value are fused to generate a lightweight chaotic quantum-resistant signature. This signature is then concatenated to generate the block header data, which is used to generate a new block. Thus, through data structure optimization and the application of efficient hash fingerprints, storage burden is significantly reduced and computational efficiency is improved while ensuring quantum-resistant computing security. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating a quantum-resistant block construction method provided in an embodiment of this application is shown. Figure 2 A flowchart illustrating a transaction data structuring processing method provided in an embodiment of this application is shown. Figure 3 A flowchart illustrating a chaotic hash fingerprint generation method provided in an embodiment of this application is shown. Figure 4 A flowchart illustrating a method for generating a first perturbation sequence set according to an embodiment of this application is shown; Figure 5 A flowchart illustrating a method for generating a preceding block hash value according to an embodiment of this application is shown. Figure 6A flowchart illustrating a chaotic quantum-resistant signature generation method provided in an embodiment of this application is shown. Figure 7 This paper shows a schematic diagram of the structure of a quantum-resistant block construction device provided in an embodiment of this application; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0029] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0030] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0031] Figure 1 A flowchart illustrating a quantum-resistant block construction method provided in an embodiment of this application is shown. (Refer to...) Figure 1 As shown, the method specifically includes the following steps: S101. Obtain the transaction set of the preceding block, and perform structured processing on the transaction data of each transaction in the transaction set to obtain the structured transaction data of each transaction.

[0032] Optionally, the complete transaction set contained in the preceding block is obtained from the blockchain. Then, a structured processing flow is sequentially executed on the raw transaction data of each transaction in the transaction set. Specifically, the key fields constituting the core of the transaction semantics are parsed and extracted from the raw transaction data to obtain a transaction digest. Redundant fields in the transaction digest are then removed, retaining only the valid fields to obtain the processed transaction data, thereby eliminating data inconsistencies caused by differences in node implementation. Simultaneously, each transaction field in the processed transaction data is sorted according to preset rules, such as lexicographical order of field names or business logic order. The field values ​​of each transaction field are standardized in type and format, such as address standardization, floating-point precision truncation, and numerical base unification. Finally, standardized and structured transaction data for each transaction is generated, laying the foundation for the subsequent generation of chaotic hash fingerprints.

[0033] S102. Based on the structured transaction data of each transaction, generate the chaotic hash fingerprint of each transaction, and generate the quantum-resistant Merkle root of the preceding block based on the chaotic transaction fingerprint of each transaction.

[0034] Optionally, for the structured transaction data of each transaction, the first initial state of the chaotic system is calculated first by combining the network public key parameters. Then, this first initial state is input into a preset multidimensional chaotic mapping function, and the state variables of the chaotic system are iteratively updated multiple times according to its piecewise recursive rules to generate a chaotic generation sequence. Further, a first perturbation sequence set is calculated round by round based on the chaotic generation sequence, and multiple first perturbation sequences in the first perturbation sequence set are accumulated and modulo operations are performed. The modulo result is converted into a 256-bit binary hash string. Finally, the binary hash string is enhanced by combining the network public key parameters to generate a chaotic hash fingerprint with initial value sensitivity, quantum resistance, key binding, and strong irreversibility, which is used to subsequently construct a quantum-resistant transaction verification structure.

[0035] Optionally, the chaotic hash fingerprints of each transaction are deterministically sorted according to the lexicographical order of the bit strings to obtain an ordered set of transaction fingerprints, so as to eliminate the influence of transaction order differences on the tree structure. Then, a complete binary tree is constructed from bottom to top. If the number of nodes in a certain layer is odd, the last node is copied to make up the number. In the construction of each layer, adjacent chaotic hash fingerprints are grouped pairwise, and after XOR fusion, the parent node hash is calculated by inputting a preset quantum-resistant chaotic hash function to generate the node list of the next layer. This process is repeated recursively layer by layer, and the number of nodes in each layer is halved until only one root node remains, which is the quantum-resistant Merkle root. This quantum-resistant Merkle root serves as the global quantum-resistant digest of the block transaction set, possessing strong irreversibility, initial value sensitivity, and quantum security, and is written into the block header for consensus verification and anti-tampering verification.

[0036] S103. Obtain the core field of the block header of the preceding block, and generate the hash value of the preceding block based on the core field of the block header.

[0037] Optionally, core block header fields are extracted from the preceding blocks already on the chain. These core block header fields include basic configuration fields and security core fields. The basic configuration fields include the version number (Version), timestamp (Timestamp), and difficulty target (Difficulty). The security core fields include quantum resistance Merkle root protection. Previous block hash value Random numbers, such as Nonce, are used. After extracting the complete block header fields from the preceding block, these fields are serialized into a standard structured byte string. If the above fields are concatenated into an ordered bit stream according to the preset order of "version number - previous block hash value - quantum-resistant Merklegen - timestamp - difficulty target - random number", and then converted into a standard structured byte string through canonical encoding, then... This is to ensure that all nodes maintain consistency during the build process.

[0038] Optionally, based on standard structured byte strings A second initial state of the chaotic system is constructed and input into the same multidimensional chaotic mapping (Improved Logistic and Cosine coupling map, ILCM) as the chaotic transaction fingerprint generation stage for multiple rounds of iterative updates. In each round of iteration, the output of the previous round is used as input to generate a chaotic generation sequence. A second perturbation sequence set is constructed based on the chaotic generation sequence. A preset number of second perturbation sequences are extracted from the second perturbation sequence set in sequence and subjected to quantization and splicing operations to obtain a fixed-length binary string. This fixed-length binary string is used as the final preceding block hash value.

[0039] S104. Generate a chaotic quantum-resistant signature based on the block header core field, the quantum-resistant Merkle root, and the hash value of the preceding block.

[0040] Optionally, the core fields of the block header, the quantum-resistant Merkle root, and the hash value of the preceding block are standardized and encoded in a standardized order to form a structured message body to be signed. Then, the private key of the packaging node and the message body to be signed are used to construct the initial perturbation value of the chaotic system. Based on this initial perturbation value, the third initial state of the chaotic system is constructed and the chaotic system is iterated multiple times to generate a set of third perturbation sequences. Multiple third perturbation sequences are extracted from the set of third perturbation sequences and concatenated to generate a fixed-length chaotic quantum-resistant signature. This chaotic quantum-resistant signature not only has strong unforgeability and message binding, but also effectively resists key recovery and signature forgery attacks in classical and quantum environments due to its reliance on the initial value sensitivity and nonlinear dynamic characteristics of the chaotic system.

[0041] S105. Concatenate the quantum-resistant Merkle root, the previous block hash value, the chaotic quantum-resistant signature, the preset random number, and the preset block header field to obtain the block header data, and generate a new block based on the block header data.

[0042] Optionally, the quantum-resistant MerkleRoot will be used. q PrevHash, the hash value of the preceding block q Chaotic quantum-resistant signature Sig q The Nonce number and preset block header fields, such as Version, Timestamp, and Difficulty, are standardized and concatenated in a predefined order to form structured block header data, BlockHeaderData. This block header data is then input into a quantum-resistant hash function based on the Multidimensional Chaotic Mapping (ILCM). By constructing an initial state and performing multiple rounds of chaotic iterations to generate a perturbation sequence, the function is quantized and compressed to output a fixed-length block header hash value (Hash). q And determine the block header hash value. q The binary representation of the block header is checked to see if it meets the consensus difficulty requirement. If not, the Nonce value is incremented and the hash calculation process is repeated until a solution that meets the conditions is found. Finally, the hash value of the block header that meets the conditions is hashed. q The corresponding Nonce is written into the block header to complete the generation of the new block and consensus confirmation.

[0043] Based on this, the quantum-resistant block construction method according to the embodiments of this application constructs a quantum-resistant Merkle root by structuring the transaction data of the preceding block and generating a compact chaotic hash fingerprint, thereby improving security while avoiding data bloat. Furthermore, key information such as the core fields of the block header, the quantum-resistant Merkle root, and the hash value of the preceding block are fused to generate a lightweight chaotic quantum-resistant signature, which is then concatenated to generate the block header data, and a new block is generated using the block header data. Thus, through the optimization of the data structure and the application of efficient hash fingerprints, the storage burden is significantly reduced and the computational efficiency is improved while ensuring the security of quantum-resistant computing.

[0044] Figure 2 A flowchart illustrating a transaction data structuring processing method provided in an embodiment of this application is shown. (Refer to...) Figure 2 As shown, step S101 above performs structured processing on the transaction data of each transaction in the transaction set to obtain structured transaction data for each transaction. Specifically, it includes the following steps: S201. Extract transaction summaries from transaction data.

[0045] Optionally, extracting a transaction summary from the transaction data involves parsing and extracting the set of fields that constitute the core of the transaction semantics from the original transaction data. Specifically, based on a predefined transaction structure template, such as a custom protocol specification, key fields in the transaction data can be identified and extracted, such as sender address (from), receiver address (to), transaction amount (amount), nonce, and timestamp.

[0046] S202. Remove redundant fields from the transaction summary to obtain the processed transaction summary.

[0047] Optionally, after extracting the transaction digest, redundant fields, such as unnecessary fields like redundant comment fields, or invalid fields unrelated to the transaction semantics, are removed from the transaction digest to eliminate hash inconsistencies caused by differences in node implementations, such as debugging information, log comments, padding bytes, and version identifiers. Specifically, all field names in the transaction digest are traversed and compared against a preset whitelist of valid fields. This whitelist, for example, only retains fields such as sender address (from), receiver address (to), transaction amount (amount), nonce (nonce), and timestamp (timestamp). Fields not in the whitelist are deleted. At the same time, it is checked whether there are null or default value fields. If they do not affect the determination of transaction uniqueness, they can be selectively removed. Finally, a semantically complete and non-redundant processed transaction digest is obtained.

[0048] S203. Sort the transaction fields in the processed transaction summary and normalize the field values ​​and field types of each transaction field to obtain structured transaction data.

[0049] Optionally, to ensure that different nodes generate completely consistent byte representations when processing the same transaction, the processed transaction digest needs to be structured. Specifically, according to predefined rules, such as sorting the transaction fields in the transaction digest by field name or logical order based on scenario requirements, for example, in ascending order by sender address (from) and timestamp (timestamp), the field values ​​and field types of each transaction field are standardized. The field values ​​of each transaction field are standardized in type and format, such as converting strings to lowercase hexadecimal address format, such as "0xa123..." to "0xA123...". Integers in numeric types retain their original precision, and floating-point numbers are truncated or rounded to a fixed number of decimal places according to security policies. In this way, the number of floating-point bits and the base encoding method are determined according to scenario security requirements, and the original transaction data is converted into structured transaction data for subsequent chaotic hash fingerprint generation.

[0050] For example, structured transaction data is shown below:

[0051] Based on this, by transforming the original transaction data into a structured representation, hash value deviations caused by field redundancy, inconsistent order, type differences, or format ambiguity are effectively eliminated. This ensures that identical input data is always generated for the same transaction on different nodes, operating systems, or programming language environments, thus providing a highly reliable and verifiable foundation for subsequent chaotic hash fingerprint calculations and ensuring that each transaction has anti-tampering and anti-quantum collision capabilities before being packaged.

[0052] Figure 3 A flowchart illustrating a chaotic hash fingerprint generation method provided in an embodiment of this application is shown. (Refer to...) Figure 3 As shown, step S102 above generates a chaotic hash fingerprint for each transaction based on the structured transaction data of each transaction, specifically including the following steps: S301. Construct the first initial state of the chaotic system based on structured transaction data and network public key parameters, and perform multiple rounds of iterative updates on the state variables of the chaotic system based on the preset chaotic mapping function and the first initial state to generate the first perturbation sequence set.

[0053] Optionally, a quantum-resistant chaotic hash fingerprint is generated for each intersection to be used in subsequent construction of a quantum-resistant binary tree. In this embodiment, a hash-like method is used, which is a multi-perturbation hash function constructed based on a chaotic system. It has the characteristics of initial value sensitivity, ergodicity, nonlinear irreversibility, and key parameter binding. Among them, initial value sensitivity means that a small difference in input will lead to a completely unpredictable output; ergodicity means that the output hash space is uniformly distributed and resistant to analysis; nonlinear irreversibility means that it is difficult to deduce the original input by quantum computing; and key parameter binding means that the initial state can be controlled by network public key parameters, increasing external verifiability.

[0054] Optionally, for each transaction, the first initial state of the chaotic system can be set according to the structured transaction data and network public key parameters of each transaction, as shown in the following expression (1): , (1) in, , This represents the first initial state of a chaotic system. This represents the network public key parameter. This represents the XOR operation in bitwise operations. This represents structured transaction data. This represents the modulo operation. Indicates the range of initial values.

[0055] Figure 4 A flowchart illustrating a method for generating a first perturbation sequence set according to an embodiment of this application is shown. (Refer to...) Figure 4 As shown, step S301 above performs multiple rounds of iterative updates on the state variables of the chaotic system based on a preset chaotic mapping function and a first initial state to generate a first set of disturbance sequences. Specifically, it includes the following steps: S401. Based on the preset chaotic mapping function and the first initial state, determine the state variables of the chaotic system in the current iteration round, and determine the state variables of the chaotic system in the next iteration round according to the state variables of the chaotic system in the current iteration round and the preset chaotic mapping function. Execute this cycle repeatedly to generate a chaotic generation sequence.

[0056] Optionally, in this embodiment of the application, the preset chaotic mapping function is a multidimensional chaotic mapping (ILCM), specifically as shown in the following expression (2): (2) in, Represents the multidimensional chaotic map ILCM. , This represents the state variables of the chaotic system in the current iteration round. , This represents the state variables of the chaotic system in the previous iteration. , This represents the state variables of the chaotic system in the next iteration. a, b, c, and d all represent system parameters, which can be set to constant values ​​or determined based on the network public key parameters. set up, This represents the modulo operation. Indicates the range of initial values.

[0057] It is worth noting that the multidimensional chaotic mapping function shown in the above expression (2) is defined in segments according to the different iteration rounds i. Specifically, when i=1, the first set of recursive formulas is used, and when i>1, the second set of recursive formulas is used to ensure that the chaotic system has stronger nonlinear and chaotic characteristics in the evolution process.

[0058] Optionally, based on the multidimensional chaotic mapping function ILCM shown in the above expression (2) and the first initial state , First, set an initial state. , Substitute into the multidimensional chaotic mapping function ILCM to calculate the state variables after the first iteration. , and then with As input, the same mapping function is substituted again to calculate the second round of states. , And so on, each round uses the output of the previous round as the input of the current round, and this process is repeated for a total of N rounds, thereby gradually generating a sequence of chaotic system states. That is, generating chaotic generation sequences .

[0059] S402. Generate the first set of perturbation sequences based on the chaotic generation sequence.

[0060] The first perturbation sequence set includes the first perturbation sequence corresponding to each round of iteration.

[0061] Optionally, based on the chaotic generation sequence The first perturbation sequence set can be constructed using the following expression (3). : (3) in, This represents the first perturbation sequence corresponding to each iteration. Represents a chaotic generation sequence. This represents the modulo operation. Indicates the range of initial values.

[0062] Optionally, based on the above expression (3), after N rounds of iterative updates to the chaotic system, the chaotic system states under all iteration rounds are collected to construct the first set of perturbation sequences. .

[0063] S302. Quantize and compress multiple first perturbation sequences in the first perturbation sequence set to generate chaotic hash fingerprints.

[0064] Optionally, for the first set of perturbation sequences The first perturbation sequences in Normalized compression and modular arithmetic are used to generate chaotic hash fingerprints. Specifically, for the first perturbation sequence set... Multiple first perturbation sequences in Perform the summation to obtain the summation result. Then, calculate the accumulated results. Perform modular arithmetic to obtain the result. and the calculation result Convert to a binary string, as shown in expression (4): (4) in, This represents the binary string generated by the conversion. This represents a conversion function from an integer to a binary hash string, such as converting an integer obtained by modulo operation into a 256-bit binary number. Represents the first set of perturbation sequences The first perturbation sequence in, This indicates the modulo operation.

[0065] Furthermore, based on the generated binary string and the network public key parameters... The final chaotic hash fingerprint is generated. Specifically, it is shown in expression (5): (5) in, Represents a chaotic hash fingerprint. This represents the binary string generated by the conversion. ,parameter Based on network public key parameters Determined, specific , , This represents the first perturbation sequence corresponding to two adjacent iterations.

[0066] Based on this, this application constructs the initial state of a chaotic system by fusing structured transaction data with network public key parameters. It then uses an ILCM mapping with segmented definition and multidimensional coupling characteristics for multiple iterations, fully leveraging the initial value sensitivity, ergodicity, and nonlinear dynamics of the chaotic system. This ensures that even minor changes in transaction content will result in a completely unpredictable final fingerprint. Furthermore, the introduction of a keyed perturbation sequence generation and dual quantization compression mechanism based on network public key parameter binding not only improves the entropy and uniformity of the hash output but also achieves external verifiability and forward security under quantum computing. This effectively resists collision attacks, preimage attacks, and differential analysis in both classical and quantum environments, providing a highly secure, consistent, and robust cryptographic foundation for the subsequent construction of quantum-resistant Merkle trees and blockchain global summaries.

[0067] As one possible implementation, step S102 above generates the quantum-resistant Merkle root of the preceding block based on the chaotic transaction fingerprints of each transaction, including: sorting the chaotic transaction fingerprints of each transaction to obtain a transaction fingerprint set, constructing a binary tree based on the transaction fingerprint set, and using the root node of the binary tree as the quantum-resistant Merkle root.

[0068] Optionally, to ensure that different nodes generate completely consistent Merkle roots when processing the same set of transactions, the chaotic hash fingerprints of all transactions need to be deterministically sorted. Specifically, the chaotic transaction fingerprints of each transaction... Sort the strings lexicographically to obtain the transaction fingerprint set. This eliminates the inconsistency in the tree structure caused by differences in the original transaction order, and forms the basis for achieving cross-node consensus. Based on this, a recursive transaction fingerprint set is used... Construct a binary tree and use a quantum-resistant hash function to compute the value of each parent node.

[0069] For example, after sorting and generating the transaction fingerprint set, a complete binary tree is constructed from the bottom up. To maintain the standard binary tree structure, if the number of nodes n in the current layer is odd, that is, if Then Make another copy and append it to At the end, the number of nodes is changed from odd to even to facilitate subsequent pairing to construct parent nodes. It's worth noting that, unlike the core steps of traditional Merkle root methods, in this embodiment, the hash value of the parent node is no longer calculated using the SHA-256 hash function, but is recursively constructed based on a quantum-resistant hash function. Specifically, for the transaction fingerprint set... The chaotic hash fingerprints in the process are grouped and concatenated in pairs, and the hash of the parent node is calculated by combining the anti-quantum hash function, as shown in the following expression (6): (6) in, Represents the node hash. Represents a chaotic hash function. , Represents two adjacent chaotic hash fingerprints, parameters Based on network public key parameters Determined, specific , This represents the XOR operation in bitwise operations.

[0070] Optionally, according to the above expression (6), the transaction fingerprint set In A hash value is generated. The parent nodes form the first-level parent node list. =[ , ,..., Based on this, repeat the above process for... Repeat pairwise concatenation and chaotic hashing to generate a list of parent nodes at level 2. List of parent nodes at level 2 The length is the list of parent nodes at level 1. of And so on, the number of nodes in each layer is the same as that in the previous layer. Until a certain layer has only one node left, this is called a quantum-resistant Merkle root. .

[0071] Based on this, this application deterministically sorts the chaotic hash fingerprints generated by each transaction and constructs a binary tree based on these fingerprints. Then, it recursively calculates the value of each parent node using a quantum-resistant hash function bound to the network public key parameters, ultimately generating a quantum-resistant Merkle root. This not only ensures extremely high security and data integrity even in the face of quantum computing threats, but also guarantees that different nodes generate completely consistent Merkle roots when processing the same set of transactions by eliminating the impact of differences in the original transaction order on the tree structure, thus enhancing the consistency and reliability of cross-node consensus.

[0072] Figure 5 This illustration shows a flowchart of a method for generating a preceding block hash value according to an embodiment of this application. (Refer to...) Figure 5 As shown, step S103 above generates the hash value of the preceding block based on the core fields of the block header, specifically including the following steps: S501. Encode the core fields of the block header to construct the second initial state of the chaotic system, and perform multiple rounds of iterative updates on the state variables of the chaotic system based on the preset chaotic mapping function and the second initial state to generate the second perturbation sequence set.

[0073] The second perturbation sequence set includes the second perturbation sequence corresponding to each round of iteration.

[0074] Optionally, after obtaining the standard structured block header core fields Then, the core fields of the block header. The second initial state of the chaotic system is constructed by encoding through an initial hash or mapping function, as shown in the following expressions (7) and (8): (7) (8) in, , This represents the second initial state of the chaotic system. Indicates the first In the round of iteration, the perturbation sequence The One element, Indicates the perturbation sequence The size of the perturbation sequence The total number of elements contained in it. Indicates an index variable, referring to the perturbation sequence. The Middle The position of each element This represents the XOR operation in bitwise operations. This represents structured transaction data. This represents the modulo operation. Indicates the range of initial values.

[0075] Furthermore, the multidimensional chaotic mapping ILCM and the second initial state shown in the above expression (2) are continued. , The state variables of a chaotic system are updated through multiple iterations, specifically including the use of the multidimensional chaotic mapping (ILCM) and a second initial state. , The process involves determining the state variables of the chaotic system in the current iteration round, and based on these state variables and the multidimensional chaotic mapping (ILCM), determining the state variables for the next iteration round. This process is repeated cyclically to generate a chaotic generation sequence. And based on the chaotic generation sequence, a second perturbation sequence set is generated. Specifically, the method of generating the second perturbation sequence set based on the chaotic generation sequence is the same as the method of generating the first perturbation sequence set, and both are generated using the method shown in the above expression (3), which will not be repeated here.

[0076] S502. According to the arrangement order of each second perturbation sequence in the second perturbation sequence set, obtain a first preset number of second perturbation sequences from the second perturbation sequence set, and encode the first preset number of second perturbation sequences to generate the preceding block hash value.

[0077] Optionally, the first preset number is, for example, 512. After obtaining the second perturbation sequence set, the first 512 second perturbation sequences can be extracted from the second perturbation sequence set according to their arrangement order. These 512 second perturbation sequences are then converted into 8-bit encoded bit strings, and the encoded results are concatenated into a fixed-length 256-bit hash value to generate the preceding block hash value. It should be noted that the fixed-length 256-bit is only an example; the specific hash value with the execution length can be set according to the application scenario.

[0078] Based on this, the above method can generate a strong quantum-resistant, highly sensitive and irreversible preceding block hash value. Its security stems from the extreme sensitivity of chaotic systems to the initial state and the nonlinear dynamic characteristics. Any slight tampering with the preceding block header data will lead to a significant change in the initial state, thus making the final hash value completely unpredictable.

[0079] Figure 6 A flowchart illustrating a chaotic quantum-resistant signature generation method provided in an embodiment of this application is shown. (Refer to...) Figure 6 As shown, step S104 above generates a chaotic quantum-resistant signature based on the block header core field, the quantum-resistant Merkle root, and the hash value of the preceding block. Specifically, it includes the following steps: S601. Combine the core fields of the block header, the quantum-resistant Merkle root, and the hash value of the preceding block to generate a message body to be signed.

[0080] Optionally, this application introduces a quantum-resistant signature algorithm based on chaotic systems to sign the core fields of the block header, thereby achieving strong binding and unforgeable protection of the identity of the block packaging node. This signature process is built on a chaotic mapping with high initial value sensitivity and nonlinear perturbation, making it impossible to derive the node private key or forge the signature even with quantum computing capabilities.

[0081] Optionally, the core fields of the block header, the quantum-resistant Merkle root, and the hash value of the preceding block are combined to form a structured message body to be signed, as shown below:

[0082] in, Indicates the version number. Indicates the hash value of the preceding block. Indicates resistance to quantum Merkelgen, Represents a timestamp. Indicates the difficulty level of the objective. This indicates standardized encoding, used to convert the above fields into binary byte strings, thereby generating the message body to be signed. .

[0083] S602. Generate the initial perturbation value of the chaotic system based on the message body to be signed and the signing private key.

[0084] Optionally, the core idea of ​​chaotic signature is to use the chaotic initial state and mapping parameters derived from the signer's private key to process the message body to be signed. Perturbation mapping and bitmasking transformation are performed, and the output is a string of unpredictable bits that are strongly bound to the message, which constitutes the signature body. The verifier uses the public key to calculate the same chaotic path and reverse-verify whether the perturbation is consistent.

[0085] Optionally, the signer, i.e., the packaging node, possesses a unique signing private key. The signing private key Essentially, it is a set of initial parameters for a chaotic system. The signing private key is required. With the message body to be signed Fusion to generate the initial perturbation value of the chaotic system The specific expression is shown in expression (9): (9) in, This represents the initial disturbance value. Indicates the treatment of the signed message body The result of lightweight hashing, such as truncating the first 256 bits using the aforementioned chaotic hashing, will be used to represent the message body to be signed. Convert to a 256-bit value to ensure a strong binding between the message and the signature. Indicates using the signing private key For initial parameters Generate a 256-bit private key fingerprint using chaotic iteration. This represents an XOR operation. Thus, this application integrates the message fingerprint and the private key fingerprint to ensure the initial perturbation value... It contains both message information and private key information, making it possible to tamper with the message body to be signed. This will lead to Changes, which in turn cause the initial disturbance value to change. Completely different, except for changing the signing private key. It will also lead to Changes will also affect the initial disturbance value. different.

[0086] S603. Based on the initial perturbation value, perform multiple rounds of iterative updates on the state variables of the chaotic system to generate a third perturbation sequence set.

[0087] The third perturbation sequence set includes the third perturbation sequence corresponding to each iteration. Optionally, after obtaining the initial perturbation value... Then, the initial disturbance value Encode the third initial state of the chaotic system, and continue to use the multidimensional chaotic mapping ILCM and the third initial state as shown in the above expression (2) to update the state variables of the chaotic system in multiple rounds. Specifically, based on the multidimensional chaotic mapping ILCM and the third initial state, determine the state variables of the chaotic system in the current iteration round, and determine the state variables of the chaotic system in the next iteration round according to the state variables of the chaotic system in the current iteration round and the multidimensional chaotic mapping ILCM. Execute the cycle to generate a chaotic generation sequence. And based on the chaotic generation sequence, a third perturbation sequence set is generated. Specifically, the method for generating the third perturbation sequence set based on the chaotic generation sequence is the same as the method for generating the first perturbation sequence set, and both are generated using the method shown in the above expression (3), which will not be repeated here.

[0088] S604. According to the arrangement order of each third perturbation sequence in the third perturbation sequence set, obtain a second preset number of third perturbation sequences from the third perturbation sequence set, and splice the second preset number of third perturbation sequences to obtain a chaotic quantum-resistant signature.

[0089] Optionally, the second preset number is, for example, k, in order to obtain the third perturbation sequence set. Then, it can be based on the third perturbation sequence set. The order of each third perturbation sequence is determined by extracting the first k third perturbation sequences from the set of third perturbation sequences and concatenating these k third perturbation sequences to obtain the chaotic anti-quantum signature, as shown in the following expression (10): (10) in, Indicates a chaotic quantum-resistant signature. This represents the set of the third perturbation sequences. This represents the truncation function used to extract data from the third perturbation sequence set. Extract k third perturbation sequences from the middle.

[0090] Furthermore, after obtaining chaotic quantum-resistant signatures Next, a signature field object is constructed and written into the block header. The signature field object is shown below: " ": { "type": "ChaoticSign", / / Signature type: Identifies it as a chaotic quantum-resistant signature "signature": " <base64encodedchaoticsequence> / / Encoded signature sequence "params": { / / Chaotic hash algorithm parameters: ensure the same rules are used during signature verification. "a": 3.54, / / Parameter assignment "b": 3.94, "d": 3.86},} It is worth noting that the consistency of fields before and after signing is crucial. Therefore, signing should be performed after all variable fields are finalized. Other core fields in the block header, such as the version number (Version) and the hash value of the preceding block, should also be considered. Since these parameters are fixed, chaotic quantum-resistant signatures are possible. No need to regenerate the random number Nonce if it is modified.

[0091] Furthermore, after the signature field object is written to the block header, node verification can be performed, specifically including reading the signature field object and the associated public key parameter from the block header. and treat the signed message body Basic validation is performed to ensure correct input format and data integrity. Then, a chaotic hash seed method is used in conjunction with the public key parameter. Calculate the initial state The specific expression is shown in expression (11): (11) in, Indicates the initial state. Indicates the treatment of the signed message body The result of lightweight hashing, such as truncating the first 256 bits using the aforementioned chaotic hashing, will be used to represent the message body to be signed. Convert to a 256-bit value to ensure a strong binding between the message and the signature. Indicates the use of public key parameters For initial parameters Generate a 256-bit private key fingerprint using chaotic iteration. This represents the XOR operation.

[0092] Furthermore, the corresponding signature verification path is obtained by iterating through the perturbation sequence consistent with that used during signing. And the verification path Quantum-resistant signatures against chaos The signature sequence is compared bit by bit. If the two are completely identical, the verification passes; otherwise, the verification fails, thus confirming that the block or transaction data has not been tampered with and has indeed been signed by the corresponding private key holder.

[0093] Based on this, this application encodes the signing private key as the initial state of a chaotic system and generates a unique initial perturbation by fusing the lightweight hash value of the message body to be signed. This makes the signing process highly dependent on the private key and message content, exhibiting strong initial value sensitivity and irreversibility. Even if an attacker possesses quantum computing capabilities, it is difficult to deduce the private key from the signature or forge a valid signature. Simultaneously, both signing and verification are based on the same chaotic path replay logic. Combined with standardized encoding and deterministic truncation strategies, cross-node verification consistency is ensured. Thus, while resisting classical and quantum attacks, it effectively supports the authenticity of the packaged node identity, the integrity of transaction data, and the tamper-resistance of the chain structure in the blockchain system.

[0094] As one possible implementation, step S105 above generates a new block based on the block header data, including: generating a block header hash based on the block header data, verifying the block header hash according to a preset consensus mechanism, determining whether the block header hash meets the difficulty condition corresponding to the preset consensus mechanism, if not, adjusting the preset random number and regenerating the block header hash, iterating until the generated block header hash meets the difficulty condition, if it does, writing the block header hash and the corresponding random number into the block header to obtain a new block.

[0095] Optionally, the core fields of the block header, including the version number (Version) and the previous block hash (PrevHash), can be... q Quantum-resistant Merkle Root q Timestamp, Difficulty, and Chaotic Quantum-resistant Signature (Sig) q After the random numbers (Nonce) are concatenated into a complete structured block header data (BlockHeaderData) in a predefined order, the BlockHeaderData is input into a quantum-resistant hash function based on chaotic mapping. Through constructing an initial state, generating a perturbation sequence through multiple iterations, and quantizing and compressing it, the final output is a fixed-length block header hash value (Hash). q The block header hash value is a binary number, and the consensus mechanism determines whether it meets the set difficulty target, i.e., the block header hash value. q The binary representation before k Are all bits 0?

[0096] Optionally, if the block header hash value Hash q If the difficulty condition is not met, keep all other fields unchanged, only increment the Nonce field, reassemble the BlockHeaderData, and perform the chaotic hash calculation again. Due to the extreme sensitivity of chaotic systems to input, even a change of only 1 in the Nonce field will affect the block header hash value. q Unpredictable and drastic changes occur, allowing for efficient exploration of the hash space. This process continues iteratively until a hash value that makes the block header hash value appear... q The Nonce value that satisfies the difficulty constraint is hashed with the corresponding block header hash value. q The corresponding random number (Nonce) is written into the block header to form a complete, verifiable new block that conforms to the consensus rules, thus completing the proof-of-work process. In this way, this application replaces the traditional hash algorithm SHA-256 with chaotic hashing, effectively resisting acceleration attacks from quantum search algorithms and significantly improving the security and resistance to computational monopoly of the blockchain in a quantum environment.

[0097] Based on this, this application replaces the traditional SHA-256 with a quantum-resistant hash function based on chaotic mapping, significantly improving the security of blockchain in the face of quantum computing threats. Because chaotic systems have extremely high initial value sensitivity and nonlinear irreversibility, even if attackers use quantum search algorithms, they cannot effectively accelerate the search process for legitimate blocks. Furthermore, even a small change in the nonce can cause a drastic change in the hash output. This not only maintains the fairness of decentralized consensus and its resistance to computational power monopolies, but also achieves strong integrity binding of the block header data. Any tampering with the Merkle root, preceding hash, or signature will invalidate the final hash, thus ensuring the immutability and verifiability of on-chain data.

[0098] In summary, this application provides a quantum-resistant block generation method based on chaotic systems, which effectively solves the core problems of existing block generation methods, such as block expansion, insufficient computational efficiency, and weak security. Specifically, firstly, a structured transaction preprocessing and deterministic sorting mechanism is adopted to eliminate redundant fields and order ambiguities while ensuring semantic integrity, significantly compressing the transaction representation volume and alleviating block bloat. Secondly, a lightweight chaotic mapping ILCM is used to replace the traditional multi-iteration hash function SHA-256. Only one multi-round chaotic iteration is needed to generate transaction fingerprints, Merkle roots, preorder hashes, and block header hashes, greatly reducing computational overhead and improving processing efficiency. More importantly, the entire block generation process embeds the network public key parameters and private keys into the chaotic initial value construction. Combining initial value sensitivity, nonlinear irreversibility, and ergodicity, the generated chaotic hash fingerprints, Merkle roots, and signatures have strong collision resistance, anti-image, and quantum attack resistance capabilities, fundamentally enhancing the integrity, identity binding, and long-term security of block data. Thus, while balancing performance and compactness, an efficient, secure, and verifiable block generation mechanism for the post-quantum era is achieved.

[0099] Based on the same inventive concept, this application also provides an anti-quantum block construction device corresponding to the anti-quantum block construction method. Since the principle of the anti-quantum block construction device in this application is similar to the anti-quantum block construction method described above in this application, the implementation of the anti-quantum block construction device can refer to the implementation of the anti-quantum block construction method, and the repeated parts will not be described again.

[0100] Reference Figure 7 The diagram shown is a structural schematic of a quantum-resistant block construction device provided in an embodiment of this application. The quantum-resistant block construction device 700 includes: a processing module 701, a first generation module 702, a second generation module 703, a third generation module 704, and a fourth generation module 705, wherein: The processing module 701 is used to obtain the transaction set of the preceding block and perform structured processing on the transaction data of each transaction in the transaction set to obtain the structured transaction data of each transaction. The first generation module 702 is used to generate chaotic hash fingerprints of each transaction based on the structured transaction data of each transaction, and to generate quantum-resistant Merkle roots of the preceding blocks based on the chaotic transaction fingerprints of each transaction. The second generation module 703 is used to obtain the block header core field of the preceding block and generate the preceding block hash value of the preceding block based on the block header core field. The third generation module 704 is used to generate a chaotic quantum-resistant signature based on the core fields of the block header, the quantum-resistant Merkle root, and the hash value of the preceding block; The fourth generation module 705 concatenates the quantum-resistant Merkle root, the previous block hash value, the chaotic quantum-resistant signature, the preset random number, and the preset block header field to obtain the block header data, and generates a new block based on the block header data.

[0101] Based on this, the quantum-resistant block construction apparatus according to the embodiments of this application constructs a quantum-resistant Merkle root by structuring the transaction data of the preceding block and generating a compact chaotic hash fingerprint, thereby improving security while avoiding data bloat. Furthermore, key information such as the block header core fields, the quantum-resistant Merkle root, and the hash value of the preceding block are fused to generate a lightweight chaotic quantum-resistant signature, which is then concatenated to generate the block header data, and a new block is generated using the block header data. Thus, through the optimization of the data structure and the application of efficient hash fingerprints, the storage burden is significantly reduced and the computational efficiency is improved while ensuring the security of quantum-resistant computing.

[0102] In one possible implementation, the processing module 701 described above is specifically used for: Extract transaction summaries from transaction data; remove redundant fields from the transaction summaries to obtain processed transaction summaries; sort the transaction fields in the processed transaction summaries and normalize the field values ​​and field types of each transaction field to obtain structured transaction data.

[0103] In one possible implementation, the first generation module 702 is specifically used for: The first initial state of the chaotic system is constructed based on structured transaction data and network public key parameters. The state variables of the chaotic system are iteratively updated multiple times based on the preset chaotic mapping function and the first initial state to generate the first perturbation sequence set. Multiple first perturbation sequences in the first perturbation sequence set are quantized and compressed to generate chaotic hash fingerprints.

[0104] In one possible implementation, the first generation module 702 is specifically used for: Based on the preset chaotic mapping function and the first initial state, the state variables of the chaotic system in the current iteration are determined, and the state variables of the chaotic system in the next iteration are determined according to the state variables of the chaotic system in the current iteration and the preset chaotic mapping function. This process is repeated to generate a chaotic generation sequence. Based on the chaotic generation sequence, a first perturbation sequence set is generated, which includes the first perturbation sequence corresponding to each iteration.

[0105] In one possible implementation, the first generation module 702 is specifically used for: Multiple first perturbation sequences are summed to obtain the summation result; Perform modulo operations on the accumulated result to obtain the result, and then convert the result into a binary string; Generate a chaotic hash fingerprint based on the binary string and the network public key parameter.

[0106] In one possible implementation, the first generation module 702 is specifically used for: The chaotic transaction fingerprints of each transaction are sorted to obtain a set of transaction fingerprints. A binary tree is constructed based on the transaction fingerprint set, and the root node of the binary tree is used as the quantum-resistant Merkle root.

[0107] In one possible implementation, the second generation module 703 is specifically used for: The core fields of the block header are encoded to construct the second initial state of the chaotic system. Based on the preset chaotic mapping function and the second initial state, the state variables of the chaotic system are iteratively updated in multiple rounds to generate a second perturbation sequence set, which includes the second perturbation sequence corresponding to each round of iteration. According to the arrangement order of each second perturbation sequence in the second perturbation sequence set, a first preset number of second perturbation sequences are obtained from the second perturbation sequence set, and the first preset number of second perturbation sequences are encoded to generate the preceding block hash value.

[0108] In one possible implementation, the third generation module 704 is specifically used for: The block header core fields, quantum-resistant Merkle root, and previous block hash values ​​are combined to generate the message body to be signed; Based on the message body to be signed and the signing private key, generate the initial perturbation value of the chaotic system; The state variables of the chaotic system are updated iteratively in multiple rounds based on the initial perturbation value to generate a third perturbation sequence set, which includes the third perturbation sequence corresponding to each round of iteration. According to the arrangement order of each third perturbation sequence in the third perturbation sequence set, a second preset number of third perturbation sequences are obtained from the third perturbation sequence set, and the second preset number of third perturbation sequences are spliced ​​together to obtain the chaotic quantum-resistant signature.

[0109] In one possible implementation, the fourth generation module 705 is specifically used for: A block header hash is generated based on the block header data, and the block header hash is verified according to the preset consensus mechanism to determine whether the block header hash meets the difficulty conditions corresponding to the preset consensus mechanism. If the conditions are not met, the preset random number is adjusted and the block header hash is regenerated. This process is repeated iteratively until the generated block header hash meets the difficulty requirements. If the conditions are met, the block header hash and the corresponding random number are written into the block header to obtain a new block.

[0110] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0111] This application also provides an electronic device 800, such as... Figure 8 The diagram shown is a structural schematic of an electronic device 800 provided in an embodiment of this application, including: a processor 801 and a memory 802, and optionally, a bus 803. The memory 802 stores machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 and the memory 802 communicate via the bus 803. When the machine-readable instructions are executed by the processor 801, the steps of the quantum-resistant block construction method described in any of the preceding claims are performed.

[0112] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the quantum-resistant block construction method as described in any of the preceding claims.

[0113] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0115] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for constructing quantum-resistant blocks, characterized in that, include: Obtain the transaction set of the preceding block, and perform structured processing on the transaction data of each transaction in the transaction set to obtain the structured transaction data of each transaction; Based on the structured transaction data of each transaction, a chaotic hash fingerprint of each transaction is generated, and based on the chaotic transaction fingerprint of each transaction, a quantum-resistant Merkle root of the preceding block is generated. Obtain the block header core field of the preceding block, and generate the preceding block hash value of the preceding block based on the block header core field; A chaotic quantum-resistant signature is generated based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value. The anti-quantum Merkle root, the preceding block hash value, the chaotic anti-quantum signature, the preset random number, and the preset block header field are concatenated to obtain the block header data, and a new block is generated based on the block header data.

2. The method according to claim 1, characterized in that, The step of structuring the transaction data of each transaction in the transaction set to obtain structured transaction data for each transaction includes: Extract transaction summaries from the transaction data; Redundant fields are removed from the transaction summary to obtain the processed transaction summary. The transaction fields in the processed transaction summary are sorted, and the field values ​​and field types of each transaction field are normalized to obtain the structured transaction data.

3. The method according to claim 1, characterized in that, The process of generating chaotic hash fingerprints for each transaction based on the structured transaction data includes: Based on the structured transaction data and network public key parameters, a first initial state of the chaotic system is constructed, and the state variables of the chaotic system are iteratively updated multiple times based on a preset chaotic mapping function and the first initial state to generate a first set of perturbation sequences. The chaotic hash fingerprint is generated by quantizing and compressing multiple first perturbation sequences in the first perturbation sequence set.

4. The method according to claim 3, characterized in that, The process of iteratively updating the state variables of the chaotic system based on a preset chaotic mapping function and the first initial state to generate a first set of perturbation sequences includes: Based on the preset chaos mapping function and the first initial state, the state variables of the chaotic system in the current iteration are determined, and the state variables of the chaotic system in the next iteration are determined according to the state variables of the chaotic system in the current iteration and the preset chaos mapping function. This process is repeated to generate a chaos generation sequence. Based on the chaotic generation sequence, the first perturbation sequence set is generated, and the first perturbation sequence set includes the first perturbation sequence corresponding to each iteration.

5. The method according to claim 3, characterized in that, The step of quantizing and compressing multiple first perturbation sequences in the first perturbation sequence set to generate the chaotic hash fingerprint includes: Multiple first perturbation sequences are summed to obtain the summation result; Perform modulo operations on the accumulated result to obtain the operation result, and convert the operation result into a binary string; The chaotic hash fingerprint is generated based on the binary string and the network public key parameters.

6. The method according to claim 1, characterized in that, The generation of the quantum-resistant Merkle root of the preceding block based on the chaotic transaction fingerprints of each transaction includes: The chaotic transaction fingerprints of each transaction are sorted to obtain a set of transaction fingerprints. A binary tree is constructed based on the transaction fingerprint set, and the root node of the binary tree is used as the quantum-resistant Merkle root.

7. The method according to claim 1, characterized in that, The step of generating the preceding block hash value of the preceding block based on the core fields of the block header includes: The core fields of the block header are encoded to construct the second initial state of the chaotic system. Based on the preset chaotic mapping function and the second initial state, the state variables of the chaotic system are iteratively updated in multiple rounds to generate a second perturbation sequence set, which includes the second perturbation sequence corresponding to each round of iteration. According to the arrangement order of each second perturbation sequence in the second perturbation sequence set, a first preset number of second perturbation sequences are obtained from the second perturbation sequence set, and the first preset number of second perturbation sequences are encoded to generate the preceding block hash value.

8. The method according to claim 1, characterized in that, The step of generating a chaotic quantum-resistant signature based on the block header core field, the quantum-resistant Merkle root, and the preceding block hash value includes: The block header core field, the quantum-resistant Merkle root, and the preceding block hash value are combined to generate the message body to be signed; Based on the message body to be signed and the signing private key, generate the initial perturbation value of the chaotic system; Based on the initial perturbation value, the state variables of the chaotic system are updated iteratively in multiple rounds to generate a third perturbation sequence set, which includes the third perturbation sequence corresponding to each round of iteration; According to the arrangement order of each third perturbation sequence in the third perturbation sequence set, a second preset number of third perturbation sequences are obtained from the third perturbation sequence set, and the second preset number of third perturbation sequences are spliced ​​together to obtain the chaotic quantum-resistant signature.

9. The method according to claim 1, characterized in that, The process of generating a new block based on the block header data includes: A block header hash is generated based on the block header data, and the block header hash is verified according to a preset consensus mechanism to determine whether the block header hash meets the difficulty conditions corresponding to the preset consensus mechanism. If the condition is not met, the preset random number is adjusted and the block header hash is regenerated. This process is repeated iteratively until the generated block header hash meets the difficulty condition. If the conditions are met, the block header hash and the corresponding random number are written into the block header to obtain the new block.

10. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when the electronic device is running, are executed by the processor to perform the steps of the quantum-resistant block construction method as described in any one of claims 1 to 9.