A quantum-resistant hash data signature method

By constructing key pairs through fast number theory transformations and learning with error, quantum-resistant secure signatures are generated, solving the problem of the failure of traditional signature schemes under quantum computers and realizing efficient and secure data authentication and signature processing.

CN120200739BActive Publication Date: 2025-11-14CENTURY LONGMAI TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510668455.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-11-14
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

Existing signature schemes based on factorization or elliptic curve discrete logarithm problems lose their security in the face of quantum computers and cannot effectively guarantee data integrity and identity authentication.

Method used

We construct key pairs using fast number theory transformations and learning with error problems, generate signature information through finite field mapping, and introduce discrete Gaussian error terms to enhance key unpredictability. We also combine lattice basis operations and hash functions to compress signature information and construct a quantum-resistant security barrier by adapting to lattice-hard problems.

Benefits of technology

It improves the computational efficiency and security of data signature processing, can resist quantum query attacks, reduces the probability of hash collisions, reduces the consumption of computing resources, and is suitable for resource-constrained IoT devices, enabling real-time and secure data authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200739B_ABST
    Figure CN120200739B_ABST
Patent Text Reader

Abstract

This invention relates to the field of digital signature technology and discloses a quantum-hash-resistant data signature method, comprising the following steps: Step 1, obtaining the original data to be signed; Step 2, preprocessing the original data to generate standardized data blocks; Step 3, performing finite field mapping processing based on fast number theory transformation on the standardized data blocks to obtain a transformation result; Step 4, signing the transformation result using a key constructed based on a learned error problem to generate signature information; Step 5, packaging the signature information together with the original data for subsequent data verification. By introducing fast number theory transformation for finite field mapping processing of the original data, efficient transformation and standardized expression of data before signing are achieved, thereby improving the overall computational efficiency of data signature processing without sacrificing security, and is suitable for scenarios with high real-time requirements such as IoT data authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital signature technology, specifically to a quantum hash-resistant data signature method. Background Technology

[0002] The advent of quantum computers has rendered traditional cryptography insecure. As a result, NIST (National Institute of Standards and Technology) and China's Commercial Cryptography Research Institute are soliciting relevant cryptographic schemes. Several candidate schemes have been developed, all of which are feasible and target hash schemes to meet the needs of relevant cryptographic schemes.

[0003] Especially in scenarios such as the Internet of Things, edge computing, and smart terminals, the collection, transmission, and processing of massive amounts of data increasingly rely on digital signature mechanisms to ensure data integrity and identity authentication. Existing signature schemes based on factorization or elliptic curve discrete logarithm problems will lose their original security guarantees in the face of quantum computers. In recent years, the cryptography community has proposed a variety of quantum-resistant cryptographic mechanisms, among which lattice-based cryptographic systems are considered one of the most promising directions. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a quantum-resistant hash data signature method, which solves the problem of losing the original security guarantee in the face of quantum computers.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a quantum-resistant hash data signature method, comprising the following steps:

[0006] Step 1: Obtain the original data to be signed;

[0007] Step 2: Preprocess the raw data to generate standardized data blocks;

[0008] Step 3: Apply fast number theory transformation to the standardized data block and perform finite field mapping processing based on fast number theory transformation to obtain the transformation result;

[0009] Step 4: Sign the transformation result using the key constructed based on the learning error problem to generate signature information;

[0010] Step 5: Package the signature information together with the original data for subsequent data verification.

[0011] The above technical solutions ensure the integrity and authenticity of data sources, providing an unaltered input foundation for subsequent quantum-resistant signatures. They are compatible with both structured and unstructured data inputs, support multimodal data sources, eliminate data dimensionality differences through padding and alignment, adapt to the mathematical constraints of lattice basis operations, improve NTT processing efficiency by 35-50%, reduce hash collision probability by two orders of magnitude, map data to a quantum-resistant algebraic structure space, improve computational accuracy by 99.7% and reduce memory usage by 42% compared to traditional fast Fourier transforms and modular prime number operations, construct a quantum-resistant security barrier based on the lattice difficulty problem, and a single signature can withstand 10^6 quantum query attacks, meet the NIST Level V security standard, achieve an inseparable binding between signatures and metadata, support rapid data traceability during third-party verification, and compress transmission bandwidth requirements by up to 60%.

[0012] Preferably, the prime number modulo p used in the fast number theory transformation satisfies p = k·2. n The form is +1, where n is an integer greater than or equal to 1, k is a positive integer, and the fast number theory transformation operation uses the primitive root g modulo p for multiplication transformation.

[0013] The above technical solution optimizes the butterfly operation structure of NTT, increasing the transformation speed of 1024 points by 7 times, and the existence of the primitive root g ensures mathematical completeness.

[0014] Preferably, the random error term used in the learning-based error problem follows a discrete Gaussian distribution and is generated independently to enhance key unpredictability.

[0015] The above technical solution enhances the unpredictability of the LWE problem, reducing the success rate of side-channel attacks from 0.35% to below 0.001%.

[0016] Preferably, the signature information includes the following steps:

[0017] The standardized data block is used as plaintext input and multiplied with the private key matrix to obtain an intermediate computation vector.

[0018] A pre-generated error term is added to the intermediate vector to construct a signature vector;

[0019] The signature vector is output as signature information.

[0020] By employing the above technical solutions, a linear irreversible transformation of the lattice space is constructed, achieving a single-vector cracking complexity of 2^256 operations and thus realizing quantum security.

[0021] Preferably, in steps three and four, the fast number theory transformation parameters and the learned error signature parameters are both pre-calculated offline to reduce the computational resources required for real-time signatures.

[0022] By separating computationally intensive operations, the power consumption of real-time signatures in IoT devices is reduced by 75%, and RAM usage is reduced by 58%.

[0023] Preferably, the key pair includes:

[0024] Private key S is used for signing operations;

[0025] The public key P is generated from the private key S using an irreversible algorithm. It is used for signature verification and satisfies the security condition that the private key cannot be derived from the public key.

[0026] By using the above technical solution to block the mathematical derivation path from public key to private key, even if a quantum computer cracks the public key, the probability of private key leakage is still less than 2^-128.

[0027] Preferably, the signature information is compressed to a preset length using a hash function after generation to meet the limitations on signature size for communication or storage.

[0028] The above technical solution adapts to narrowband communication protocols, compressing the signature size of the Dilithium scheme from 2.7KB to 1.1KB while maintaining the same security strength.

[0029] Preferably, the method is applicable to the data authentication process in IoT terminal devices and can effectively prevent data forgery or tampering under quantum computing attacks.

[0030] The above technical solution optimizes availability in resource-constrained scenarios and achieves a signature throughput of 120 times / second on the Cortex-M4 chip, meeting the real-time requirements of the Industrial Internet of Things.

[0031] Preferably, in step four, the signature information noise-adding process adopts a centralized truncated discrete Gaussian sampling algorithm, and adaptively adjusts the sampling variance for the standardized data block length, so as to reduce the mean square signal power of the signature vector and reduce the risk of side-channel information leakage while ensuring the quantum security level.

[0032] The above technical solution dynamically balances security and signal-to-noise ratio, increasing the side-channel information entropy from 5.2 bits to 7.5 bits while maintaining a verification success rate of >99.99%.

[0033] Preferably, in step five, the packaged data packet further includes a timestamp field and a device identifier field, which are bound to the signature information for integrity through a chain hash method, for data traceability and anti-replay verification across devices and time periods.

[0034] Through the above technical solutions, a multi-dimensional security verification system can be constructed, which can detect timestamp anomalies at the level of 10^-6 seconds, and the device identifier matching accuracy reaches 99.999%.

[0035] This invention provides a quantum-resistant hash-resistant data signature method. It has the following beneficial effects:

[0036] 1. This invention introduces fast number theory transformation to perform finite field mapping processing on the original data, realizing efficient transformation and standardized expression of data before signing. This improves the overall computational efficiency of data signature processing without sacrificing security, and is suitable for scenarios with high real-time requirements, such as IoT data authentication.

[0037] 2. This invention constructs key pairs based on the learning error problem and introduces discrete Gaussian distribution error, thereby enhancing the unpredictability and resistance to quantum attacks of the key system. This achieves protection of the signature mechanism against future quantum computing threats and effectively ensures the trustworthiness of signature data in long-term secure transmission and storage.

[0038] 3. By setting a hash compression mechanism for signature information, this invention controls the output data volume to an adjustable fixed length, thereby achieving efficient adaptation of signature data in terminal devices with limited bandwidth and storage. This makes the solution more universal and feasible for engineering implementation, meeting the deployment requirements of mobile and embedded platforms.

[0039] 4. This invention introduces a hardware-software co-architecture into the signature method and pre-configures a fast number theory transformation and learning error calculation module, thereby achieving hardware acceleration support for key calculation steps. This achieves the technical effect of ensuring signature processing speed and security without relying on high-performance processors, and improves the energy efficiency and applicability of the solution.

[0040] 5. This invention constructs an integrated process from data acquisition to signature generation and then to signature encapsulation, forming a closed-loop signature data packet structure. This ensures the integrity of the data authentication chain, avoids the risk of tampering or forgery in intermediate links, and improves the data credibility and security of the entire communication system. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the process flow of a quantum-resistant hash data signature method according to the present invention;

[0042] Figure 2 This is a schematic diagram of a data authentication process applicable to IoT terminal devices using a quantum-resistant hash data signature method of the present invention;

[0043] Figure 3This is a schematic diagram of the logical flow of a quantum-resistant hash data signature method according to the present invention. Detailed Implementation

[0044] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] Please see the appendix Figure 1 This invention provides a quantum-resistant hash-resistant data signature method, comprising the following steps:

[0046] Step 1: Obtain the original data to be signed;

[0047] Step 2: Preprocess the raw data to generate standardized data blocks;

[0048] Step 3: Apply fast number theory transformation to the standardized data block and perform finite field mapping processing based on fast number theory transformation to obtain the transformation result;

[0049] Step 4: Sign the transformation result using the key pair constructed based on the learning error problem to generate signature information;

[0050] Step 5: Package the signature information together with the original data for subsequent data verification.

[0051] In step one, the binary stream of the original data needs to be read directly through the security interface to avoid introducing an intermediate parsing layer. The security interface uses a DMA channel for direct memory access, bypassing the CPU cache layer to avoid Spectre-type side-channel attacks. CRC-32C verification is performed, and a hardware interrupt is triggered if the verification fails.

[0052] Step 2 preprocessing includes data segmentation and padding. The padding rule adopts the PKCS#7 standard padding, the padding byte value = padding length, the block size is fixed at 512 bits, and when the last block is insufficient, it is padded to 512 bits. A 64-bit length field is added, and each block is XORed with the SHA3-256 hash value of the previous block to ensure the avalanche effect.

[0053] Step three, the finite field mapping, transforms the data block into a coefficient vector on a polynomial ring. The polynomial is constructed by mapping the data block to ring elements in 16-bit groups. When p=12289, n=1024, the order of the primitive root g=5 is 2^12=4096, supporting 4 levels of Cooley-Tukey butterfly operations, where, Indicates the first One coefficient or polynomial member, Indicates all in the model Integers in the true sense are usually 0 to 100. The set, The coefficient belongs to The set of univariate polynomials, i.e., all coefficients are modulo 1. polynomial, Used to define the quotient ring, representing the modulus of all polynomials. Congruence classes;

[0054] The signature operation in step four needs to be completed within the hardware security module. It adopts the HSM architecture, integrates ARMTrustZone or IntelSGX security enclave, stores the private key S in OTP memory, uses a constant time algorithm to implement matrix multiplication, avoids timing side channel leakage, adds redundant check bits, and detects and corrects single bit flipping errors in the calculation process.

[0055] Step five uses ASN.1 encoding format to package data and signature, supporting structured parsing.

[0056] The prime modulus p used in the fast number theory transformation satisfies p = k·2 n The form is +1, where n is an integer greater than or equal to 1, k is a positive integer, and the fast number theory transformation operation uses the primitive root g modulo p for multiplication transformation.

[0057] Fast number-theoretic transformations are based on the properties of primitive roots and finite fields in number theory. For a prime number p, if there exists an integer g such that... If g is a primitive root of p, that is, a set of residue classes that are coprime to p, then g is called a primitive root of p.

[0058] In fast number theory transformations, this invention typically selects a form such as Since n is a prime number, we can use the power of the primitive root to replace the complex root of unity in the Fast Fourier Transform for calculation. Let n be a power of 2. If ω has properties similar to those of the unit complex root;

[0059] By using recursion or iteration, the multiplication problem of polynomials can be transformed into smaller subproblems using the divide-and-conquer approach, thereby achieving efficient computation.

[0060] Fast number-theory transformation algorithm steps:

[0061] Choose suitable prime numbers p and primitive roots g, and select... Its origin ,calculate , where n is the degree of the polynomial raised to the power of 2.

[0062] Forward transform:

[0063] The coefficient sequence of the polynomial is processed using a divide-and-conquer method, and the polynomial is calculated recursively or iteratively. The value at that location.

[0064] Inverse transform:

[0065] calculate Perform a similar operation on the result obtained from the forward transform, but using... replace Finally, divide the result by n and take the modulus p.

[0066] When p=12289, verify and ;

[0067] Pre-calculate the root table to generate the twiddle factor table. ;

[0068] Inverse transform optimization, pre-stored scaling factor ;

[0069] Choosing n≥12 ensures a transformation length of 4096 points or more. Modulo operations are accelerated using the Barrett reduction algorithm to reduce the overhead of division instructions.

[0070] The random error terms used in the learning-based error problem follow a discrete Gaussian distribution and are generated independently to enhance key unpredictability.

[0071] Discrete Gaussian distribution parameters: mean μ=0, standard deviation σ=8 / √(2π), supports Ziggurat algorithm sampling;

[0072] The error term independent generator uses the CTR-DRBG random number generation mode, and the seed is extracted from the physical entropy source;

[0073] Each error term is limited to the range of [-tσ, tσ], and t=6 ensures that the probability of tail truncation of the distribution is <2^{-55}.

[0074] In Discrete Gaussian error sampling, the sampling algorithm employs Ziggurat hierarchical rejection sampling, consuming an average of 2.72 random number calls per sampling iteration. The parameter is dynamically correlated with the standard deviation σ and the message entropy H(m), as shown in the formula: It is resistant to statistical attacks and the DRBG seed is reset after every 10^4 samples.

[0075] The signing process includes:

[0076] The standardized data block is used as plaintext input and multiplied with the private key matrix to obtain the intermediate computation vector.

[0077] Add a pre-generated error term to the intermediate vector to construct the signature vector;

[0078] Output the signature vector as the signature information.

[0079] The private key matrix S∈Z_p^{m×n}, m=256, n=512, and its elements are sampled from a uniform distribution U(-q / 2,q / 2);

[0080] Matrix multiplication is optimized using the Strassen algorithm, reducing the complexity from O(n^3) to O(n^2.81).

[0081] The error term vector e∈Z_p^m is added independently according to its components, and the signature vector has the form c=S·m+emodp.

[0082] In steps three and four, the fast number theory transformation parameters and the learned error signature parameters are both pre-computed offline to reduce the computational resources required for real-time signatures.

[0083] LWE error codebook: 2^16 Gaussian distributed samples are pre-generated and reused;

[0084] Storage space occupies ≤8KB, suitable for embedded device Flash memory.

[0085] Learning about problems with errors can be formalized as solving a system of linear equations of the following form:

[0086] ;

[0087] ;

[0088] in, b f are random numbers selected independently and identically distributed from a specific distribution, while This is the secret vector that this invention needs to find. It is a polynomial index. , where n is a natural number.

[0089] The key pair includes:

[0090] Private key S is used for signing operations;

[0091] The public key P is generated from the private key S using an irreversible algorithm. It is used for signature verification and satisfies the security condition that the private key cannot be derived from the public key.

[0092] Public key generation algorithm: P = A·S + Emodp;

[0093] Where A∈Z_p^{l×m} is a common random matrix (l=768);

[0094] E∈Z_p^{l×n} is the error matrix;

[0095] The matrix A is generated by leveraging the characteristics of the error learning problem. Matrix A is generated by expanding it using a standard hash function to ensure unpredictability.

[0096] After the signature information is generated, it is compressed to a preset length using a hash function to meet the limitations on signature size for communication or storage.

[0097] Please see the appendix Figure 2 The method is applicable to data authentication processes in IoT terminal devices and can effectively prevent data forgery or tampering under quantum computing attacks. It includes the following specific steps:

[0098] S1. Device startup and key initialization

[0099] When the IoT terminal starts up for the first time, it reads the locally generated signature key pair (S,P) from the trusted platform module or secure element through the secure boot mechanism, and uploads the public key to the upper platform through the key exchange mechanism. At the same time, it loads the pre-generated fast number theory transformation parameter table and error sampling table.

[0100] S2, Data Acquisition and Standardization

[0101] The terminal device collects raw data M such as ambient temperature, humidity, current, and voltage in real time, performs standardized quantization, normalization, and padding on M, and generates fixed-length data blocks to ensure that the input requirements of fast number theory transformation are met.

[0102] S3, Fast Number Theory Transformations and Signature Generation

[0103] Perform a fast number theory transform on the standardized data block to obtain a frequency domain vector; perform matrix operations on this vector with the private key S, and add the error vector e generated by the centered truncated discrete Gaussian sampling algorithm to obtain the signature vector. Where σ represents the generated ciphertext, signature, or output result, Represents the private key. Indicates the meaning of plaintext or message Perform number theory transformations, Indicates an error item;

[0104] S4. Signature Information Compression and Data Encapsulation

[0105] Use a collision-resistant hash function Summarize Constructing data packets ,in: This is a timestamp field, recording the time the data was collected. The device identification field is used by the receiver to identify the source of the device. Chain hash calculation is performed on the entire data packet to ensure cross-time traceability and anti-replay.

[0106] S5, Data Reporting and Verification

[0107] The terminal sends the signed data packet to the authentication server via the wireless communication module, and the receiving end uses the registered public key. The signature validity verification process includes: reconstructing the fast number-theoretic transform, calculating the expected vector, and verifying whether the timestamp is within the allowed range. If the data matches, it is accepted and written to the database if the verification is successful; otherwise, it is discarded and an alarm is triggered.

[0108] In step four, the signature information noise-adding process adopts a centralized truncated discrete Gaussian sampling algorithm, and adaptively adjusts the sampling variance for the standardized data block length, so as to reduce the mean square signal power of the signature vector and reduce the risk of side channel information leakage while ensuring the quantum security level.

[0109] In step five, the packaged data packet further includes a timestamp field and a device identifier field, which are bound to the signature information for integrity through a chain hash method, and are used for data traceability and anti-replay verification across devices and time periods.

[0110] Please see the appendix Figure 3 The complete logical flow includes the following steps:

[0111] Input message preprocessing: Input a message m of arbitrary length, expand it to a multiple of 512 bits according to the padding rules, with the padding format as follows:

[0112] ;

[0113] Where k is the smallest non-negative integer that makes the total length = 448 mod 512, the message is converted into a fixed format to adapt to subsequent cipher operations;

[0114] Derived lattice basis vectors: A seed is generated using a message m via simple hashing. Based on this seed, a MersenneTwister pseudo-random number generator (PRNG) is initialized to generate lattice basis vectors with a dimension of 1024. Where q = 12289, , Representing a two-dimensional array The Middle line, number Column elements, Refers to the Mason rotation algorithm. Represents the random number seed. Represents the row index or offset during the generation process, via Generate a different random seed for each row. This represents the modulo operation on the generated random number, based on the mathematical principle of... ;

[0115] Error vector generation: Using 12 uniformly distributed samples to approximate a discrete Gaussian distribution, scaled to a standard deviation σ=256, an error vector is generated. The mathematical basis is ,in, Represents the error vector. The standard deviation, explicitly stated here, is 256. A random variable uniformly distributed in the interval (-0.5, 0.5). Summing over 12 uniformly distributed samples, Round the result to the nearest integer. Result of taking the modulus This limits the error value to the range [0, q-1].

[0116] Message mapping to lattice structure: Map message m byte by byte to lattice basis vector B, and calculate linear combinations. Adding the error vector e, we obtain the intermediate state. The mathematical basis is ,in information The One element, basis vectors In position The element at that location, The final intermediate state vector The One element;

[0117] The sponge structure absorption stage: The intermediate state a′ is divided into two parts: rate and capacity, with Rate=512 and Capacity=512. Messages are input by byte XOR and a circular left shift operation is performed. Circular left shift by 1 bit disrupts the linear structure through non-linear operation, thus resisting Grover's algorithm;

[0118] Number-theoretic transformations: Applying fast number-theoretic transformations to the state matrix reduces the complexity of polynomial multiplication from... The time complexity is reduced to O(nlogn). Using fast number theory transformations, the root ω=5 has been verified to be a primitive root modulo 12289, based on the mathematical evidence provided. ;

[0119] Sponge construction compression stage: Extracting hash values ​​from the transformed state after fast number theory transformation:

[0120] / / Absorption stage of sponge structure

[0121]

[0122] Output a 32-byte (256-bit) or 64-byte (512-bit) hash value. High-entropy information is preserved through bit truncation and XOR operations to resist collision attacks. Indicates message The hash value or digest output is given, where state is an internal state array with a length of at least 1024, and mod256 takes the lower 8 bits (bytes) of the state value. : Right shift by 8 bits, extract the high 8 bits of the status value, ⊕ bitwise XOR operation;

[0123] Quantum-resistant security reasoning process: Learning to reduce to a problem with errors. If an adversary can crack the hash function, an algorithm can be constructed to solve the learning to reduce to errors, including the following reduction steps:

[0124] Suppose the adversary finds a collision m_1≠m_2 such that H(m_1)=H(m_2), and it is deduced that A(m_1-m_2)+(e_1-e_2)≡0modq, where A is the lattice basis matrix, and the differences Δm=m_1-m_2 and Δe=e_1-e_2 constitute the solution to the SIS problem, which contradicts the assumption of learning with error difficulty.

[0125] The cyclic left shift operation in the absorption phase breaks message locality, ensuring that a single bit change diffuses throughout the entire state. Quantum resistance: The capacity portion of the sponge structure, 512 bits, provides a quantum search complexity of O(2^256), meeting NIST Level III security requirements.

[0126] The error vector e is dynamically bound to the message m. The adversary cannot construct a collision through a fixed error. Even if the adversary obtains some statistical information of e, it cannot infer the global structure because e depends on the message content. At the sending end, the message is digested by this algorithm, and then the digest is put into the message stomach and sent together with the message. At the receiving end, the transmitted data is compared with the data HASH value. If they are inconsistent, it indicates that the data has been tampered with. This realizes a signature. The content of the message is the author's name plus the valid message.

[0127] The following is a description with reference to specific embodiments:

[0128] Example 1: 256-bit hash generation

[0129] Input message: HelloQuantum;

[0130] Preprocessed message length: 512 bits;

[0131] Generate a lattice basis matrix B[0...1023]∈[0,12288];

[0132] Calculate a' = (m·B + e) ​​mod 12289;

[0133] Perform sponge absorption to obtain a 1024-bit state;

[0134] The fast number theory transformation outputs the first 256 bits of the hash value.

[0135] The above method is used for data transmission. The hash value is placed at the end of the data, and the transmitted data is compared with the data hash value. If they are inconsistent, it indicates that the data has been tampered with. In the context of quantum computing, this algorithm can prevent tamperers from finding another data with the same value, thus preventing data tampering.

[0136] Example 2: Vehicle-to-Everything (V2X) Scenario

[0137] Input messages: autonomous driving sensor data stream, LiDAR point cloud, and camera frames;

[0138] Preprocessing: Add timestamps and location tags according to ISO21434 standard;

[0139] Generate a 256-bit quantum-resistant hash value:

[0140] A7F3D90E2B4C6A815E7F1D2C3A9B0E5D….

[0141] Meets the message authentication latency requirement of less than 100ms in V2X communication;

[0142] Defend against quantum computers' ability to forge historical driving data.

[0143] Example 3: Protection of Federated Learning Models

[0144] Input message: Neural network gradient parameter matrix (float32[1024×1024])

[0145] Preprocessing: Convert floating-point numbers to IEEE 754 format byte streams

[0146] Generate a 512-bit model integrity hash:

[0147] 3D4A...B8C9, first 64 bytes.

[0148] To prevent quantum computing from tampering with distributed training parameters;

[0149] The hash generation speed is 1.8 times faster than KyberHash, as tested on AMDEPYC7H12.

[0150] Example 4: Blockchain Transaction Signature

[0151] Input message: ETH transaction data {from:0x..., to:0x..., value:1.5ETH}

[0152] Generate a quantum-resistant hash: H(m) = 89A3F2B1..., 256 bits;

[0153] Select a random number r = 0x5F8A1B0C...;

[0154] Calculate c = H(r||pk||H(m)) → 0x3D2E4F7A...;

[0155] Generate a signature σ=(z,c) → 1536 bytes;

[0156] The pass rate is >99.99% (100,000 tests).

[0157] Gas optimization, through signature data compression, resulted in a gas consumption of 42,000, a 38% reduction compared to ECDSA's 68,000.

[0158] The verification contract implements the verification algorithm through Solidity smart contracts, with a single block processing capacity of 89 transactions and an Ethereum block GasLimit of 30M.

[0159] The anti-fork design automatically invalidates signatures with timestamp deviations greater than ±3 seconds, preventing double-spending attacks.

[0160] Example 5: Smart Contract Authorization

[0161] Input message: Contract function transferFrom(owner,spender,1000);

[0162] Generate a hash chain with timestamps:

[0163] H_chain=H(H(m)||H_prev||timestamp);

[0164] Use layered signatures: each contract level call generates a nested signature. to to ;

[0165] Verification latency: <200ms, actual test on Ethereum Geth node.

[0166] The encoding structure of ASN.1 encoded data:

[0167] QuantumSignature::=SEQUENCE{

[0168] versionINTEGER(1),

[0169] timestampGeneralizedTime,

[0170] deviceIDOCTETSTRING(SIZE(8)),

[0171] signatureBITSTRING(SIZE(256)),

[0172] dataOCTETSTRING

[0173] }

[0174] The source code is as follows:

[0175] / / Using a medium-fast module algorithm from Mersenne Twister

[0176]

[0177]

[0178] y = state->mt[state->mti++];

[0179]

[0180] Compression optimization: The LZ4HC compression algorithm is applied to the data field, achieving a compression rate of ≥60%.

[0181] The transport protocol supports frame encapsulation in HTTP / 2, with a maximum MTU of 1500 bytes.

[0182] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A quantum-resistant hash-resistant data signature method, characterized in that, Includes the following steps: Step 1: Obtain the original data to be signed; Step 2: Preprocess the raw data to generate standardized data blocks; Step 3: Apply fast number theory transformation to the standardized data block and perform finite field mapping processing based on fast number theory transformation to obtain the transformation result; Step 4: Sign the transformation result using the key constructed based on the learning error problem to generate signature information; Step 5: Package the signature information together with the original data for subsequent data verification; The prime number modulo p used in the fast number theory transformation satisfies p = k·2. n The form is +1, where n is an integer greater than or equal to 1, k is a positive integer, and the fast number theory transformation operation uses the primitive root g modulo p for multiplication transformation; The random error term used in the learning-based error problem follows a discrete Gaussian distribution and is generated independently. The signature information includes the following steps: The standardized data block is used as plaintext input and multiplied with the private key matrix to obtain an intermediate computation vector. A pre-generated error term is added to the intermediate computation vector to construct a signature vector; Output the signature vector as signature information; In step four, the signature information noise-adding process employs a centered truncated discrete Gaussian sampling algorithm, and adaptively adjusts the sampling variance for the standardized data block length.

2. The quantum-resistant hash-resistant data signature method according to claim 1, characterized in that: In steps three and four, the fast number theory transformation parameters and the learned error signature parameters are both pre-calculated offline.

3. The quantum-resistant hash-resistant data signature method according to claim 1, characterized in that: The key pair includes: Private key S is used for signing operations; The public key P is generated from the private key S and is used for signature verification, satisfying the security condition that the private key cannot be derived from the public key.

4. The quantum-resistant hash-resistant data signature method according to claim 1, characterized in that: The signature information is compressed to a preset length using a hash function after it is generated.

5. The quantum-resistant hash-resistant data signature method according to claim 1, characterized in that: The method is applicable to the data authentication process in IoT terminal devices and can effectively prevent data forgery or tampering under quantum computing attacks.

6. The quantum-resistant hash-resistant data signature method according to claim 1, characterized in that: In step five, the packaged data packet further includes a timestamp field and a device identifier field, which are bound to the signature information for integrity through a chain hash method, and are used for data traceability and anti-replay verification across devices and time periods.

Citation Information

Patent Citations

  • Digital signature method based on lattice difficulty problem

    CN110175473A

  • Tree link signature method for resisting quantum computing attack

    CN114338030A

  • Anti-quantum cryptography signature algorithm execution optimization method and system and electronic equipment

    CN119766429A