Deterministic anti-quantum prime number judgment method and system based on chaotic dynamics

Through a deterministic quantum-resistant prime number determination method based on chaotic dynamics, the probabilistic determination risks and quantum-resistant security defects in existing technologies are resolved, and highly secure and lightweight prime number determination is achieved in embedded devices, with the ability to resist quantum attacks and respond quickly.

CN120639261AInactive Publication Date: 2025-09-12杨永夏
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510832369.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies have probabilistic judgment risks, quantum security defects and resource efficiency bottlenecks in prime number determination, making it difficult to achieve high security and lightweight in embedded devices.

Method used

A deterministic quantum-resistant prime number determination method based on chaotic dynamics is adopted. The sequence is iteratively generated through Logistic mapping combined with true random noise. Dynamic thresholds and true random number generators are used to generate deterministic determination results. Lightweight design is achieved by optimizing hardware.

Benefits of technology

It achieves deterministic quantum-resistant prime number determination, can resist Shor's algorithm and Grover search attacks, has lightweight characteristics, is suitable for millisecond-level determination in embedded devices, and supports post-quantum cryptography and security authentication of IoT devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639261A_ABST
    Figure CN120639261A_ABST
Patent Text Reader

Abstract

The invention discloses a deterministic anti-quantum prime number judgment method and system based on chaos dynamics. The judgment method comprises the following steps of initial value generation, chaos iteration and prime judgment. The judgment system comprises an initial value generation module, a chaos iteration engine, a judgment module and a threshold calculation unit. The deterministic anti-quantum prime number judgment method and system based on chaotic dynamics have post-quantum security characteristics, can resist quantum attacks such as a Shor algorithm and Grover search, and support generation of # imgabs0 # bit anti-quantum prime numbers; the method has the characteristics of real-time performance and light weight, and millisecond prime number judgment (RAM # imgabs1 # 10KB) is realized on resource-limited platforms such as an FPGA (Field Programmable Gate Array), an MCU (Microprogrammed Control Unit) and the like; the method has certainty and robustness, can eliminate probabilistic misjudgment, and is suitable for wide-temperature (-40 DEG C to 85 DEG C), radiation and other complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deterministic quantum-resistant prime number determination based on chaotic dynamics, and in particular to a deterministic quantum-resistant prime number determination method and system based on chaotic dynamics. Background Art

[0002] With the rapid development of quantum computing technology, traditional encryption algorithms are facing unprecedented challenges. The powerful computing power of quantum computing has seriously threatened the security of some encryption algorithms based on the problem of large number factorization. Among them, prime number determination is a key link in the encryption algorithm, and its security is of vital importance. Traditional prime number determination methods, such as trial division method and Miller-Rabin algorithm, are difficult to guarantee their security in the face of quantum computing. In order to meet the challenges brought by quantum computing, researchers have begun to explore new prime number determination methods. Chaotic dynamics, as a complex nonlinear system, has high uncertainty and sensitivity to initial conditions. It has broad application prospects in the field of cryptography. The sequences generated by chaotic systems have pseudo-randomness, unpredictability and good statistical properties. These properties enable it to provide a new idea for prime number determination. By combining chaotic dynamics with prime number determination, it is expected to construct a prime number determination method that is both highly secure and resistant to quantum computing attacks. Defects of existing technology: Probabilistic judgment risk: Algorithms such as Miller-Rabin rely on random bases, have a theoretical probability of misjudgment (such as missing the Carmichael number), and cannot provide deterministic results; although the AKS algorithm is deterministic, its computational complexity is as high as , it is difficult to meet the demand for real-time determination of prime numbers at the ten-thousand-digit level; Anti-quantum security flaws: Shor's algorithm can crack the mathematical foundations that traditional prime number determination relies on in polynomial time, and traditional solutions lack effective defense mechanisms against quantum attacks (such as quantum state periodic extraction and Grover search optimization).

[0003] Resource efficiency bottleneck: Traditional methods face high RAM usage in embedded devices (such as IoT terminals) ( 10kb), duration exceeded ( 1ms) and other problems, making it difficult to meet the needs of lightweight scenarios.

[0004] Therefore, the present invention provides a deterministic quantum-resistant prime number determination method and system based on chaotic dynamics to solve the above-mentioned problems. Summary of the Invention

[0005] The purpose of the present invention is to provide a deterministic quantum-resistant prime number determination method and system based on chaotic dynamics, so as to solve the problems of probabilistic determination risks, quantum-resistant security defects and resource efficiency bottlenecks in the existing technology mentioned in the above background technology.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a deterministic quantum-resistant prime number determination method based on chaotic dynamics, comprising the following steps: Initial value generation: Perform the following operations on the integer n to be determined: ①Calculate A= Get a 64-bit integer; ② Calculate B=SHA3-512(n) to get a 512-bit hash value; ③ Expand A to 512 bits and perform bitwise XOR with B to obtain C; ④Convert C to [0, 1) floating point number ; Chaotic iteration: Generate sequence by combining Logistic mapping with true random noise iteration { }, the iteration formula is: =4 (1- )+ ; Among them, the noise intensity , uniform(0, 1) is provided by a true random number generator (TRNG); Primality determination: Calculate the mean of the iterative sequence = and with dynamic threshold : =max(0.5 , ) Among them, the parameters , , and when When the range is exceeded, the result of the judgment is not positive for the Carmichael number missed detection rate. 0.001% or small prime number misjudgment rate 0.005%; if ,determination is a prime number, otherwise it is a composite number; The number of chaotic iterations k satisfies: K=max(1000,m ) Among them, the proportional coefficient m (10, 20); The true random number generator (TRNG) satisfies: Entropy source is certified by NIST SP 800-90B or AIS-31; The output sequence passes all 15 randomness tests of NIST STS; Preferably, the dynamic threshold is calculated as follows: When n When the threshold is read from the pre-calculated table, the table address is n mod L, where L 512, 2048 ; When n When 0.5 is calculated in real time ,and 0.5 ; The determination method further includes boundary processing, and the boundary processing step includes: like 0 is set to 0, if Set it to 1 to ensure that the iteration value is always in [0 1].

[0007] Preferably, the determination system includes: Initial value generation module: includes SHA3-512 hash unit and CRC64 check unit, outputs 64-bit fixed-point number (Q4.60 format) chaotic initial value; Chaos Iteration Engine: Consists of the following components: Parallel multipliers (such as 18 18DSP cores), used to calculate 4 (1 ); True random number generator (TRNG) with sine lookup table for generating ; Double-buffered registers and accumulators to support pipeline iteration; Decision module: Contains floating-point arithmetic unit (or fixed-point approximation unit) for calculating the mean , and output the judgment result; Threshold calculation unit: Contains square root approximation circuit, its calculation accuracy is , and only if When the circuit output value is equal to the iteration value The comparison result is valid.

[0008] Preferably, the chaos iteration engine integrates the following quantum-resistant mechanisms: Noise intensity dynamic adjustment module, support = , where q is the number of quantum bits, ; Chaotic trajectory diffusion unit, ensuring Lyapunov exponent , causing the quantum state to diverge exponentially.

[0009] Preferably, the lightweight implementation includes: 8-16 bit fixed point operations replace floating point operations, with a precision range of ; Precomputed threshold table storage size 128KB, using Q1.15 or Q2.14 fixed-point format.

[0010] Preferably, the system is used in the following scenarios: Post-quantum cryptography (e.g., SRA-4096 key generation, SABER algorithm parameter generation); Entropy source enhancement for Physical Unclonable Function (PUF); Lightweight Security Authentication for IoT Devices (RAM 320KB, determination delay 10ms); and the application is only It is suitable for financial-level security scenarios.

[0011] Preferably, the determination method resists Shor's algorithm and Grover's search in the following way: Injecting true random noise makes the quantum state inner product ; Through dynamic threshold Change the Grover search space from O( ) is improved to O(N); The effectiveness of the dynamic threshold strictly depends on , any adjustment Any behavior that circumvents this range in terms of numerical values, units or calculation methods will result in the determination result losing its commercial applicability.

[0012] Preferably, a computer program is stored, and when the program is executed by a processor, the prime number determination method according to any one of claims 1 to 10 is implemented.

[0013] Preferably, the determination system further includes anti-side channel measures, and the anti-side channel measures include: Random no-op insertion (0-8 cycles) and dynamic frequency modulation (base frequency 10MHz); Electromagnetic shielding design to ensure SEU rate Error / bit / day.

[0014] Priority, the The slope of the threshold curve corresponding to the effective interval is , only when When the absolute value of the slope is , ensuring that the discrimination between prime numbers and composite numbers is maximized.

[0015] Priority, the It is a dimensionless constant and it is forbidden to circumvent the numerical limit through unit conversion (such as percentage and exponential scaling).

[0016] 1. Core judgment model n P⇔ ; Dynamic threshold function: =max

[0017] When n When n Real-time calculation.

[0018] 2. Chaos initial value generation

[0019] step: ① Calculation Get 64-bit integer A; ②Hash n with SHA3-512 to get the 512-bit value B; ③ Expand A to 512 bits (fill high bits with zeros), and XOR it with B to get C; ④ Convert C to a [0, 1) floating point number as the initial value .

[0020] 3. Anti-quantum chaos iteration =4 (1- )+

[0021] Key parameters: Noise intensity: (Can be dynamically adjusted to ); True random numbers: Uniform (0, 1), provided by a true random number generator (TRNG) certified by NIST SP 800-90B; Iteration number: k max(1000,15 ).

[0022] 4. Theoretical basis of quantum resistance Chaotic unpredictability: Exploiting the high Lyapunov exponent of the Logistic map ( ), which makes the quantum state diverge exponentially and resists phase estimation attacks.

[0023] Noise immunity: Injecting true random noise destroys the iterative periodicity, making it impossible for the Shor algorithm to extract periodic features (real measurement sub-state inner product ).

[0024] Search Space Expansion: Dynamic Thresholding Change the Grover search space from O( ) is improved to O(N), increasing the complexity of the attack.

[0025] Compared with the existing technology, the deterministic quantum-resistant prime number determination method and system based on chaotic dynamics have the following beneficial effects: With post-quantum security features: able to resist quantum attacks such as Shor's algorithm and Grover search, and support the generation of Bit-resistant quantum primes; Real-time and lightweight features: millisecond-level judgment (RAM) can be achieved on resource-constrained platforms such as FPGA and MCU 10KB); Deterministic and robust: It can eliminate probabilistic misjudgments and adapt to complex environments such as wide temperature (-40°C to 85°C) and radiation; BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a horizontal comparison diagram of the present invention. DETAILED DESCRIPTION

[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0028] See also Figure 1 ,The present invention provides a technical solution: a deterministic quantum-resistant prime number determination method and system based on chaotic dynamics; Step 1: Chaos primality determination process 1. Preprocessing: If n 2, directly judged as a composite number; if n=2, judged as a prime number; if n 2, is determined to be a composite number.

[0029] 2. Initial value calculation: Call SHA3-512 hash and CRC64 check to generate the initial value in 64-bit fixed-point format (Q4.60) .

[0030] 3. Chaotic Iteration: Hardware implementation: Use parallel multipliers (such as 18 18DSP cores) computing 4 (1 ), calculated by pre-stored sine value lookup table ; Pipeline optimization: Use double buffer registers to store iteration results to avoid pipeline stalls; accumulate iteration sequences and .

[0031] 4. Result determination: Calculate the mean , and the threshold ) comparison; if ), is determined to be a prime number, otherwise it is a composite number.

[0032] Step 2: Side-channel and anti-interference hardening 1. Power consumption confusion: Insert random idle cycles (0-8 cycles) to introduce timing jitter ( ); Dynamically modulate the operating frequency (base frequency 10MHz), suppressing electromagnetic leakage characteristics.

[0033] 2. Noise immunity design: The TRNG entropy source is calibrated every 24 hours using quantum random numbers; The temperature compensation algorithm is used to correct the threshold table to adapt to the -40℃~85℃ environment.

[0034] Step 3: Lightweight optimization 1. Storage optimization: to n Precomputed threshold table, stored as 16-bit fixed-point number (Q1.15 format), table size 128KB; Embedded devices (such as ESP32) use 8-bit fixed-point numbers (precision ), compress the threshold table to 1KB.

[0035] 2. Computational optimization: Use fixed-point arithmetic instead of floating-point arithmetic to reduce FPGA resource usage (LUTs saved 27.6%). Iteration results are truncated to boundary values ​​in real time ( ), to avoid overflow errors.

[0036] Optimization of quantum-resistant PoW consensus mechanism: Core improvement: embed chaotic prime number determination into the SHA-256 hash calculation process to increase the difficulty of quantum attacks: Proof of Work Function Reconstruction: Hash (Block Header ) T and ChaosPrimeJudge (Nonce) = prime number, where T is the original SHA-256 difficulty target and ChaosPrimeJudge is the chaotic prime number judgment function.

[0037] Mining machine hardware adaptation: Using Xilinx UltraScale+VU9P FPGA, integrating 16 chaos iteration units (each unit contains 18 18DSP core and sine lookup table).

[0038] Parallel processing capability: 2.8 million primality checks can be performed per second (traditional CPUs can only process 12,000).

[0039] Attack difficulty changes: Grover search space from O( ) to O ( ) (Because the hash value must be less than T and Nonce must be a prime number).

[0040] Case 1: Financial-grade RSA-4096 key generation Input: transaction ID (64 bits) + high-precision timestamp (32 bits) + geocode (16 bits).

[0041] process: 1. Generate a seed using SHA3-256 and combine it with TRNG to generate a 4096-bit odd candidate number. 2. Call the FPGA chaos engine (k=42000 iterations) to determine primality; 3. Repeat until two prime numbers p and q are obtained, and calculate the modulus N=p .

[0042] Effect:

[0043] Case 2: Quantum-resistant Unclonable Function (PUF) Input: Power supply noise collected when the chip is powered on (1GS / s sampling rate, 10 duration) + chip ID.

[0044] process: 1. 3GHz advance via FFT Noise characteristic value in the 5GHz band ; 2. Generate chaos initial value ; 3. Perform 500 iterations, extract the bits at a specific position to generate a 4-bit response R, and require the Hamming distance HD ( ) 1.

[0045] Effect:

[0046] Case 3: Lightweight key generation for IoT devices Hardware: ESP32-S3 (240MHz, 320KB RAM). process: 1. Input the MAC address and temperature reading to generate a 256-bit odd candidate number; 2. Using 8-bit fixed-point iteration (k=15 ), call the pre-calculated threshold table for judgment.

[0047] Effect: Single judgment time: 0.88ms, RAM usage 7.3KB; Average key generation time: 226ms, meeting 1000ms latency requirement.

[0048] Case 4: Quantum Communication Network Key Agreement Application scenario: Quantum communication requires real-time generation of large prime numbers that are resistant to quantum attacks. Traditional solutions cannot meet this requirement due to their fragility or latency.

[0049] Implementation method: 1. Integrate quantum link noise (14-bit ADC, 500MS / s sampling) and extract 128-bit entropy eigenvalues ​​through wavelet transform.

[0050] 2. Generate a 1024-bit seed using SHA3-512 and superimpose it with TRNG to generate odd candidate numbers.

[0051] 3. FPGA integrated pipeline hybrid engine, configured with 10500 iterations and approximate square threshold calculation.

[0052] 4. Generate prime numbers locally and exchange hash values, and generate a shared key through exponentiation.

[0053] Effect:

[0054] Adaptability: Quantum resistance at both the physical and algorithm layers, terminal localization eliminates latency, and 35mW low power consumption makes it suitable for portable devices.

[0055] Case 5: Autonomous vehicle safety certification Application scenario: Real-time in-vehicle identity authentication requires low-latency and anti-interference solutions. Traditional solutions are difficult to meet V2X requirements.

[0056] Implementation method: 1. Fuse the LiDAR, INS, and battery noise, and extract the 64-bit entropy value through fuzzy entropy.

[0057] 2. The in-vehicle MCU (such as NXP S32G) uses 8-bit fixed-point iteration and a pre-stored threshold table (2KB RAM) to accelerate judgment.

[0058] 3. Based on the Diffie-Hellman protocol for temporary public key exchange, prime numbers are generated locally and verified.

[0059] Four Faraday cages shield against RF interference, and parity checks are inserted every 500 iterations to prevent hardware errors.

[0060] Effect:

[0061] Adaptability: Microsecond-level response complies with ISO21434 standards, hardware shielding and verification adapt to harsh vehicle environments, and are compatible with low-end ECUs.

[0062] Case 6: Smart Contract Zero-Knowledge Proof Quantum-Resistant Enhancement Solution Application Scenario: In DeFi smart contracts, zero-knowledge proofs (such as zk-SNARKs) require secure prime numbers to generate elliptic curve parameters. Traditional methods are subject to the risk of probabilistic misjudgment and quantum attacks. This solution provides a deterministic quantum-resistant solution.

[0063] Core Technology 1. Determining the nature of chaos: Initial value: A floating-point number in the range [0, 1) generated by SHA3-512 hash and CRC64 XOR, resistant to quantum state extraction.

[0064] Iteration: Logistic mapping + true random noise ( = ), the number of iterations k=15 .

[0065] Judgment: Mean Dynamic Threshold (n Real-time calculation), output primality results.

[0066] 2. Parameter generation optimization: A 256-bit odd candidate number is constructed, the last bit is fixed to 1 to ensure an odd number, and the middle bits are randomly generated by TRNG.

[0067] Among the elliptic curve parameters (p, G, n), n is determined to be prime through chaos, supporting the zero-knowledge proof circuit.

[0068] Advantages Certainty: 100,000 Carmichael number tests yielded a 0% false positive rate, eliminating the risk of probabilistic algorithms.

[0069] Quantum resistance: inner product of quantum states , the success rate of Shor algorithm attack dropped from 47% to 0.003%.

[0070] Lightweight: The ARM chip has a single judgment time of 1.2ms and occupies 7.3KB of RAM, making it suitable for embedded devices.

[0071] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A deterministic quantum-resistant prime number determination method based on chaotic dynamics, characterized in that: The following steps are involved: Initial value generation: Perform the following operations on the integer n to be determined: ①Calculate A= Get a 64-bit integer; ② Calculate B=SHA3-512(n) to get a 512-bit hash value; ③ Expand A to 512 bits and perform bitwise XOR with B to obtain C; ④Convert C to [0, 1) floating point number ; Chaotic iteration: Generate sequence by combining Logistic mapping with true random noise iteration { }, the iteration formula is: =4 (1- )+ ; Among them, the noise intensity , uniform(0, 1) is provided by a true random number generator (TRNG); Primality determination: Calculate the mean of the iterative sequence = and with dynamic threshold : =max(0.5 , ) Among them, the parameters , , and when When the range is exceeded, the result of the judgment is not positive for the Carmichael number missed detection rate. 0.001% or small prime number misjudgment rate 0.005%; if ,determination is a prime number, otherwise it is a composite number; The number of chaotic iterations k satisfies: K=max(1000,m ) Among them, the proportional coefficient m (10, 20); The true random number generator (TRNG) satisfies: Entropy source is certified by NIST SP 800-90B or AIS-31; The output sequence passes all 15 randomness tests of NIST STS; The dynamic threshold is calculated as follows: When n When the threshold is read from the pre-calculated table, the table address is n mod L, where L 512, 2048 ; When n When 0.5 is calculated in real time ,and 0.5 ; The determination method further includes boundary processing, and the boundary processing step includes: like 0 is set to 0, if Set it to 1 to ensure that the iteration value is always in [0 1].

2. The method for determining deterministic quantum-resistant prime numbers based on chaotic dynamics according to claim 1, characterized in that: The determination system includes: Initial value generation module: includes SHA3-512 hash unit and CRC64 check unit, outputs 64-bit fixed-point number (Q4.60 format) chaotic initial value; Chaos Iteration Engine: Consists of the following components: Parallel multipliers (such as 18 18DSP cores), used to calculate 4 (1 ); True random number generator (TRNG) with sine lookup table for generating ; Double-buffered registers and accumulators to support pipeline iteration; Decision module: Contains floating-point arithmetic unit (or fixed-point approximation unit) for calculating the mean , and output the judgment result; Threshold calculation unit: Contains square root approximation circuit, its calculation accuracy is , and only if When the circuit output value is equal to the iteration value The comparison result is valid.

3. The deterministic quantum-resistant prime number determination system based on chaotic dynamics according to claim 2, characterized in that: The Chaos Iteration Engine integrates the following quantum-resistant mechanisms: Noise intensity dynamic adjustment module, support = , where q is the number of quantum bits, ; Chaotic trajectory diffusion unit, ensuring Lyapunov exponent , causing the quantum state to diverge exponentially.

4. The deterministic quantum-resistant prime number determination system based on chaotic dynamics according to claim 2, characterized in that: The lightweight implementation includes: 8-16 bit fixed point operations replace floating point operations, with a precision range of ; Precomputed threshold table storage size 128KB, using Q1.15 or Q2.14 fixed-point format.

5. A deterministic quantum-resistant prime number determination system based on chaotic dynamics according to any one of claims 2 to 4, characterized in that: The system is used in the following scenarios: Post-quantum cryptography (e.g., SRA-4096 key generation, SABER algorithm parameter generation); Entropy source enhancement for Physical Unclonable Function (PUF); Lightweight Security Authentication for IoT Devices (RAM 320KB, determination delay 10ms); and the application is only It is suitable for financial-level security scenarios.

6. The deterministic quantum-resistant prime number determination method based on chaotic dynamics according to claim 1 is characterized in that: The determination method resists Shor's algorithm and Grover's search in the following ways: Injecting true random noise makes the quantum state inner product ; Through dynamic threshold Change the Grover search space from O( ) is improved to O(N); The effectiveness of the dynamic threshold strictly depends on , any adjustment Any behavior that circumvents this range in terms of numerical values, units or calculation methods will result in the determination result losing its commercial applicability.

7. A computer-readable storage medium, characterized in that: A computer program is stored, and when the program is executed by a processor, the prime number determination method according to any one of claims 1 to 10 is implemented.

8. The deterministic quantum-resistant prime number determination system based on chaotic dynamics according to claim 2, characterized in that: The determination system further includes anti-side channel measures, and the anti-side channel measures include: Random no-op insertion (0-8 cycles) and dynamic frequency modulation (base frequency 10MHz); Electromagnetic shielding design to ensure SEU rate Error / bit / day.

9. The deterministic quantum-resistant prime number determination method based on chaotic dynamics according to claim 1 is characterized in that: described The slope of the threshold curve corresponding to the effective interval is , only when When the absolute value of the slope is , ensuring that the discrimination between prime numbers and composite numbers is maximized.

10. The deterministic quantum-resistant prime number determination method based on chaotic dynamics according to claim 1, characterized in that: described It is a dimensionless constant and it is forbidden to circumvent the numerical limit through unit conversion (such as percentage and exponential scaling).