Abstract
DBTRU was proposed by Thang and Binh in 2015. As a variant of NTRU, the integer polynomial ring is replaced by two binary truncated polynomial rings . DBTRU has some advantages over NTRU in terms of security and performance. In this paper, we propose a polynomial-time linear algebra attack against the DBTRU cryptosystem, which can break DBTRU for all recommended parameter choices. The paper shows that the plaintext can be achieved in less than 1 s via the linear algebra attack on a single PC.
1. Introduction
The Number Theory Research Unit (NTRU) cryptosystem as a public key cryptosystem was proposed by Hoffstein, Pipher, and Silverman in 1996 and published in 1998 [1]. It was standardized by IEEE in 2008 [2]. In 2020, NTRU entered the third round of submissions in the National Institute of Standards Technology (NIST) post-quantum cryptography standardization process. NTRU works on the integer polynomial ring . The encryption and decryption procedures involve linear operations between ring elements. This characteristic gives NTRU a great advantage over Rivest, Shamir, Adleman (RSA) cryptosystem and elliptic curve cryptosystem (ECC) in terms of computational speed and key size. NTRU can be classified as post-quantum cryptography, and its security is based on the hardness of the shortest vector problem in a certain lattice. Compared with traditional public key algorithms, its research has been a hot spot in the field of public key cryptography. NTRU is widely used in e-commerce, communication, embedded systems, and portable devices [3,4].
Since 2002, cryptographers have been exploring the optimization of NTRU from the underlying mathematical structure in order to achieve a higher level of security or better performance. Banks et al. gave the non-invertible version in 2002 [5]. This extension can overcome the problem of finding “enough” invertible polynomials in small sets. In 2002, Gaborit et al. proposed CTRU [6], a NTRU-like cryptosystem that runs on . CTRU can avoid the attacks based on the LLL algorithm. Vats proved that it is insecure under linear algebra attack in 2008 [7]. In 2005, Coglianese and Goi proposed MaTRU [8], which operates in the ring of k by k matrices . Compared to NTRU, MaTRU further improves system operation efficiency. In 2011, Malekian et al. adopted the unique mathematical structure of quaternion algebra to design the QTRU cryptosystem [9], in which non-commutativeness plays a key role in the system, and which further enhances the security of QTRU. In 2015, Yasuda et al. proposed a general NTRU cryptosystem based on group ring, called GR-NTRU [10]. They investigated the security and performance of the cryptosystem under different instance group rings by combining group representation theory. In 2017, Thakur et al. designed NTRU over spit quaternion algebra [11]; SQTRU can reduced the decryption failure due to a non-commutative algebraic structure. In 2018, Wang et al. presented a variant of NTRU with IND-CPA security named D-NTRU [12], which has higher encryption and decryption efficiency than NTRU. In 2008, Karbasi et al. established PairTRU working in the matrix ring with pairwise entries of distinct polynomials in [13]. PairTRU is more secure than NTRU under lattice based attack. In 2020, Hajaje et al. proposed PMTRU by combining the advantages of NTRU with MATRU [14]. PMTRU also improves the speed of encryption and decryption procedures.
DBTRU was proposed by Thang and Binh in 2015 [15]. The name DBTRU indicates the use of number theory and two binary truncated polynomial rings , (). Because both algorithms for encryption and decryption of DBTRU are only simple modular polynomial operations, DBTRU is as fast as NTRU. Although the message-expansion factor in DBTRU is higher than that in NTRU, the keys of DBTRU are smaller under approximately the same level of security.
In this paper, we further analyze the security of DBTRU and propose a linear algebra attack that can break it for all recommended parameter choices to compare the security levels in NTRU. More precisely, we first explore a hidden linear relationship between the public keys and the secret keys and find the parameter constraints for plaintext and secret key security while guaranteeing correct decryption.
2. The DBTRU System
We describe the DBTRU cryptosystem, as developed in [15], including notations, key generation, encryption, decryption, and decryption criteria.
2.1. Notations
This cryptosystem relies on two integer parameters s, l and four sets , , , of polynomials with binary coefficients. In general, s is smaller than l and . Let . The polynomial ring is denoted by . DBTRU is working in and . We write * for polynomial multiplication in , and let denote the degree of .
Let , , , and denote the maximum degree and Hamming weight of f,g,, and m, respectively. We replace the definition in NTRU with
In addition, similar to DBTRU, we set the modular polynomials as and .
2.2. Key Generation
During the process of key generation, Bob chooses two arbitrary positive integers s and l such that , and sets . In addition, Bob chooses an small positive integer and arbitrary polynomials (), which are invertible in both and . For each , Bob computes and , where and . Then Bob computes
and its two inverses
and
Notice that . Bob chooses a non-zero polynomial and computes
Bob keeps f,, and as the private keys, publishing h as the public key.
2.3. Encryption and Decryption
Suppose Alice wants to send a s-bit message m to Bob. First, Alice randomly selects a non-zero polynomial , a small positive integer , and arbitrary polynomials . The ciphertext is given by
Alice then sends the l- bit ciphertext e to Bob. After receiving e, Bob computes
and recovers the message m by computing
2.4. Proof of Decryption
By inserting (1) into (2), there is
Hence, . Thereby,
2.5. Decryption Criteria
It is proved that
and
if satisfies
then
Thereby, to ensure successful decryption, it is necessary that
3. Security Analysis
In this section, we describe the details of our attack on a DBTRU cryptosystem. First, we show that there is a hidden linear relationship between the public keys and the random non-zero polynomial in the encryption phase. Second, we construct a linear system of equations with the unknown random non-zero polynomial and then recover the plaintext message after we obtain the random non-zero polynomial. Finally, we present the whole algorithm of our attack.
3.1. The Hidden Linear Relationship
Theorem 1.
As described in the DBTRU cryptosystem, let and , where . Let () be some randomly chosen polynomials with . For the ciphertext
if , then the part of coefficients of e, namely, are equal to the coefficients of with the same degree.
Proof of Theorem 1
As noted above, the ciphertext is calculated by
and we can write e as
where (). We assume
where (). In addition,
with ().
We have
Now considering the maximum degree of components of , we have
From the precise analysis above, we have only part of the coefficients of e related to the , and m. More specifically, only the coefficients are affected by the modulo L, and are just equal to the coefficients of with the same degree. □
From Theorem 1, we can see that the key to breaking DBTRU lies in the irrationality of the ciphertext structure. In each encryption process, we can construct the following linear equation system through the partial coefficients of the ciphertext e, we have
We denote the coefficient matrix of Equation (3) as
where the elements of the matrix are the coefficients of the public key h.
In Equation (3), the number of variables is , and the number of equations is . Let
we have that the number of equations is greater than or equal to the number of variables. In this case, the system of equations in (3) has a unique solution. Therefore, plaintext and secret polynomial will be secure if
We will present how to recover the unique solution in the next subsection.
Remark 1.
In the DBTRU cryptosystem, the authors also proposed an assessment of the algebraic attack on this scheme. The main problem with their security analysis is that they paid attention to too many unknown polynomials. Here, we discover the hidden linear relationship between the public keys and the random non-zero polynomial by careful analysis.
3.2. Recover the Non-Zero Polynomial
To recover the polynomial , we need to analyze the solutions of Equation (3). As long as the rank of matrix A defined above is equal to n, then Equation (3) should have only one solution, namely, the polynomial . To analyze the rank of matrix A, we cite the following result, which is Theorem 2 of [16].
Lemma 1.
Let N be a positive integer. Let be the distinct prime factors of N. Consider the ring of matrices with entries in . Then the proportion of invertible matrices (i.e., with determinant coprime to N) is equal to :
Applying Lemma 1, we have the following Corollary.
Corollary 1.
Let p be a prime integer and be an integer. Let denote the ring consisting of matrices with entries in . The probability of having at least one invertible matrix in is
Proof
(Proof of Corollary 1).
When setting in Lemma 1, we have that the probability of having a irreversible matrix with entries in is
Then, when we choose matrices from , the probability that all the matrices are irreversible is
Based on the above analysis, we can deduce the result in our corollary. □
Table 1 shows the probability of having at least one invertible matrix in .
Table 1.
The probability of at least one invertible matrix in , with .
Remark 1.
From Table 1, we can see that even for p = 2, we only need to choose 3 times or more from ; then we can get a invertible matrix with a probability close to 1.
Finally, after obtaining , one can recover the message m by calculating
Here, we propose our whole attack as follows Algorithm 1
| Algorithm 1: Main strategy of this attack |
Input: .
Output: The plaintext message m. |
4. Experiments Results
In DBTRU, the authors concluded that as a variant of NTRU, DBTRU has advantages in both security and performance comparison with NTRU, as shown in Table 2, Table 3 and Table 4, respectively.
Table 2.
Comparison in moderate security mode of NTRU.
Table 3.
Comparison in high security mode of NTRU.
Table 4.
Comparison in highest security mode of NTRU.
Here, we use Sage Math to complete our experiments. First, we give the probability of encountering an invertible matrix when selecting multiple times under 10,000 sets of data in Table 5.
Table 5.
The probability of having an invertible matrix.
From Table 5, the experiment data validate Remark 2.
Next, we give the total running time of breaking the DBTRU cryptosystem under 10,000 sets of data in Table 6.
Table 6.
The running time for breaking DBTRU.
From Table 6, the results show that for the three parameter choices recommended in the DBTRU cryptosystem, our proposed linear algebra attack can recover the plaintext within 1 s.
5. Conclusions
The DBTRU cryptosystem is a binary analogue of NTRU. It was claimed in [15] that DBTRU has some important security and performance advantages over NTRU. For instance, at nearly the same level of security, DBTRU always has smaller keys. In this paper, we propose a linear algebra attack that breaks DBTRU by exploiting the secret linear relationship between public keys and secret keys. The linear algebra attack is practical on all three settings of recommended parameters, and the plaintext can be achieved in less than 1 s on a single PC. Our work may provide a new method of security analysis for NTRU variants or other cipher schemes.
Further research direction could be the fusion of NTRU with more complex algebraic structures, such as non-commutative algebras, to enhance the security of NTRU-like cryptosystems.
Author Contributions
X.T. wrote the original draft; Y.D. did the software work; J.B., L.L. and L.W. reviewed and edited the draft. All authors have read and agreed to the version of the manuscript.
Funding
This work was supported by the National Key Research and Development Program of China under Grant 2020YFB1805403, the Fundamental Research Funds for the Central Universities under Grant 2021RC29, the National Natural Science Foundation of China under Grants 61972050 and 62032002, the Beijing Natural Science Foundation under Grant L191012, and the 111 Project under Grant B08004.
Institutional Review Board Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Hoffstein, J.; Pipher, J.; Silverman, J.H. NTRU: A ring-based publickey cryptosystem. In Algorithmic Number Theory, Third International Symposium, ANTS III; Springer: Berlin/Heidelberg, Germany, 1998; Volume 1423, pp. 267–288. [Google Scholar]
- IEEE Std 1363; IEEE Standard Specification for Public Key Cryptographic Techniques Based on Hard Problems over Lattices. IEEE Computer Society: Washington, DC, USA, 2009.
- American National Standard for Financial Services. Lattice-Based Polynomial Public Key Establishment Algorithm for the Financial Services Industry; Technical Report, ANSI X9.98-2010; American National Standard for Financial Services: Washington, DC, USA, 2010. [Google Scholar]
- Bailey, D.V.; Coffin, D.; Elbirt, A.; Silverman, J.H.; Woodbury, A.D. NTRU in constrained devices. In International Workshop on Cryptographic Hardware and Embedded Systems; Springer: Berlin/Heidelberg, Germany, 2001; pp. 262–272. [Google Scholar]
- Banks, W.D.; Shparlinski, I.E. A variant of NTRU with non-invertible polynomials. In Indocrypt; Springer: Berlin/Heidelberg, Germany, 2002; pp. 62–70. [Google Scholar]
- Gaborit, P.; Ohler, J.; Sole, P. CTRU, a polynomial analogue of NTRU. In Computer Algebra and Functional Equations; INRIA: Rocquencourt, France, 2002; Volume 4621, pp. 1–12. [Google Scholar]
- Vats, N. Algebraic cryptanalysis of CTRU cryptosystem. In International Computing and Combinatorics Conference; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5092, pp. 235–244. [Google Scholar]
- Coglianese, M.; Goi, B.M. Matru: A new NTRU-based cryptosystem. In International Conference on Cryptology in India; Springer: Berlin/Heidelberg, Germany, 2005; pp. 232–243. [Google Scholar]
- Malekian, E.; Zakerolhosseini, A.; Mashatan, A. QTRU: Quaternionic version of the ntru public-key cryptosystems. ISeCure 2011, 3, 29–42. [Google Scholar]
- Yasuda, T.; Dahan, X.; Sakurai, X. Characterizing NTRU-Variants Using Group Ring and Evaluating Their Lattice Security. IACR, Cryptology ePrint Archive. 2015, pp. 1170–1186. Available online: https://eprint.iacr.org/2015/1170 (accessed on 18 September 2022).
- Thakur, K.; Tripathi, B.P. A Variant of NTRU with split quaternions algebra. Palest. J. Math. 2017, 6, 598–610. [Google Scholar]
- Wang, B.; Lei, H.; Hu, Y. D-NTRU: More efficient and average-case IND-CPA secure NTRU variant. Inf. Sci. 2018, 438, 15–31. [Google Scholar] [CrossRef]
- Karbasi, A.H.; Atani, R.E.; Atani, S.E. PairTRU: Pairwise non-commutative extension of the NTRU public key cryptosystem. Int. J. Inf. Secur. Sci. 2018, 7, 11–19. [Google Scholar]
- Hajaje, H.; Guennoun, Z.E.A.; Guennoun, M. PMTRU: An Efficient and Resistant Variant of the NTRU Public Key Cryptosystem. In Proceedings of the 2020 IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), London, ON, Canada, 30 August–2 September 2020; pp. 1–8. [Google Scholar]
- Thang, C.M.; Binh, N. Dbtru, a new NTRU-like cryptosystem based on dual binary truncated polynomial rings. In Proceedings of the 2015 2nd National Foundation for Science and Technology Development Conference on Information and Computer Science (NICS), Ho Chi Minh City, Vietnam, 16–18 September 2015; pp. 11–16. [Google Scholar]
- Nguyen, P. Cryptanalysis of the Goldreich-Goldwasser-Halevi cryptosystem from crypto’97. In Crypto’97, Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 1999; pp. 288–304. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).