Lightweight lattice-based anti-quantum encryption method

By combining ternary NTT technology and improved trapdoor technology, the balance between ciphertext size and decryption error rate is solved, achieving compact ciphertext and efficient computation at a 128-bit security level, suitable for high fault-tolerant scenarios.

CN118890155AActive Publication Date: 2024-11-01INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES

Patent Information

Application Number
CN202410400403.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2024-11-01
Estimated Expiration
2044-04-03

AI Technical Summary

Technical Problem

Existing lattice-based quantum-resistant cryptographic schemes struggle to achieve an optimal balance between ciphertext size and decryption error rate, especially at the 128-bit security level, where traditional parameter selection limits the flexibility and efficiency of ciphertext size.

Method used

A lightweight encryption method based on NTRU is adopted, which combines ternary NTT technology and improved trapdoor technology. More flexible parameters are selected to reduce the ciphertext size. At the same time, the decryption error rate is improved by using a fusion decoding algorithm of Babai Rounding Off and Babai Nearest Plane algorithms to achieve more compact ciphertext.

Benefits of technology

At the 128-bit security level, the ciphertext size is reduced to 309 bytes, and the ciphertext expansion rate is less than 20 times, making it suitable for high fault-tolerant scenarios. Furthermore, computational efficiency is improved through ternary NTT technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890155A_ABST
    Figure CN118890155A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight lattice-based anti-quantum encryption method. The method comprises the following steps: 1) generating a public key h and private keys (f, g, F ', G') by using a key generation algorithm; 2) encrypting the plaintext m according to n, k, q, sigma f and gamma by using an encryption algorithm to generate a ciphertext c; and 3) decrypting the ciphertext c according to n, q, q ', f, g, F, G, gamma and k by using an encryption algorithm to obtain a ciphertext m. According to the method, the relationship between the decryption error rate and the ciphertext size can be better balanced, the decryption trap door technology in the BAT is combined with the ternary NTT, more flexible parameters are selected, the size of the ciphertext is further reduced at the cost of improving the decryption error rate, the ciphertext with the extremely small size can be provided at the ciphertext expansion rate lower than 20 times, and the decryption efficiency is improved. The method is suitable for some high-fault-tolerance scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to cryptographic scheme design technology and lattice cryptographic technology, and in particular to a lightweight lattice-based quantum-resistant encryption method. Background Art

[0002] Since people realized that quantum computers can solve large integer decomposition and discrete logarithm problems in polynomial time, existing public key cryptography schemes and signature schemes (such as RSA, Rabin, ECDSA, etc.) have been greatly threatened, including the security level of symmetric cryptography has been cut in half. Therefore, in order to cope with the ability of quantum computers that is different from classical computers, cryptographers began to study cryptographic systems with quantum-resistant characteristics, that is, cryptographic schemes that can still maintain exponential complexity under quantum computers. From a broad perspective, there are currently five mainstream quantum-resistant cryptographic schemes, including cryptographic systems based on lattice difficult problems, cryptographic systems based on coding problems, cryptographic systems based on multivariable equations, cryptographic systems based on elliptic curve homology problems, and traditional symmetric cryptographic systems. Lattice cryptography, as the most widely used and currently the best performing type of cryptography in quantum-resistant schemes, has attracted widespread attention because it can not only be used for encryption, but also for signatures and even fully homomorphic operations and other cryptographic applications.

[0003] A lattice cryptographic scheme is a cryptographic system based on a difficult problem on a lattice. A lattice is a The discrete additive group on can be viewed as a linear space of integer coefficients, formally expressed as The matrix B is called a lattice basis of the lattice. In the average case, solving the shortest vector problem (SVP, i.e. solving the shortest non-zero vector on a lattice) and the closest vector problem (CVP, i.e. finding the closest vector to a given point in space) on a lattice is considered difficult (NP-hard), but actual cryptographic schemes are not designed directly based on the SVP / CVP problem. Most of them are based on LWE (Learning With Error Problem) or SIS (Short Integer Solution Problem). These problems can only be reduced to the approximate SVP (using a given approximation factor to limit the ratio between the length of the short vector and the length of the shortest vector on the lattice) / approximate CVP problem (using a given approximation factor to limit the ratio between the distance between the vector and the target point and the distance between the vector and the closest vector on the lattice), which is equivalent to a weakened SVP / CVP problem. At present, mainstream lattice cryptography is generally based on the LWE problem, on which different algebraic structures are added to produce problems such as NTRU, Ring-LWE, Module-LWE, etc.

[0004] The formal description of the LWE problem is: for a matrix A secret vector A noise vector Calculate b≡A·s+e(mod q). Given (A,b), solve the secret vector s. The difficulty comes from the added noise vector. When the standard deviation of the noise vector is large, it is difficult to solve the LWE problem. Currently, there are two main algorithms for solving the LWE problem: primal attack and dual attack. The primal attack regards LWE as an approximate CVP problem and then constructs an m+n+1-dimensional embedding lattice: Then there is a short vector [e -s 1] on it. By solving the approximate SVP problem on the embedded lattice, we can get the short vector and then solve the LWE problem. Currently, the best algorithm for solving the SVP problem is the BKZ lattice reduction algorithm that uses the sieve method at the bottom layer. The complexity is still O(2 0.292n ) exponentially. Another attack method is dual attack, which is to attack A in The corresponding dual grid is: Lattice reduction is performed on the matrix A1, where A1 is the matrix consisting of the first n1 columns of the matrix A, so that the short vector [wv] is obtained so that vA1≡w(mod q). Then the original formula can be rewritten as vb≡vA·s+ve≡ws1+vA2s2+ve(mod q), where w, s1, v, e are all short vectors, so the result after the inner product is still small, which can be regarded as a sub-Gaussian distribution. The secret value of the s2 part can be guessed by blasting, and a distinguisher can be combined to distinguish the sub-Gaussian distribution and The uniform random distribution on s2 is used to determine whether the correct s2 is guessed. The actual complexity estimation is limited by the incorrect key independence assumption in the algorithm. Currently, it has not been able to perform better than the primal attack. Therefore, the security estimation can focus on the attack complexity evaluated by the primal attack, that is, the uSVP attack.

[0005] Usually, solutions based on the LWE problem need to balance the dimension and the standard deviation of s and e to achieve the required security level. Generally, the estimation model proposed by Martin R.Albrecht, Rachel Player, and Sam Scott in 2015 is used to evaluate the security level, or a more accurate simulation model proposed by Dana Dachman-Soled, Léo Ducas, Huijing Gong, and Mélissa Rossi in 2020 based on the hidden information in the test channel is used for evaluation.

[0006] The earliest lattice cryptographic scheme was the NTRU encryption scheme proposed by Hoffstein, Pipher, and Silverman in 1996. Its difficulty is mainly based on the validity of the NTRU assumption and the difficulty of the shortest vector problem (SVP) on the lattice. The original NTRU assumption is: for a polynomial quotient ring Where n is a prime number and q is a large modulus, giving a distribution with a small standard deviation Extract elements from it as coefficients to generate polynomials f and g, where f needs to have an inverse on R. Then NTRU assumes that the polynomial adversary cannot distinguish h≡g·f -1 (mod q) and R q For the attack on the NTRU hypothesis, the most direct method is to transform h into an inverse circulant matrix and construct a The upper 2D lattice correspond On a 2n-dimensional lattice, there exists a 1-dimensional dense sublattice [gf], corresponding to The previous n-dimensional lattice, that is, there are n linearly independent and very short lattice bases, and then use the BKZ lattice reduction algorithm to simplify and directly find f and g. It can be regarded as an LWE problem with b as a zero vector. However, when the standard deviation of q is too large compared to f and g, the advantage brought by the dense sublattice will make it easier to solve than ordinary LWE. When the standard deviation of f and g is 1, there is an upper bound of q that is easier to solve, which is O(n 2.484 ), on the contrary, when q is less than this limit, the approximate SVP problem of LWE is still used to analyze the difficulty of NTRU.

[0007] The original NTRU scheme provides a natural one-way trapdoor: using The polynomial f and g on the same network are used as private keys, h≡g·f -1 (mod q) as the public key, for the plaintext polynomial m (the coefficients of the plaintext polynomial are all less than p, that is, ) When encrypting, the ciphertext c is calculated as p·h·r+m, where p is a small prime number, usually 3, and r is R q The previous polynomial, whose coefficients are drawn from a distribution with small standard deviation When decrypting, first Calculate a≡c·f≡p·g·r+f·m(mod q) above, where g,m,f,r are all small coefficient polynomials. When the coefficient of the product of their polynomials is less than , then the polynomial a=p·g·r+f·m, that is, there is no modular operation. Then calculate m≡a· in For the polynomial f in The advantages of this trapdoor are simple implementation and fast calculation. It is also widely used by many schemes. There are many modifications. For example, if f is rewritten as f′=p·f+1, then only c·f′≡(p·g·r+p·f·m+m)≡m≡(mod p) needs to be calculated once for decryption. However, these variants do not change the conditions for the correct decryption of the trapdoor, that is, This limitation also results in uneven standard deviations of m and r when the standard deviations of f and g are the same, which limits the selection of parameters and leads to subsequent improvements.

[0008] In signature schemes such as Falcon, a one-way trapdoor based on NTRU is also required. In order to further reduce the standard deviation of the coefficients of f and g and thereby reduce the signature size, a new trapdoor technology is used. The polynomial f and g on the same network are used as private keys, h≡g·f -1 (mod q) as the public key, for the plaintext polynomial m, calculate the ciphertext c = h·r + m, where r is R q The previous polynomial, whose coefficients are drawn from a distribution with small standard deviation Now consider the NTRU grid: This lattice has another lattice basis: Where G, F satisfy gF-fG=q. This is to look at the trapdoor from the perspective of the lattice basis. For the NTRU lattice generated by the public key, a set of shorter lattice bases can be obtained using the private key, which widens the decryption capability gap between the party who knows the private key and the party who only knows the public key. When a good enough lattice basis is mastered on a lattice, the approximate CVP problem on the lattice can be efficiently calculated. It is found that there is a vector (h·r,r) on the NTRU lattice, and the vector (c,0) can be constructed through the ciphertext, (c,0)=(h·r,r)+(m,-r), then the distance between the two vectors is the length of the vector (m,-r), and m,r are coefficients from the distribution of small standard deviations. Therefore, given the vector (c,0), solving the point closest to it on the NTRU lattice will most likely result in (h·r,r), thereby decrypting m,r. The shortness of the distance of the vector solved by CVP depends on the quality of the given lattice basis (i.e., whether the length of the basis vector is short enough). The most efficient CVP solving algorithm is the Babai Rounding Off algorithm, which can be regarded as multiplying the inverse of the lattice basis matrix to the target vector and then rounding it off. For a lattice L(B), given a point t, using the Babai Rounding Off algorithm to find the vector closest to t on L is to calculate Then when e = vt, the solution to CVP is successful if and only if || e·B -1 || ∞<1. When using trapdoor solution, the decryption is correct if and only if It can be noted that the restriction here has less coefficient p than the previous condition, but it is necessary to consider ||G·r+F·m|| ∞ , and the coefficients of G and F are still different from the coefficients of g and f even through the algorithm proposed by Thomas Pornin and Thomas Prest in 2019 to generate smaller G and F. The level difference is Therefore, another CVP solution algorithm, Babai Nearest Plane algorithm, is used here. It needs to calculate the Gram Schmidt orthogonalization matrix of a given lattice basis, and then directly map the coordinates of the target point on the Gram Schmidt orthogonalization matrix to the original lattice matrix to obtain the close point. Here, only the orthogonal element G needs to be calculated on the quotient ring R. * ,F * Without the need to expand into inverse cyclic matrix calculation, the constraint condition for correct decryption becomes The orthogonalized elements are basically the same size as the previous g and f, so the condition for successful decryption can be written as Compared with previous The standard deviation of the coefficients of the p-fold polynomial r can be reduced while the standard deviations of g, f, and m remain unchanged. Since the difficulty of the LWE problem mainly comes from the dimension and the proportion of the standard deviation to the modulus, when the size of the standard deviation is reduced, the size of the modulus can be reduced while maintaining almost the same security parameter level, while ensuring that the decryption error rate does not drop too much, thereby shortening the size of the ciphertext.

[0009] The above trapdoor design is more commonly used in lattice-based signature schemes to calculate the CVP problem on the NTRU lattice. The new scheme BAT proposed by Pierre-Alain Fouque, Paul Kirchner, Thomas Pornin, and Yang Yu in 2022 [6] This trapdoor is applied to the NTRU-based encryption scheme, thus constructing the most compact NTRU-based encryption scheme currently available. It can achieve the NTRU scheme of n=512,q=257 while ensuring the security level of 128-bit classical computers, and the decryption error rate is less than 2 128 .

[0010] In BAT, a trapdoor form that can be calculated more efficiently is proposed, which combines the characteristics of Babai Rounding Off and Babai Nearest Plane algorithms and does not require the storage of floating-point numbers in the Gram Schmidt matrix. Ignoring some details and scaling factors, the algorithm is described by converting the orthogonal polynomial G calculated on the quotient ring R into * ,F * The coefficients of are stored as integers with a certain precision, that is, for rational numbers use To save, q' is a large number that controls the precision, and G stored with q' precision * ,F * Recorded as Then we only need to solve the linear equation: That's it.

[0011] Cryptographic schemes often need to balance security and efficiency to find an optimal balance. The above BAT scheme is limited by the parameter selection of NTT fast polynomial multiplication, so only the lowest n=512,q=257 parameters are given. Since the traditional binary NTT requires the dimension to be a power of 2, the next level can only select n=256, and at this time it is impossible to achieve a security level of 128 bits. Consider combining ternary NTT technology to select more flexible dimensions and moduli, so as to select parameters that reach the 128 level but are more compact from 256 and 512.

[0012] Traditional binary NTT, Compute fast polynomial multiplication, where n = 2 k , then x n +1 is a cyclotomic polynomial, which can be There is a decomposition: x n +1=(x-ξ 1 )(x-ξ 3 )…(x-ξ 2n-1 ), when the prime number q≡1(mod 2n), then There are n 2n-order roots of unity on x, so x n +1 can also be Decompose into n first-degree polynomials. Based on CRT (Chinese Reminder Theorem), calculate When multiplying two polynomials a and b, their values ​​in the multiplication of these n linear polynomials can be calculated separately, and then combined into the result through CRT, which can greatly speed up the calculation time. In actual calculation, a tree structure is used to decompose the calculation layer by layer.

[0013] In the NTTRU scheme published by Vadim Lyubashevky and Gregor Seiler in 2019, it was proposed to apply ternary NTT technology to the NTRU scheme design, which mainly considered The NTRU+ scheme proposed by Jonghyun Kim and Jong Hwan Park later extended the application of ternary NTT technology to a more general case, that is, considering 3n = 2 k 3 j , k, j ≥ 1 degree cyclotomic polynomial, the corresponding cyclotomic polynomial is It can also be decomposed layer by layer, and two isomorphisms are used here to decompose downward: where ξ is A sixth root of unity on Among them α=ξ, β=ξω, γ=ξω 2 ,ω is Through the above two isomorphisms, we can continue to layer down until we get a bunch of quadratic polynomials or cubic polynomials. Although they cannot be completely decomposed into linear polynomials, the calculation speed has been greatly improved.

[0014] The BAT algorithm uses a trapdoor for decryption, which greatly compresses the size of the ciphertext. However, due to efficiency considerations, it needs to ensure that the dimension and modulus are consistent with the parameters of NTT fast calculation. It is impossible to flexibly select parameters, so it cannot strike a good balance between the decryption error rate and the ciphertext size. Summary of the invention

[0015] In order to improve the ciphertext size problem in the above scheme, the present invention discloses a lightweight quantum-resistant encryption method based on NTRU, which can provide extremely small-sized ciphertext with a ciphertext expansion rate of less than 20 times.

[0016] The meanings of some symbols involved in the present invention are as follows:

[0017] The ring of integers;

[0018] q′: a large prime number used to control precision;

[0019] q: a prime number;

[0020] the ring of integers modulo q;

[0021] The ring of polynomials over the ring of integers;

[0022] Polynomial rings over rings;

[0023] σ f ,σ s : is a real number greater than 0, describing the standard deviation of the polynomial components;

[0024] ||||: represents the L2 norm. When used for polynomials and vectors composed of polynomials, it means to calculate the L2 norm of the vector concatenated by the components of the polynomials.

[0025] The polynomial quotient ring on ;

[0026] The polynomial quotient ring on ;

[0027] R n : That is, a vector consisting of n elements on R.

[0028] The technical solution of the present invention is as follows:

[0029] A lightweight lattice-based quantum-resistant encryption method, the steps of which include:

[0030] 1) Generate the public key h and private key (f, g, F′, G′) using the key generation algorithm; the method is:

[0031] 11) Calculation

[0032] 12) From the standard deviation σ f Discrete Gaussian distribution of Extract 2n elements as coefficients of two polynomials f and g on R;

[0033] 13) Determine whether the polynomial f is reversible on R mod q, if not, return to step 12); if reversible, proceed to step 14);

[0034] 14) If Then return to step 12); otherwise, proceed to step 15);

[0035] 15) Calculate h = g·f -1 (mod q);

[0036] 16) From R 2 Select F, G so that gF-Gf=q;

[0037] 17) Calculate (F′, G′, w) = Reduce (g, f, G, F, q′, γ); Reduce() is a polynomial reduction algorithm;

[0038] 18) If Return to step 12); otherwise output the public key

[0039] h, private key (f, g, F′, G′); where, R is The polynomial quotient ring on is a polynomial ring over the integer ring, is the ring of integers modulo q, and n is a 2 i 3 j is a positive integer representing the degree of the polynomial, k is a parameter generating noise in LWR, which is a small positive integer greater than or equal to 2, and q′ is a prime number used to control the accuracy;

[0040] 2) Using encryption algorithm according to n,k,q,σ f ,γ encrypts the plaintext m to generate the ciphertext c; the method is:

[0041] 21) From the standard deviation σ s Discrete Gaussian distribution of Extract n elements from the top as R q The coefficients of the polynomial s on ; where R q for The polynomial quotient ring on for Polynomial rings over rings, is the ring of integers modulo q;

[0042] 22) Calculate the ciphertext

[0043] 23) Calculate e = (hs mod q) - kc0;

[0044] 24) If Then return to step 21); otherwise, proceed to step 25);

[0045] 25) Calculate the ciphertext Output ciphertext c = (c0, c1);

[0046] 3) Use the encryption algorithm to decrypt the ciphertext c according to n, q, q′, f, g, F, G, γ, k to obtain the ciphertext m; the method is:

[0047] 31) Use the decoding algorithm Decode(c0,f,g,F,G,q,q′,k) to calculate s,e;

[0048] 32) If Then terminate the decryption calculation; otherwise output the plaintext

[0049] Furthermore, the polynomial reduction algorithm Reduce() calculates (F′, G′, w) based on the input g, f, G, F, q′, γ as follows: First calculate Then calculate Then output (F′=q′F-fw,G′=q′G-gw,w); where, represents the conjugate of f.

[0050] Furthermore, the decoding algorithm Decode(c0,f,g,F,G,q,q′,k) calculates s,e by first calculating (F′,G′,w)=Reduce(g,f,G,F,q′,γ), c′=fc(mod q), c″=q′Fc-c′w(mod qq′); then solving the integer ring Linear equation on : Output (e,s).

[0051] Furthermore, And is a prime number.

[0052] Furthermore, σ f ,σ s are all real numbers greater than 0, n is a positive integer and the only factors of n are 2 and 3.

[0053] Furthermore, the hash algorithm in step 25) is the hash algorithm shake256 in the sha3 hash function family.

[0054] Furthermore, m is a plaintext polynomial, and the coefficients of the plaintext polynomial m are all 0 or 1.

[0055] The quantum-resistant encryption scheme of the present invention is as follows Figure 1 As shown, the algorithm includes three parts:

[0056] 1) Key generation algorithm;

[0057] 2) Encryption algorithm;

[0058] 3) Decryption algorithm.

[0059] The specific steps of the key generation algorithm are:

[0060] enter:

[0061] Output: public key h, private key (f, g, F′, G′)

[0062] 1) Calculation

[0063] 2) From the standard deviation σ f Discrete Gaussian distribution of Extract 2n elements as coefficients of two polynomials f and g on R;

[0064] 3) Determine whether f is reversible on R mod q. If not, return to step 2); if reversible, proceed to step 4);

[0065] 4) If Then return to step 2); otherwise, proceed to step 5);

[0066] 5) Calculate h = g·f -1 (mod q);

[0067] 6) Calculate (F, G) ∈ R 2 , so that gF-Gf=q;

[0068] 7) Calculate (F′, G′, w) = Reduce (g, f, G, F, q′, γ); Reduce() is a polynomial reduction algorithm;

[0069] 8) If Then return to step 2); otherwise, proceed to step 9);

[0070] 9) Output the public key h and the private key (f, g, F′, G′); that is, combine f, g, F′, G′ together as the private key.

[0071] Where n is of the form 2 i 3 j is a positive integer, indicating the degree of the polynomial, k is the parameter that generates noise in LWR, which is a small positive integer greater than or equal to 2, q′ is a large prime number that controls the accuracy, This step is performed by the client to calculate the key.

[0072] The specific steps of the encryption algorithm are:

[0073] Input: n, k, q, σ f ,γ,m∈{0,1} 128 , m is the plaintext to be encrypted

[0074] Output: ciphertext c

[0075] 1) From the standard deviation σ s Discrete Gaussian distribution of Extract n elements from the top as R q The coefficients of the polynomial s on ;

[0076] 2) Calculate the ciphertext

[0077] 3) e = (hs mod q) - kc0;

[0078] 4) If Then return to step 1); otherwise, proceed to step 5);

[0079] 5) Calculate the ciphertext

[0080] 6) Output ciphertext c = (c0, c1).

[0081] This step encrypts the information by the client.

[0082] The specific steps of the decryption algorithm are:

[0083] Input: n,q,q′,f,g,F,G,γ,k,c

[0084] Output: Plain text m

[0085] 1) Use the decoding algorithm Decode(c0,f,g,F,G,q,q′,k) to calculate s,e;

[0086] 2) If Then the output is ⊥; that is, the decryption fails and the decryption calculation is terminated;

[0087] 3) Output plain text

[0088] This step is performed by the user to decrypt the ciphertext.

[0089] More specifically, the hash algorithm used is shake256 from the sha3 hash function family, and the output length is set to 16 bytes. The specific steps of the Reduce algorithm in the key generation algorithm are:

[0090] Input: g,f,G,F,q′,γ

[0091] Output: F′, G′, w

[0092] 1) Calculation

[0093] 2) Calculation

[0094] 3) Output (F′=q′F-fw, G′=q′G-gw,w).

[0095] in represents the conjugate of f, that is The essence of the Reduce algorithm here is to use g and f to simplify G and F to obtain approximately orthogonal elements on R.

[0096] The two judgments on the norms ||g,γf|| and ||G′,γF′|| in the key generation algorithm are to avoid the generation of differential keys that exceed the estimated decryption error rate. The more specific decryption error rate calculation part will be placed in the specific parameter selection later.

[0097] The Decode algorithm uses the trapdoor of NTRU on the lattice basis for decoding, which can be regarded as the fusion of Babai RoundingOff algorithm and Babai Nearest Plane algorithm, which is consistent with the BAT scheme. The specific steps are as follows:

[0098] Input: c0,f,g,F,G,q,q′,k

[0099] Output: e,s

[0100] 1) Compute (F′, G′, w) = Reduce (g, f, G, F, q′, γ);

[0101] 2) c′ = fc (mod q);

[0102] 3)c″=q′Fc-c′w(mod qq′);

[0103] 4) Solution Linear equation on :

[0104] 5) Output (e, s).

[0105] Compared with the prior art, the present invention has the following positive effects:

[0106] The present invention can better balance the relationship between the decryption error rate and the ciphertext size, combines the decryption trapdoor technology in BAT with the ternary NTT, selects more flexible parameters, and further reduces the size of the ciphertext at the cost of increasing the decryption error rate, making it more suitable for some high fault tolerance scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0108] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below through some details.

[0109] The present invention discloses a lightweight quantum-resistant encryption scheme based on NTRU. The biggest feature of the scheme is that the ciphertext size is extremely small. It can use 309 bytes of ciphertext while ensuring a 128-bit security level, and the ciphertext expansion rate is less than 20 times. In addition, the scheme parameter selection supports incomplete NTT technology, which can accelerate the polynomial multiplication part.

[0110] Efficient Storage:

[0111] When storing, for ciphertext, 16 elements are stored in a group with a base of 86, requiring a total of 309 bytes. For public keys, 48 ​​elements are stored in a group with a base of 257, requiring a total of 385 bytes.

[0112] Quick calculation:

[0113] Traditional binary NTT, Compute fast polynomial multiplication, where n = 2 k , then x n +1 is a cyclotomic polynomial, which can be There is a decomposition: x n +1=(x-ξ 1 )(x-ξ 3 )…(x-ξ 2n-1 ), when the prime number q≡1(mod 2n), then There are n 2n-order roots of unity on x, so x n +1 can also be Decompose into n first-degree polynomials. Based on CRT (Chinese Reminder Theorem), calculate When multiplying two polynomials a and b, we can calculate their multiplication values ​​of these n linear polynomials respectively, and then combine them into the result through CRT, which can greatly speed up the calculation time. In actual calculation, a tree structure is used to decompose the calculation layer by layer. The bottom layer of the complete NTT calculation is a linear polynomial, so in the end, we only need to The above calculation is performed, and the complete NTT calculation has restrictions on the modulus and dimension, and needs to satisfy q≡1(mod 2n). When some more flexible parameters are selected, this condition cannot be met. For example, it may only be possible to achieve q≡1(mod n). In this case, the lowest-level modulus polynomial in NTT is a quadratic polynomial.

[0114] In the NTTRU scheme published by Vadim Lyubashevky and Gregor Seiler in 2019, it was proposed to apply ternary NTT technology to the NTRU scheme design, which mainly considered The NTRU+ scheme proposed by Jonghyun Kim and Jong Hwan Park later extended the application of ternary NTT technology to a more general case, that is, considering 3n = 2 k 3 j , k, j ≥ 1 degree cyclotomic polynomial, the corresponding cyclotomic polynomial is It can also be decomposed layer by layer, and two isomorphisms are used here to decompose downward: where ξ is A sixth root of unity on Where α=ξ, β=ξω, γ=ξω 2 ,ω is The encryption scheme proposed in this invention satisfies Through the above two isomorphisms, we can continue to layer down. The bottom layer is a sixth-order polynomial. Although it cannot be completely decomposed into a first-order polynomial, it has greatly improved the calculation speed.

[0115] Security Analysis:

[0116] In terms of security level, the present invention adopts the estimation model proposed in to perform security level assessment, which is a commonly used assessment model for lattice cryptographic schemes. Although this scheme is based on the NTRU problem, the size of q has not reached the level of overstretched attack, so only uSVP attack is considered. The same evaluation method as LWE is used. The final key recovery complexity is 132.6, and the ciphertext recovery complexity is 132.6.

[0117] Decryption error rate analysis:

[0118] In the calculation of standard deviation, this paper combines the calculation method of the ideal lattice basis distribution on the ternary modular polynomial in NTTRU and the idea of ​​using a new decoding algorithm to calculate the error in BAT. Polynomials on a Polynomial Quotient Ring The corresponding convolution matrix can be written as:

[0119]

[0120] in:

[0121]

[0122]

[0123] When polynomials a and b are modularly multiplied, the element of the resulting polynomial is c = ba + b' (a + a'), where a and a' come from the coefficient distribution of polynomial a, b and b' come from the coefficient distribution of polynomial b, and the coefficients of polynomials f and g in the present invention are both derived from the distribution of polynomials with a standard deviation of σ f The coefficient distribution of the simplified F′, G′ polynomial can also be regarded as the standard deviation of If the discrete Gaussian is used, it is only necessary to substitute the distribution of G′,s and f,e to calculate the distribution result of the above polynomial product, and then calculate the error through Gaussian tail noise, and take the maximum value as the upper bound estimate of the decryption error corresponding to the scheme parameters. The error of the present invention is less than 2 through theoretical calculation. -28 , and in actual experiments, the rejection sampling technique can be used to control the -30 the following.

[0124] Plan size comparison:

[0125]

[0126]

[0127] It can be seen that the solution proposed in the present invention is smaller in size than the existing solution that achieves a 128-bit security level, and accordingly sacrifices some security level and decryption error rate, but it still has application scenarios.

[0128] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A lightweight lattice-based quantum-resistant encryption method, the steps of which are include: 1) Generate the public key h and private key (f, g, F′, G′) using the key generation algorithm; The method is: 11) Calculation 12) From the standard deviation σ f The discrete Gaussian distribution D σf Extract 2n elements as coefficients of two polynomials f and g on R; 13) Determine whether the polynomial f is reversible on R mod q, if not, return to step 12); if reversible, proceed to step 14); 14) If Then return to step 12); Otherwise proceed to step 15); 15) Calculate h = g·f -1 (mod q); 16) From R 2 Select F, G so that gF-Gf=q; 17) Calculate (F′, G′, w) = Reduce (g, f, G, F, q′, γ); Reduce() is a polynomial reduction algorithm; 18) If Return to step 12); otherwise output the public key h and private key (f, g, F′, G′); where, R is The polynomial quotient ring on is a polynomial ring over the integer ring, is the ring of integers modulo q, and n is a 2 i 3 j is a positive integer representing the degree of the polynomial, k is a parameter generating noise in LWR, which is a small positive integer greater than or equal to 2, and q′ is a prime number used to control the accuracy; 2) Using encryption algorithm according to n,k,q,σ f ,γ encrypts the plaintext m to generate the ciphertext c; the method is: 21) From the standard deviation σ s Discrete Gaussian distribution of Extract n elements from the top as R q The coefficients of the polynomial s on ; where R q for The polynomial quotient ring on for Polynomial rings over rings, is the ring of integers modulo q; 22) Calculate the ciphertext 23) Calculate e = (hs mod q) - kc 0 ; 24) If Then return to step 21); otherwise, proceed to step 25); 25) Calculate the ciphertext Output ciphertext c = (c 0 ,c 1 ); 3) Use the encryption algorithm to decrypt the ciphertext c according to n, q, q′, f, g, F, G, γ, k to obtain the ciphertext m; the method is: 31) Use the decoding algorithm Decode(c 0 ,f,g,F,G,q,q′,k) calculates s,e; 32) If Then terminate the decryption calculation; otherwise output the plaintext 2. The method according to claim 1, It is characterized in that The polynomial reduction algorithm Reduce() calculates (F′, G′, w) based on the input g, f, G, F, q′, γ as follows: First calculate Then calculate w = [vq′], and then output (F′ = q′F-fw, G′ = q′G-gw, w); where, represents the conjugate of f.

3. The method according to claim 1, It is characterized in that Decoding algorithmDecode(c 0 ,f,g,F,G,q,q′,k) to obtain s,e: first calculate (F′,G′,w)=Reduce(g,f,G,F,q′,γ),c′=fc(mod q),c″=q′Fc-c′w(mod qq′); then solve the integer ring Linear equation on : Output (e,s).

4. The method according to claim 1, 2 or 3, It is characterized in that And is a prime number.

5. The method according to claim 1, 2 or 3, It is characterized in that σ f ,σ s are all real numbers greater than 0, n is a positive integer and the only factors of n are 2 and 3.

6. The method according to claim 1, 2 or 3, It is characterized in that The hash algorithm in step 25) is the hash algorithm shake256 in the sha3 hash function family.

7. The method according to claim 1, 2 or 3, It is characterized in that m is a plaintext polynomial, and the coefficients of the plaintext polynomial m are all 0 or 1.

Citation Information

Patent Citations

  • Secret key packaging, encrypting and decrypting method based on NTRU grid

    CN116318695A

  • Key negotiation method based on lattice physical entropy source enhancement

    CN117014134A

  • Method and processing device for performing a lattice-based cryptographic operation

    US20190312728A1

Cited By

  • Public key decomposition method based on digital inverse adiabatic quantum optimization

    CN120433927A

  • Quantum annealing attack method for solving LWE problem in quantum cryptography

    CN121567318A