Data encryption and dynamic key management method based on quantum security protocol
Through the data encryption and dynamic key management method based on quantum security protocol, quantum random numbers, chaotic mapping and grid-based encryption methods are used to solve the problem of traditional encryption technology being cracked in the quantum computing environment, and high-security and quantum attack-resistant data encryption and key management are realized.
Patent Information
- Application Number
- CN202510412323.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-03
AI Technical Summary
Existing encryption technologies may be efficiently cracked when facing quantum computers, and traditional key management has the defect of static keys being easily attacked, making it difficult to build high-security and quantum attack-resistant data encryption and key management methods.
The data encryption and dynamic key management method based on the quantum security protocol are adopted to generate dynamic keys through quantum random numbers and chaotic mapping. Combined with the encryption method based on grid theory, dynamic transformation matrix and pseudo-inverse matrix are introduced, and discrete cosine transformation and dynamic mask authentication mechanisms are used to detect data integrity and defend against tampering and replay attacks.
A high-security and quantum attack-resistant data encryption scheme is realized, which enhances the unpredictability and attack resistance of the key, ensures the long-term security of the data in the quantum computing environment, and improves the dynamics and complexity of the system.
Smart Images

Figure CN119921951A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption, 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 one of the core issues 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, in the process of information exchange and storage, data faces many security challenges, including but not limited to unauthorized access, data tampering, replay attacks, and quantum computing threats. 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 and have strong security guarantees in classical computing environments. However, these encryption schemes may be efficiently cracked when facing quantum computers. Therefore, how to build a highly secure, quantum-resistant data encryption and key management method has become an important issue that needs to be urgently addressed in the current information security field.
[0003] Existing data encryption schemes mainly include symmetric encryption, public key encryption, and encryption methods based on lattice theory. Among them, symmetric encryption algorithms, such as AES, encrypt and decrypt data through a fixed-length key, and have the advantages of high computational efficiency and convenient hardware implementation. However, the key distribution and management problem of symmetric encryption is its main bottleneck. Once the key is leaked, the attacker can easily decrypt all encrypted data. Public key encryption algorithms, such as RSA and ECC, are widely used in data encryption, identity authentication, and digital signatures. RSA relies on the problem of large integer decomposition, and its security is determined by the key length. However, Shor's quantum algorithm can efficiently decompose large integers in polynomial time, thereby completely breaking the RSA system. Even if a 4096-bit RSA key is used, it may be cracked in a short time on a quantum computer. ECC is considered to be a safer choice than RSA due to its shorter key length and higher computational efficiency, but its security depends on the elliptic curve discrete logarithm problem and is also unable to resist quantum computing attacks. Therefore, the public key encryption system needs a new security foundation to ensure its feasibility in the future quantum computing environment. Summary of the invention
[0004] The purpose of the present invention is to provide a data encryption and dynamic key management method based on a quantum security protocol, and realize a data encryption scheme with high security and resistance to quantum attacks. Dynamic keys are generated by quantum random numbers and chaotic mapping, making the keys unpredictable at different time steps and enhancing the anti-attack capability; an encryption method based on lattice theory is adopted to increase the complexity of data encryption and ensure that it is still safe even with the development of quantum computers; a dynamic transformation matrix is introduced to make the ciphertext structure change with the key to prevent pattern recognition attacks; in the decryption process, the pseudo-inverse matrix is used to restore the data to ensure data reversibility; at the same time, the authentication mechanism of discrete cosine transform and dynamic mask is combined to detect data integrity and defend against tampering and replay attacks.
[0005] In order 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: 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, construct the key update function by forming the update increment through the nonlinear chaotic increment and the fractal function to update the key; Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, obtain a short vector by sampling from a multidimensional Gaussian distribution, and construct a public random matrix; encrypt the integer vector by combining the dynamic transformation matrix, the short vector, and the public random matrix to obtain the ciphertext; Step 3: Use the current key and dynamic transformation matrix obtained through synchronous update to decrypt and restore the original message.
[0006] Furthermore, the key at the initial moment is: ; in, is the initial quantum random seed provided by the quantum random number generator, which takes an integer value; is the seed of the classic entropy source, which takes an integer value; Indicates a serial 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.
[0007] Furthermore, for each 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; To update the increment, it is composed of nonlinear chaotic increment and fractal function.
[0008] Further, update increments 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 any time has a value of The update formula is: ; for Chaotic variables at each moment; The value range is ; is the nonlinear amplification index, used to enhance the chaotic variables The impact of is a bitwise XOR operation, since is a real number, first After rounding, 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.
[0009] 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 sequence of bytes: ;in Indicates 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 padding method to fill them; 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 in 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 updated integer after mapping, 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 .
[0010] Furthermore, 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 meet ; is a positive real number used as a scaling parameter.
[0011] Furthermore, 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 .
[0012] Furthermore, in step 3, the pseudo-inverse of the dynamic transformation matrix is calculated 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: ; in, is the intermediate integer vector; the original message is restored through inverse mapping .
[0013] 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 get 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, adjusting The amplitude of the sine function in the frequency domain is then Perform bitwise XOR with the dynamic mask to get 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.
[0014] The data encryption and dynamic key management method based on quantum security protocol of the present invention has the following beneficial effects: The present invention adopts a dynamic key management mechanism, which breaks through the defect that static keys in traditional encryption methods are easily attacked. In existing encryption technologies, keys are often fixed. Once cracked, the security of the entire system will be threatened. The present invention introduces a combination of quantum random number seeds and classical entropy sources to update the key at each time step, and increases the unpredictability of the key through chaotic systems and fractal functions. This way of dynamic key evolution makes it impossible for an attacker to infer the future key change rules even if he obtains the key at a certain point in time, thereby effectively resisting side channel attacks, statistical analysis attacks, and brute force attacks.
[0015] Secondly, since 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, which are still difficult to solve 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.
[0016] 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 dynamics 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 may 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
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0018] Figure 1 A method flow chart of a data encryption and dynamic key management method based on a quantum security protocol provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0020] Example 1, reference Figure 1 :Data encryption and dynamic key management method based on quantum security protocol, the method comprising: 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, construct the key update function by forming the update increment through the nonlinear chaotic increment and the fractal function to update the key; The basis of quantum security protocol lies in the uncertainty principle of quantum physics, whose characteristics determine that quantum random number generator (QRNG) can provide truly unpredictable random numbers. Compared with traditional pseudo-random numbers, quantum random numbers cannot be predicted and reproduced in theory, which can significantly enhance the security of key generation. The present invention first selects a quantum entropy source as the core random source of the initial key, and uses quantum physical phenomena such as quantum measurement collapse effect, vacuum fluctuation noise or spin state measurement to obtain the initial quantum random bit string. Due to the limited rate of quantum random number generation, in order to improve the key entropy value and enhance the randomness of the system, the present invention further combines the classical entropy source seed, such as the classical random bit stream based on thermal noise, semiconductor noise or chaotic signal, and fuses it with the quantum random bit stream to form a composite entropy pool. Based on this, the present invention uses an exclusive OR operation to combine the quantum random number and the classical entropy source bit stream, so that the final initial key has a higher randomness, while avoiding the security risks that may be caused by a single entropy source.
[0021] After obtaining the initial key, the present invention adopts a composite method based on nonlinear chaotic increment and fractal function to update the key. Key update is an important link in the encryption system's resistance to quantum computing attacks. Traditional key update methods often rely on linear or regular transformations, which may have certain security risks in the face of the rapid solution capability of quantum computing. Therefore, the present invention constructs a key evolution mechanism combining nonlinear chaotic mapping and fractal dynamics, so that the key presents high-dimensional nonlinear characteristics in the time dimension, so as to ensure that even if the attacker obtains part of the historical key, it is still difficult to infer the generation mode of the future key. In the key update process, the present invention first constructs a key increment through a chaotic system. The characteristics of the chaotic system are that it is extremely sensitive to the initial value and has pseudo-randomness. Select a suitable chaotic map, such as Logistic mapping, Henon mapping or Arnold mapping, and use the key state at the current moment 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 enhances the complexity of the key space, so that even if the attacker attempts to establish a prediction model through a statistical analysis method, it is difficult to successfully reproduce the key update process. In addition, in order to further increase the unpredictability of the key, the present invention introduces fractal function as a supplementary modulation means for key update. Fractal function is a type of mathematical structure that has self-similarity at multiple scales. Its role in the present invention is to adjust the dynamic step size in the key update process, so that the key update not only has the characteristics of chaotic disturbance, but also can show different transformation laws at different time scales, thereby increasing the complexity of the key.
[0022] Combining chaotic mapping and fractal function, 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 of the previous moment, but also nonlinearly combined according to the output value of the chaotic mapping 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 shows a highly complex nonlinear trajectory. In practical applications, this update method can effectively improve the security of the key. Even if the attacker has strong computing power, it is difficult to reverse the future key evolution mode through numerical analysis methods. In addition, the key update mechanism proposed by the present invention also has good adaptability, and can optimize parameters for different data encryption requirements. For example, in the scenario of high security requirements, the number of iterations of the chaotic mapping can be increased or the dimension of the fractal modulation can be increased, making the key update process more complicated and increasing the difficulty of attack; and in the scenario with high requirements for computing efficiency, the update step size can be adjusted to ensure that the key is updated while reducing the computing overhead to meet the application requirements in resource-constrained environments. Compared with the prior art, 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 used in many fields such as high-security data storage, quantum communication, and Internet of Things security.
[0023] Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, obtain a short vector by sampling from a multidimensional Gaussian distribution, and construct a public random matrix; encrypt the integer vector by combining the dynamic transformation matrix, the short vector, and the public random matrix to obtain the ciphertext; During the encryption process, the original message needs to be preprocessed to adapt to subsequent mathematical transformations. The present invention adopts an integer vectorization method to convert the original message into a high-dimensional integer vector, so that the data can participate in subsequent matrix transformation and encryption operations in a numerical manner. This process ensures that the data can be mapped in a high-dimensional space, and at the same time, the characteristics of the integer vector are utilized to make the encryption process more adaptable to the lattice-based security mechanism. Compared with traditional character encoding conversion, the vectorization method of the present invention can make full use of the algebraic structure of the integer ring, while improving the computational efficiency, enhancing the recoverability of information, and ensuring the integrity of data during decryption. After completing the integer vectorization, the present invention uses the key at the current moment to generate a dynamic transformation matrix. The construction method of the dynamic transformation matrix is closely related to the key, and the key at each moment will affect the specific value of the transformation matrix, thereby ensuring that the encryption process at different times is dynamic. During the construction process of the matrix, the key first generates a reference value through a key derivation function, and then combines the hash transformation with the modular operation to obtain the final transformation matrix. Due to the dynamic update of the key, the transformation matrix of the present invention can change over time, so that even if the same message is encrypted at different time points, the encryption results are different, which greatly enhances the system's anti-attack capability. In addition, the transformation matrix is constructed in a way that ensures the mathematical reversibility of the matrix, so that the decryption end can generate the corresponding inverse matrix using the same key, thereby realizing data recovery.
[0024] After obtaining the dynamic transformation matrix, the present invention adopts a short vector encryption method based on lattice theory to further improve the security of the ciphertext. The core idea of short vector encryption is to use multi-dimensional Gaussian distribution to randomly select a short vector from high-dimensional space and add it as a perturbation term to the encryption process. The introduction of short vectors can significantly increase the unpredictability of ciphertext, making it difficult for attackers to infer the original message through calculation even if they have mastered part of the ciphertext information. Compared with traditional encryption methods, such as AES, RSA, etc., the present invention uses short vectors to construct encryption perturbations, which not only has low computational complexity, but also shows extremely high security in terms of anti-quantum attacks. This is because the lattice-based encryption method mathematically relies on solving the short vector problem, which is difficult to solve efficiently even with a quantum computer under the current known algorithm framework, thereby ensuring that the present invention can still maintain high security in the future quantum computing environment. In addition, the present invention introduces a public random matrix in the encryption process, the role of which is to increase the randomness of the ciphertext, so that even if the attacker has mastered some system parameters, it is difficult to directly crack the ciphertext. The public random matrix is generated by a known random source and is published in a fixed manner, so that both the sender and the receiver can access the matrix without the need for additional key exchange. Its construction method combines random sampling technology, so that the matrix elements are mathematically uniformly distributed, ensuring that no structural deviation is introduced in the encryption process. By combining the dynamic transformation matrix, short vectors and the public random matrix, the encryption process of the present invention can form a complex high-dimensional mapping mathematically, making the ciphertext almost unbreakable for attackers, thereby providing extremely high security.
[0025] Step 3: Use the current key and dynamic transformation matrix obtained through synchronous update to decrypt and restore the original message.
[0026] In the decryption process, it is first necessary to ensure that the keys of the encryption end and the decryption end are updated synchronously. The present invention adopts a composite key update method combining a quantum entropy source with a nonlinear chaotic increment and a fractal function, so that the key exhibits highly complex nonlinear characteristics in the time series. However, although the key is highly random in mathematics, the present invention still ensures the synchronization of the key at the encryption end and the decryption end, thereby ensuring the executability of the decryption process. Specifically, since the key generation and update mechanism is completely driven by the same initial condition and the same chaotic mapping function, as long as the decryption end uses the same initial key and calculates according to the preset chaotic iteration rule, the same key state as the encryption end can be obtained at the decryption time. This key synchronization method does not need to rely on an external channel for additional key transmission, fundamentally avoiding security risks such as man-in-the-middle attacks and key theft, so that the present invention has significant advantages over traditional encryption systems in terms of key management. When the decryption end successfully synchronizes the key, it is necessary to reconstruct the dynamic transformation matrix using the key at the current moment. Since the dynamic transformation matrix is generated by key drive during the encryption process, the decryption end can use the same method to construct a consistent dynamic transformation matrix after obtaining the same key. 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 the matrix is used to restore the original message.
[0027] Since the present invention combines fractal modulation in the key update process, the key evolution process presents nonlinear dynamic characteristics, so the corresponding transformation matrix also changes over time, ensuring the security of the ciphertext, and making it difficult to infer the future encryption matrix form even if the attacker intercepts part of the historical ciphertext. After constructing the dynamic transformation matrix, the decryption end can use its inverse matrix to perform preliminary decryption on the ciphertext and restore the original message from the high-dimensional representation after obfuscation. However, relying solely on the inverse operation of the transformation matrix is still not enough to fully restore the original message, because in the encryption process, the present invention also introduces a lattice-based short vector perturbation, the existence of which enhances the security of the ciphertext, but also brings additional computational challenges to the decryption process. Therefore, in the decryption process, in addition to applying the inverse matrix of the dynamic transformation matrix, it is also necessary to process the short vector perturbation. Since the short vector perturbation term comes from a multidimensional Gaussian distribution, it is statistically estimable, so the decryption end can combine the short vector sampling mechanism to denoise the ciphertext to extract the original information therein. The present invention constructs a short vector recovery algorithm so that the decryption end can effectively remove the random noise introduced in the encryption process and finally 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.
[0028] Example 2: The key at the initial moment is: ; in, is the initial quantum random seed provided by the quantum random number generator, which takes an integer value; is the seed of the classic entropy source, which takes an integer value; Indicates a serial 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.
[0029] Specifically, in the key generation process, the quantum random number generator first generates , which is an integer and is directly taken from the uncertainty phenomenon of quantum physics systems, such as the measurement collapse of single photons, spin state projection, or vacuum fluctuations. Since the randomness of the quantum entropy source comes from the basic principles of physics, it is different from the deterministic algorithm of the traditional pseudo-random number generator, and 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 in 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, it forms an input data stream. This data stream is input into the hash function The function of the hash function is to perform a one-way irreversible transformation on the input data, so that even if an attacker can observe part of the input or output data, other information cannot be effectively inferred. The present invention is applicable to hash functions for cryptographic purposes, such as SHA-3 or BLAKE2. These hash algorithms have strong anti-collision and diffusion properties, so that a small change in the input data can significantly affect the output, thereby enhancing the security of the key. The output of the hash function is usually a binary string of a fixed length, and the application of the key requires an integer form. Therefore, the present invention further performs integer mapping on the hash output to ensure that it is suitable for subsequent encryption calculations.
[0030] 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 in 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 restricted 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 classical entropy source proposed in the present invention has significant advantages in 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 uses physical principles to provide a higher level of security, so that even if quantum computers have powerful computing power in the future, it is difficult to crack the entire process of generating keys. On the other hand, the addition of the 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, the modular operation ensures the mathematical rationality of the key, making the distribution of the key more in line with cryptographic security requirements.
[0031] Example 3: For each 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; To update the increment, it is composed of nonlinear chaotic increment and fractal function.
[0032] 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 operations 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, the one-way nature of the hash transformation makes it impossible for an attacker to obtain the key at a certain point in time. , and it is 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, which aims 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 a very small initial perturbation will 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 Logistic mapping, Henon mapping or Arnold mapping can be used to generate high-dimensional chaotic sequences, and the complexity of chaotic trajectories can be controlled by parameter adjustment. For example, the Logistic mapping is defined as: , in Control the degree of chaos, The system enters a completely chaotic state within the scope, and this mapping is able to generate highly unpredictable sequences for constructing key update increments.
[0033] 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 feature makes it difficult for attackers to infer the future key generation rules 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, hash transformation can effectively diffuse the influence of input data, making it possible to There are minor changes, the generated keys The hash function will also show completely different characteristics, thus avoiding the possible pattern trend in the key update process. In addition, the output length of the hash function is fixed, so that the value range of the key is controlled, avoiding the storage and computing overhead caused by the increase in key length during the calculation process. The introduction of modular operations further enhances the security of key updates. middle, As a preset large prime number, ensure that the key is always in a finite field The advantage of finite field operations is that they can effectively prevent the key from growing exponentially due to the update process, while ensuring the uniform distribution of the key, so that the key value space will not be affected by the output characteristics of the hash function, further improving the security of the system. 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, thereby enhancing the irreversibility of the key update process.
[0034] Example 4: 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 any time has a value of 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 After rounding, 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.
[0035] Specifically, in this formula, the composition of nonlinear chaotic increments is first considered. At each moment, the quantum random number generator outputs a value range limited to arrive This part comes from the measurement uncertainty in quantum physics, which provides the basic physical randomness for the whole 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: , 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. Next, this part of the result is compared with the sine modulation function Multiply, where the angular frequency and Phase By controlling the periodicity and initial offset of the sine wave respectively, sine modulation can introduce periodic changes in time, so that the update increments show different amplitude characteristics at different time points, thereby further preventing the exposure of periodic patterns. Another part of the fractal function comes from the mathematical characteristics of self-similar structures in fractal theory, and its basic form is: .
[0036] 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 As the cosine function increases, the influence of high-order terms gradually decreases, while low-order terms play a leading role. Chaotic variables at different scales Perform periodic mapping so that the fractal function exhibits nonlinear and unpredictable oscillation characteristics at different time scales. This part is designed to introduce a multi-scale self-similar perturbation in the update increment, making the entire key update process not only extremely uncertain locally, but also difficult to be captured by any statistical model globally.
[0037] 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. of restrictions, thus Restricted to finite domain 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 Not only does it have extremely high entropy and randomness in theory, but it 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, 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 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 features, thereby providing solid theoretical support and technical guarantee for data encryption and dynamic key management. In practical applications, the key update mechanism based on the 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 adjusted according to the requirements of different application scenarios during the specific implementation process. For example, the parameter Can be scaled up or down according to security requirements, affecting chaotic variables Contribution to the update increment; angular frequency With 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 disturbances within a predetermined time period; the fractal scaling factor Sum The choice of can also be flexibly configured according to the system's requirements for multi-scale perturbations, thereby taking into account both computational complexity and implementation efficiency while ensuring security. This parameterized design approach makes the key update mechanism of the present invention highly adaptable and scalable, and can achieve the best balance between security and performance according to actual needs.
[0038] Embodiment 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 sequence of bytes: ;in Indicates 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 padding method to fill them; 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 in 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 updated integer after mapping, 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 .
[0039] 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 , a padding method is used to make up the number of bytes in all groups to ensure that the number of bytes in all groups is consistent. The padding method can be zero padding, that is, adding zero-value bytes to the last group to ensure that the data format of all groups is consistent. This method ensures that the dimension and format of the integer vector are not affected by the length of the original message, so that all data can be evenly mapped to the integer vector space without causing abnormal encryption calculations due to byte mismatch.
[0040] 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 rule 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. 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 All less 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 a string to a mathematical vector, so that the encryption operation can be efficiently calculated in 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 different encoding formats, and ensure that all data can be encrypted and decrypted according to unified mathematical rules. On the other hand, the method enables the encryption system to be optimized based on mathematical tools such as linear algebra and lattice theory, for example, by constructing a random transformation matrix or a lattice basis transformation, the encryption process has a stronger anti-attack capability. In addition, the present invention adopts the method of integer vectorization, which can also make the encryption method more adaptable to different types of data input. For example, when facing data in different languages or formats, UTF-8 encoding can ensure the integrity of the original information, while the integer vectorization method ensures that the data can be mapped into the same mathematical space without affecting the correctness of the encryption operation due to different encoding formats. This method has important application value in the future quantum security environment, especially in the context of quantum computers potentially threatening traditional public key cryptographic algorithms. Integer vectorization can effectively improve the security of the key and make it more difficult to be attacked by quantum computing.
[0041] Example 6: 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 meet ; is a positive real number used as a scaling parameter.
[0042] Specifically, the dynamic transformation matrix The core structure of is composed of multiple element cascade sums, each of which contains an exponential function and a predefined reversible permutation matrix. The exponential function is used 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, The 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 controlled by the modulus Constraints enable the construction of the transformation matrix to be operated in a finite field. This exponential mapping method is similar to the exponential transformation in Fourier analysis. It can project the numerical characteristics of the key to the complex plane, so that the transformation matrix not only contains linear transformation information, but also has the characteristics of the complex field, thereby increasing the difficulty for attackers to infer the key. Especially in the face of quantum computing attacks, this exponential mapping can improve the randomness of the key in the complex field and avoid being efficiently solved by algorithms such as quantum Fourier transform.
[0043] Permutation Matrix It plays a key role in the construction of the dynamic transformation matrix. is a dimension of A reversible 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 a 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, controls the influence of the key in the transformation matrix. Larger 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 computational stability and security. If it is too small, the transformation matrix may change too drastically during the key update process, affecting the stability of the calculation. 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 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 over the traditional fixed transformation matrix scheme. First, through the combination of exponential transformation and rounding operations, the construction process of the transformation matrix has a highly nonlinear characteristic, thus avoiding linear algebra attacks or statistical analysis attacks. Secondly, since the permutation matrix Pre-fixed and not equivalent, the transformation matrix at each moment is composed of different Therefore, even if the attacker obtains part of the key information, it is difficult to infer the complete key update rule 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, thereby ensuring the availability of the encryption system.
[0044] Example 7: 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 .
[0045] 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 follow a 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 in the encryption process is mathematically guaranteed, and it can effectively resist linear algebra attacks and lattice reduction attacks. Noise vector is another key parameter, which is used 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. 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 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 convert the original integer vector Mapping to the encryption space makes the ciphertext not only dependent on the original message, but also affected by the current key state. Since the structure of the dynamic transformation matrix changes over time, even if an attacker obtains part of the ciphertext information, it is difficult to deduce the evolution law of the original data or key through reverse analysis. This design makes the encryption scheme more secure in the time dimension, thereby enhancing the system's anti-attack ability.
[0046] Embodiment 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: ; in, is the intermediate integer vector; the original message is restored through inverse mapping .
[0047] 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 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 synchronization update 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 vector The product of, and the noise vector The interference with the original message is removed from the encrypted expression.
[0048] Since the noise vector The value of satisfies , and the 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 In this case, the noise and randomization items introduced during encryption can be accurately offset, thus restoring the original The same integer values or only the difference in padding. Through the above inverse transformation, the intermediate integer vector Then, the corresponding de-mapping process can be carried out to reassemble the byte sequence and restore the original message. In this process, the key to successfully performing the inverse transformation on 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 too small, 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 time series changes rapidly. 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 introduced synchronous update ensures that the encryption end and the decryption end are synchronized at all times. The accurate match enables both parties to generate completely consistent ; Once the matrix is inconsistent at the encryption end and the decryption end, the inverse multiplication operation will fail, and the 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 end and the decryption end. Especially as quantum computing is getting closer to practical application, the traditional public key encryption system based on the problem of large number factorization faces potential risks, and the scheme combining lattice theory and quantum randomness can significantly enhance the system's resistance. and the 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 In the sense of inverse transformation, the decryption end subtracts and And multiply Recover the intermediate integer vector , thus completing the entire decryption process. Finally, you only need to perform reverse disassembly according to the same byte group mapping strategy as before encryption to recover the encrypted data without any loss. Restore to original message .
[0049] 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 get 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, adjusting The amplitude of the sine function in the frequency domain is then Perform bitwise XOR with the dynamic mask to get 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.
[0050] Specifically, when encrypting a message and generating ciphertext, the authentication tag of the original message is Pre-embedded in the ciphertext so that the decryption end can verify the message consistency in the subsequent process. The decryption end successfully recovers the intermediate integer vector After that, in order to cover and verify the data more flexibly, the present invention uses discrete cosine transform 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 The system then uses the frequency domain representation to adjust its amplitude and phase, thereby producing differentiated masking effects at different times. 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 the 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 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 there is a possibility that the data has been modified by an attacker, and it is necessary to issue an alarm or take protective measures in time.
[0051] The present invention is 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 used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these 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, construct the key update function by forming the update increment through the nonlinear chaotic increment and the fractal function to update the key; Step 2: Preprocess the original message into an integer vector; construct a dynamic transformation matrix using the current key, obtain a short vector by sampling from a multidimensional Gaussian distribution, and construct a public random matrix; encrypt the integer vector by combining the dynamic transformation matrix, the short vector, and the public random matrix to obtain the ciphertext; Step 3: Use the current key and dynamic transformation matrix obtained through synchronous update to decrypt and restore the original message.
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, is the initial quantum random seed provided by the quantum random number generator, which takes an integer value; is the seed of the classic entropy source, which takes an integer value; Indicates a serial 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.
3. The data encryption and dynamic key management method based on quantum security protocol as claimed in 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; To update the increment, it is composed of nonlinear chaotic increment and fractal function.
4. The data encryption and dynamic key management method based on quantum security protocol as claimed in claim 3, characterized in that: 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 any time has a value of The update formula is: ; for Chaotic variables at each moment; The value range is ; is the nonlinear amplification index, used to enhance the chaotic variables The impact of is a bitwise XOR operation, since is a real number, first After rounding, 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.
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 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 sequence of bytes: ;in Indicates 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 padding method to fill them; 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 in 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 updated integer after mapping, 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 .
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 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 meet ; is a positive real number used as a scaling parameter.
7. The data encryption and dynamic key management method based on quantum security protocol according to claim 6, 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 .
8. The data encryption and dynamic key management method based on quantum security protocol as claimed in claim 7, characterized in that: In step 3, the pseudo-inverse of the dynamic transformation matrix is calculated 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: ; in, is the intermediate integer vector; the original message is restored through inverse mapping .
9. The data encryption and dynamic key management method based on quantum security protocol as claimed in claim 8, characterized in that: The method further includes: after obtaining the intermediate integer vector, performing dynamic authentication verification on the intermediate integer vector, specifically including: when transmitting the ciphertext, pre-setting the authentication tag of the message Embed ciphertext; Perform discrete cosine transform to get 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, adjusting The amplitude of the sine function in the frequency domain is then Perform bitwise XOR with the dynamic mask to get 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
Grid-based access control encryption and decryption method and system
CN116055152A
Dynamic encryption coding method based on serial cascade convolution
CN118590184A
Chaotic encryption and decryption method and system based on random weight
CN119544185A
Asymmetrical Chaotic Encryption
US20110311054A1
Cited By
Market supervision data security protection method and system based on dynamic encryption strategy
CN120223430A
Data storage integrity verification system and method based on whole ring
CN120277729A
A complete ring-based data storage integrity checking system and method
CN120277729B
Key management system for bank-enterprise direct connection multi-level encryption transmission
CN120474850A
Lightweight hybrid encryption transmission method and system capable of resisting quantum attack
CN120675692A