Data encryption and dynamic key management method based on quantum security protocol

Through the dynamic key management method based on the quantum security protocol, the dynamic key is generated using quantum random numbers and chaotic mapping, combined with the encryption method based on grid theory, the problem of insufficient security in the quantum computing environment is solved, and data encryption with high security and attack resistance is achieved.

CN119921951BActive Publication Date: 2025-08-22HENGHUI XINDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510412323.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-22
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

The existing encryption technology is insufficient in the face of quantum computers. Traditional RSA and ECC algorithms are easily cracked by quantum computers, which makes it difficult to manage keys, and traditional encryption solutions are difficult to provide sufficient security and attack resistance in quantum computing environments.

Method used

The data encryption method based on the quantum security protocol is adopted, and the dynamic key is generated using quantum random numbers and chaotic mapping. Combined with the encryption method based on grid theory, a dynamic transformation matrix and discrete cosine transformation are introduced to construct a dynamic mask for authentication, and to defend against tampering and replay attacks.

Benefits of technology

Data encryption with high security and attack resistance in quantum computing environment is realized, dynamic key updates are difficult to predict, and the ciphertext structure changes over time, preventing statistical analysis attacks and ensuring data integrity and reversibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119921951B_ABST
    Figure CN119921951B_ABST
Patent Text Reader

Abstract

The present invention discloses a data encryption and dynamic key management method based on a quantum security protocol. The method comprises the following steps: Step 1: selecting an initial quantum random seed and a classical entropy source seed to generate a key at the initial moment; at each moment, constructing a key update function by combining a nonlinear chaotic increment with a fractal function to update the key; Step 2: preprocessing the original message into an integer vector; constructing a dynamic transformation matrix using the current moment's key, sampling a short vector from a multidimensional Gaussian distribution, and constructing a public random matrix; encrypting the integer vector by combining the dynamic transformation matrix, the short vector, and the public random matrix to obtain ciphertext; Step 3: decrypting the current moment's key and the dynamic transformation matrix obtained by synchronous update to restore the original message. The present invention provides a highly secure data encryption scheme that is resistant to quantum attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a data encryption and dynamic key management method based on a quantum security protocol. Background Art

[0002] With the rapid development of information technology, data security has become a core issue of global concern. Driven by emerging technologies such as cloud computing, the Internet of Things, big data, and blockchain, the generation, storage, and transmission of data are growing exponentially. However, during the exchange and storage of information, data faces numerous security challenges, including but not limited to unauthorized access, data tampering, replay attacks, and the threat of quantum computing. Traditional encryption technologies, such as the RSA algorithm based on large integer factorization and the ECC algorithm based on the elliptic curve discrete logarithm problem, rely on the security of computational complexity problems. While they offer strong security guarantees in classical computing environments, these encryption schemes can be effectively cracked in the face of quantum computers. Therefore, developing highly secure data encryption and key management methods that are resistant to quantum attacks has become a critical issue that needs to be addressed in the current information security field.

[0003] Existing data encryption schemes primarily include symmetric encryption, public key encryption, and lattice-based encryption methods. Symmetric encryption algorithms, such as AES, encrypt and decrypt data using fixed-length keys, offering the advantages of high computational efficiency and convenient hardware implementation. However, key distribution and management are key bottlenecks in symmetric encryption. Once the key is compromised, an attacker can easily decrypt all encrypted data. Public key encryption algorithms, such as RSA and ECC, are widely used in fields such as data encryption, identity authentication, and digital signatures. RSA relies on the problem of factoring large integers, and its security is determined by the key length. However, Shor's quantum algorithm, which can efficiently factor large integers in polynomial time, completely breaks the RSA system. Even with a 4096-bit RSA key, it can be cracked in a short time on a quantum computer. ECC, due to its shorter key length and higher computational efficiency, is considered a more secure option than RSA. However, its security relies on the elliptic curve discrete logarithm problem and is also vulnerable to quantum computing attacks. Therefore, public key encryption systems require a new security foundation to ensure their viability in the future quantum computing environment. Summary of the Invention

[0004] The purpose of this invention is to provide a data encryption and dynamic key management method based on a quantum-safe protocol, realizing a highly secure data encryption scheme that is resistant to quantum attacks. Dynamic keys are generated through quantum random numbers and chaotic mapping, making them unpredictable at different time steps and enhancing attack resistance. Lattice-theory-based encryption is employed to increase the complexity of data encryption, ensuring security even with the development of quantum computers. A dynamic transformation matrix is ​​introduced to change the ciphertext structure with the key, preventing pattern recognition attacks. During decryption, a pseudo-inverse matrix is ​​used to restore data, ensuring data reversibility. Furthermore, a discrete cosine transform and dynamic mask authentication mechanism are combined to detect data integrity and defend against tampering and replay attacks.

[0005] To solve the above technical problems, the present invention provides a data encryption and dynamic key management method based on a quantum security protocol, the method comprising:

[0006] Step 1: Select the initial quantum random seed and the classical entropy source seed to generate the key at the initial moment; at each moment, update the key by constructing the key update function through the nonlinear chaotic increment and fractal function to update the increment;

[0007] Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, sample a short vector from a multidimensional Gaussian distribution, and construct a public random matrix; combine the dynamic transformation matrix, short vector, and public random matrix to encrypt the integer vector to obtain ciphertext;

[0008] Step 3: Use the current key and dynamic transformation matrix obtained by synchronous update to decrypt and restore the original message.

[0009] Furthermore, the key at the initial moment is:

[0010] ;

[0011] in, The initial quantum random seed provided by the quantum random number generator is an integer; is the classic entropy source seed, which takes an integer value; Indicates a concatenation operation; It is a secure hash function that outputs a fixed-length binary string and then maps it to an integer; It is a preset large prime number used for modular operations to ensure that the result is within a finite field; It is a modulo operation.

[0012] Furthermore, for each moment , the key update function updates the key, the formula is as follows:

[0013] ;

[0014] in, for The key to the moment; for The key to the moment; It is the update increment, which is composed of nonlinear chaotic increment and fractal function.

[0015] Further, update increments Use the following formula to express it:

[0016] ;

[0017] in, is the nonlinear chaotic increment; for The quantum random seed generated by the quantum random number generator at the moment is in the range arrive between; for The chaotic variable obtained by Logistic mapping at the moment takes the value The update formula is:

[0018] ;

[0019] for Chaotic variables at each moment; The value range is ; is the nonlinear amplification index, used to enhance the chaotic variable the impact of; is a bitwise XOR operation, since is a real number, first Round and then Perform bitwise XOR operation; To floor the function, convert the real number to an integer; is a sinusoidal modulation function; where is the angular frequency, which controls the period of the sinusoidal modulation function; is the phase, used to adjust the offset of the sinusoidal modulation function;

[0020] is a fractal function; is an integer subscript index; is the number of fractal function terms; is the fractal scaling factor.

[0021] Furthermore, in step 2, the process of preprocessing the original message into an integer vector specifically includes: using UTF-8 encoding to convert the original message into an integer vector. Convert to a byte sequence: ;in Indicates the bytes, is the total number of bytes; ; Let the dimension of the integer vector to be generated be , which is divided into groups, and define the number of bytes contained in each group as If the last group is insufficient bytes, use the filling method to fill; for the groups, , define its corresponding integer for:

[0022] ;

[0023] Among them When, define ; Each group of bytes is considered a An unsigned integer of bytes, where the highest bit corresponds to the first byte and the lowest bit corresponds to the last byte; As the weight factor, each byte is mapped to its corresponding bit weight in the integer; to ensure that the subsequent operations are within the module The constructed integers satisfy ;like Known and greater than the maximum value that can be represented by a single group , then we can directly get the integer vector: ;in, is an integer vector; otherwise, the modulo operation will Further mapping updates: ; is the integer after the mapping is updated, as a component in the integer vector; Indicates that all lengths are A vector where each component comes from the modulus The set of integers in the sense .

[0024] Furthermore, in step 2, the dynamic transformation matrix is ​​constructed using the current key through the following formula: :

[0025] ;

[0026] in, is an integer subscript index; is the imaginary number symbol; is a pre-fixed, mutually inequivalent and reversible permutation matrix with dimension ; each All satisfied ; is a positive real number used as a scaling parameter.

[0027] Furthermore, in step 2, the integer vector is encrypted using the following formula to obtain the ciphertext :

[0028] ;

[0029] in, To disclose random matrices, their structures satisfy the properties of ideal lattices; is a short vector sampled from a discrete Gaussian distribution; is a noise vector used to mask the lattice structure, satisfying .

[0030] Furthermore, in step 3, the pseudo-inverse of the dynamic transformation matrix is ​​calculated using the key of the current moment and the dynamic transformation matrix obtained by synchronous update. , and then decrypt it using the following formula to get the intermediate integer vector:

[0031] ;

[0032] in, is the intermediate integer vector; the original message is restored through inverse mapping .

[0033] Furthermore, the method further comprises: after obtaining the intermediate integer vector, performing dynamic authentication verification on the intermediate integer vector, specifically comprising: when transmitting the ciphertext, pre-setting the authentication tag of the message Embed ciphertext; Perform discrete cosine transform to obtain frequency domain representation ; For discrete cosine transform operation; using dynamic key With the current time step Generate a dynamic mask :

[0034] ;

[0035] in, is the key scaling parameter, adjust The amplitude of the sine function; then, the frequency domain representation Perform bitwise XOR with the dynamic mask to obtain a new frequency domain vector Finally, Restored to time domain message through inverse discrete cosine transform ; Inverse discrete cosine transform operation; generate a check value based on the time domain message ;Will and Compare them and if they are consistent, it is determined that the original message has not been tampered with, and the dynamic authentication verification is completed.

[0036] The data encryption and dynamic key management method based on the quantum security protocol of the present invention has the following beneficial effects:

[0037] This invention utilizes a dynamic key management mechanism, overcoming the vulnerability of static keys in traditional encryption methods. In existing encryption technologies, keys are often fixed, and once cracked, the security of the entire system is threatened. This invention combines a quantum random number seed with a classical entropy source to update the key at each time step, and increases the key's unpredictability through the use of chaotic systems and fractal functions. This dynamic key evolution prevents attackers from predicting future key changes, even if they obtain the key at a certain point in time. This effectively protects against side-channel attacks, statistical analysis attacks, and brute-force attacks.

[0038] Secondly, because the key update mechanism of the present invention is affected by the quantum random entropy source, even in a quantum computing environment, the key generation mode still has a high degree of randomness and unpredictability, thereby ensuring long-term security in future computing environments. Secondly, the present invention adopts an encryption method based on lattice theory, which effectively improves the system's anti-attack capability. Compared with traditional public key encryption methods that rely on large number decomposition or discrete logarithm problems, the present invention uses a lattice-based encryption algorithm to make data encryption rely on solving short vector problems or learning congruence problems, and these problems are still difficult to be solved efficiently even with the powerful computing power of quantum computers. Therefore, even if quantum computing technology develops further in the future, the present invention can still provide sufficient security protection.

[0039] In addition, the present invention introduces random matrices and short vectors in the encryption process, which improves the randomness of the ciphertext and ensures that even when the same data is encrypted multiple times, the ciphertext generated each time is different, thereby effectively preventing statistical analysis attacks. In order to enhance the dynamic nature of the encryption system, the present invention proposes a dynamic transformation matrix that relies on the current key construction. Traditional encryption schemes often use fixed transformation matrices or linear transformations, so that attackers can infer the ciphertext structure when analyzing a large amount of ciphertext and ultimately derive the key. The present invention uses exponential transformation combined with a permutation matrix to construct a dynamic transformation matrix, so that the structure of the ciphertext changes over time, thereby improving the complexity and anti-attack ability of the ciphertext. Since the dynamic transformation matrix is ​​generated by key drive, its security is directly affected by the key update mechanism. Even if the attacker has partial ciphertext or historical keys, it is difficult to reproduce the future transformation matrix structure, thereby significantly improving the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0041] Figure 1 A schematic diagram of a method flow for a data encryption and dynamic key management method based on a quantum security protocol provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. 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 shall fall within the scope of protection of the present invention.

[0043] Example 1, reference Figure 1 : A data encryption and dynamic key management method based on a quantum security protocol, the method comprising:

[0044] Step 1: Select the initial quantum random seed and the classical entropy source seed to generate the key at the initial moment; at each moment, update the key by constructing the key update function through the nonlinear chaotic increment and fractal function to update the increment;

[0045] Quantum security protocols are based on the uncertainty principle of quantum physics. This property enables quantum random number generators (QRNGs) to provide truly unpredictable random numbers. Compared to traditional pseudo-random numbers, quantum random numbers are theoretically unpredictable and unreproducible, significantly enhancing the security of key generation. This invention first selects a quantum entropy source as the core random source of the initial key. It utilizes quantum physics phenomena such as quantum measurement collapse, vacuum fluctuation noise, or spin-state measurement to generate an initial quantum random bit stream. Due to the limited rate of quantum random number generation, to increase the key entropy and enhance the randomness of the system, this invention further combines a classical entropy source seed—such as a classical random bit stream based on thermal noise, semiconductor noise, or chaotic signals—with the quantum random bit stream to form a composite entropy pool. Based on this, the invention uses an exclusive-OR operation to combine the quantum random number and the classical entropy source bit stream, resulting in a highly random initial key while avoiding the security risks associated with a single entropy source.

[0046] After obtaining the initial key, the present invention uses a composite method based on nonlinear chaotic increments and fractal functions to perform key updates. Key updates are a crucial step in protecting encryption systems against quantum computing attacks. Traditional key update methods often rely on linear or regular transformations, which can pose security risks in the face of the rapid computational speed of quantum computing. Therefore, the present invention constructs a key evolution mechanism that combines nonlinear chaotic mapping with fractal dynamics. This mechanism allows the key to exhibit high-dimensional nonlinear characteristics in the temporal dimension, ensuring that even if an attacker obtains partial historical keys, it is difficult to infer the generation pattern of future keys. During the key update process, the present invention first constructs a key increment using a chaotic system. Chaotic systems are characterized by their extreme sensitivity to initial values ​​and pseudo-randomness. A suitable chaotic map, such as the Logistic map, the Henon map, or the Arnold map, is selected, and the current key state is used as the initial value input. After several iterations, a new key perturbation term is obtained. This perturbation term not only ensures the decoupling of the key sequence between adjacent moments but also increases the complexity of the key space, making it difficult for attackers to successfully replicate the key update process even if they attempt to establish a prediction model using statistical analysis methods. Furthermore, to further increase the unpredictability of the key, the present invention introduces fractal functions as a supplementary modulation method for key updates. Fractal functions are a type of mathematical structure that exhibits self-similarity at multiple scales. In this invention, they regulate the dynamic step size during the key update process, ensuring that the key update not only exhibits the characteristics of chaotic perturbations but also exhibits different transformation patterns at different time scales, thereby increasing the complexity of the key.

[0047] By combining chaotic mapping and fractal functions, the key update function of the present invention can not only dynamically adjust the key, but also ensure that the key update trajectory has good randomness and security in multidimensional space. Specifically, the key update increment is not only affected by the key state at the previous moment, but also undergoes a nonlinear combination based on the output value of the chaotic map and the modulation factor of the fractal function, so that the key update sequence no longer presents a predictable periodic or linear growth pattern, but instead exhibits a highly complex nonlinear trajectory. In practical applications, this update method can effectively improve the security of the key. Even if the attacker has powerful computing power, it is difficult to reversely infer the future key evolution pattern through numerical analysis methods. In addition, the key update mechanism proposed in the present invention is also highly adaptable and can be optimized for different data encryption requirements. For example, in scenarios with high security requirements, the number of chaotic map iterations can be increased or the dimension of the fractal modulation can be increased, making the key update process more complex and increasing the difficulty of attack. In scenarios with high computational efficiency requirements, the update step size can be adjusted to ensure that the key is updated while reducing computational overhead, meeting the application requirements of resource-constrained environments. Compared with the existing technology, the key management method of the present invention not only improves the security of the data encryption system, but also optimizes the computing efficiency while ensuring the dynamic nature of the key. It can be widely applied to multiple fields such as high-security data storage, quantum communication, and Internet of Things security.

[0048] Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, sample a short vector from a multidimensional Gaussian distribution, and construct a public random matrix; combine the dynamic transformation matrix, short vector, and public random matrix to encrypt the integer vector to obtain ciphertext;

[0049] During the encryption process, the original message requires preprocessing to adapt to subsequent mathematical transformations. The present invention utilizes integer vectorization to convert the original message into a high-dimensional integer vector, allowing the data to participate in subsequent matrix transformations and encryption operations in a numerical manner. This process ensures that the data can be mapped in a high-dimensional space and, by leveraging the properties of integer vectors, makes the encryption process more adaptable to lattice-based security mechanisms. Compared to traditional character encoding conversion, the vectorization method of the present invention fully utilizes the algebraic structure of integer rings, improving computational efficiency while enhancing information recoverability and ensuring data integrity during decryption. After completing integer vectorization, the present invention uses the current key to generate a dynamic transformation matrix. The construction of the dynamic transformation matrix is ​​closely related to the key, and the key at each moment affects the specific values ​​of the transformation matrix, ensuring the dynamic nature of the encryption process at different times. During the matrix construction process, the key is first used to generate a baseline value through a key derivation function. A hash transformation and modular operation are then combined to produce the final transformation matrix. Due to the dynamic key update, the transformation matrix of the present invention can change over time, ensuring that even if the same message is encrypted at different times, the encryption results will be different, greatly enhancing the system's anti-attack capabilities. In addition, the construction method of the transformation matrix ensures the mathematical reversibility of the matrix, so that the decryption end can use the same key to generate the corresponding inverse matrix, thereby realizing data recovery.

[0050] After obtaining the dynamic transformation matrix, the present invention employs a short vector encryption method based on lattice theory to further enhance the security of the ciphertext. The core concept of short vector encryption is to utilize a multidimensional Gaussian distribution to randomly select a short vector from a high-dimensional space and incorporate it into the encryption process as a perturbation term. The introduction of short vectors significantly increases the unpredictability of the ciphertext, making it difficult for an attacker to decipher the original message through computation, even if they possess partial ciphertext information. Compared to traditional encryption methods such as AES and RSA, the present invention utilizes short vectors to construct encryption perturbations, which not only has lower computational complexity but also exhibits extremely high security against quantum attacks. This is because lattice-based encryption methods mathematically rely on solving the short vector problem, which is difficult to solve efficiently even with a quantum computer within the currently known algorithm framework. This ensures that the present invention can maintain high security in future quantum computing environments. In addition, the present invention introduces a public random matrix into the encryption process to increase the randomness of the ciphertext, making it difficult for an attacker to directly decipher the ciphertext, even if they possess partial system parameters. This public random matrix is ​​generated from a known random source and published in a fixed manner, allowing both the sender and receiver to access the matrix without requiring additional key exchange. Its construction incorporates random sampling techniques, resulting in a mathematically uniform distribution of matrix elements, ensuring that no structural bias is introduced into the encryption process. By combining a dynamic transformation matrix, short vectors, and a public random matrix, the encryption process of this invention forms a mathematically complex high-dimensional mapping, rendering the ciphertext virtually unbreakable by attackers and providing extremely high security.

[0051] Step 3: Use the current key and dynamic transformation matrix obtained by synchronous update to decrypt and restore the original message.

[0052] During the decryption process, it is first necessary to ensure that the encryption and decryption keys are updated synchronously. This invention utilizes a composite key update method that combines a quantum entropy source with nonlinear chaotic increments and fractal functions, resulting in a highly complex, nonlinear time series key. Despite the mathematically highly random nature of the key, the invention ensures key synchronization between the encryption and decryption ends, thereby ensuring the feasibility of the decryption process. Specifically, because the key generation and update mechanisms are driven entirely by the same initial conditions and the same chaotic mapping function, as long as the decryption end uses the same initial key and performs calculations according to the preset chaotic iteration rules, the key state at the time of decryption is identical to that of the encryption end. This key synchronization method eliminates the need for external channels for additional key transmission, fundamentally avoiding security risks such as man-in-the-middle attacks and key theft, giving the invention a significant advantage over traditional encryption systems in key management. Once the decryption end successfully synchronizes the key, it reconstructs the dynamic transformation matrix using the current key. Since the dynamic transformation matrix is ​​generated by the key during the encryption process, the decryption end, upon obtaining the same key, can use the same method to construct a consistent dynamic transformation matrix. The main function of this matrix in the encryption phase is to perform a linear transformation on the integer vector, so that the message content is tightly coupled with the key state, thereby forming a highly random ciphertext. In the decryption phase, the inverse matrix of this matrix is ​​used to recover the original message.

[0053] Because the present invention incorporates fractal modulation during the key update process, the key evolution exhibits nonlinear dynamic characteristics. Therefore, the corresponding transformation matrix also changes continuously over time, ensuring the security of the ciphertext. Furthermore, even if an attacker intercepts some historical ciphertext, it is difficult to infer the future form of the encryption matrix. After constructing the dynamic transformation matrix, the decryption end can use its inverse matrix to perform preliminary decryption on the ciphertext, recovering the original message from the obfuscated high-dimensional representation. However, relying solely on the inverse operation of the transformation matrix is ​​not sufficient to fully recover the original message. This is because the present invention also introduces lattice-based short vector perturbations during the encryption process. The presence of these perturbations enhances the security of the ciphertext, but also introduces additional computational challenges to the decryption process. Therefore, in addition to applying the inverse of the dynamic transformation matrix, the short vector perturbations must also be processed during the decryption process. Since the short vector perturbations originate from a multidimensional Gaussian distribution and are statistically estimable, the decryption end can incorporate a short vector sampling mechanism to denoise the ciphertext to extract the original information. The present invention constructs a short vector recovery algorithm so that the decryption end can effectively remove the random noise introduced during the encryption process and ultimately obtain the original integer vector, thereby achieving complete recovery of the data. In addition, the present invention ensures the integrity and tamper resistance of the information during the decryption process. Due to the introduction of short vector perturbations in the encryption process, if the ciphertext is tampered with or lost during transmission, the decryption end will not be able to correctly remove the noise when restoring the integer vector, resulting in decryption failure. Therefore, the present invention can naturally detect data tampering and improve the reliability of the communication system. In contrast, traditional encryption systems usually require additional hash checks or digital signature mechanisms to ensure data integrity, while the present invention uses the characteristics of short vector perturbations to enable data integrity verification to be adaptively embedded in the decryption process, thereby reducing additional computational overhead.

[0054] Example 2: The key at the initial moment is:

[0055] ;

[0056] in, The initial quantum random seed provided by the quantum random number generator is an integer; is the classic entropy source seed, which takes an integer value; Indicates a concatenation operation; It is a secure hash function that outputs a fixed-length binary string and then maps it to an integer; It is a preset large prime number used for modular operations to ensure that the result is within a finite field; It is a modulo operation.

[0057] Specifically, in the key generation process, the quantum random number generator first generates , which is an integer and is directly derived from the uncertainty phenomena of quantum physics systems, such as the measurement collapse of single photons, spin state projections, or vacuum fluctuations. Since the randomness of the quantum entropy source comes from the basic principles of physics, unlike the deterministic algorithm of traditional pseudo-random number generators, its results are truly unpredictable in theory. Using a quantum entropy source alone can significantly improve the security of the key, but considering that the hardware generation rate of quantum random numbers may be subject to certain limitations, and in order to further increase the entropy value of the key, the present invention introduces a classical entropy source into the key construction. The classical entropy source can come from physical or mathematical models such as thermal noise, semiconductor noise or chaotic systems. Its role is to provide additional randomness to increase the complexity of the key and, in some cases, enhance the robustness of the system. and Afterwards, the two random numbers are concatenated Combined together to form an input data stream. This data stream is input into the hash function The purpose of a hash function is to perform a one-way, irreversible transformation on input data, preventing an attacker from effectively inferring other information even if they can observe part of the input or output data. The present invention is applicable to hash functions used in cryptography, such as SHA-3 or BLAKE2. These hash algorithms have strong collision resistance and diffusion properties, allowing even small changes in the input data to significantly affect the output, thereby enhancing the security of the key. The output of a hash function is typically a fixed-length binary string, while the application of a key requires an integer form. Therefore, the present invention further performs integer mapping on the hash output to ensure its suitability for subsequent encryption calculations.

[0058] In order to ensure that the key is distributed in a suitable mathematical space and meets the requirements of finite field operations, the present invention uses modular operations to constrain the hash value to a preset large prime number. In the finite field defined by .in, The selection of is crucial to the security of the system and should be a large prime number to ensure the uniform distribution of the key space and prevent structural deviations of the key due to improper selection of the modulus. The characteristics of the key enable it to maintain good algebraic properties in subsequent mathematical operations, ensuring the operability and anti-attack capability of the system. In the entire key generation process, the hash function and modular operation work together, so that the key not only inherits the high unpredictability of quantum randomness, but also avoids the linear correlation problem that may exist in traditional key generation methods. The introduction of modular operation ensures that the key value is always within a limited range, thereby mathematically avoiding the situation where the key is too large or too small, and ensuring that the key is evenly distributed in a finite field, improving the robustness of the encryption algorithm. In addition, the one-way nature of the hash function means that even if an attacker obtains the key at a certain moment, , and it is difficult to obtain the original seed by reverse deduction and , thereby ensuring the forward security of the key. Compared with the traditional pseudo-random key generation method, the method of combining quantum randomness with a classical entropy source proposed in the present invention has significant advantages in terms of security. Traditional methods usually rely on deterministic algorithms, and their security is mainly based on the assumption of computational complexity. The key generation method of the present invention directly utilizes physical principles to provide a higher level of security, so that even in the future when quantum computers have powerful computing power, it is difficult to crack the entire process of generating keys. On the other hand, the addition of a classical entropy source enables the system to operate normally even when the quantum random number generator may be limited, thereby improving the stability of the key generation process. At the same time, modular operations ensure the mathematical rationality of the key, making the distribution of the key more in line with cryptographic security requirements.

[0059] Example 3: For each moment , the key update function updates the key, the formula is as follows:

[0060] ;

[0061] in, for The key to the moment; for The key to the moment; It is the update increment, which is composed of nonlinear chaotic increment and fractal function.

[0062] Specifically, during the key update process, each moment Key Generate the key for the next moment by performing iterative calculations through hash transformation and modular operation The core expression of the key update function is The structure of this formula ensures the continuity of the key, and at the same time, it uses the one-way nature of the hash transformation to make it possible for an attacker to obtain the key at a certain point in time. , it is also difficult to obtain the previous or subsequent keys through reverse deduction. During the evolution of the key, As a key parameter for key update, it determines the key change pattern. Its essence is composed of nonlinear chaotic increments and fractal functions, aiming to introduce highly complex dynamic characteristics so that the key change trajectory is not linearly predictable. As an update increment, it combines the sensitive dependence of nonlinear chaotic systems and the multi-scale perturbation characteristics of fractal functions. The characteristic of nonlinear chaotic systems is that they are extremely sensitive to initial conditions. Even extremely small initial perturbations can lead to significant state changes after a period of evolution. This characteristic can effectively increase the unpredictability of the key. Common chaotic maps such as the Logistic map, Henon map, or Arnold map can be used to generate high-dimensional chaotic sequences, and the complexity of the chaotic trajectory can be controlled by parameter adjustment. For example, the Logistic map is defined as:

[0063] ,

[0064] in Control the degree of chaos, Within this range, the system enters a completely chaotic state, and this mapping can generate highly unpredictable sequences for constructing key update increments.

[0065] On the other hand, fractal functions mathematically exhibit multi-scale self-similarity, and their core characteristic is the ability to display complex recursive patterns at different levels. In the key update mechanism of the present invention, the role of the fractal function is to introduce additional nonlinear perturbations, so that the evolution process of the key is not only affected by the chaotic system, but also has a more complex mathematical structure. Fractal growth models such as the Mandelbrot series or the Julia set can form dynamic fractal evolution in the time dimension, so that the change trajectory of the key shows complexity at different scales, thereby further improving the security of the key sequence. By adjusting the fractal parameters, the key evolution can maintain a certain degree of randomness in the local range, while still having controllable distribution characteristics in the overall range. This characteristic makes it difficult for attackers to infer the generation rules of future keys through statistical analysis. Hash function It plays a vital role in the key update process. Its one-way nature ensures the forward security of the key, making it impossible for an attacker to obtain the current key even if the attacker obtains the key. , nor can the past or future key values ​​be directly derived. At the same time, the hash transformation can effectively diffuse the influence of the input data, making it possible to There are minor changes, the generated keys It will also show completely different characteristics, thus avoiding the possible pattern tendency in the key update process. In addition, the output length of the hash function is fixed, which controls the value range of the key and avoids the storage and computing overhead caused by the increase of the key length during the calculation process. The introduction of modular arithmetic further enhances the security of key updates. middle, As a preset large prime number, it ensures that the key is always in a finite field The advantage of finite field operations is that they effectively prevent exponential growth of keys during the update process while ensuring uniform key distribution. This ensures that the key value space is not affected by the output characteristics of the hash function, further improving system security. Due to the irreversibility of modular operations, even if an attacker obtains the key at a certain moment, it is difficult to directly infer its generation path, thus enhancing the irreversibility of the key update process.

[0066] Example 4: Update Increment Use the following formula to express it:

[0067] ;

[0068] in, is the nonlinear chaotic increment; for The quantum random seed generated by the quantum random number generator at the moment is in the range arrive between; for The chaotic variable obtained by Logistic mapping at the moment takes the value The update formula is:

[0069] ;

[0070] for Chaotic variables at each moment; The value range is ; is the nonlinear amplification index, used to enhance the chaotic variable the impact of; is a bitwise XOR operation, since is a real number, first Round and then Perform bitwise XOR operation; To floor the function, convert the real number to an integer; is a sinusoidal modulation function; where is the angular frequency, which controls the period of the sinusoidal modulation function; is the phase, used to adjust the offset of the sinusoidal modulation function;

[0071] is a fractal function; is an integer subscript index; is the number of fractal function terms; is the fractal scaling factor.

[0072] Specifically, in this formula, the composition of nonlinear chaotic increments is first considered. At each moment, the quantum random number generator outputs a value whose range is limited to arrive This part comes from the measurement uncertainty in quantum physics, which provides the basic physical randomness for the entire system. In order to introduce additional nonlinear perturbations, the present invention uses the chaotic variables obtained by Logistic mapping. The chaotic variable obeys the classic Logistic mapping update formula, namely:

[0073] ,

[0074] The parameters The value range is , ensuring that the system is in a chaotic state, so that In each iteration, it shows extremely sensitive dependencies. The impact on the update process, the nonlinear amplification exponent is introduced into the formula , so that by calculating Then with Perform a bitwise XOR operation , thus embedding the randomness and amplification effect of chaotic variables directly into the key update. is a real number, and the XOR operation requires the operand to be an integer, so in the calculation This step ensures the legitimacy and consistency of the entire operation under the discrete mathematics framework. Multiply, where the angular frequency and phase By controlling the periodicity and initial offset of the sine wave separately, sinusoidal modulation can introduce periodic changes in time, so that the update increment exhibits different amplitude characteristics at different time points, thereby further preventing the exposure of periodic patterns. The other part of the fractal function is derived from the mathematical properties of self-similar structures in fractal theory. Its basic form is:

[0075] .

[0076] In this expression, is the fractal scaling factor, which can generate complex and delicate perturbations at multiple scales by weighted summation of cosine functions at different scales. Used to adjust the contribution of each term in the overall sum, so that As the cosine function increases, the influence of the high-order terms gradually decreases, while the low-order terms play a dominant role. Chaotic variables at different scales By performing periodic mapping, the fractal function exhibits nonlinear and unpredictable oscillation characteristics at different time scales. This design introduces a multi-scale self-similar perturbation into the update increment, making the entire key update process not only highly uncertain locally but also globally difficult to capture by any statistical model.

[0077] The nonlinear chaotic increment and fractal function are processed by bitwise XOR operation. Combined, its purpose is to mathematically achieve the effective superposition of two different random sources, thereby making the update increment The value of is extremely complex both locally and globally. This bitwise XOR operation is irreversible, so even if an attacker can partially obtain the information of a certain component, it is difficult to restore the complete increment value. In addition, in order to ensure that the update increment remains within the appropriate range, the entire result is subjected to a modular operation. 's restrictions, thus Limited to finite fields This not only ensures the effective operation of the subsequent key update function on the finite field, but also avoids the risk of numerical overflow or other calculation anomalies. Through this design, the present invention draws the essence from quantum randomness, chaos theory and fractal geometry, and organically combines them to make the key update increment It not only has extremely high entropy and randomness in theory, but also exhibits highly nonlinear and multi-scale perturbation characteristics in actual calculations. It is precisely this multi-level and multi-angle randomness guarantee that makes it difficult for attackers to predict or reconstruct the key update process through reverse deduction or statistical analysis even when quantum computers have powerful computing power in the future, thus ensuring the security and stability of the system in long-term operation. Specifically, quantum random numbers Provides absolute randomness at the physical level, chaotic variables and its nonlinear amplification index The sensitive dependence of the classical nonlinear dynamic system is introduced into the key update, and the sinusoidal modulation function and fractal functions The mathematical structure of the entire update increment is enriched from the perspectives of periodic modulation and multi-scale self-similarity. This multi-dimensional and multi-level design concept enables each key update to present new and unpredictable mathematical characteristics, thereby providing solid theoretical support and technical guarantees for data encryption and dynamic key management. In practical applications, the key update mechanism based on this update increment construction can effectively resist various modern cryptographic attacks, especially in the face of the challenges brought by future quantum computing. Traditional key update methods often rely on fixed or linear transformations, while the present invention greatly improves the complexity and uncertainty of the key update process by introducing nonlinear mechanisms of chaos and fractals, making it difficult for attackers to predict the generation of future keys through mathematical models even if they have mastered some historical keys. At the same time, modular operations limit the entire process to a limited numerical domain, ensuring the stability and computational efficiency of the system. Such a design is not only applicable to the fields of distributed network communications and data storage security, but also plays an important role in financial transactions, identity authentication and other application scenarios that require high security. In addition, the update increment formula adopted by the present invention can be parameter-adjusted according to the requirements of different application scenarios during the specific implementation process. For example, the parameter It can be scaled up or down according to security requirements, affecting the chaotic variables Contribution to the update increment; angular frequency and phase It can be optimized and adjusted according to the time synchronization requirements of the system to ensure that the sinusoidal modulation function can provide appropriate disturbance within the predetermined time period; the fractal scaling factor Sum of terms The choice of can also be flexibly configured based on the system's requirements for multi-scale perturbations, thereby ensuring security while balancing computational complexity and implementation efficiency. This parameterized design approach makes the key update mechanism of the present invention highly adaptable and scalable, and can achieve the optimal balance between security and performance based on actual needs.

[0078] Example 5: In step 2, the process of preprocessing the original message into an integer vector specifically includes: using UTF-8 encoding to convert the original message into an integer vector. Convert to a byte sequence: ;in Indicates the bytes, is the total number of bytes; ; Let the dimension of the integer vector to be generated be , which is divided into groups, and define the number of bytes contained in each group as If the last group is insufficient bytes, use the filling method to fill; for the groups, , define its corresponding integer for:

[0079] ;

[0080] Among them When, define ; Each group of bytes is considered a An unsigned integer of bytes, where the highest bit corresponds to the first byte and the lowest bit corresponds to the last byte; As the weight factor, each byte is mapped to its corresponding bit weight in the integer; to ensure that the subsequent operations are within the module The constructed integers satisfy ;like Known and greater than the maximum value that can be represented by a single group , then we can directly get the integer vector: ;in, is an integer vector; otherwise, the modulo operation will Further mapping updates: ; is the integer after the mapping is updated, as a component in the integer vector; Indicates that all lengths are A vector where each component comes from the modulus The set of integers in the sense .

[0081] Specifically, in the first step of message conversion, the original message After UTF-8 encoding, it forms a byte sequence. , where each It is a byte with a value range of . UTF-8 is a variable-length encoding method that can efficiently represent characters in different languages ​​while ensuring compatibility with existing computer systems. In this encoding method, a character may be represented by 1 to 4 bytes, so in practical applications, different messages may be mapped to byte sequences of different lengths. In order to ensure that all data can be encrypted according to unified rules, the present invention further stipulates that the byte sequences are grouped according to certain rules so that they can be mapped to the integer space. In the grouping process, the dimension of the integer vector to be generated is set to , the byte sequence of the message is divided into Groups, each containing Bytes. When the last group of bytes is insufficient When , padding is used to ensure that all packets have the same number of bytes. Zero padding can be used, which adds zero-valued bytes to the last group to ensure consistent data format across all packets. This approach ensures that the dimension and format of the integer vector are unaffected by the length of the original message, allowing all data to be evenly mapped into the integer vector space without causing encryption calculation anomalies due to byte mismatches.

[0082] For each group, the present invention defines an integer To represent the byte set of the group, and use the weight mapping method to convert. Specifically, each byte pass Calculate the integer ,in As a weighting factor, it is used to ensure that the high-order byte has a greater contribution to the value, while the low-order byte has a smaller impact. This conversion method is similar to the big-endian integer representation, that is, the highest-order byte corresponds to the highest bit of the integer, and the lowest-order byte corresponds to the lowest bit of the integer, thus ensuring that the converted integer can accurately represent the original data while maintaining the recoverability of the data. When a byte exceeds the range of the original message, that is, When , the byte is defined as zero according to the padding rules to prevent invalid data from affecting the calculation results. This integer mapping method ensures that messages of different lengths can be converted into integer vectors according to the same rules, making the input format of the encryption system stable and scalable. In order to make the integer vector suitable for the module Finite field operations, the present invention further stipulates that all integers Must meet ,in Is a predefined prime number or large integer used to control the security parameters of the encryption system. The value of is large enough so that all possible integers are smaller than , we can directly get the integer vector , used for subsequent encryption calculations. However, in some application scenarios, May be less than , that is, a single packet may generate more than The integer value of , so the present invention adopts modular operation Map it to a finite field , so that all integers are limited to the legal range. This modular operation ensures that the numerical value of the data remains mathematically stable, while preventing the integer value from exceeding the computable range, thereby improving the security and computing efficiency of the system. Through this integer vectorization preprocessing, the present invention not only realizes the conversion of data from character strings to mathematical vectors, so that encryption operations can be efficiently calculated within a finite field, but also ensures the structure of the data, so that the original message can be accurately restored during decryption. Compared with the traditional direct character encoding encryption method, this preprocessing method has higher security and mathematical operability. On the one hand, the use of integer vectorization can effectively avoid the decryption mismatch problem caused by differences in character sets or encoding formats, ensuring that all data can be encrypted and decrypted according to unified mathematical rules. On the other hand, this method enables the encryption system to be optimized based on mathematical tools such as linear algebra and lattice theory, for example, by constructing random transformation matrices or lattice basis transformations, so that the encryption process has stronger anti-attack capabilities. In addition, the use of integer vectorization in the present invention can also make the encryption method more adaptable to different types of data input. For example, when dealing with data in different languages ​​or formats, UTF-8 encoding can ensure the integrity of the original information, while integer vectorization ensures that the data can be mapped into the same mathematical space, without affecting the correctness of encryption operations due to different encoding formats. This method has important application value in future quantum security environments, especially in the context of the potential threat of quantum computers to traditional public-key cryptography algorithms. Integer vectorization can effectively improve the security of keys, making them more vulnerable to quantum computing attacks.

[0083] Example 6: In step 2, the dynamic transformation matrix is ​​constructed using the current key through the following formula: :

[0084] ;

[0085] in, is an integer subscript index; is the imaginary number symbol; is a pre-fixed, mutually inequivalent and reversible permutation matrix with dimension ; each All satisfied ; is a positive real number used as a scaling parameter.

[0086] Specifically, the dynamic transformation matrix The core structure of is composed of multiple element-wise cascade sums, where each term contains an exponential function and a predefined reversible permutation matrix. The role of the exponential function is to By performing nonlinear mapping, a small change in the key can cause a large-scale disturbance in the matrix, thereby enhancing the security of the key update process. In the formula, Rounding operation As a quantization operation, the key is discretized so that the transformation structure of the matrix shows a jump-like dynamic adjustment characteristic as the key changes. This quantization process can effectively avoid linear correlation and improve the independence of the transformation matrix under different key states, thereby reducing the risk of the key being guessed or reconstructed. middle, As a phase factor, ensure that the change in the exponential term is affected by the modulus Constraints allow the construction of the transformation matrix to operate within a finite domain. This exponential mapping method, similar to the exponential transform in Fourier analysis, projects the numerical characteristics of the key onto the complex plane, ensuring that the transformation matrix not only contains linear transformation information but also possesses the properties of the complex domain, thereby increasing the difficulty for attackers to infer the key. In particular, in the face of quantum computing attacks, this exponential mapping can enhance the randomness of the key in the complex domain, preventing it from being efficiently solved by algorithms such as the quantum Fourier transform.

[0087] Permutation Matrix It plays a key role in the construction of dynamic transformation matrix. is a dimension of An invertible matrix that satisfies , that is, the determinant of the matrix is ​​non-zero, thus ensuring that the matrix has good reversibility. In the encryption process, the role of the permutation matrix is ​​to provide nonlinear transformation, so that the data undergoes complex arrangement and replacement under the action of the transformation matrix, thereby increasing the unpredictability of the ciphertext. They are not equivalent to each other, that is, they are independent of each other in mathematical structure, so the key By index Choose different The combination makes the transformation matrix have a unique arrangement at different times, further enhancing the security of the encryption scheme. As a scaling factor, it controls the influence of the key in the transformation matrix. The value can make the key change have a gentle impact on the transformation matrix, and a smaller The value will cause a slight change in the key to cause a drastic change in the matrix. The selection of needs to balance the stability and security of calculation. If it is too small, the transformation matrix may change too drastically during the key update process, affecting the stability of the calculation; if If it is too large, it may reduce the sensitivity of the key, making the difference of the transformation matrix at different times insufficient, affecting the security of the encryption system. It is necessary to optimize according to the specific security requirements and computing environment so that the transformation matrix can maintain appropriate dynamic changes under different key states while ensuring the matrix's reversibility and computational efficiency. The design of this dynamic transformation matrix has significant security advantages compared to the traditional fixed transformation matrix scheme. First, by combining exponential transformation and rounding operations, the construction process of the transformation matrix has a highly nonlinear characteristic, thereby avoiding linear algebra attacks or statistical analysis attacks. Second, due to the permutation matrix Pre-fixed and not equivalent, the transformation matrix at each moment is composed of different The key is generated by combining the key and the data. Therefore, even if an attacker obtains partial key information, it is difficult to infer the complete key update rules through matrix analysis. In addition, the reversibility of the dynamic transformation matrix ensures the correctness of the decryption process. That is, using the same key to generate the corresponding inverse transformation matrix at the decryption end can effectively restore the original data, thus ensuring the usability of the encryption system.

[0088] Example 7: In step 2, the integer vector is encrypted using the following formula to obtain the ciphertext :

[0089] ;

[0090] in, To disclose random matrices, their structures satisfy the properties of ideal lattices; is a short vector sampled from a discrete Gaussian distribution; is a noise vector used to mask the lattice structure, satisfying .

[0091] Specifically, is a public random matrix with dimension , whose elements belong to the finite field , and satisfies the characteristics of the ideal lattice. The ideal lattice is a special type of lattice structure with strong mathematical symmetry, which makes the computational complexity of the encryption process maintain high security under the standard lattice assumption. The introduction of ensures the randomness of the ciphertext, so that the same message will not produce the same ciphertext when encrypted at different time points, thus preventing replay attacks and statistical analysis attacks. In addition, the construction of the random matrix is ​​based on the mathematical properties of the ideal lattice, which enables the encryption process to be calculated in a high-dimensional lattice space, increasing the complexity of the ciphertext while ensuring that the original data can be correctly restored during the decryption process. In the encryption process, the short vector is a random vector sampled from a discrete Gaussian distribution, whose elements belong to The discrete Gaussian distribution is a probability distribution commonly used in lattice cryptography. Its characteristic is that it can provide shorter random vectors while ensuring that their values ​​obey the normal distribution, thereby enhancing the security of the encryption system. The role of is to increase the unpredictability of the ciphertext, making it difficult for an attacker to derive the key or original message through linear algebra methods even if they have mastered some system parameters. Since each element of the short vector comes from a discrete Gaussian distribution, the complexity of the data during the encryption process is mathematically guaranteed and can effectively resist linear algebra attacks and lattice reduction attacks. Noise vector Is another key parameter, its role is to further conceal the lattice structure of the ciphertext, making it impossible for attackers to deduce the original data through the mathematical properties of the ciphertext. Taken from a finite field , and meet , that is, the maximum absolute value of each element does not exceed 2. The introduction of this noise ensures that the degree of disturbance of the data during the encryption process is within a controllable range, while enhancing the security of the encryption algorithm. In lattice cryptography, the introduction of noise is usually used to enhance the system's anti-attack capability, making it difficult for the attacker to recover the original message by solving the lattice basis or other mathematical methods even if he has some prior information. Noise vector The design makes the encryption process show strong nonlinear characteristics in mathematics, ensuring that it is difficult for attackers to solve the key through simple algebraic operations or optimization algorithms. Dynamic transformation matrix Depends on the current key Combined with the exponential mapping and permutation matrix, the encryption process at each moment has different mathematical characteristics. The role of the dynamic transformation matrix is ​​to transform the original integer vector Mapping to the encryption space makes the ciphertext dependent not only on the original message but also affected by the current key state. Because the structure of the dynamic transformation matrix changes over time, even if an attacker obtains partial ciphertext information, it is difficult to deduce the evolution of the original data or key through reverse analysis. This design makes the encryption scheme more secure over time, thereby enhancing the system's resistance to attacks.

[0092] Example 8: In step 3, the pseudo-inverse of the dynamic transformation matrix is ​​calculated by using the key at the current moment and the dynamic transformation matrix obtained by synchronous update. , and then decrypt it using the following formula to get the intermediate integer vector:

[0093] ;

[0094] in, is the intermediate integer vector; the original message is restored through inverse mapping .

[0095] Specifically, in the data encryption and dynamic key management method based on the quantum security protocol of the present invention, the decryption process described in Example 8 relies on the key that is kept updated synchronously between the decryption end and the encryption end. , and use the key to generate a dynamic transformation matrix To restore the original data, the encryption end performs pseudo-inverse on the integer vector When processing, a random matrix is ​​constructed containing , short vector , noise vector And the dynamic transformation matrix The encryption formula is used to obtain the ciphertext The decryption end is at the same time Get the key for synchronous updates and is generated using the same algorithm as the encryption end , then in a finite field Calculated in To perform the reverse mapping. In this process, in order to ensure the correctness of the decryption result, the ciphertext With random matrix and short vectors The product of , and the noise vector The interference with the original message is removed from the encrypted expression.

[0096] Since the noise vector The value of , and short vector Coming from a discrete Gaussian distribution, its norm remains relatively small in the higher probability range, so the decryption end is known 、 、 ,as well as Under these circumstances, the noise and randomization items introduced during encryption can be accurately offset, thus restoring the original The integer values ​​are the same or have only padding differences. Through the above inverse transformation, the intermediate integer vector Then it can go through the corresponding de-mapping process before encryption to reassemble into a byte sequence and restore the original message In this process, the key to the successful inverse transformation of the decryption end is to synchronously obtain the correct dynamic transformation matrix The reversibility of the matrix also comes from the design requirements of the encryption end when constructing the matrix, that is, to ensure In the model If the attacker does not know the exact If the value is not found, the correct inverse matrix cannot be constructed, and the noise and short vector effects cannot be eliminated during the decryption process. The processing can be based on lattice theory and random masking, and then superimposed on the nonlinear perturbation generated by the dynamic transformation matrix, thereby improving the security of the system. In particular, the key dynamic update mechanism proposed by the present invention makes The system changes rapidly in time series. Even if the key or noise information at a certain moment is leaked, it is still impossible to infer the encryption or decryption parameters at other moments, forming a highly dynamic system that is difficult to track. During the entire decryption process, the introduction of synchronous updates ensures that the encryption end and the decryption end are synchronized at all times. The exact match enables both parties to generate completely consistent Once the matrix is ​​inconsistent between the encryption and decryption ends, the inverse multiplication operation will fail, and decryption will not be successful. In this way, when the system faces active attacks or eavesdropping, the attacker not only has to face the high complexity of the lattice cryptographic problem, but also has to deal with the additional difficulty caused by the evolution of the key over time. The present invention further increases the acquisition of high entropy sources such as quantum random number seeds and chaotic functions at both the encryption and decryption ends. Especially as quantum computing approaches practical application, the traditional public key encryption system based on the problem of large number decomposition faces potential risks. The solution combining lattice theory and quantum randomness can significantly enhance the system's resistance. In addition, short vector and noise vector The introduction of lattice-based encryption ensures that the decryption process can still be successfully restored even in the post-quantum era. It will not be affected by the high-speed calculation of quantum algorithms. Under this multi-layer defense structure, if the attacker lacks the current , it is impossible to eliminate the noise vector, nor to overcome the double randomization barrier of the dynamic transformation matrix and the short vector, let alone restore And solve At this point, Example 8 constructs the same , and in the model Perform inverse transformation in the sense of and and multiply Recover the intermediate integer vector , thus completing the entire decryption process. Finally, it is only necessary to reversely disassemble according to the same byte group mapping strategy as before encryption, and the Restore to original message .

[0097] Embodiment 9: The method further comprises: after obtaining the intermediate integer vector, performing dynamic authentication verification on the intermediate integer vector, specifically comprising: when transmitting the ciphertext, pre-setting the authentication tag of the message Embed ciphertext; Perform discrete cosine transform to obtain frequency domain representation ; For discrete cosine transform operation; using dynamic key With the current time step Generate a dynamic mask :

[0098] ;

[0099] in, is the key scaling parameter, adjust The amplitude of the sine function; then, the frequency domain representation Perform bitwise XOR with the dynamic mask to obtain a new frequency domain vector Finally, Restored to time domain message through inverse discrete cosine transform ; Inverse discrete cosine transform operation; generate a check value based on the time domain message ;Will and Compare them and if they are consistent, it is determined that the original message has not been tampered with, and the dynamic authentication verification is completed.

[0100] Specifically, when encrypting a message and generating ciphertext, the authentication tag of the original message is It is pre-embedded in the ciphertext so that the decryption end can verify the message consistency in the subsequent process. In order to cover and verify the data more flexibly, the present invention uses discrete cosine transform to Mapped to the frequency domain, we get a frequency domain representation At this time, in order to further enhance the dynamic and random nature of the verification, the present invention uses the key at the current moment The time step of the decryption end Construct a dynamic mask , the mask is incorporated into the Parameters such as α and β are used to adjust its amplitude and phase, thereby producing differentiated masking effects at different times. Then, the system represents the frequency domain Perform bitwise XOR with the dynamic mask to obtain a new frequency domain vector Since the XOR operation is irreversible in a finite field, even if an attacker intercepts the frequency domain data at this time, it is difficult to infer the original vector from it or tamper with it without being discovered. In order to restore it to the time domain representation, the present invention uses the inverse discrete cosine transform to Convert to , so that the time domain data at this time has been superimposed with the dynamic disturbance introduced by the key and time step. The present invention then uses the hash function to generate the check value , here, is a time domain vector formed after frequency domain masking and inverse transformation, and and It is a key parameter that can be updated synchronously and kept confidential. The system finally compares this new check value with the embedded Compare them. If the two are exactly the same, it means that the message has not been tampered with during the transmission and decryption process; if they are inconsistent, it means that the data may have been modified by an attacker, and it is necessary to issue an alarm or take protective measures in time.

[0101] The present invention has been described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core ideas of the present invention. It should be noted that, for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications may be made to the present invention, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A data encryption and dynamic key management method based on a quantum security protocol, characterized in that: The method comprises: Step 1: Select the initial quantum random seed and the classical entropy source seed to generate the key at the initial moment; at each moment, update the key by constructing the key update function through the nonlinear chaotic increment and fractal function to update the increment; Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, sample a short vector from a multidimensional Gaussian distribution, and construct a public random matrix; combine the dynamic transformation matrix, short vector, and public random matrix to encrypt the integer vector to obtain ciphertext; Step 3: Use the current key and dynamic transformation matrix obtained by synchronous update to decrypt and restore the original message; Update Increment Use the following formula to express it: ; in, is the nonlinear chaotic increment; for The quantum random seed generated by the quantum random number generator at the moment is in the range arrive between; for The chaotic variable obtained by Logistic mapping at the moment takes the value The update formula is: ; for Chaotic variables at each moment; The value range is ; is the nonlinear amplification index, used to enhance the chaotic variable the impact of; is a bitwise XOR operation, since is a real number, first Round and then Perform bitwise XOR operation; To floor the function, convert the real number to an integer; is a sinusoidal modulation function; where is the angular frequency, which controls the period of the sinusoidal modulation function; is the phase, used to adjust the offset of the sinusoidal modulation function; is a fractal function; is an integer subscript index; is the number of fractal function terms; is the fractal scaling factor; It is a preset large prime number used for modular operations to ensure that the result is within a finite field.

2. The data encryption and dynamic key management method based on quantum security protocol according to claim 1, characterized in that: The initial key is: ; in, The initial quantum random seed provided by the quantum random number generator is an integer; is the classic entropy source seed, which takes an integer value; Indicates a concatenation operation; It is a secure hash function that outputs a fixed-length binary string and then maps it to an integer; It is a modulo operation.

3. The data encryption and dynamic key management method based on quantum security protocol according to claim 2, characterized in that: For every moment , the key update function updates the key, the formula is as follows: ; in, for The key to the moment; for The key to the moment; It is the update increment, which is composed of nonlinear chaotic increment and fractal function.

4. The data encryption and dynamic key management method based on quantum security protocol according to claim 3, characterized in that: In step 2, the process of preprocessing the original message into an integer vector specifically includes: using UTF-8 encoding to convert the original message into an integer vector. Convert to a byte sequence: ;in Indicates the bytes, is the total number of bytes; ; Let the dimension of the integer vector to be generated be , which is divided into groups, and define the number of bytes contained in each group as If the last group is insufficient bytes, use the filling method to fill; for the groups, , define its corresponding integer for: ; Among them When, define ; Each group of bytes is considered a An unsigned integer of bytes, where the highest bit corresponds to the first byte and the lowest bit corresponds to the last byte; As the weight factor, each byte is mapped to its corresponding bit weight in the integer; to ensure that the subsequent operations are within the module The constructed integers satisfy ;like Known and greater than the maximum value that can be represented by a single group , then we can directly get the integer vector: ;in, is an integer vector; otherwise, the modulo operation will Further mapping updates: ; is the integer after the mapping is updated, as a component in the integer vector; Indicates that all lengths are A vector where each component comes from the modulus The set of integers in the sense .

5. The data encryption and dynamic key management method based on quantum security protocol according to claim 4, characterized in that: In step 2, the dynamic transformation matrix is ​​constructed using the current key through the following formula: : ; in, is an integer subscript index; is the imaginary number symbol; is a pre-fixed, mutually inequivalent and reversible permutation matrix with dimension ; each All satisfied ; is a positive real number used as a scaling parameter.

6. The data encryption and dynamic key management method based on quantum security protocol according to claim 5, characterized in that: In step 2, the integer vector is encrypted using the following formula to obtain the ciphertext : ; in, To disclose random matrices, their structures satisfy the properties of ideal lattices; is a short vector sampled from a discrete Gaussian distribution; is a noise vector used to mask the lattice structure, satisfying .

7. The data encryption and dynamic key management method based on quantum security protocol as claimed in claim 6, characterized in that: In step 3, the pseudo-inverse of the dynamic transformation matrix is ​​calculated using the key and dynamic transformation matrix obtained by synchronous update at the current moment. , and then decrypt it using the following formula to get the intermediate integer vector: ; in, is the intermediate integer vector; the original message is restored through inverse mapping .

8. The data encryption and dynamic key management method based on quantum security protocol as claimed in claim 7, characterized in that: The method further comprises: after obtaining the intermediate integer vector, performing dynamic authentication verification on the intermediate integer vector, specifically comprising: when transmitting the ciphertext, pre-setting the authentication tag of the message Embed ciphertext; Perform discrete cosine transform to obtain frequency domain representation ; For discrete cosine transform operation; using dynamic key With the current time step Generate a dynamic mask : ; in, is the key scaling parameter, adjust The amplitude of the sine function; then, the frequency domain representation Perform bitwise XOR with the dynamic mask to obtain a new frequency domain vector Finally, Restored to time domain message through inverse discrete cosine transform ; Inverse discrete cosine transform operation; generate a check value based on the time domain message ;Will and Compare them and if they are consistent, it is determined that the original message has not been tampered with, and the dynamic authentication verification is completed.

Citation Information

Patent Citations

  • Public key encryption method based on cells

    CN110138752A

  • Dynamic encryption coding method based on serial cascade convolution

    CN118590184A