Lightweight hybrid encryption transmission method and system capable of resisting quantum attack

By combining Lattice cryptography with symmetric encryption algorithms, adopting a hybrid encryption method and introducing a fast dimensionality reduction decoding mechanism, the problem of high computational complexity of Lattice cryptography in resource-constrained devices is solved, and efficient and secure quantum-resistant encryption transmission is achieved, which is suitable for the Internet of Things and edge computing scenarios.

CN120675692AActive Publication Date: 2025-09-19WUXI ALEADER INTELLIGENT TECH

Patent Information

Application Number
CN202510719045.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-19
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

Existing lattice cryptographic schemes have high computational complexity, long operation time, and large memory requirements in core processes such as key generation, ciphertext encapsulation and decapsulation. They are difficult to deploy efficiently in resource-constrained terminal devices and lack the ability to perceive and adapt to the dynamic operating status of the device, resulting in low encryption efficiency.

Method used

Combining lattice cipher and symmetric encryption algorithm, a hybrid encryption method is adopted. The key negotiation encapsulation is completed through the lattice algorithm, and then the symmetric algorithm is used for data encryption and decryption. A fast dimensionality reduction decoding mechanism based on pre-trained mapping relationship is introduced to optimize the key decoding process. Sparse matrix coding and quantization compression technology are combined to reduce the computational and storage burden.

Benefits of technology

While ensuring quantum-resistant security, the algorithm significantly reduces the burden on device computing power, storage capacity, and communication, improves encryption efficiency, and is suitable for resource-constrained terminal devices, especially the Internet of Things and edge computing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675692A_ABST
    Figure CN120675692A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-quantum-attack lightweight hybrid encryption transmission method and system, and aims to solve the problems that an existing lattice-based encryption algorithm is complex in calculation, high in resource consumption and difficult to adapt to embedded equipment and an internet of things scene. According to the method, a key encapsulation mechanism is constructed based on an LWE problem, key negotiation is performed by using the quantum attack resistance of the key encapsulation mechanism, and encryption transmission is performed on data in combination with a lightweight symmetric encryption algorithm. In the de-encapsulation process, a rapid dimension reduction decoding mechanism is introduced, and dimension reduction mapping is performed on a high-dimensional ciphertext vector and a private key vector through a mapping matrix obtained through training, so that the matrix operation complexity is reduced, and the decryption efficiency is improved. According to the method, the implementation cost and operation burden of an algorithm on an embedded platform can be remarkably reduced while anti-quantum security is kept, and the method is suitable for an Internet of Things terminal, an edge computing node and other low-power-consumption equipment sensitive to security and energy consumption and has good security, light weight and deployment practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data security and encrypted communication technology, and in particular relates to a lightweight hybrid encryption transmission method and system that is resistant to quantum attacks. Background Art

[0002] With the continuous breakthroughs in quantum computing technology, traditional public-key cryptography is facing a serious threat. The security of classic asymmetric encryption algorithms, such as RSA and elliptic curve cryptography (ECC), relies on solving difficult mathematical problems such as large integer factorization and discrete logarithms. However, once quantum computers possess sufficient computing power, Shor's algorithm could solve these problems in polynomial time, theoretically destroying the fundamental cryptographic structures currently used in scenarios such as internet security, e-commerce, and digital signatures. This potential threat has sparked significant attention and research investment in quantum-resistant cryptographic algorithms within the global cryptography community.

[0003] As one of the mainstream solutions to counter quantum attacks, Lattice-based cryptography has a high theoretical security guarantee because its security can be reduced to known mathematical problems. In particular, the encryption, key exchange, and signature mechanisms constructed based on the Learning With Errors (LWE) problem have been proven to be resistant to attacks under both classical and quantum computing models, and have become one of the important candidate directions for the selection of quantum-resistant cryptography standards by international standardization organizations (such as NIST).

[0004] Despite the significant advantages of Lattice cryptography in quantum security, its practical application still faces a series of technical bottlenecks. The primary issue is that current Lattice cryptography schemes suffer from high computational complexity, long operation times, and large memory requirements in core processes such as key generation, ciphertext encapsulation, and decapsulation. This is particularly true in lattice problem scenarios like LWE, where high-dimensional modular operations and matrix multiplications are frequently required. This results in encryption efficiency far lower than that of traditional public key systems and is particularly unfriendly to resource-constrained terminal devices.

[0005] With the rapid development of new computing scenarios such as the Internet of Things, edge computing, and wireless sensor networks, massive numbers of low-power, resource-light embedded devices have become an integral part of the network ecosystem. These devices place clear demands on data confidentiality, integrity, and identity authentication during communications, but their processing power, power budget, and communication bandwidth are extremely limited. In such environments, deploying quantum-resistant cryptographic algorithms with high computational complexity and storage overhead presents significant challenges. Therefore, how to significantly reduce the algorithm's requirements for device computing power, storage capacity, and communication overhead while ensuring quantum security has become a critical issue that needs to be addressed in the field of cryptographic engineering.

[0006] In recent years, some research has attempted to combine lattice-based cryptography with symmetric encryption, improving overall efficiency by replacing the transmission of symmetric keys with a key encapsulation scheme based on the LWE problem. However, because the key negotiation process itself still relies on complex lattice structure calculations, its deployment efficiency in embedded platforms remains less than ideal. Furthermore, current mainstream quantum-resistant algorithms are mostly based on fixed parameter designs and lack the ability to perceive and adapt to the dynamic operating state of devices, making it difficult to implement optimal deployment strategies across devices with varying computing power levels. Furthermore, the sheer volume of data required for public key and ciphertext transmission further burdens the physical channel, hindering stable operation in low-power communication environments. Summary of the Invention

[0007] To solve the above technical problems, the present invention provides a lightweight hybrid encryption transmission method and system that is resistant to quantum attacks. The method combines the lattice public key mechanism with the symmetric encryption algorithm, adopts a "hybrid encryption" approach, completes key negotiation encapsulation through the lattice algorithm, and then uses the symmetric algorithm to encrypt and decrypt data, so as to achieve a balance between encryption efficiency and security.

[0008] Specifically, the technical solutions provided by the present invention are as follows: A lightweight hybrid encryption transmission method resistant to quantum attacks, comprising: S1. The data receiver randomly generates a structured matrix A and a private key. s and error vector e , and calculate the construction vector b = As + e , the data receiver retains the private key s , and publish the public key ( A , b ); S2, the data sender receives the public key ( A , b ) and then randomly generate a key , random vector r , error vector and , and generate the ciphertext ( u , v ), , , superscript T represents transpose, q is the set modulus, Indicates rounding down; S3. The data sender uses the key The sensitive data to be sent is encrypted by a symmetric encryption algorithm to obtain the encrypted data C, and the ciphertext ( u , v) and the encrypted data C are sent to the data recipient; S4. The data recipient uses the private key s From the ciphertext ( u , v ) to decode the recovery key , and use the decoded recovered key The original sensitive data is decrypted from the encrypted data C using the corresponding symmetric encryption algorithm; the key The decoding recovery formula is: , It means taking the nearest integer, and mod is the modulo operation.

[0009] Furthermore, in step S4, the key The decoding recovery formula is: ,in, , , is the dimension reduction projection matrix based on the pre-trained mapping relationship, To pass M After dimensionality reduction projection , is the private key after dimensionality reduction projection.

[0010] Furthermore, the projection matrix M It is trained from the sample set through minimum inner product deviation optimization, including the following steps: collect N Ciphertext vector and the corresponding private key ,by Construct a sample set for the sample; Define the optimization objective function: ; Set the dimension of the reduced projection matrix and randomly initialize the reduced projection matrix M ; The gradient descent algorithm is used to traverse the sample set and iterative training is performed to obtain the dimension reduction projection matrix that makes the objective function value less than the set deviation threshold. M , which is used as the final participation key The dimension-reduction projection matrix for the decoding operation.

[0011] Furthermore, each iteration includes the following steps: Calculate the current objective function value. If it is less than the set deviation threshold, stop the iteration and convert the current dimension reduction projection matrix As the final dimension reduction projection matrix, otherwise continue iterative training; Calculate the dimension reduction projection matrix for each sample pair Gradient contribution: for No. p Rankq Column Elements , the gradient contribution of each sample is expressed as: , in, represents the difference between the original inner product and the reduced inner product, represents the partial derivative, make , , then by the chain rule we can deduce: , in, Represents a vector The q elements, Represents a vector The q elements, express The p elements, express The p elements; Update based on gradient contribution : , is the learning rate.

[0012] Preferably, the private key in S1 s It is a model q Sparse short vectors in finite fields, private keys s The generation of the private key adopts the ternary distribution, which is generated by sampling with medium probability from the set {-1,0,1}; or adopts the central binomial distribution, so that the private key s No. i element value , and Sampling from {0,1} with medium probability, is the control parameter, if ,but .

[0013] Preferably, the symmetric encryption algorithm in S3 adopts ChaCha20, and when encrypting, the key is first converted to Expand to the 256-bit key required by ChaCha20, and then use ChaCha20 to encrypt the sensitive data to be sent; when decrypting in S4, first use the key derivation function to decode the recovered key Expand it to the 256-bit key required for ChaCha20, and then use ChaCha20 to decrypt the encrypted data.

[0014] Preferably, the dimension reduction projection matrix M Sparse coding is performed to reduce storage space and multiplication operations: M Elements whose absolute values ​​are less than the set threshold are considered to be 0, and only non-zero elements and their index positions are recorded / stored; during the operation, an all-zero matrix is ​​initialized, and then the corresponding non-zero elements are filled in according to the index to decode and obtain the dimensionality reduction projection matrix M .

[0015] Preferably, the dimension reduction projection matrix M Perform quantization compression to convert the original floating point representation M Mapping to fixed-length integer representation: Determine the mapping range and set the matrix M The maximum and minimum element values ​​are and ; Divide the integer interval into [-D, D], M Each element in performs a mapping, quantized as: , Dequantization is performed by interpolation during restoration: ; in, for M Middle i Rank j Column elements, is the quantitative value, round Indicates rounding to the nearest integer. is the inverse quantized value obtained during restoration.

[0016] A lightweight hybrid encryption transmission system based on the above method includes a data sending end and a data receiving end: The data sending end is used to randomly generate a key , based on the public key ( A , b ) Generate ciphertext ( u , v ), and send the key Encrypted sensitive data and ciphertext ( u , v ); the data receiving end is used to generate a private key s , and publish the public key ( A , b ); Also used to retrieve the ciphertext from the received ( u , v ) using the private key s Decode and recover the key , and use the key Decrypt encrypted sensitive data to obtain original data; The data sending end includes a symmetric encryption module for using a key The sensitive data to be sent is encrypted by a symmetric encryption algorithm; the data receiving end includes a symmetric decryption module for using a private key s Decode the recovered key Decrypt the received encrypted data using a symmetric encryption algorithm.

[0017] Preferably, the data receiving end further includes a data verification module for performing integrity verification on the decrypted data to verify the integrity and authenticity of the data.

[0018] The present invention provides a lightweight hybrid encryption transmission method and system that is resistant to quantum attacks, integrating the quantum security characteristics of the Lattice cipher and the high efficiency of the symmetric encryption algorithm, aiming to realize a data encryption transmission mechanism that is both secure and feasible in resource-constrained terminal devices. In terms of design, the Lattice encryption mechanism built based on the LWE problem gives full play to its natural resistance to quantum attacks, ensuring that the key negotiation process still has a solid security foundation in the face of quantum computing threats. The present invention introduces for the first time a fast dimensionality reduction decoding mechanism based on pre-trained mapping relationships, which effectively alleviates the computational burden brought about by high-dimensional matrix operations in the decryption stage, and greatly reduces the decryption delay and energy consumption without sacrificing the decoding accuracy; at the same time, combined with the embedded optimization requirements, sparse matrix coding and quantization compression technology are used to further reduce storage pressure and communication bandwidth.

[0019] In summary, the present invention systematically focuses on quantum-resistant security, hybrid encryption system construction, and lightweight decryption process, and proposes an innovative encryption solution with practical deployment value and engineering adaptability. It is suitable for various application scenarios such as the Internet of Things, edge computing, and secure communications. It has significant technological advancement and innovation, and can provide strong support for building the next generation of quantum-resistant security infrastructure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0021] Figure 1 It is a schematic diagram of the technical solution framework provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0022] To make the purpose, 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without making creative efforts are all within the scope of protection of the present invention.

[0023] Example 1 This embodiment provides a lightweight hybrid encryption transmission method that is resistant to quantum attacks, such as Figure 1 As shown in the figure, the main design idea of ​​this method is to build a hybrid encryption framework that integrates lattice encryption and symmetric encryption algorithms. Symmetric encryption is used in the data transmission process, and the key is generated and negotiated using the lattice algorithm. At the same time, in order to reduce the complexity of lattice encryption calculations, a fast dimensionality reduction decoding algorithm based on the LWE optimized mapping matrix is ​​designed to reduce computing time and bandwidth.

[0024] Lattice cryptography is one of the core research directions in post-quantum cryptography. Its security is based on the computational difficulties inherent in the lattice structure in high-dimensional space. These difficulties include the shortest vector problem (SVP), the closest vector problem (CVP), and the LWE problem. The LWE problem is a computational problem based on lattice theory, the core of which is to solve a random linear equation system with noise. Suppose a matrix is ​​given A , an unknown vector s , construct vector b = As + e , where the error vector e From some discrete error distribution (such as discrete Gaussian distribution), the goal of LWE is to A and b Solve the case s , which is considered intractable based on current knowledge, even for quantum computers.

[0025] In the lightweight hybrid encryption transmission method provided in this embodiment, all key encapsulation and decapsulation operations construct ciphertext in the form of LWE. The key encapsulation mechanism based on LWE allows the communicating parties to securely negotiate a shared key without exposing the symmetric encryption key. The sender uses the receiver's public key ( A , b ) to encapsulate a random bit string , by constructing a ciphertext pair ( u , v ) pass key information, only those who have the private key s The receiver can recover the bit string from the ciphertext .

[0026] (1) The receiver randomly generates a structured matrix , small norm private key s and error vector e , and calculate the construction vector b = As + e , the private key is retained by the recipient s , and publish the public key to the sender ( A , b ).

[0027] Private Key s It is a model q A sparse short vector in a finite field, satisfying the following conditions: all elements belong to the set of small integers (low norm), are uniformly distributed or obey a symmetric probability distribution. s The generation of can be done using a ternary distribution, for example, by sampling from the set {-1, 0, 1} with medium probability. The central binomial distribution can also be used, for example, for the parameter ,make: , like ,but , the expectation is 0, and the variance is .

[0028] Error vector e The role of the key structure is to cover up, which is the essential source of LWE security. Its generation is similar to the private key. s , meeting the small norm requirement, the thief is unpredictable (preventing attackers from rebuilding).

[0029] (2) After receiving the public key, the sender randomly generates a bit string , a random vector r , error vector and , and calculate the generated ciphertext pair ( u , v ),in, , , Indicates rounding down. Then the bit string As the key of the symmetric encryption algorithm, the sensitive data to be sent is encrypted to obtain the encrypted data C. Finally, the ciphertext pair generated by the calculation ( u , v ) is sent to the recipient together with the encrypted data C.

[0030] There are many existing symmetric encryption algorithms. This embodiment uses a lightweight algorithm that is highly resistant to side-channel attacks, such as ChaCha20. ChaCha20 is an improved version of Salsa20 and has the following characteristics: Input: a 256-bit key, a 96-bit random number, and a 32-bit counter; Operation: 20 rounds of state transformation (addition-XOR-rotation) to generate a pseudo-random word stream; Encryption: XOR operation is performed on the plaintext and the key to output the ciphertext; Decryption: XOR the ciphertext with the same key to recover the plaintext.

[0031] Specifically in this embodiment, the bit string is first converted to It is expanded to the 256-bit key required for ChaCha20, and then ChaCha20 is used to encrypt the sensitive data to be sent.

[0032] (3) After receiving the data, the recipient needs to use the private key retained locally s From the ciphertext pair ( u , v ) to recover the key bit string when encrypting data , and then the corresponding symmetric encryption algorithm can be used to decrypt the encrypted data C, and finally the sensitive data sent by the sender can be recovered and obtained.

[0033] On the sender side there is , On the receiving side , And by and b = As + e It can be seen that , Therefore:

[0034] in is the decryption residual term, whose absolute value does not exceed Under the premise, we have: , It means taking the nearest integer, and mod is the modular operation, that is, taking the remainder after division.

[0035] The above recovery key bit string The success of the decryption depends on whether the absolute value of the decryption residual is less than , if the absolute value of the decrypted residual is less than , then the recovery is reliable (the trade-off will not cross For example: suppose ,but ,like , then when the sender encrypts , the receiver only needs the absolute value of the residual term when decrypting , you can still successfully recover .

[0036] In order to keep the decryption success rate at a high level, the absolute value of the decryption residual must be controlled to not exceed Therefore, in practical applications, the following strategies should be followed: Use a small-norm private key s , such as ternary distribution; setting a reasonable Standard deviation; constrained random vector r norm, reducing its e The inner product of q , increasing the error tolerance zone.

[0037] After recovering the bit string After that, the receiver also needs to use the key derivation function (such as SHAKE128) to convert the bit string It is expanded to a 256-bit key of ChaCha20, and then ChaCha20 is used to decrypt the received encrypted data C to obtain the sender's original sensitive data.

[0038] In the above decoding, the bit string is obtained During the process, the receiver must execute High-dimensional operations ( , m is usually very large, such as 1024 or 2048). For embedded devices, performing such large-scale vector multiplication operations is very costly (memory usage, operation delay, power consumption, etc.). To this end, this embodiment designs a fast dimensionality reduction decoding algorithm based on the LWE optimized mapping matrix. By introducing a pre-constructed dimensionality reduction projection matrix, the high-dimensional and Dimensionality reduction to a low-dimensional space. Specifically: First, use the dimension reduction projection matrix Map the original high-dimensional vector: , Then, the high-dimensional decoding operation is transformed into a low-dimensional inner product: , Finally, using the structure of the LWE ciphertext, the key bit string can still be extracted from it: .

[0039] Due to the use of dimensionality reduction projection matrix Perform dimensionality reduction mapping, still retaining the greatest extent and The principal component (information energy) of the decryption operation is mapped to a linear approximation subspace equivalent to the original space. The approximation error introduced by the dimensionality reduction mapping can still keep the decryption residual term within the error tolerance range, that is, its absolute value still does not exceed , so In fact, it is still equal to .

[0040] Dimensionality reduction projection matrix It can be constructed based on historical data or a constructed sample set through the minimum inner product deviation optimization method, so that it can retain the key decoding information in the original ciphertext while compressing the vector dimension, thus ensuring the decoding accuracy. The specific steps may include the following: Step 1: Collect training samples First, we need to build a sample set to learn the structural laws of high-dimensional data. This process is similar to the "training set preparation" in machine learning. From the actual LWE encryption encapsulation process, we collect a large number of ciphertext vectors. and the corresponding private key vector , each sample is a group .

[0041] To ensure statistical reliability, as many samples as possible are needed. In practice, this example generated and collected 8,000 sample pairs. These samples essentially reflect the co-distribution characteristics of "ciphertext" and "private key" in high-dimensional space in real systems, and serve as the basis for learning the dimensionality reduction projection matrix.

[0042] Step 2: Define the optimization objective function The purpose of optimization is to find a reduced-dimensional projection matrix , so that the inner product of the two vectors before and after dimensionality reduction remains approximately unchanged in all samples. Therefore, the objective function can be defined as: , in, represents the vector inner product before dimensionality reduction, represents the inner product of the vector after dimensionality reduction, N is the total number of samples. The vector inner product deviation before and after dimensionality reduction is made close to zero or meets the set deviation threshold. At this time, the dimensionality reduction projection matrix is ​​needed.

[0043] Step 3: Initialize the dimensionality reduction projection matrix In order to find a dimension reduction projection matrix that minimizes the objective function , we need to start from an initial matrix and learn it by step-by-step iteration. The first step is to set the dimensionality reduction projection matrix The matrix is ​​initialized with random small values. Initializing the matrix is ​​just a starting point; the final effect depends on subsequent training and optimization.

[0044] Step 4: Minimize the error and optimize the matrix training To get the best , it is necessary to gradually adjust the values ​​of the matrix elements through an optimization algorithm. The core idea is to iterate over all samples, calculate the error between each pair of reduced inner products and the original inner product under the current matrix, and use this error information to adjust the matrix. If the reduced inner product is significantly smaller than the original inner product, it indicates information loss, and some matrix elements should be increased; if the reduced inner product is larger than the original inner product, it indicates excessive offset, and some matrix elements should be reduced. After each adjustment, the objective function is recalculated until the error approaches zero.

[0045] This embodiment uses the Gradient Descent (GD) algorithm for training optimization. In each iteration, the current objective function is calculated relative to the matrix The partial derivative (i.e. gradient) of each element in is then adjusted in the direction of the negative gradient.

[0046] Specifically, for each round of training: 1. Calculate the current objective function value For each sample , calculate the difference between the original inner product and the reduced inner product: ; Accumulate the square errors of all samples and calculate the average to obtain the current objective function value; If the current objective function value is less than the set deviation threshold, the iterative training is stopped and the current matrix As the final dimension reduction projection matrix, otherwise continue iterative training.

[0047] 2. Calculate the matrix for each sample pair Gradient contribution For the matrix No. p Rank q Column Elements , the gradient contribution of each sample can be expressed as: , Indicates partial derivative (partial differential), make , , then by the chain rule we can deduce: , in, Represents a vector The q elements, Represents a vector The q elements, express The p elements, express The p elements.

[0048] 3. Update the matrix M For each matrix element ,implement: , That is, the matrix elements are modified using the sample average gradient.

[0049] The above is the main content of the quantum-resistant lightweight hybrid encryption transmission method provided by this embodiment. To better understand the practical application process of this solution, the following uses "smart grid remote terminal secure communication" as an example to illustrate the complete workflow of this solution.

[0050] In smart grid systems, remote terminal units (RTUs) need to regularly upload data (such as current, voltage, and load status) to the main control center. Because they are deployed at edge nodes with limited device resources, they need to have lightweight, secure, and quantum-resistant encrypted communication capabilities.

[0051] Step 1: System Initialization The main control center and remote terminals pre-share LWE system parameters, including structured matrix A Dimension and modulus q , symmetric key length, error distribution and dimensionality reduction projection matrix, etc.

[0052] Step 2: The remote terminal (receiver) generates public and private keys Generate structured matrices using random seeds , private key ,error , calculate b = As + e , keep the private key locally s , publish the public key ( A , b ).

[0053] Step 3: The control center (sender) initiates key negotiation After receiving the public key, the main control center randomly generates a symmetric key bit string , and generate ,error and ,calculate: , ; Use symmetric key bit string Encrypt the data (such as the power curve) with ChaCha20 to obtain C and send it ( u , v ) and C to the remote terminal.

[0054] Step 4: Remote terminal quickly decodes and decrypts Using the reduced projection matrix M Calculate the projection result: , Decoding the symmetric key bit string:

[0055] use Perform ChaCha20 decryption to recover the original data sent by the main control center. If the data passes the integrity check (such as hash or CRC check), the communication is completed.

[0056] In this hybrid encryption framework, a dimensionality reduction projection matrix is ​​used M To accelerate LWE key decoding, the matrix may still have the following problems: it is large in scale. Even if its dimension is 128x512, it needs to store 65536 floating-point values, which is about 256KB of space; the floating-point representation is complex, the floating-point operation resource usage is high, and the efficiency is low on embedded chips; there is a lot of redundancy. In the actual training matrix, many values ​​are close to 0, which can be regarded as invalid projection directions.

[0057] To this end, in some embodiments, by reducing the dimension of the projection matrix M Sparse coding and quantization compression are performed to reduce its storage volume and improve its computing efficiency on embedded chips.

[0058] Sparse coding will reduce the dimension of the projection matrix M Elements whose absolute values ​​are less than a threshold (e.g., 0.001) are treated as zero, and only non-zero elements and their indices are recorded. Decoding requires only initializing an all-zero matrix and then filling in non-zero values ​​according to the recorded indices. Processing only non-zero elements during the computation significantly reduces the number of multiplications. Sparse coding can also reduce the storage space occupied by the reduced-dimensional projection matrix. The compression ratio depends on the matrix density, with a typical sparsity of up to 90%.

[0059] To avoid the complexity of floating point representation, the dimension-reduced projection matrix is ​​compressed using quantization. M Map to fixed-length integers (such as 8-bit integers), specifically: first determine the mapping range, set the matrix M The maximum and minimum element values ​​are and ; Divide the integer interval, such as [-127,127]. Then the matrix M Each element in Perform the mapping, quantized as: After quantization, all elements are converted to int8 type and stored as integer matrices, occupying only 25% of the original size. When restoring, dequantization is performed through interpolation: .

[0060] Example 2 Based on the above method, this embodiment provides a lightweight hybrid encryption transmission system that is resistant to quantum attacks. The system includes a data sending end and a data receiving end.

[0061] The data sender is used to randomly generate a key , based on the public key ( A , b ) Generate ciphertext ( u , v ), and send the key Encrypted sensitive data and ciphertext ( u , v ). The data receiving end is used to generate a private key s , and publish the public key ( A , b ); Also used to retrieve the ciphertext from the received ( u , v ) using the private key s Decode and recover the key , and use the key Decrypt encrypted sensitive data to obtain the original data.

[0062] The data sending end includes a symmetric encryption module for using the key The sensitive data to be sent is encrypted by a symmetric encryption algorithm. The data receiving end includes a symmetric decryption module for using the private key s Decode the recovered key Decrypt the received encrypted data using a symmetric encryption algorithm.

[0063] In some embodiments, the data receiving end also includes a data verification module for performing integrity verification on the decrypted data. Integrity verification is an important step to ensure that data has not been tampered with during transmission or storage. By using hash algorithms, MAC, HMAC and other technologies, data integrity can be effectively verified.

[0064] The above-mentioned system can execute a lightweight hybrid encryption transmission method resistant to quantum attacks described in Example 1, and has functional modules and beneficial effects corresponding to the method. For technical details not described in detail in this embodiment, please refer to a lightweight hybrid encryption transmission method resistant to quantum attacks provided in Example 1 of the present invention.

[0065] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or certain portions of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Under the idea of ​​the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above. For the sake of simplicity, they are not provided in detail. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of this application.

Claims

1. A lightweight hybrid encryption transmission method resistant to quantum attacks, characterized in that: include: S1. The data receiver randomly generates a structured matrix A and a private key. s and error vector e , and calculate the construction vector b = As + e , the data receiver retains the private key s , and publish the public key ( A , b ); S2. The data sender receives the public key ( A , b ) and then randomly generate a key , random vector r , error vector and , and generate the ciphertext ( u , v ), , , superscript T represents transpose, q is the set modulus, Indicates rounding down; S3. The data sender uses the key The sensitive data to be sent is encrypted by a symmetric encryption algorithm to obtain the encrypted data C, and the ciphertext ( u , v ) and the encrypted data C are sent to the data recipient; S4. The data recipient uses the private key s From the ciphertext ( u , v ) to decode the recovery key , and use the decoded recovered key The original sensitive data is decrypted from the encrypted data C using the corresponding symmetric encryption algorithm; the key The decoding recovery formula is: , It means taking the nearest integer, and mod is the modulo operation.

2. The lightweight hybrid encryption transmission method according to claim 1, characterized in that: In step S4, the key The decoding recovery formula is: ,in, , , is the dimension reduction projection matrix based on the pre-trained mapping relationship, for pass M The result after dimensionality reduction projection, is the private key after dimensionality reduction projection.

3. The lightweight hybrid encryption transmission method according to claim 2, wherein: The dimension reduction projection matrix M It is trained from the sample set through minimum inner product deviation optimization, including the following steps: collect N Ciphertext vector and the corresponding private key ,by Construct a sample set for the sample; Define the optimization objective function: ; Set the dimension of the reduced projection matrix and randomly initialize the reduced projection matrix M ; The gradient descent algorithm is used to traverse the sample set and iterative training is performed to obtain the dimension reduction projection matrix that makes the objective function value less than the set deviation threshold. M , which is used as the final participation key The dimension-reduction projection matrix for the decoding operation.

4. The lightweight hybrid encryption transmission method according to claim 3, wherein: Each iteration includes the following steps: Calculate the current objective function value. If it is less than the set deviation threshold, stop the iteration and convert the current dimension reduction projection matrix As the final dimension reduction projection matrix, otherwise continue iterative training; Calculate the dimension reduction projection matrix for each sample pair Gradient contribution: for No. p Rank q Column Elements , the gradient contribution of each sample is expressed as: , in, represents the difference between the original inner product and the reduced inner product, represents the partial derivative, make , , then by the chain rule we can deduce: , in, Represents a vector The q elements, Represents a vector The q elements, express The p elements, express The p elements; Update based on gradient contribution : , is the learning rate.

5. The lightweight hybrid encryption transmission method according to claim 1, wherein: Private key in S1 s It is a model q Sparse short vectors in finite fields, private keys s The generation of the private key adopts the ternary distribution, which is generated by sampling with medium probability from the set {-1,0,1}; or adopts the central binomial distribution, so that the private key s No. i element value , and Sampling from {0,1} with medium probability, is the control parameter, if ,but .

6. The lightweight hybrid encryption transmission method according to claim 1, wherein: The symmetric encryption algorithm described in S3 uses ChaCha20. When encrypting, the key is first converted to Expand to the 256-bit key required by ChaCha20, and then use ChaCha20 to encrypt the sensitive data to be sent; when decrypting in S4, first use the key derivation function to decode the recovered key Expand it to the 256-bit key required for ChaCha20, and then use ChaCha20 to decrypt the encrypted data.

7. The lightweight hybrid encryption transmission method according to claim 2, wherein: For the dimension reduction projection matrix M Sparse coding is performed to reduce storage space and multiplication operations: M Elements whose absolute values ​​are less than the set threshold are considered to be 0, and only non-zero elements and their index positions are recorded / stored; during the operation, an all-zero matrix is ​​initialized, and then the corresponding non-zero elements are filled in according to the index to decode and obtain the dimensionality reduction projection matrix M .

8. The lightweight hybrid encryption transmission method according to claim 2, wherein: For the dimension reduction projection matrix M Perform quantization compression to convert the original floating point representation M Mapping to fixed-length integer representation: Determine the mapping range and set the matrix M The maximum and minimum element values ​​are and ; Divide the integer interval into [-D, D], M Each element in performs a mapping, quantized as: , Dequantization is performed by interpolation during restoration: ; in, for M Middle i Rank j Column elements, is the quantitative value, round Indicates rounding to the nearest integer. is the inverse quantized value obtained during restoration.

9. A lightweight hybrid encryption transmission system based on the method according to any one of claims 1 to 8, comprising a data sending end and a data receiving end, characterized in that: The data sending end is used to randomly generate a key , based on the public key ( A , b ) Generate ciphertext ( u , v ), and send the key Encrypted sensitive data and ciphertext ( u , v ); the data receiving end is used to generate a private key s , and publish the public key ( A , b ); Also used to retrieve the ciphertext from the received ( u , v ) using the private key s Decode and recover the key , and use the key Decrypt encrypted sensitive data to obtain original data; The data sending end includes a symmetric encryption module for using a key The sensitive data to be sent is encrypted by a symmetric encryption algorithm; the data receiving end includes a symmetric decryption module for using a private key s Decode the recovered key Decrypt the received encrypted data using a symmetric encryption algorithm.

10. The lightweight hybrid encryption transmission system according to claim 9, characterized in that: The data receiving end also includes a data verification module for performing integrity verification on the decrypted data to verify the integrity and authenticity of the data.

Citation Information

Patent Citations

  • Lattice encryption-based end-to-end data confidentiality and integrity protection method

    CN113242129A

  • Industrial network data algorithm design method with quantum resistance

    CN117614627A

  • Anti-quantum cryptography algorithm based on grid

    CN118200003A

  • Grid-based specified server searchable encryption optimization method and device, equipment and medium

    CN119299092A

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

    CN119921951A

Cited By

  • Lightweight anti-quantum key agreement protocol method and system for edge computing

    CN121485935A

  • Lightweight quantum-resistant key agreement protocol method and system for edge computing

    CN121485935B