A dynamic quantum secure sponge structure optimization method, system, device and medium
Patent Information
- Application Number
- CN202510850257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2045-06-24
AI Technical Summary
目前的量子抗性方案在实际应用中普遍面临效率低、计算开销大的问题
通过在SHA-3海绵结构中引入基于格密码(LWE)的动态置换层,本发明显著增强了现有SHA-3海绵结构的量子抗性。在量子计算环境下,传统的SHA-3算法面临Grover算法加速的碰撞攻击威胁,而本发明通过在哈希过程中的每个子块应用LWE加密,使得量子计算机难以利用加速算法破解碰撞或预映像问题,从而大幅提升了算法的量子抗性。
Smart Images

Figure CN120512250B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, system, device, and medium for optimizing dynamic quantum-safe sponge structures, belonging to the field of quantum computing technology. Background Technology
[0002] With the rapid development of quantum computing technology, traditional encryption and hash algorithms face unprecedented challenges. Quantum computers, through quantum parallel computing and quantum algorithms (such as Grover's and Shor's algorithms), can outperform classical computers in certain computational tasks, particularly in breaking traditional encryption algorithms, posing a significant security risk. For hash collision and search problems, Grover's algorithm reduces the complexity of collision search, greatly accelerating the process. This means that traditional algorithms like SHA-1 and SHA-2 will be threatened in a quantum environment. For factorization and discrete logarithm problems, Shor's algorithm can solve these problems in polynomial time on quantum computers, thus threatening public-key encryption systems that rely on large number factorization and discrete logarithms.
[0003] SHA-3 is a modern cryptographic standard. As a hash algorithm designed with a sponge structure (Sponge Dynamic Quantum-Safe Sponge Structure Optimization Construction), it possesses strong collision resistance and anti-pre-mapping capabilities. Its collision resistance strength can reach 2^128, but under the threat of quantum computing, this strength is still insufficient to prevent collision search attacks accelerated by quantum computers using Grover's algorithm. Although increasing the length of the hash output can improve security to some extent, this method is not effective against quantum computing attacks because the acceleration effect of quantum computers remains effective against structured attacks.
[0004] Current quantum-resistant technologies, including post-quantum cryptography algorithms such as Sphinx+ and XMSS, while theoretically providing some quantum resistance, often rely on hash trees or state preservation mechanisms, resulting in low computational efficiency and difficulty in direct compatibility with existing SHA-3 standards. Existing post-quantum cryptography algorithms typically require significantly increased computational and storage overhead, leading to a substantial decrease in efficiency and making it difficult to meet low-latency requirements such as real-time communication. For example, Sphinx+ and XMSS suffer from throughput limitations, excessive storage overhead, and insufficient compatibility.
[0005] Despite the progress made in quantum-resistant encryption technologies and quantum-safe algorithms, many challenges remain. For example, designing a hash algorithm that provides high security without significantly reducing efficiency in a quantum computing environment remains a core issue in cryptography. Maintaining the security and applicability of algorithms in the collision search problem faced by quantum computers is a pressing technical challenge. Current quantum-resistant schemes generally suffer from low efficiency and high computational overhead in practical applications. Summary of the Invention
[0006] The purpose of this invention is to provide a method, system, device, and medium for optimizing dynamic quantum-safe sponge structures. By introducing a dynamic permutation layer based on lattice cryptography into the SHA-3 sponge structure, the ability to resist quantum collision attacks is significantly improved, while maintaining high efficiency and compatibility.
[0007] To achieve the above objectives, the present invention employs the following technical solution: A method for optimizing a dynamic quantum-safe sponge structure includes the following steps: The input message is padded and segmented to generate preprocessed data blocks; The preprocessed data block is input into the SHA-3 sponge structure for absorption stage processing; Between the absorption phase and the squeezing phase, a dynamic quantum-safe permutation operation is performed: the extracted intermediate state in the current sponge state is divided into k sub-blocks; a temporary key is dynamically derived based on the intermediate value of the previous round of sponge states; and the Ring-LWE encryption algorithm is used to encrypt each sub-block. The encrypted state is subjected to a squeezing phase to generate the final hash value.
[0008] Preferably, the Ring-LWE encryption algorithm employs a polynomial ring: , in, Represents a large prime number or power. Indicates the dimension or rank of the ring. Modulus Integer ring, Indicates the modulus of the coefficients Polynomial module polynomial ring, A variable representing a polynomial, used to represent elements in a ring.
[0009] Preferably, the dynamically derived temporary key is generated using the LWE key generation algorithm: , in, Indicates a temporary key. This refers to the LWE key generation algorithm. This indicates the state of the output in the previous round. This represents the mod function.
[0010] Preferably, the Ring-LWE encryption algorithm is used to encrypt each sub-block to generate encrypted ciphertext. The formula is as follows: , in, This indicates the Ring-LWE encryption algorithm. This indicates the status of the output in this round.
[0011] Preferably, the value of k is 16.
[0012] Preferably, the dynamic quantum-safe permutation operation is performed once after every 5 rounds of permutation in SHA-3.
[0013] A dynamic quantum-safe sponge structure optimization system, comprising: Preprocessing module: used for message filling and chunking; SHA-3 Absorption Module: Performs standard absorption phase calculations; Quantum security enhancement module: includes: State segmentation unit: Divides the sponge state into k sub-blocks; Dynamic key generation unit: generates temporary keys based on historical states; Ring-LWE encryption unit: performs encryption operations on each sub-block; SHA-3 squeezing module: generates the final hash output.
[0014] A dynamic quantum-safe sponge structure optimization device includes a processor and a memory storing program instructions, wherein the processor is configured to execute the dynamic quantum-safe sponge structure optimization method when running the program instructions.
[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned dynamic quantum-safe sponge structure optimization method.
[0016] The advantages of this invention are: optimized dynamic quantum-safe sponge structure. By introducing a lattice-based dynamic permutation layer (LWE) into the SHA-3 sponge structure, this invention significantly enhances the quantum resistance of existing SHA-3 sponge structures. In a quantum computing environment, the traditional SHA-3 algorithm faces the threat of collision attacks accelerated by Grover's algorithm. This invention, by applying LWE encryption to each sub-block in the hashing process, makes it difficult for quantum computers to use accelerated algorithms to crack collision or pre-mapping problems, thereby greatly improving the algorithm's quantum resistance.
[0017] While the traditional SHA-3 algorithm possesses strong collision resistance and pre-mapping resistance, its collision resistance significantly decreases under the accelerated attacks of quantum computers. This invention improves the algorithm's collision resistance by introducing an LWE-based encryption layer, which substantially increases the computational resources required by quantum computers for collision searching. In particular, when quantum computers face pre-mapping attacks, the encryption mechanism of this invention also significantly increases the complexity of cracking it.
[0018] This invention employs a dynamic key derivation mechanism, ensuring that the key is dynamically generated in each round of the hashing process, rather than remaining fixed. This mechanism increases the difficulty for attackers to predict the key, especially when quantum computers attempt to brute-force the key, thus increasing the complexity of the cracking and further enhancing the algorithm's security. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0020] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1 In this invention, we introduce a dynamic permutation layer based on LWE (Light Wave Engine Optimization), enabling the SHA-3 sponge structure to effectively resist acceleration attacks from quantum computers when processing data. Specifically, each sub-block of the sponge state is processed using Ring-LWE encryption, thereby increasing the difficulty for a quantum computer to crack each sub-block.
[0023] By employing the Ring-LWE encryption method, an encryption layer is added during the replacement phase of the sponge structure. This significantly increases the computational resources required by quantum computers attempting to accelerate collision search using the Grover algorithm or other quantum algorithms, making it impossible to crack the algorithm within an acceptable timeframe.
[0024] In the traditional SHA-3 algorithm, the key is generally fixed. However, in this invention, the key is dynamically derived, with a new key generated in each round based on the state of the previous round. This makes it difficult for attackers to predict the key, further enhancing the algorithm's quantum resistance.
[0025] like Figure 1 As shown, a method for optimizing a dynamic quantum-safe sponge structure includes the following steps: S1: Fill and divide the input message to generate preprocessed data blocks; S2: The preprocessed data block is input into the SHA-3 sponge structure for absorption stage processing; S3: Between the absorption phase and the squeezing phase, perform a dynamic quantum-safe permutation operation: divide the extracted intermediate state in the current sponge state into k sub-blocks; dynamically derive a temporary key based on the intermediate value of the previous round of sponge state; and encrypt each sub-block using the Ring-LWE encryption algorithm. S4: Perform a squashing phase on the encrypted state to generate the final hash value.
[0026] As a refinement of the above embodiment, step S1 includes: processing the input data M according to the padding rules of the SHA-3 standard to obtain the padded message. The specific steps are as follows: Padding: Pad the input message M (which is smaller than the block size r=1088 bits of the sponge structure) to ensure that the message length meets the requirements of the SHA-3 sponge structure.
[0027] Segmentation: The padded message is segmented according to the r=1088 dynamically quantum-safe sponge structure optimized bits and input into the sponge structure to start the SHA-3 absorption phase.
[0028] As a refinement of the above embodiments, step S3, between the absorption phase and the squeezing phase, performs a dynamic quantum-safe substitution operation, including: The SHA-3 sponge structure comprises multiple transformation stages: θ, ρ, π, χ, ι (five rounds of permutation). In these stages, data is continuously absorbed and compressed to generate the final hash value. In this invention, each round of the encryption process is enhanced: LWE encryption: After every five rounds of permutation, an intermediate state S is extracted from the sponge state and divided into multiple sub-blocks. For each sub-block, the following operations are performed: Temporary key generation: Generating temporary keys using the LWE key generation algorithm. , Encryption: Apply Ring-LWE encryption to each sub-block to generate encrypted ciphertext. The encryption formula is: , in, This indicates the Ring-LWE encryption algorithm. This indicates the status of the output in this round.
[0029] Reorganization state: The encrypted sub-block Reassemble into a new sponge state and continue in subsequent rounds until the final hash value is output.
[0030] In LWE encryption, the key is dynamically derived from the intermediate states of a sponge structure. This dynamic derivation mechanism ensures that the encryption key is different for each round, increasing the difficulty for quantum computers to crack the algorithm.
[0031] Specifically, the Ring-LWE encryption algorithm employs a polynomial ring: , in, Represents a large prime number or power. Indicates the dimension or rank of the ring. Modulus Integer ring, Indicates the modulus of the coefficients Polynomial module polynomial ring, The variable representing the polynomial is used to represent the elements in the ring; this formula means that the coefficients of all polynomials with a degree less than n are in the ring. And according to Take the mold. This means to sort all polynomials by Perform a "modulo" operation, that is, only keep the modulo and modulo. The remainder.
[0032] In this embodiment, the enhanced algorithm passed all standard hash test vectors (such as Monobit and Runs dynamic quantum-safe sponge structure optimization tests) on the NIST test platform. Throughput loss was ≤15% (compared to native SHA3-256), meeting real-time communication requirements.
[0033] To verify the performance of the quantum resistance enhancement algorithm, comparative tests were conducted. The table below shows the comparison results between the native SHA-3 and the enhanced SHA-3 in terms of throughput, computation time, and collision attack complexity, as shown in Table 1: Table 1 Comparison Results The results above show that although the throughput of the enhanced SHA-3 is slightly reduced (≤15%), the enhanced algorithm has a significant advantage in terms of quantum resistance to attacks, and the complexity of collision attacks is greatly improved, meeting the application requirements of high security scenarios.
[0034] A horizontal comparison of post-quantum algorithms (based on the enhanced version of SHA3-256) is shown in Table 2: Table 2: Horizontal Comparison of Post-Quantum Algorithms Note: The storage overhead test environment was an ARM Cortex-M7 platform with dynamic quantum-safe sponge architecture optimization, and the message length was 1KB. The above results indicate that: Throughput increased by 209% (compared to SPHINCS+); Storage overhead is reduced by 95% (compared to XMSS).
[0035] Quantum attack simulation test: Grover algorithm attack test was conducted on the IBM dynamic quantum-safe sponge structure optimization Qiskit quantum simulation platform, as shown in Table 3: Table 3 Comparison of Algorithm Attack Tests It should be noted that: Although this invention introduces an LWE-based encryption and dynamic key derivation mechanism, increasing encryption complexity, the overall performance loss is very limited. Compared to the traditional SHA-3 algorithm, the throughput loss of this invention is controlled within 15%, which can meet the needs of real-time communication and high-throughput applications, such as blockchain and IoT scenarios. At the same time, memory usage remains low, making it suitable for resource-constrained devices.
[0036] The quantum resistance enhancement scheme of this invention is compatible with the existing SHA-3 standard, allowing users to seamlessly integrate it onto existing infrastructure without requiring large-scale modifications to existing systems. Particularly in practical applications, users can choose different operating modes (such as single-layer hashing or double-layer hashing) according to their security requirements, making this invention suitable for both low-security and high-security scenarios.
[0037] Compared to other post-quantum cryptography algorithms (such as SPHINCS+ and XMSS), the solution of this invention exhibits superior performance in terms of storage overhead. For example, SPHINCS+ requires a 1MB parameter table to support its hash tree structure, while this invention requires only a small amount of storage space (256KB), greatly reducing memory and storage requirements, making it particularly suitable for resource-constrained environments such as embedded devices and mobile devices.
[0038] The quantum-resistant enhanced SHA-3 hash algorithm of this invention is applicable to multiple fields with high security requirements, including but not limited to blockchain, the Internet of Things (IoT), digital currencies, encrypted communication, and the protection of long-term data security. It provides safeguards for data security for decades to come, and is particularly suitable for sensitive data requiring long-term storage or high-security protection.
[0039] This invention supports a configurable two-layer hash protocol, allowing users to choose the appropriate operating mode based on specific security requirements. For higher security requirements, a two-layer hash structure (including quantum-resistant signature algorithms) can be enabled; for lower security requirements, a single-layer hash mode can be selected, providing flexible configuration options. This configurability enables the solution to meet security needs in different scenarios.
[0040] Example 2 A dynamic quantum-safe sponge structure optimization system, comprising: Preprocessing module: used for message filling and chunking; SHA-3 Absorption Module: Performs standard absorption phase calculations; Quantum security enhancement module: includes: State segmentation unit: Divides the sponge state into k sub-blocks; Dynamic key generation unit: generates temporary keys based on historical states; Ring-LWE encryption unit: performs encryption operations on each sub-block; SHA-3 squeezing module: generates the final hash output.
[0041] This disclosure also provides a dynamic quantum-safe sponge structure optimization device, including a processor and a memory. Optionally, the device may further include a communication interface and a bus. The processor, communication interface, and memory can communicate with each other via the bus. The communication interface can be used for information transmission. The processor can call logical instructions in the memory to execute the dynamic quantum-safe sponge structure optimization method of the above embodiments.
[0042] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0043] Memory, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor executes the program instructions / modules stored in the memory to perform functional applications and data processing, thereby realizing the dynamic quantum-safe sponge structure optimization method in the above embodiments.
[0044] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory may include high-speed random access memory and may also include non-volatile memory.
[0045] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described dynamic quantum-safe sponge structure optimization method.
[0046] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0047] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more 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 method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code. It can also be a transient storage medium.
[0048] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for optimizing a dynamic quantum-safe sponge structure, characterized in that, Includes the following steps: The input message is padded and segmented to generate preprocessed data blocks; The preprocessed data block is input into the SHA-3 sponge structure for absorption stage processing; Between the absorption phase and the squeezing phase, a dynamic quantum-safe permutation operation is performed: the extracted intermediate state in the current sponge state is divided into k sub-blocks; a temporary key is dynamically derived based on the intermediate value of the previous round of sponge states; and the Ring-LWE encryption algorithm is used to encrypt each sub-block. The encrypted state is subjected to a squashing phase to generate the final hash value; The Ring-LWE encryption algorithm employs a polynomial ring: , in, Represents a large prime number or power. Indicates the dimension or rank of the ring. Modulus Integer ring, Indicates the modulus of the coefficients Polynomial module polynomial ring, A variable representing a polynomial, used to represent elements in a ring; The dynamically derived temporary key is generated using the LWE key generation algorithm: , in, Indicates a temporary key. This refers to the LWE key generation algorithm. This indicates the state of the output in the previous round. This represents the mod function; The Ring-LWE encryption algorithm is used to encrypt each sub-block, generating the encrypted ciphertext. The formula is as follows: , in, This indicates the Ring-LWE encryption algorithm. This indicates the status of the output in this round.
2. The method for optimizing dynamic quantum-safe sponge structures according to claim 1, characterized in that, The value of k is 16.
3. The method for optimizing dynamic quantum-safe sponge structures according to claim 1, characterized in that, The dynamic quantum-safe permutation operation is performed once every 5 rounds of permutations in SHA-3.
4. A dynamic quantum-safe sponge structure optimization system, characterized in that, The method for optimizing a dynamic quantum-safe sponge structure as described in any one of claims 1-3 includes: Preprocessing module: used for message filling and chunking; SHA-3 Absorption Module: Performs standard absorption phase calculations; Quantum security enhancement module: includes: State segmentation unit: Divides the sponge state into k sub-blocks; Dynamic key generation unit: dynamically derives temporary keys based on the intermediate values of the previous round of sponge states; Ring-LWE encryption unit: performs encryption operations on each sub-block; SHA-3 squeezing module: generates the final hash output.
5. A dynamic quantum-safe sponge structure optimization device, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the dynamic quantum-safe sponge structure optimization method as described in any one of claims 1-3 when running the program instructions.
6. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the dynamic quantum-safe sponge structure optimization method as described in any one of claims 1-3 above.
Citation Information
Patent Citations
Lightweight hash function construction method based on Sponge structure
CN107769911A
Data encryption method and device
CN118842572A