Next Article in Journal
New Expressions to Apply the Variation Operation Strategy in Engineering Tools Using Pumps Working as Turbines
Previous Article in Journal
Parametric Estimation of Diffusion Processes: A Review and Comparative Study
 
 
Article

Revisiting Multivariate Ring Learning with Errors and Its Applications on Lattice-Based Cryptography

1
AtlanTTic Research Center, Universidade de Vigo, 36310 Vigo, Spain
2
Laboratory for Data Security, École Polytechnique Fédérale de Lausanne, CH-1015 Lausanne, Switzerland
3
Inpher, CH-1015 Lausanne, Switzerland
*
Author to whom correspondence should be addressed.
Academic Editor: Askar Tuganbaev
Mathematics 2021, 9(8), 858; https://doi.org/10.3390/math9080858
Received: 28 February 2021 / Revised: 8 April 2021 / Accepted: 9 April 2021 / Published: 14 April 2021
(This article belongs to the Section Mathematics and Computer Science)

Abstract

The “Multivariate Ring Learning with Errors” problem was presented as a generalization of Ring Learning with Errors (RLWE), introducing efficiency improvements with respect to the RLWE counterpart thanks to its multivariate structure. Nevertheless, the recent attack presented by Bootland, Castryck and Vercauteren has some important consequences on the security of the multivariate RLWE problem with “non-coprime” cyclotomics; this attack transforms instances of m-RLWE with power-of-two cyclotomic polynomials of degree n=ini into a set of RLWE samples with dimension maxi{ni}. This is especially devastating for low-degree cyclotomics (e.g., Φ4(x)=1+x2). In this work, we revisit the security of multivariate RLWE and propose new alternative instantiations of the problem that avoid the attack while still preserving the advantages of the multivariate structure, especially when using low-degree polynomials. Additionally, we show how to parameterize these instances in a secure and practical way, therefore enabling constructions and strategies based on m-RLWE that bring notable space and time efficiency improvements over current RLWE-based constructions.
Keywords: tensor of number fields; lattice cryptography; homomorphic encryption; ring learning with errors; multivariate rings tensor of number fields; lattice cryptography; homomorphic encryption; ring learning with errors; multivariate rings

1. Introduction

Lattices have become a very promising tool for the development and improvement of new cryptographic constructions, notably those belonging to the field of homomorphic encryption. Instead of directly working with lattice assumptions, it is frequent to deal with assumptions whose underlying security can be based on the hardness of lattice problems. Among them, the family of Learning with Errors (LWE) [1,2] has become the preferred one due to its versatility. Lyubashevsky et al. [3,4] proposed a variant of LWE called Ring-LWE (or RLWE), whose hardness can be reduced from hardness problems over ideal lattices (instead of the general ones used in the LWE version). RLWE has proven to be more practical than LWE, as the underlying primitives can be usually more efficient; e.g., RLWE enables a notable reduction in the size of the public and secret keys in public key cryptosystems.
The RLWE problem enables homomorphic cryptography with a ring homomorphism supporting both addition and multiplication of ciphertexts. Among the possible quotient polynomial rings used for this purpose, the most practical ones are those where the ideal is a cyclotomic polynomial of the form 1 + z n , with n a power of two. They present two advantages: (a) they enable efficient implementations of polynomial operations through fast radix algorithms of the Number Theoretic Transforms (NTTs) [5,6], and (b) the polynomial operations over the used ring correspond to basic blocks in practical applications in Computer Vision and Signal Processing [7,8,9], comprising, among others, linear convolutions, filtering, and linear transforms.
Recently, a multivariate version of RLWE (m-RLWE) was proposed as a means to efficiently deal with encrypted multidimensional structures, such as videos or images [9,10,11,12]. In this scenario, the use of a tensorial decomposition in “coprime” cyclotomic rings (see [3,4,13]) is a priori not applicable, as these structures require that the ideals have the same form (e.g., ( 1 + z n ) ). This is the context in which m-RLWE [10] was originally introduced.
Additionally, current hot problems in (fully) homomorphic encryption involve the optimization of elementary polynomial operations through fast transforms and, especially, the search for optimal strategies to execute homomorphic slot manipulations and trade off storage and computation needs for relinearization operations. These are fundamental blocks in homomorphic processing and in the implementation of the bootstrapping (see [14,15,16,17]) primitives enabling fully homomorphic encryption. As we will show, m-RLWE can bring significant efficiency improvements in all of them (see Section 8 and Section 9).
The use of the tensor of lattices and/or adding a multivariate structure to the involved rings has been the subject matter of several previous works, but with very different targets. We briefly survey here the closest ones: (a) In [18], the authors applied the standard tensor product of lattices to improve the hardness factor of the Shortest Vector Problem (SVP) under different assumptions. (b) In [13], the authors define an isomorphism between some cyclotomic fields and a tensor product of cyclotomic fields when the order m in Φ m ( z ) can be factored into several (different) prime powers. (c) The “tensor” representation also appears in the definition of the GLWE problem (also called Module-LWE [19]) which was originally introduced in [20,21]. In fact, analogously to LWE versus RLWE, the introduced multivariate RLWE problem can be seen as a ring version of the GLWE problem, by means of adding for a second time a ring structure into the module. (d) Finally, the FHEW scheme features [22] a ring tensoring for a speed-up of the homomorphic accumulator, and also bivariate rings are used as a means to enhance the efficiency of polynomial products inside the refreshing procedure in [23].
It is discussed in [24] that the m-RLWE problem can be reduced from discrete Gaussian Sampling (equivalent to worst case Shortest Independent Vectors Problem, SIVP) over the tensor of rings. Unfortunately, a recent work [25] shows an effective attack against m-RLWE when the univariate subrings share common roots, therefore considerably lowering the security of the underlying problem. Hence, our main contribution in this work is to redefine the m-RLWE problem and find secure instantiations that preserve the efficient results on multivariate RLWE  [12], by basing their security on a subset of RLWE on general number fields (see the recent work by Peikert et al. [26], that generalizes the RLWE problem to any modulus and any ring over number fields).
We now briefly sketch the more conventional univariate RLWE problem, and its use for the implementation of efficient homomorphic encryption. Next, we informally introduce the definition of m-RLWE, the attack by Bootland, Castryck and Vercauteren [25], and the rationale of our solution, all exemplified in the bivariate case.

1.1. Univariate RLWE and Homomorphic Encryption

Gentry’s seminal work [27] introduced a new family of cryptosystems enabling Fully Homomorphic Encryption (FHE), which can compute an unbounded number of both encrypted additions and multiplications. Despite its theoretical relevance, current FHE schemes are still not entirely practical for real scenarios [28]. This motivated the use of a more efficient alternative as Somewhat Homomorphic Encryption (SHE), on which only a limited number of consecutive homomorphic operations is allowed. Precisely, as in many real scenarios the number of required operations is known beforehand, SHE turns out to be a perfect fit. Furthermore, many optimizations have been incorporated and, consequently, lattice-based SHE/FHE cryptosystems are being progressively adopted by researchers in the field [7,29,30,31]. In particular, RLWE-based cryptosystems show nowadays the best runtime performance.
Most of the efficiency improvements that RLWE has introduced into (somewhat/fully) homomorphic encryption rely on its particular algebraic structure [4], consisting in the use of polynomial cyclotomic rings. Actually, from a practical perspective, most of the recent libraries for homomorphic cryptography, such as the HElib [14,32], PALISADE [33], SEAL [34], Lattigo [35] and NFLlib [5], take advantage of this fact to optimize the runtime of the implemented lattice-based cryptosystems.
We exemplify in Table 1 the use of univariate RLWE for homomorphic encryption.

1.2. Bivariate RLWE

Let K ( T ) = K x K y be the tensor product of 2 cyclotomic number fields of dimensions n x = ϕ ( m x ) and n y = ϕ ( m y ) , and  R = Z [ x , y ] / ( Φ m x ( x ) , Φ m y ( y ) ) the tensor of their corresponding ring of integers (see Table 2 for a summary of the notation used).
We define a Bivariate Ring LWE sample (see Definition 2 for the general formulation of m-RLWE) as the pair ( a , b = ( a · s ) / q + e mod R ) , where a R q is uniformly random and e ψ comes from the error distribution ψ .

1.3. BCV Attack

Choices of polynomial functions f x ( x ) = Φ m x ( x ) , f y ( y ) = Φ m y ( y ) as f x ( x ) = x n x + 1 , f y ( y ) = y n y + 1 have been proposed in [10], as this structure presents computational advantages and can be very beneficial for practical applications.
BCV attack is able to exploit common roots on the involved rings to factorize the multivariate RLWE samples into RLWE samples of smaller dimension. For example, consider that n x = n y = n ; by applying the substitution x y , we obtain n RLWE samples of dimension n each, hence decreasing the n 2 lattice dimension of the original m-RLWE sample.

1.4. Secure Multivariate RLWE Instantiations

Let m = m x m y and gcd ( m x , m y ) = 1 ; then, the m-th cyclotomic field K = Q ( ζ m ) Q [ x ] / ( Φ m ( x ) ) (with ζ m the m-th root of unity) is isomorphic (see Theorem 1) to the bivariate field
K Q [ x , y ] / ( Φ m x ( x ) , Φ m y ( y ) ) .
Consequently, by considering instantiations satisfying gcd ( m x , m y ) = 1 , the bivariate RLWE problem becomes equivalent to the equally sized RLWE problem. However, we would like to search for other instantiations where the polynomial ideals can have a similar form and, if possible, the same degree.
By restricting ourselves to the most common scenario of “power-of-two” cyclotomics (we must clarify here that we refer to polynomials with only two non-zero terms: the leading and the constant coefficient of the polynomial), polynomial ideals of the form ( x n x + d x , y n y + d y , z n z + d z , ) , could avoid BCV attack for some parameters { n x , d x , n y , d y , n z , d z , } . E.g., the rings Z [ x ] / ( x 64 + 1 ) and Z [ y ] / ( y 27 + 5 ) do not have common roots, so trivial substitutions such as x y cannot be applied. Additionally, whenever we reduce modulo q and work over R q , we can impose (for the sake of efficiency) that both polynomials functions x 64 + 1 and y 27 + 5 factor in linear terms enabling the use of variants of the NTT. Additionally, slot encoding and slot manipulations are still possible in the plaintext ring by means of the pre-/post-processing, as presented in [7]. Analogously to the negayclic convolution, these pre-/post-processing steps preserve the properties of the NTT transform over a ring with an α -generalized convolution [36].
This seems to effectively avoid a substitution attack; however, there might be some small ideal divisor for which, modulo some particular q, the noise does not increase substantially, and we can distinguish the resulting sample from uniform. This attack has been extensively studied by Peikert in [37] and we will discuss it in Section 7.1.

1.5. The Proposed Solution

The previous strategy preserves most of the advantages of the multivariate constructions while apparently avoiding the effects of BCV attack. However, the security of these instantiations is not based on any specific formulation of the RLWE problem, and there is no trivial way of parameterizing them. This raises the following questions:
  • Can we find multivariate rings similar to Z [ x , y , ] / ( x n x + d x , y n y + d y , ) while (a) still preserving the aforementioned advantages of this structure, and (b) basing its security on the hardness of the RLWE problem (see Definition 7); i.e., without a decrease in the ring dimension due to BCV attack (see Theorem 3)?
  • If these multivariate rings exist, how can the values { n x , n y , } , { d x , d y , } be chosen to easily define the ring of integers R and its dual R ?
From this point forward, we focus on answering these two questions. To this aim, we identify number fields whose ring of integers (and their dual) have the sought structure (see Section 4). In particular, we divide this set of fields in two categories:
  • Multiquadratic number fields (see Section 5). These structures ([38], Theorem 4.1 and its proof) enable efficient radix-2 transforms for faster polynomial arithmetic (see Section 8).
  • More general number fields with polynomials functions { x n x + d x , y n y + d y , } (see Section 6). These structures support all the signal processing applications described in [8], and the matrix operations introduced by the original MHEAAN scheme [39] (not based on coprime cyclotomic polynomials [40]) while preserving the equivalent RLWE security.

1.5.1. Rationale on the Security of Our Solution

The weakness of some m-RLWE instantiations is rooted on the existence of (small norm) zero divisors in the tensor product of fields. For example, Q [ x , y ] / ( x 2 + 1 , y 2 + 1 ) has zero divisors as x + y (e.g., ( x + y ) ( x y ) = 0 ), and hence m-RLWE samples defined on rings Z [ x , y ] / ( x 2 + 1 , y 2 + 1 ) can be easily factored, as the effective degree can be reduced with substitutions { x y , x y } . Additionally, as these roots have small norm, the noise in the reduced samples is not increased enough to preserve security.
Instead of the previously proposed Z [ x , y ] / ( x 2 + 1 , y 2 + 1 ) , we work with a quotient bivariate ring with polynomial ideals of the form ( x n x + d x , y n y + d y ) (we use Z [ x , y ] / ( x 2 + 1 , y 2 + 3 ) as our example). The use of different polynomials functions avoids a trivial substitution attack. However, we need to rule out the possibility of (small norm) substitution attacks, such as the one from [25], modulo some q; even if they exist, finding them would require solving a hard subset-sum mod q (knapsack) problem.
As there is a security reduction from ideal lattices to RLWE defined on general number fields [26], we search for the ring of integers of multivariate number fields. This gives us a way to find secure parameters for the used ring, and also the right error distribution to guarantee that the noise increase after a substitution modulo q is enough to preserve the required security [37]. To exemplify this rationale, we compare the differences between a bivariate cyclotomic ring (which can be seen as a univariate cyclotomic ring), and our proposed solution.
Consider the ring Z [ z ] / ( Φ 12 ( z ) ) with Φ 12 ( z ) = z 4 z 2 + 1 . There is an isomorphism with the bivariate ring Z [ x , y ] / ( Φ 4 ( x ) , Φ 3 ( y ) ) where Φ 4 ( x ) = x 2 + 1 and Φ 3 ( y ) = y 2 + y + 1 . Therefore, our intuition is that if we found an effective substitution attack on our example ring Z [ x , y ] / ( x 2 + 1 , y 2 + 3 ) , this would work analogously for the cyclotomic bivariate case Z [ x , y ] / ( Φ 4 ( x ) , Φ 3 ( y ) ) . In particular, if we apply the transformation T ( y ) = 2 y + 1 in the ring Z [ y ] / ( y 2 + 3 ) , we obtain Z [ y ] / ( y 2 + y + 1 ) , which is the mentioned cyclotomic ring with Φ 3 ( y ) . Consequently, for this particular case, it is clear that the existence of an attack in our example ring implies an attack to the bivariate cyclotomic ring.
For more general multivariate rings, we can apply a similar idea. In general, for a secure bivariate ring such as Z [ x , y ] / ( x n x + d x , y n y + d y ) , we can search for a transformation y T ( y ) where the new polynomial function can share at least some roots with x n x + d x . If this transformation can be effectively applied, we could use it to attack multivariate cyclotomic rings.
Thus, this strengthens the belief that an attack on secure m-RLWE instantiations defined on a general number field should provide us with either an attack to RLWE on the product of prime-powers cyclotomic rings, and/or a better understanding on the weaknesses of general cyclotomic rings. For a discussion on the practical security of RLWE on the proposed number fields we refer the reader to Section 7.1.

1.5.2. Division Algebras and Non-Norm Condition

In [41], the authors propose an alternative variant of LWE over cyclic algebras, which they denote as CLWE (Cyclic Algebra LWE). The main difference with respect to RLWE relies on the fact that, instead of adding a ring structure, they incorporate into Module-LWE a cyclic algebra structure, constructing a non-commutative variant of LWE.
The security of CLWE is supported by the hardness of finding short vectors in certain structured lattices induced by ideals in a cyclic algebra A . Additionally, they explicitly address BCV attack by means of the “non-norm” condition (see  [42], Proposition 3.5).
Let a cyclic algebra A = ( L / K , θ , γ ) where K is a number field of degree k and L is a Galois extension of K of degree n such that G a l ( L / K ) = θ . For a non-zero γ K , the cyclic algebra is defined as A = L u L u n 1 L where u A and u n = γ .
The non-norm condition on γ (see  [42], Proposition 3.5) avoids BCV attack by stating that the lowest power of γ which appears in N L / K ( L ) is γ n , where N L / K represents the relative norm of L into K (see [41] for more details).
This defense against BCV attack also relies on avoiding the existence of zero divisors, which are needed for the attack to succeed. In our case, as we already work in a number field, we can adhere to the security conditions established by Peikert [37] to avoid this type of attacks.
It is worth mentioning that we see both approaches as potentially complementary, in such a way that the underlying field K considered in the (cyclic) division algebra could be one of the multivariate fields discussed in Section 5 and Section 6.

1.5.3. Contributions

The first contribution of this work is the definition and parameterization of secure instantiations of the multivariate Ring Learning With Errors problem [8,24], supported by the extended reduction [26] of the original proof by Lyubashevsky et al. [3,4]. The proposed instantiations address the vulnerability leveraged on BCV attack to m-RLWE [25], while still preserving all the efficiency improvements that m-RLWE brings. Moreover we show that is possible to securely instantiate the m-RLWE problem, because the canonical embedding of R has a polynomial skewness ( λ n / λ 1 ). Our two main results are summarized in Theorem 5 and Corollary 1 for multiquadratic rings (see Section 5), and Theorems 7 and 8 together with Corollaries 2 and 3, which refer to more general multivariate rings (see Section 6). They show valid parameter choices so that the reduction for RLWE over general number fields [26] (Theorem 2) applies to the hardness of multivariate RLWE, and without a reduction in the lattice dimension. More flexible parameter choices require to relax this assumption from RLWE to the Order-LWE assumption (see Section 9.4). Finally, Theorem 3 gives a worst-case security guarantee for RLWE with any multivariate cyclotomic ring, by stating that it is at least as hard as univariate RLWE, but introducing a decrease in the lattice dimension of the univariate RLWE assumption by a factor of L (see Section 4).
The second contribution is to showcase the possible applications. They are numerous and achieve improved space-time tradeoffs in the most critical lattice operations. Therefore enabling more efficient homomorphic processing and closing the gap to the realization of practical fully homomorphic encryption. This is the main list of applications:
  • We introduce the α -generalized Walsh–Hadamard Transform as the basic block that can replace Number Theoretic Transforms in multivariate rings [43], achieving an improvement on the computational complexity of degree-n polynomial products by a factor log ( n ) in terms of elemental multiplications, with additional savings in memory usage (see Section 8). It is worth noting that the results of Section 8 were previously introduced in [43], where we also exemplify its use for the implementation of Oblivious Linear function Evaluation.
  • We enable net improvements in cryptographic primitives built on top of m-RLWE, such as efficient time and space computation of automorphisms, relinearizations, packing, unpacking and homomorphic slot manipulation, and, consequently, bootstrapping, improving on current achievable trade-offs in RLWE (see Section 9).
  • We instantiate a simple cryptosystem based on m-RLWE (see Section 7.2), and exemplify with it the use of the multivariate structure of m-RLWE to improve on complex number embedding, enabling fully packed complex numbers, compared to the exponentially decreasing packing ratio of current approaches working with multivariate rings [39,40] (see Section 10). This enables applications in homomorphically encrypted approximate arithmetic, complex processing, and efficient multidimensional signal manipulation.

1.5.4. Structure

The rest of the paper is organized as follows: Section 2 describes BCV attack to multivariate RLWE. Section 3 introduces some algebraic number theory notions and the main definitions for the m-RLWE problem. Section 4 describes the followed strategy to achieve secure instantiations of multivariate RLWE, including the well-known tensor of “coprime” cyclotomic rings. Section 5 focuses on the analysis of multiquadratic rings. Section 6 studies a set of more general multivariate rings. Section 7 includes a discussion on the achieved resilience against known attacks together with example instantiations that showcase the practicality of multivariate RLWE, and discusses some practical applications. Additionally, the included Section 8 particularizes the problem to rings enabling an α -generalized Walsh–Hadamard Transform, and compares its performance with fast NTT algorithms currently used in state-of-the-art RLWE cryptosystems. Section 9 introduces the strategies for homomorphic packing/unpacking and the space/time tradeoffs improving on current RLWE relinearization and bootstrapping operations. Section 10 briefly discusses how to work with complex slots, comparing to current approaches that work with bivariate rings. Finally, Section 11 draws some conclusions.

2. Worst Case Security of Multivariate RLWE

We first introduce the notation used in this section (see Table 2 for more details on the notation used in this work). Polynomials are denoted with regular lowercase letters, omitting the polynomial variable (i.e., a instead of a ( x ) ) when there is no ambiguity.
We follow a recursive definition of multivariate modular rings: R q [ x 1 ] = Z q [ x 1 ] / ( f 1 ( x 1 ) ) denotes the polynomial quotient ring in the variable x 1 modulo f 1 ( x 1 ) with coefficients belonging to Z q . Analogously, R q [ x 1 , x 2 ] = ( R q [ x 1 ] ) [ x 2 ] / ( f 2 ( x 2 ) ) is the quotient bivariate polynomial ring with coefficients belonging to Z q reduced modulo univariate f 1 ( x 1 ) and f 2 ( x 2 ) . In general, R q [ x 1 , , x l ] (resp. R [ x 1 , , x l ] ) represents the quotient multivariate polynomial ring with coefficients in Z q (resp. Z ) and the l polynomial functions f i ( x i ) with 1 i l . The polynomial a can also be denoted by a column vector a whose components are the corresponding polynomial coefficients.
For the sake of clarity, we present the definition of multivariate RLWE with power-of-two cyclotomic polynomials, as originally introduced in [10], but all the results in this section can be generalized to any cyclotomic function:
Definition 1
(Multivariate RLWE with power-of-two polynomial functions as x i n i + 1 ). Given a multivariate polynomial ring R q [ x 1 , , x l ] with f j ( x j ) = 1 + x j n j for j = 1 , , l where n = j n j (with all n j a power of two) and an error distribution χ [ x 1 , , x l ] that generates small-norm random multivariate polynomials in R q [ x 1 , , x l ] , the multivariate polynomial RLWE problem relies upon the computational indistinguishability between samples ( a i , b i = a i · s + e i ) and ( a i , u i ) , where a i , u i R q [ x 1 , , x l ] are chosen uniformly at random from the ring R q [ x 1 , , x l ] ; s , e i χ [ x 1 , , x l ] are drawn from the error distribution.
The original works of multivariate RLWE [8,10] assume that the search and decision m-RLWE problems (see Definitions 3 and 4) in dimension n = i = 1 m n i are as hard as the corresponding RLWE problems in dimension n. However, Bootland, Castryck and Vercauteren [25] introduced an attack that can exploit polynomial functions that allow repeated “low-norm” roots in the multivariate ring. As a result, when the subrings of the tensor have common roots, this attack is able to factor the m-RLWE samples into RLWE samples of smaller dimension, hence reducing the security of these m-RLWE samples to that of solving a set of independent RLWE samples which are easiest to break. For e.g., the ring Z [ x , y ] / ( x 2 n + 1 , y n + 1 ) , changes of variable y x 2 i with i Z 2 n * factors the m-RLWE sample into n different RLWE samples with rings of polynomial function x 2 n + 1 and an increase in the error variance of n (maximum degree of y n + 1 ).
The instantiations of (multivariate) RLWE with “coprime” cyclotomic rings are not affected by this attack, as they do not introduce these “common” roots (see Section 4.1).
We now give a more formal description of the attack, particularized for bivariate RLWE (2-RLWE) with power of two cyclotomics (Definition 1). Let ( a , b = a s + e ) R q 2 [ x , y ] and R q [ x , y ] = Z q [ x , y ] / x n x + 1 , y n y + 1 with n x n y and k = n x n y without loss of generality.
Now we define the map Θ ˜ :
Θ ˜ : Z q [ x , y ] / ( x n x + 1 , y n y + 1 ) Z q [ x ] / ( x n x + 1 ) n y a ( x , y ) a ( x , x k ) , a ( x , x 3 k ) , , a ( x , x ( 2 n y 1 ) k )
This map is a ring homomorphism, and if q is odd it is also invertible (see [25]). This transforms the pair ( a , b ) R q [ x , y ] into ( Θ ˜ ( a ) , Θ ˜ ( b ) R q n y [ x ] . If we denote each of the components by Θ ˜ i , for  i = 1 , , n y , we have
Θ ˜ i ( a ) , Θ ˜ i ( b ) = Θ ˜ i ( a ) Θ ˜ i ( s ) + Θ ˜ i ( e ) R q 2 [ x ] ,
for i = 1 , n y . This results in n y different RLWE samples of dimension n x and whose noise has a variance n y times higher than the original 2-RLWE sample (the result of adding n y independent variables).
The attack works by trying to break the obtained n y RLWE samples. Once this is done, as the map is invertible, it is possible to reconstruct the original secret key with the different n y smaller keys.
This attack can be generalized to an m-RLWE sample (Definition 1) by recursively applying “versions” of this map ( l 1 ) times. This recursion converts an m-RLWE sample into n n 1 RLWE samples (assuming, without loss of generality, that n 1 n 2 n l ) with dimension n 1 and an error variance n n 1 times higher.

3. Multivariate Ring Learning with Errors

This section revisits the main definitions from algebraic number theory and multivariate RLWE, including a generalized version of the multivariate polynomial RLWE problem which admits any type of cyclotomic polynomial as ideals. For the sake of clarity, we particularize to power-of-two cyclotomic functions (Definition 1) when exemplifying some of the results, but this does not affect to the generality of the discussion.

3.1. Algebraic Number Theory Background

This section presents the fundamental concepts of lattices and algebraic number theory and extends them to the more general case of a tensor of number fields on which m-RLWE is based.

3.1.1. The Space H ( T ) = i H i

When dealing with cyclotomic fields, it is useful to work with the subspace H R s 1 × C 2 s 2 with s 1 + 2 s 2 = n , where the tuple ( s 1 , s 2 ) N 2 is called the signature of the number field, and H satisfies
H = { ( x 1 , , x n ) R s 1 × C 2 s 2 such that   x s 1 + s 2 + j = x ¯ s 1 + j , j [ s 2 ] } C n .
The subspace H is composed of vectors from R s 1 × C 2 s 2 , whose first s 1 elements ( x 1 , , x s 1 ) are real numbers, and the last part is composed of s 2 complex numbers ( x s 1 + 1 , , x s 1 + s 2 ) together with their complex conjugates ( x s 1 + s 2 + 1 , , x s 1 + 2 s 2 ) = ( x ¯ s 1 + 1 , , x ¯ s 1 + s 2 ) .
An orthonormal basis { h j } j [ n ] for H can be defined as
h j = e j i f j [ s 1 ] 1 2 ( e j + e j + s 2 ) i f s 1 < j s 1 + s 2 1 2 ( e j s 2 e j ) i f s 1 + s 2 < j s 1 + 2 s 2 ,
where e j are the vectors of the standard basis in R n . Each element a = j n a j h j H (with a j R ) has its own l p norm. For our purposes, we define the subspace H ( T ) = i l H i as the tensor product of l subspaces H i (each subspace H i defined as in Equation (3) but with s 1 + 2 s 2 = n i ).
In particular, if we see each element belonging to each H i as a different linear transformation, we are actually working with the Kronecker product of the subspaces H i . We can therefore express an orthonormal basis for H ( T ) given by { h j } j n as the result of the Kronecker product of the original basis of each H i , by defining any invertible mapping for j and { j 1 , , j l } , where h j = i l h j i ( i ) are the basis vectors for H ( T ) , and  n = i l n i ; each { h j i ( i ) } j i n i is the orthonormal basis of each H i C n i for i l .

3.1.2. Lattice Background

A lattice in our multivariate setting is defined as an additive subgroup of H ( T ) . We only consider full rank lattices, obtained as the set of all integer linear combinations of a set of n linear independent basis vectors B = { b 1 , , b n } H ( T )
Λ = L ( B ) = i [ n ] z i b i such that   z Z n
The minimum distance λ 1 ( Λ ) of a lattice Λ for the norm | | . | | is given by the length of the shortest non-zero lattice vector, that is, λ 1 ( Λ ) = min x Λ / x 0 | | x | | .
The dual lattice of Λ H ( T ) is defined as Λ * = { x H ( T ) | Λ , x Z } and it satisfies ( Λ * ) * = Λ .

3.1.3. Gaussian Measures

The results on nonspherical Gaussian distributions presented in [4] can be extended to our case. Hence, we revisit here some of the concepts for Gaussian measures, adapted to our tensor setting.
We consider the Gaussian function ρ r : H ( T ) ( 0 , 1 ] with r > 0 as ρ r ( x ) = exp ( π | | x | | 2 / r 2 ) . A continuous Gaussian probability distribution D r can be obtained by normalizing the previous function to obtain a probability density function as r n ρ r ( x ) . Extending this to the non spherical Gaussian case, we consider the vector r = i l r i where r = ( r 1 , , r n ) ( R + ) n and r i = ( r i , 1 , , r i , n i ) ( R + ) n i and whose components satisfy r i , j + s 1 + s 2 = r i , j + s 1 . Finally, a sample from D r is given by j [ n ] x j h j where each x j is drawn independently from a Gaussian distribution D r j over R ; r j equals i l r i , j i (where l is the number of “unidimensional” spaces H i in the tensor, that is n = i [ l ] n i ) and we are using any invertible mapping between { j } j n and { j i } j i n i , i l .

3.2. Main Definitions for Multivariate Ring-LWE

Let K ( T ) = i l K i be the tensor product of l cyclotomic fields of dimension n i = ϕ ( m i ) each, and  R = i l O K i ( R = i l O K i ) the tensor of their corresponding (dual of the) ring of integers. We have the following definitions:
Definition 2
(Multivariate Ring LWE distribution). For s R q and an error distribution ψ over K ( T ) , R , a sample from the m-RLWE distribution A s , ψ over R q × T is generated by a R q uniformly at random, e ψ , and outputting ( a , b = ( a · s ) / q + e mod R ) (where T = K ( T ) , R / R and K ( T ) , R = K ( T ) Q R ).
Definition 3
(Multivariate Ring LWE, Search). Let Ψ be a family of distributions over K ( T ) , R . m R L W E q , Ψ denotes the search version of the m-RLWE problem. It is defined as follows: given access to arbitrarily many independent samples from A s , ψ for some arbitrary s R q and ψ Ψ , find s.
Definition 4
(Multivariate Ring LWE, Average-Case Decision). Let Υ be a distribution over a family of error distributions, each over K ( T ) , R . The average-case decision version of the m-RLWE problem, denoted m R D L W E q , Υ , is to distinguish with non-negligible advantage between arbitrarily many independent samples from A s , ψ , for a random choice of ( s , ψ ) U ( R q ) × Υ (where U ( R q ) represents the uniform distribution over R q ), and the same number of uniformly random and independent samples from R q × T .
For an asymptotic treatment of the m-RLWE problems, we let K ( T ) come from an infinite sequence of tensors of number fields K = { K ( T ) , n } of increasing dimension n ( n = i ϕ ( m i ) is the number of basis elements that form the integral basis), and let q, Ψ , and  Υ depend on n as well.

3.2.1. Error Distributions

We include here two definitions about the error distributions.
Definition 5
(extension of Lyubashevsky et al. [4], Definition 3.4). For a positive real α > 0 , the family Ψ α is the set of all elliptical Gaussian distributions D r (over K ( T ) , R ), where each parameter r i α with i n .
Definition 6
(extension of Lyubashevsky et al. [4], Definition 3.5). Let K ( T ) = i l K i where the K i are the m i -th cyclotomic number field having degree n i = ϕ ( m i ) . For a positive real α > 0 , a distribution sampled from Υ α is given by an elliptical Gaussian distribution D r (over K ( T ) , R ) whose parameters are r j n using the unidimensional index (see Section 3.1.3), and each r j satisfies r j 2 = α 2 ( 1 + n x j ) where different x j , x k that do not correspond to conjugate positions are chosen independently from the distribution Γ ( 2 , 1 ) .
Practical applications [7,9,10] usually deal with variants of the problem:
  • discrete b: Instead of working with an error distribution ψ over K ( T ) , R , the m-RLWE distribution A s , χ can use χ as a discrete error distribution over R , so that the element b belongs to R q .
  • small key: Instead of a uniform s, s can be a “short key” equivalently sampled from the error distribution (this is known as “normal form” in [13]), with equivalent security. Given a list of lm-RLWE samples, s can be substituted with the error e of any sample ( a , b ) whose term a is invertible in R q , which occurs with constant probability by Claim 1 below.
  • power of 2 cyclotomic: Instead of sampling a and s from R q and R q respectively, both are usually sampled from R q (this is usually known as the non-dual variant). In general, the works which consider s in R q deal with cyclotomic fields where m i is a power of two. It can be shown that for this particular type of cyclotomic fields both definitions are equivalent.
  • modulus switching: The original definitions of the problem are presented with a prime modulus q that splits the space into small independent coordinates. With the same hardness guarantees, it is possible to modulus-switch to other compute-friendly modulus at the price of a slight increase of the error.
Lyubashevsky et al. [13] show that the variant of RLWE with discrete and short error ( R D L W E q , χ ) is as hard as the original R D L W E q , ψ , by following the technique from [44]. These results can be adapted to our more general case as follows:
Claim 1.
The fraction of invertible elements in R q = i l O K i / ( q ) , for prime q = 1 mod m i for all i and with n = i ϕ ( m i ) , is ( 1 1 q ) n . Thus, if  q n , this probability is constant.
Proof. 
Since R q is in bijection with the ring ( Z / q Z ) n via the tensor embedding mod q, so an element is invertible iff. its image does not contain any zero. Hence, there are ( q 1 ) n invertible elements out of q n .    □

3.2.2. Pseudorandomness of m-RLWE

To show that the m-RLWE distribution is pseudorandom (that is, there exists a reduction from the search problem to the decision variant of the hardness problem) we rely on the results from [4], applied to the case of multivariate elements. The main needed properties are those related to the decomposition of ( q ) into n prime ideals ( q 1 mod m i for all i) and the use of the automorphisms that permute the prime ideals.

4. Proposed Approach for Secure Multivariate Rings

Despite the efficiency benefits of multivariate RLWE, its security can be much smaller than originally expected for those instances vulnerable to BCV attack [25]. This motivates us to redefine the set of instantiations that preserve the security in the tensor lattice dimension.
This section enumerates those secure instantiations of multivariate RLWE. With this in mind, we first briefly revise the choice of “coprime” order cyclotomics explicitly included in [13]. Afterwards, we discuss the possibility of using a more general set of number fields, enabling other multivariate rings that can be more convenient for practical applications.

4.1. Multivariate RLWE as a Subset of RLWE

It is well known that for two cyclotomic number fields Q ( ζ a ) and Q ( ζ b ) with coprime orders gcd ( a , b ) = 1 , their product is the cyclotomic number field Q ( ζ a b ) (see Lemma  11.8 in [45]). For convenience, we include an adapted version of this property ([13], Equation (1.1)) using the polynomial representation of the cyclotomic number fields.
Theorem 1
(Tensorial decomposition of cyclotomic number fields).   The m-th cyclotomic field K = Q ( ζ m ) Q [ x ] / ( Φ m ( x ) ) (with ζ m the m-th root of unity) is isomorphic to the multivariate field
K Q [ x 1 , , x l ] / ( Φ m 1 ( x 1 ) , , Φ m l ( x l ) ) ,
where m = i m i is decomposed in its prime-power decomposition with gcd ( m j , m k ) = 1 for all j k .
This fact gives an alternative basis to the power basis { 1 , x , , x ϕ ( m ) 1 } for the ring of integers R = Z [ x ] / ( Φ m ( x ) ) ; this basis is the “powerful” basis of K composed of elements i x i j i with 0 j i < ϕ ( m i ) . It does not coincide with the power basis under the mentioned field isomorphism and considering the map x m m i x i for i = 1 , , l (see [13]). This “powerful” basis has some very nice properties [13] which make it more appealing than the more “conventional” power basis. Additionally the authors of [13] provide a detailed analysis on how the performance of ring operations can be improved by means of this multivariate structure.
Besides [13], the use of the multivariate structure in Equation (4) has been exploited to enhance polynomial operations in both the HElib [14,32] and the MHEAAN [40] libraries. This gives us a first approach to deal with multivariate instantiations which do not suffer a decrease on the underlying lattice dimension. However, this structure is not flexible enough to convey the same benefits that general multivariate structures can achieve; in particular, it cannot preserve the interesting structure of power-of-two cyclotomics ( 1 + x n ).

4.2. More General RLWE Instantiations

We look now beyond cyclotomics, into more general and flexible number fields and their parameterization. We first introduce the definitions of RLWE over any number field [26], and then give the intuition on the properties required to resist the BCV attack. A detailed discussion on the choice of good parameters and the security of RLWE on these number fields follows in Section 5, Section 6 and Section 7.1.

4.2.1. RLWE Over Any Number Field

Peikert et al. [26] have recently generalized the RLWE problem to any number field. Let K be a number field with ring of integers R = O K ; let R be the fractional codifferent ideal of K, and let T = K R / R . Let q 2 be a (rational) integer modulus, and for any fractional ideal I of K, let I q = I / q I (for any fractional ideal I K there is a O K such that a I O K is an integral ideal of O K ). We include now the relevant definitions of RLWE over any number field that we use in our formulation.
Definition 7
(Ring-LWE Distribution, Definition 2.14 in [26]). For s R q and an error distribution ψ over K R , the  R L W E distribution A s , ψ over R q × T is sampled by independently choosing a uniformly random a R q and an error term e ψ , and outputting a , b = ( a · s ) / q + e mod R .
Definition 8
(Ring-LWE, Average-Case Decision, Definition 2.15 in [26]). Let Υ be a distribution over a family of error distributions, each over K R . The average-case Ring-LWE decision problem, denoted R L W E q , Υ , is to distinguish (with non-negligible advantage) between independent samples from A s , ψ for a random choice of ( s , ψ ) U ( R q ) × Υ , and the same number of uniformly random and independent samples from R q × T .
Theorem 2
(Theorem 6.2 from [26]).  Let K be an arbitrary number field of degree n, I any fractional ideal of K, and  R = O K . Let α = α ( n ) ( 0 , 1 ) , and let q = q ( n ) 2 be an integer such that α q 2 · ω ( 1 ) . There is a polynomial-time quantum reduction from K D G S γ to (average-case, decision) R L W E q , Υ α , for any
γ = max η ( I ) · 2 / α · ω ( 1 ) , 2 n / λ 1 ( I ) .
K D G S γ corresponds to the Discrete Gaussian Sampling (DGS) problem, but restricted to (fractional) ideal lattices in K.
The Υ α distribution considered here is narrower than the one from Theorem 6. We refer the reader to Definition 6.1 from [26] for its concrete expression.
Additionally, it is worth highlighting some observations on the choice of a particular number field in RLWE, as stated in [26]:
  • The geometry of the dual ideal R affects the error rate α (chosen to be smaller than the minimum distance λ 1 ( R ) ). As  α decreases, worst-case hardness theorems give weaker guarantees (i.e., larger approximation factors), and known attacks on Ring-LWE become more efficient.
  • A similar phenomenon arises for rings with large “expansion factors” (see [46]) which imposes smaller α for achieving correct decryption; hence, good rings for practical applications have small expansion factors.
  • Besides the two previous relations, there is no practical evidence on which particular number field is better in terms of security.

4.2.2. Ad-Hoc Countermeasures to BCV Attack

BCV attack [25] shows that a reduced RLWE sample is at least as hard as an m-RLWE sample. To prove the converse, we can use an oracle for m-RLWE. With access to such oracle and a set of RWLE samples with different keys, we can construct an m-RWLE sample (with a slight increase in the noise variance) by means of the reverse map of BCV attack (i.e., Θ ˜ 1 ). Once this oracle returns the secret key of the m-RLWE sample, the original keys of the RLWE sample can be recovered by means of the map Θ ˜ .
We can therefore express the security of m-RLWE in terms of RLWE, but the decrease of the involved dimension considerably reduces the applicability of the problem with “non-coprime” polynomial functions. The security of j k ϕ ( gcd ( m j , m k ) ) independent RLWE samples with dimension i [ l ] ϕ ( m i ) j k ϕ ( gcd ( m j , m k ) ) could be reduced to that of one m-RLWE sample (according to Definition 2) with dimensions { ϕ ( m 1 ) , , ϕ ( m l ) } :
Theorem 3
( Θ ˜ 1 transform from [25]). Let L independent univariate RLWE samples ( a i , b i ) R q × T for i [ L ] and dimension n. We can transform (this transformation is invertible when q is prime) these L samples by means of the (inverse) of BCV attack into one m-RLWE sample with l dimensions { ϕ ( m 1 ) , , ϕ ( m l ) } (see Definition 2) satisfying L = j k ϕ gcd ( m j , m k ) and having for the RLWE sample n = i [ l ] ϕ ( m i ) L . This transformation slightly increases the variance of the error distribution by a factor L.
The decrease in the lattice dimension by a factor L = j k ϕ gcd ( m j , m k ) brings about the question of whether we can modify some of the multivariate RLWE constructions where L > 1 to avoid BCV attack.

4.2.3. Followed Strategy

By considering instantiations satisfying gcd ( m j , m k ) = 1 for all j k , we straightforwardly go back again to the RLWE problem defined on univariate cyclotomic rings. On the contrary, we would like to find other instantiations where the polynomial ideals can have a similar form and degree. We will hence focus on polynomial functions as follows: { x n x + d x , y n y + d y , z n z + d z , } , which can avoid BCV attack for certain parameters, while enabling NTT-like fast transforms and preserving the advantages of the originally introduced m-RLWE constructions.
However, the security of these instantiations is apparently not based on any specific formulation of the RLWE problem, so we do not have a clear way of choosing the right parameters.
In the next two sections, we will show that this is not really true and that there are many number fields satisfying Definition 7, and whose ring of integers (and their dual) has the aforementioned structure. In particular, we focus on multiquadratic number fields (Section 5) and more general multivariate rings (Section 6).

5. Multiquadratic Rings

Let K = Q ( d i ) be a field with prime d i (hence squarefree) satisfying d i = 1 mod 4 ; its ring of integers is O K = Z 1 + d i 2 with basis { 1 , 1 + d i 2 } and discriminant Δ K = d i , then we can also represent O K as a polynomial ring Z [ x ] / ( x 2 x + 1 d i 4 ) ( O K is free of rank 2), according to (see Proposition 1):
Proposition 1
(Proposition 2.24 from [47] ). Let K = Q ( d ) be a quadratic field with d a squarefree integer. If  d 2 , 3 ( mod 4 ) , then O K = Z d Z [ x ] / ( x 2 d ) and O K is free of rank 2 over Z with basis { 1 , d } . If  d 1 ( mod 4 ) , then O K = Z 1 + d 2 Z [ x ] / ( x 2 x + 1 d 4 ) and O K is free of rank 2 over Z with basis { 1 , 1 + d 2 } .
Let us extend the field to Q ( d 1 , , d l ) (a multiquadratic field), with all d i pairwise coprime, but still sticking to the case d i = 1 mod 4 . Taking into account that O K O K = O F when gcd ( Δ K , Δ K ) = 1 , where F is the compositum over Q (see [48]) of two subfields K = Q ( d 1 ) and K = Q ( d 2 ) (see [49]), we have that O F = Z 1 + d 1 2 , 1 + d 2 2 . This can be generalized to the case of a field with l “coprime” squares, whose resulting ring of integers is
O K = Z 1 + d 1 2 · · Z 1 + d l 2 .
Therefore, as all d i are different primes, the discriminants of Q ( d i ) are also coprime, which implies that the ring of integers can be expressed as the product of the respective univariate rings of integers. However, the definition of RLWE (see Definition 8) works on the dual of the ring of integers, due to its geometric properties. The dual can be obtained through Theorem 4:
Theorem 4
(Theorem 3.7 from [50] ). Let K = Q ( α ) and let f ( T ) be the minimal polynomial of α in Q [ T ] . Write
f ( T ) = ( T α ) ( c 0 ( α ) + c 1 ( α ) T + + c n 1 ( α ) T n 1 ) , c i ( α ) K .
The dual basis to { 1 , α , , α n 1 } relative to the trace product is
c 0 ( α ) f ( α ) , c 1 ( α ) f ( α ) , , c n 1 ( α ) f ( α ) .
In particular, if  K = Q ( α ) and α O K then
( Z + Z α + + Z α n 1 ) = 1 f ( α ) ( Z + Z α + + Z α n 1 ) .
For simplicity, if a ring of integers R = Z [ x ] / ( f ( x ) ) satisfies Theorem 4, we usually denote its dual as R = 1 f ( x ) Z [ x ] / ( f ( x ) ) , being f ( x ) the corresponding scale factor introduced in the power basis. Particularized to the quadratic case, Theorem 4 says that whenever the ring of integers has a power basis, the basis of the dual is
1 , 1 + d i 2 = 1 f ( α ) , 1 f ( α ) 1 + d i 2 ,
where f ( x ) = x 2 x + 1 d 4 and α = 1 + d 2 , so f ( x ) = 2 x 1 ; evaluated at x = α = 1 + d i 2 , it satisfies f ( α ) = d i .
As dual commutes tensoring, this result can be straightforwardly extended to the compositum case with several d i . Additionally, we see that we can go from the dual to O K by just scaling with d i (or multiplying with the polynomial 2 x 1 ).
Following our requirements, we need a ring of the form Z [ x 1 , , x l ] / ( x 1 2 d 1 , , x l 2 d l ) , which is an order of the field Q ( d 1 , , d l ) , but not necessarily its ring of integers and a Dedekind domain. Actually, a recent work [51] discusses the hardness of a generalization of Ring-LWE called Order-LWE, which can be leveraged to have more freedom in the choice of the multivariate rings (see Section 9 for more details on the advantages of Order-LWE). We also refer the reader to [52] for a recent study on the connections between several algebraic LWE variants.
However, in this section we only want to base the security on RLWE defined on a number field of the form Q ( d 1 , , d l ) (see Definition 7) and its ring of integers satisfying Z [ x 1 , , x l ] / ( x 1 2 x 1 + 1 d 1 4 , , x l 2 x l + 1 d l 4 ) . We will therefore show that we can define an invertible map modulo q from the ring O K (and its dual O K ) to the ring Z [ x 1 , , x l ] / ( x 1 2 d 1 , , x l 2 d l ) , while still basing its security on the original RLWE formulation from Definition 7. Additionally, this map does not significantly increase the noise; in fact, it also decorrelates it in the coefficient domain, enabling direct sampling of the noise in the coefficient representation with an independent error distribution.
The map, applied to each variable x i , works as follows:
  • We apply the change of variable x x + 1 2 .
  • We multiply the sample by a factor 2.
This mapping can be applied whenever the inverse of 2 exists modulo q. The multiplication by 2 is applied afterwards to avoid the potentially high distortion introduced by the factor 1 2 into the noise.
Canonical Embedding:
Let K = Q ( d ), and note that 1 2 x 1 evaluated at x = 1 + d 2 equals 1 d . We define the Embedding map E going from O K 1 d Z [ x ] / ( x 2 x + 1 d 4 ) to C 2 , as the substitutions { x 1 + d 2 , d d } and { x 1 d 2 , d d } . This gives this transformation matrix for E
1 d 1 1 + d 2 1 d 1 2 .
The inverse map E 1 is defined as the product with the matrix
d 1 2 1 + d 2 1 1 .
Sampling the error directly in the coefficient domain:
Finally, if we define the noise in the embedding of the dual ring as two independent Gaussian variables e 0 , e 1 with variance σ 2 , we have in the ring 1 x Z [ x ] / ( x 2 d ) after following the whole “processing chain”:
1 x ( e 0 + e 1 ) 2 σ 2 x + d ( e 0 e 1 ) 2 d σ 2 mod x 2 d .
Hence, the noise is not correlated in the coefficient domain and we can easily sample the error distribution considering an appropriate variance per coefficient.
For simplicity, we have focused on a quadratic field, but the embedding matrix can be extended to the multiquadratic case by means of the Kronecker product.

5.1. Multiquadratic RLWE

Let us define the multiquadratic version of m-RLWE, where all the polynomial functions have the form f i ( x i ) = d i + x i 2 , as 
Definition 9
(Multivariate polynomial RLWE with quadratic polynomial ideals). Given a multivariate polynomial ring R q [ x 1 , , x l ] with f j ( x j ) = d j + x j 2 for j = 1 , , l where l = log 2 n (with n a power of two) and an error distribution χ [ x 1 , , x l ] that generates small-norm random multivariate polynomials in R q [ x 1 , , x l ] , the multivariate polynomial RLWE relies upon the computational indistinguishability between samples ( a i , b i = a i · s + e i ) and ( a i , u i ) , where a i R q [ x 1 , , x l ] , u i R q [ x 1 , , x l ] are chosen uniformly at random from the rings R q [ x 1 , , x l ] and R q [ x 1 , , x l ] ; and s , e i χ [ x 1 , , x l ] are drawn from the error distribution (see Section 5).
Given an adequate parameter setting, the security reduction from Theorem 2 applies to this multiquadratic version of the RLWE problem.
Theorem 5
(Parameter setting—hardness of multiquadratic RLWE). The polynomial-time quantum reduction from Theorem 2 applies to the multiquadratic RLWE assumption from Definition 9 (with f i ( x i ) = d i + x i 2 ) whenever:
  • All d i are squarefree integers.
  • All d i are pairwise coprime, i.e.,  gcd ( d i , d j ) = 1 for all i j .
  • All d i satisfy d i = 1 mod 4 .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Corollary 1
(Parameter setting—hardness of multiquadratic RLWE, derived fom Theorem 5).   The polynomial-time quantum reduction from Theorem 2 applies to the multiquadratic RLWE assumption from Definition 9 (with f i ( x i ) = d i + x i 2 ) whenever:
  • All d i are different prime numbers.
  • All d i satisfy d i = 1 mod 4 .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Section 7.1 gives further insights on the security and practicality of the chosen parameterization, and exemplifies it with a concrete instantiation. In particular, Proposition 5 gives a sufficient condition to consider the problem secure against known attacks. It is worth mentioning that even when the Principal Ideal Problem is easy in multiquadratics [53], to the best of our knowledge, this has not been proven enough to solve RLWE.

5.2. Comparison with Gaussian Integers

We now compare the multiquadratic RLWE with the particular case of power-of-two cyclotomics m-RLWE (see Definition 1) where all the used polynomial functions have the same form f i ( x i ) = 1 + x i 2 :
Definition 10
(multivariate polynomial RLWE with Φ 4 ( · ) as polynomial functions). Given a multivariate polynomial ring R q [ x 1 , , x l ] with f j ( x j ) = 1 + x j 2 for j = 1 , , l where l = log 2 n (with n a power of two) and an error distribution χ [ x 1 , , x l ] that generates small-norm random multivariate polynomials in R q [ x 1 , , x l ] , the multivariate polynomial RLWE relies upon the computational indistinguishability between samples ( a i , b i = a i · s + e i ) and ( a i , u i ) , where a i , u i R q [ x 1 , , x l ] are chosen uniformly at random from the ring R q [ x 1 , , x l ] ; and s , e i χ [ x 1 , , x l ] are drawn from the error distribution.
The comparison of our secure multiquadratic RLWE samples with RLWE samples from Definition 10 is specially relevant, as the latter are severely affected by BCV attack. Samples from Definition 10 can be reduced to a dimension of 2, by applying the map Θ ˜ a total of ( log 2 n 1 ) times, yielding n / 2 RLWE samples with f ( x ) = 1 + x 2 and error variance n / 2 times higher than the original m-RLWE sample; this can be very easily solved. Consequently, despite of the efficiency of the polynomial operations on the rings instantiated according to Definition 10, they are not valid for cryptographic applications. Meanwhile, the samples from a secure instantiation of multiquadratic RLWE (Definition 9) preserve the lattice dimension n and withstand BCV attack.
Another advantage of the multiquadratic RLWE problem is that it also enables very efficient polynomial operations, without decreasing security. In particular, it is possible to apply a variant of the Fast Walsh–Hadamard Transform (over finite rings instead of the usual real numbers), featuring a convolution property that relates the coefficient-wise representation with the transformed domain. This transform can be very efficiently computed with FFT-like algorithms whose computational cost is only O ( n log n ) additions and O ( n ) products, hence considerably speeding up practical implementations [43]. For more details, we refer the reader to Section 8.

6. More General Multivariate Rings

Let us consider now general fields Q ( a 1 1 / n 1 , , a l 1 / n l ) , for which the a i are squarefree and coprime, but for simplicity we will assume that they are independent primes. The results shown in the previous section for multiquadratics cannot be straightforwardly generalized to these fields, as the individual univariate fields Q ( a i 1 / n i ) can easily have common factors in their discriminants (i.e., be non-coprime), in such a way that finding a basis for the multivariate ring of integers is not trivial. We refer the reader to Section 9 for a discussion on the advantages that Order-LWE [51] brings about with respect to RLWE when choosing a basis for the ring of integers.
We explain the followed path that leads to our definition of valid, secure and easily parameterizable multivariate rings. We start by choosing number fields whose ring of integers O K can be represented as Z [ x ] / ( x n + a x + b ) , that is, as quotient polynomial rings whose ideal has the form ( x n + a x + b ) . For this to be a valid ring O K for K, it has to be irreducible over Q , for which we use Eisensntein’s criterion:
Proposition 2
(Eisenstein’s criterion [54]). The polynomial p ( x ) = a n x n + a n 1 x n 1 + + a 1 x + a 0 , where a i Z for all i = 0 , , n and a n 0 (which means that the degree of p ( x ) is n) is irreducible if some prime number p divides all coefficients a 0 , , a n 1 , but not the leading coefficient a n and, moreover, p 2 does not divide the constant term a 0 .
Therefore, we impose the following two conditions on f ( x ) = x n + a x + b :
  • Both a and b have to be divisible by a prime p and not by p 2 (Eisenstein’s criterion).
  • If we choose b as a prime, a has to be divisible by b.
Now, we can compute the discriminant for this number field by resorting to ([55], Chapter 2.7 ):
Proposition 3
(An example of the calculation of a discriminant [55] ). For the calculation of Δ K in a number field K = Q ( x ) being a extension of finite degree n of Q and f ( x ) = x n + a x + b the minimal polynomial of x over Q , we obtain
Δ K = ( 1 ) n ( n 1 ) 2 ( n n b n 1 + ( 1 ) n 1 ( n 1 ) n 1 a n ) .
For n = 2 (respectively, 3) we rediscover the well-known expressions a 2 4 b (respectively, 27 b 2 4 a 3 ).
Theorem 6
(Theorem 8.11 from [45] ). For Z -lattices L L inside K, [ L : L ] 2 < and
d i s c Z ( L ) = [ L : L ] 2 · d i s c Z ( L ) .
In particular, if  L O K and the integer d i s c Z ( L ) Z { 0 } is squarefree then [ O K : L ] = 1 ; i.e.,  L = O K .
If we choose values for a and b such that the polynomial discriminant is squarefree, Theorem 6 guarantees that the ring of integers has a power basis of the form { 1 , α , α 2 , } , with  α a root of x n + a x + b . Consequently, Z [ x ] / ( x n + a x + b ) is a valid ring of integers.
By including more “univariate” subrings, Z [ x 1 , , x l ] / ( x 1 n + a 1 x + b 1 , , x l n + a l x + b l ) becomes a valid ring of integers when all the discriminants are coprime [49]. Therefore, this is a feasible strategy to define RLWE over a multivariate ring, as the product of univariate rings with polynomial ideals ( x n + a i x + b i ) . To define the dual O K we can make use of Theorem 4 which states that whenever the ring of integers has a power basis, the basis of the dual is the same basis, scaled by 1 f ( α ) = 1 n α n 1 + a , where α is a root of f ( x ) .
Finding valid parameters for f ( x ) = x n + a x + b :
Unfortunately, the two previous conditions (Eisenstein’s criterion from Proposition 2 and Theorem 6) cannot be satisfied at the same time
  • To satisfy the Eisenstein’s criterion, b and a have to be divisible by at least a prime p (i.e., gcd ( a , b ) = u · p for some u Z ), this introduces a factor p n 1 in Δ K (see Equation (9)), in such a way that Δ K is not squarefree and not satisfying [ O K : L ] = 1 in Theorem 6.
    We could still work with these multivariate rings provided that their discriminants are coprime, but it seems that there is no straightforward way to determine the “powerful” basis of the ring of integers: starting from Proposition 3, it is known that Z [ α ] O K 1 Δ K Z [ α ] where f ( α ) = 0 .
  • Additionally, Eisenstein’s criterion is a sufficient but not necessary condition for irreducibility of the polynomial functions. Without the imposed restrictions, we could search for squarefree and coprime discriminants, but we would have to verify the irreducibility of the involved functions case-by-case. Nevertheless, this is not impossible to find, as it is known that monogenic fields are not scarce [56]; in fact, for random polynomials f, it has been conjectured that Z [ x ] / ( f ( x ) ) of degree 4 is a ring of integers with probability 0.307  [57].

6.1. Transformation Based on Modulus Switching

Let us assume that we have found valid (monogenic) x i n + a i x i + b i functions defining the ring of integers Z [ x i ] / ( x i n + a i x i + b i ) ; they do not yet feature the desired x n + d form.
In order to achieve this, we consider a map from the original RLWE samples to RLWE samples modulo q, that removes the term a x if q divides a. It is worth noting that this transformation is nothing but a modulus switching to q, and if it were possible to break RLWE modulo q, the original secret key could be recovered or at least the indistinguishability assumption could be broken.
The trick relies on all the polynomial functions having the form f i ( x i ) = x i n + a i q a i x i + b i . Hence, a reduction modulo q converts the polynomial functions into f i ( x i ) = x i n + b i . We show the effect of this transformation on the ring q O K for the univariate case (it extends to the multivariate case, as dual commutes tensoring):
  • O K is defined as 1 f ( α ) O K ; under the polynomial ring Z [ x ] / ( x n + a i q x + b i ) , this implies that the dual is 1 n x n 1 + a i q Z [ x ] / ( x n + a i q x + b i ) .
  • After reducing modulo q, we obtain 1 n x n 1 Z q [ x ] / ( x n + b i ) ; considering that x has inverse modulo q, we can multiply numerator and denominator by x to obtain x n x n = x n b i .
  • The factor 1 n b i can be removed by just a scaling (moving to the ring of integers O K ), so we can directly work on Z q [ x ] / ( x n + b i ) . This gives a “basis” { b i , x , x 2 , , x n 1 } (or a basis { 1 n , x n b i , x 2 n b i , , x n 1 n b i } without scaling).
Decodability of the transformed x n + a x + b :
Elias et al. [56] use an heuristic perturbation method to bound the spectral norm of the canonical embedding with f ( x ) = x n + a x + b . As the condition number is stable for most of the random perturbations of the canonical embedding matrix associated to x n + 1 , they conjecture that many f functions have a bounded spectral norm in terms of a and b; therefore, we can consider that the spectral norm s 1 ( N f ) ( N f represents the inverse of the canonical embedding matrix) is likely bounded by max ( a , b ) · det ( N f ) 1 / n  [58]. Consequently, the same arguments about noise behavior in [37,58] still apply, and in order to guarantee the prevalence of the security reduction (see Proposition 5), the noise wraps around modulo q in some of the polynomial coefficients ( max ( a , b ) q ). This is due to the large q factor introduced in f ( x ) , which requires the use of a high error variance, rendering some of the polynomial coefficients modulo q useless. This makes these RLWE samples harder to use for cryptographic applications.

6.2. Valid and Practical Parameterizations for Multivariate Rings

The previous solutions to parameterize multivariate rings with polynomial ideals ( x n + d ) are not satisfactory, as (a) the search of valid univariate rings is not easy to handle (due to the impossibility to use Eisenstein’s criterion) and (b) the obtained samples are not practical for cryptographic applications due to their high noise in some polynomial coefficients.
Here we follow a slightly different approach, releasing the condition on equal-degree polynomial functions; that is, we consider multivariate rings as Z [ x 1 , , x l ] / ( x 1 n 1 + d 1 , , x l n l + d l ) . Again, to simplify the explanation we only use an univariate quotient ring with polynomial ideal ( x n + d ) , but all the results can be analogously extended to the multivariate case (see Section 5) by requiring coprime discriminants.
First, for  f ( x ) = x n + d , Equation (9) simplifies to Δ K = ( 1 ) n ( n 1 ) 2 n n d n 1 .
Let d be a prime number and n = u m a prime power. Then,
  • f ( x ) is an irreducible polynomial over Q by the Eisenstein’s criterion (Propostion 2).
  • f ( x ) is monogenic for d and n by satisfying the following Proposition 4.
Proposition 4
(Adapted Proposition 3 from [56]). Let n be a power of a prime u. If d is squarefree and u 2 does not divide ( ( d ) n 1 + 1 ) d , then the polynomials x n + d are monogenic.
Proposition 4 shows that f ( x ) can be monogenic even when its discriminant is not squarefree. If  f ( x ) satisfies Proposition 4, we have O K = Z [ x ] / ( x n + d ) and O K = 1 n x n 1 Z [ x ] / ( x n + d ) .
In order to extend these results to multivariate rings Z [ x 1 , , x l ] / ( x 1 n 1 + d 1 , , x l n l + d l ) , we only have to consider functions { x 1 n 1 + d 1 , , x l n l + d l } satisfying Proposition 4 and having coprime discriminants. This basically means that all the d i and n i are respectively different primes and power primes.
Analogously to the multiquadratic rings in Section 5, we can directly map the error distribution in the coefficient domain. In particular, for the ring 1 n i x n i 1 Z [ x i ] / ( x i n i + d i ) , the parameter for the error distribution in the ( j 1 ) -th coefficient ( 1 j n i ) is given by n i d i n i j n i r , where r is the parameter of an independent spherical error distribution in the embedding domain [58]. This extends to multivariate rings by means of the Kronecker product.
Finally, we introduce the definition of multivariate RLWE with the proposed polynomial functions f i ( x i ) = d i + x i n i :
Definition 11
(Multivariate RLWE with polynomial functions as x i n i + d i ). Given a multivariate polynomial ring R q [ x 1 , , x l ] with f j ( x j ) = d j + x j n j for j = 1 , , l where n = j n j (where all n j are prime powers) and an error distribution χ [ x 1 , , x l ] that generates small-norm random multivariate polynomials in R q [ x 1 , , x l ] , the multivariate polynomial RLWE relies upon the computational indistinguishability between samples ( a i , b i = a i · s + e i ) and ( a i , u i ) , where a i R q [ x 1 , , x l ] , u i R q [ x 1 , , x l ] are chosen uniformly at random from the rings R q [ x 1 , , x l ] and R q [ x 1 , , x l ] ; s , e i χ [ x 1 , , x l ] are drawn from the error distribution.
For the ring R [ x 1 , , x l ] , we define χ [ x 1 , , x l ] as an error distribution generating polynomials belonging to R [ x 1 , , x l ] and whose parameter per coefficient satisfies r i [ l ] n i d i n i j i n i , where 1 j i n i and 1 i l , and hence represents the parameter for the coefficient associated to the monomial x 1 j 1 1 · · x l j l 1 .
Given an adequate parameter setting, the security reduction from Theorem 2 applies to several multivariate versions of the RLWE problem (see Definition 11).
Theorem 7
(Parameter setting—hardness of multivariate RLWE with polynomial functions as x i n i + d i ). The polynomial-time quantum reduction from Theorem 2 applies to the multivariate RLWE assumption from Definition 11 whenever:
  • All d i are squarefree and all n i are powers of the primes u i .
  • Each u i 2 does not divide ( ( d i ) n i 1 + 1 ) d i .
  • All n i and d i satisfy gcd ( n i , n j ) = 1 , gcd ( n i , d j ) = 1 and gcd ( d i , d j ) = 1 if i j .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Corollary 2
(Parameter setting—hardness of multivariate RLWE with polynomial functions as x i n i + d i , derived from Theorem 7). The polynomial-time quantum reduction from Theorem 2 applies to the multivariate RLWE assumption from Definition 11 whenever:
  • All d i and n i are, respectively, different odd primes and powers of the odd primes u i .
  • All d i and u i satisfy gcd ( d i , u j ) = 1 for all i , j .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Corollary 3
(Parameter setting—hardness of multivariate RLWE with polynomial functions as x i n i + d i , derived from Theorem 7). The polynomial-time quantum reduction from Theorem 2 applies to the multivariate RLWE assumption from Definition 11 whenever:
  • All d i are different primes, and each n i is a power of d i .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Theorem 8
(Parameter setting—hardness of multivariate RLWE with the compositum of rings from Definitions 9 and 11). The polynomial-time quantum reduction from Theorem 2 applies to the multivariate RLWE assumption from Definition 11 whenever:
  • For all f i ( x i ) = d i + x i n i with n i = 2 :
    -
    The d i are squarefree integers satisfying d i = 1 mod 4 .
  • For all f i ( x i ) = d i + x i n i with n i > 2 a power of a prime u i :
    -
    Each u i 2 does not divide ( ( d i ) n i 1 + 1 ) d i .
  • All d i and all n i > 2 satisfy gcd ( n i , n j ) = 1 , gcd ( n i , d j ) = 1 and gcd ( d i , d j ) = 1 if i j .
  • The error distribution satisfies the lower bound α q 2 · ω ( 1 ) .
Some examples of valid parameters:
In order to show the feasibility of the proposed parameterization, we exemplify it with some practical use cases for bivariate RLWE; we will consider n 1 = 2 11 = 2048 and n 2 = 3 7 = 2187 , and  d 1 = 5 , d 2 = 7 , for which we prove that they meet the conditions of Proposition 4
  • 2 2 = 4 does not divide 5 2047 + 1 , or equivalently, 5 2047 + 1 0 mod 4 . We have 5 2047 + 1 mod 4 = 1 2047 + 1 = 2 0 .
  • 3 2 = 9 does not divide 7 3 7 1 + 1 , or equivalently, 7 3 7 1 + 1 0 mod 9 . We have 7 3 7 1 + 1 = 7 1 7 3 7 + 1 = 7 1 7 3 7 mod 6 + 1 = 7 2 + 1 = 50 = 5 mod 9 0 .
Consequently, with this choice of parameters we can work on the number field K = Q ( ( 5 ) 1 / 2048 , ( 7 ) 1 / 2187 ) , with  O K = Z [ x , y ] / ( x 2048 + 5 , y 2187 + 7 ) and O K = 1 4478976 x 2047 y 2186 O K .
As for the example mentioned in the introduction, with functions x 64 + 1 and y 27 + 5 , we can also verify that
  • x 64 + 1 is the Φ 128 ( x ) power-of-two cyclomic, hence it is monogenic.
  • y 27 + 5 is monogenic by Proposition 4, as  3 2 = 9 does not divide 5 or 5 26 + 1 .
Additionally, as both discriminants are coprime, the product is directly the corresponding ring of integers.

7. Security of Multivariate RLWE and Example Instantiations

This section includes a discussion on several aspects of the proposed solutions in this work, namely their security, the geometric interpretation of the problem, and the feasibility of the proposed parameterizations. With this purpose, we enumerate the known attacks in the literature and include an example instantiation of a simple bivariate RLWE scheme. We refer to next Sections for a description of the applications enabled by our constructions.

7.1. Resilience against Known Attacks

The formulation proposed in this work involves working with quotient rings whose polynomial ideal is ( x n + d ) or, more generally, ( x n + a x + b ) . Some particular instantiations of these rings have already been studied in the literature and we can find specific attacks to “variants” of the RLWE problem (e.g., PLWE together with non-dual and dual RLWE versions) defined over them.
In general, the known attacks can be divided in two main types [37]:
  • Attacks using a reduction modulo an ideal divisor q of the modulus q R  [56,59,60,61,62,63]. These attacks try to distinguish between the error distribution and the uniform distribution modulo an ideal divisor.
  • A reduction to errorless LWE [58] which exploits the relation between RLWE and LWE. Expressing RLWE in its LWE form, the error term of some of the equations can be removed by means of a rounding operation, and linear algebra can be used to search for the secret key.
All these attacks have been generalized and studied in depth by Peikert in [37], where he concludes that all the concrete insecure RLWE instantiations made use of error distributions which were insufficiently well spread relative to the rings, meaning that none of the vulnerable instantiations satisfy the conditions from Theorem 2 to have worst-case hardness. In [37], Peikert also gives sufficient conditions to make RLWE secure against the previous attacks. We summarize the main relevant results for our constructions.
Proposition 5
(Invulnerability condition from [37]). Let ψ = D r (see Definition 7) be a spherical Gaussian error distribution over K R for some r > 0 ; a sufficient condition for invulnerability to the attacks from [37,56,58,59,60,61,62] is
r 2 .
The validity of Proposition 5 to resist the previous attacks is shown in the following two theorems: Theorem 9 (for the attack based on reduction modulo an ideal divisor) and Theorem 10 (for the attack based on errorless LWE).
Theorem 9
(Theorem 5.2 from [37]). Given a Ring-LWE sample ( a , b = s · a + e ) R q × K R / q R where e D r is transformed into n LWE samples ( A a , b = s T A a + e T ) , where b ( R / q Z ) n and e R n are respectively the coefficient vectors of b K R / q R and e K R (with respect to the chosen basis of R ), and  A a Z q n × n is the matrix of multiplication by a R q with any element of R q (with respect to the chosen bases of R , R ). Then, for any Z -basis B = ( b j ) of R used above, each entry of e is a continuous Gaussian of parameter at least r n 2 n (which is the required lower bound to apply the worst-case hardness theorems for plain-LWE).
Theorem 10
(Theorem 5.1 from [37]). Let q R be any ideal of norm N ( q ) 2 n , and let the error parameter r 2 satisfy condition (10). Then the reduced error distribution D r mod q R is within statistical distance 2 2 n of uniform over K R / q R .

7.2. Geometric Interpretation and Examples of Multivariate RLWE

In this section, we give a high level overview of how to instantiate a secure multivariate RLWE sample from Definition 11, exemplifying it in the bivariate case (all rings are defined over variables x , y , omitted when unambiguous).
This example can also be used as a means to showcase complex numbers packing into slots, obtaining a net improvement on the number of available slots per ciphertext when comparing to the recent results in [39] (see Section 10). For the sake of clarity, we introduce a simple SHE scheme which enables homomorphic additions and multiplications without taking into account some of the more advanced techniques typically considered in the literature.

A Multivariate RLWE Sample

For simplicity, we consider a bivariate RLWE sample ( a , b = a · s + e ) R q × R q , where a R q [ x , y ] , s R q [ x , y ] and e χ [ x , y ] , with  χ [ x , y ] generating small-norm random bivariate polynomials in R [ x , y ] . We can use a uniformly random s or follow conventional approaches where s is a small key (see Section 3).
Geometry of R, its dual R and an example for { x 2 + 3 , y 2 5 } :
To easily illustrate the geometry of R and R , we use a simple example R = Z [ x , y ] / ( x 2 + 3 , y 2 5 ) . By means of the canonical embedding, we know that the substitutions { x ± 3 , y ± 5 } yield the four different slots in the embedding domain.
This clearly shows that λ 1 ( R ) n = 2 by the embedding of 1, and we can also obtain the embedding of the elements x, y and x y . The term x y can be used to obtain an upper-bound for λ 4 ( R ) , such that λ 4 ( R ) 2 15 .
This is generalizable to any multiquadratic with l = log 2 n variables, by considering the embedding of 1 and i [ l ] x i , obtaining λ 1 ( R ) n and λ n ( R ) n i [ l ] d i . As the l-th prime is asymptotically p l l log l , a worst-case for l = log 2 n is d l l l l ( log l ) l = ( log 2 n ) log 2 n ( log 2 log 2 n ) log 2 n . Combining the two previous expressions we have that λ n ( R ) (and hence also the ratio λ n ( R ) λ 1 ( R ) ) is polynomially upper-bounded by n.
These bounds are straightforwardly extended to the dual R by taking into account the corresponding “tweak” factor. For the multiquadratic scenario, the dual only suffers a scaling by the square roots of the d i terms (R is sparser than the dual R ). However, considering higher degrees in the polynomial functions x i n i + d i , the tweak factor can turn the noise in the non-dual version of RLWE into highly non-spherical.
A very detailed analysis of these effects (including also some enlightening visual examples) can be found in [37].
Parameters’ choice:
We show now how to select correct parameters { n x , n y , d x , d y } satisfying the conditions established in Section 5 and Section 6 for valid number fields.
As a brief summary, and focusing on n x , n y > 2 , this mainly implies that: (1) the discriminants of K x = Q [ x ] / ( x n x + d x ) and K y = Q [ y ] / ( y n y + d y ) are coprime, i.e.,  gcd ( Δ K x , Δ K y ) = 1 , and (2) n x , n y are prime powers satisfying Proposition 4.
This enables the definition of O K = R = Z [ x , y ] / ( x n x + d x , y n y + d y ) as the ring of integers. Analogously, the dual is O K = 1 n x n y x n x 1 y n y 1 Z [ x , y ] / ( x n x + d x , y n y + d y ) (see Section 6 for some particular choices).
In this bivariate case, the error distribution χ [ x , y ] samples polynomials in O K whose coefficients are independently sampled from Gaussian distributions with different standard deviations. In particular, σ is equal to r n d x n x j x n x d y n y j y n y / 2 π for the coefficient associated to the monomial x j x 1 y j y 1 with 1 j x n x and 1 j y n y .
Working on q O K :
As it is usually done with power-of-two cyclotomics, we can directly transform the dual into the ring of integers by means of a scaling. If we have O K = 1 n x n y x n x 1 y n y 1 Z [ x , y ] / ( x n x + d x , y n y + d y ) , we can first multiply the dual by x y x y , to see the simplified relation x y x y O K = x y n d x d y O K .
Finally, analogously to the x n + 1 functions, we can scale the ( a , b ) sample by n = n x n y and also d x d y . This gives us a sample ( a ( x , y ) , b ( x , y ) = n d x d y x y · b ( x , y ) ) R q 2 . Consequently, we can directly work on the ring of integers with ( a , b = a s + e ) R q 2 where a R q , s R q (or also s χ [ x , y ] ) and e χ [ x , y ] . After the multiplication with the monomial x y , the error distribution χ [ x , y ] generates independent coefficients from a Gaussian distribution of σ = r n d x n x j x n x d y n y j y n y / 2 π for 1 < j x n x and 1 < j y n y , σ = r n d x 2 n x j x n x d y n y j y n y / 2 π for j x = 1 and 1 < j y n y , σ = r n d x n x j x n x d y 2 n y j y n y / 2 π for 1 < j x n x and j y = 1 while σ = r n d x 2 n x 1 n x d y 2 n y 1 n y / 2 π for j x = j y = 1 .
SHE over Multivariate Rings:
The basic example cryptosystem described in Table 3 follows the structure of the SHE version introduced in [64] and implemented in [65]. The main difference relies on the fact that our polynomial elements belong to the multivariate rings R [ x , y ] , R t [ x , y ] and R q [ x , y ] (see Definition 11), contrarily to the traditional univariate version Z [ x ] / ( 1 + x n ) and its analogous rings modulo t and q. In Table 3 the diagonal of J has the corresponding standard deviations of χ normalized by r (i.e., σ / r ) for each coefficient of the bivariate polynomials.
In particular, our plaintext ring R t is basically a bivariate polynomial R t [ x , y ] = Z t [ x , y ] / ( x n x + d x , y n y + d y ) which is encoded as a sub-module of T = K R / R (see Definition 7). Our example is based on the scheme introduced in [64], but other choices are possible. Regarding the achieved noise bounds, they are analogous to the computations from [64] by taking into account the expansion factor of the involved rings.
The additional variables of the multivariate structure can bring about some significant advantages: more efficient polynomial operations (see Section 8), better space/efficiency tradeoffs when working with automorphisms (see Section 9), and can also be very useful when working with multidimensional structures (see the works [8,10,39] for more details on practical applications). In particular, in [39,40] the authors present a library called MHEAAN, based on multivariate RLWE, which is optimized to perform homomorphic matrix operations.
Correctness and Security:
The condition for correct decryption is that the effective noise | | ( i = 0 γ 1 c i s i ) mod q ) | | remains smaller than q / 2 . Let us consider a simplified version of Theorem 2 from [64] where only the effect of noise is taken into account, and let max { σ } be the maximum standard deviation of the polynomials sampled from χ [ x , y ] . Let M be the maximum coefficient of the evaluated degree-D polynomial; if M ( t max { σ } d x d y n n ) D is smaller than q / 2 , the scheme of Table 3 can evaluate degree-D multivariate polynomials over elements which belong to R t [ x , y ] . We could also consider a more tight empirical condition for q, as stated in [65].
Regarding the security of this SHE scheme, it relies on the indistiguishability assumption of the polynomial multivariate version of RLWE (with adequately chosen secure parameters χ [ x , y ] , { n x , d x , n y , d y } and q) featured in Definition 11; breaking this assumption implies, as stated in Theorem 2, the existence of a quantum algorithm which solves short vector problems over ideal lattices. For a practical estimation of the bit security, we can apply the LWE security estimator developed by Albrecht et al. [66,67] to the cryptosystems built on multivariate RLWE and also the estimates included in the standards document [68] for a general random lattice with the same dimension ( n = n i ). This is plausible, analogously to what it is typically done with ideal lattices, as a secure instantiation of m-RLWE works with full-rank lattices, for which no substantially faster attacks are known than for general lattices.

8. Multiquadratic Rings with Fast Walsh–Hadamard Transforms

Copyright of Section 8 by IEEE: ©2021 IEEE. Reprinted, with permission, from Section 3 and Section 4 of the conference paper: “Multiquadratic Rings and Walsh–Hadamard Transforms for Oblivious Linear Function Evaluation”, 2020 IEEE International Workshop on Information Forensics and Security (WIFS). This section focuses on improving the cost of the underlying polynomial operations for cryptographic primitives based on RLWE, especially polynomial products (convolutions) [43]. We show how the well-known asymptotic cost of O ( n log n ) for cyclotomic rings with polynomials of n coefficients can be improved by a factor of log n in terms of elemental multiplications when working on m-RLWE (or RLWE over a multivariate number field). To this aim, we particularize the multivariate version to degree-2 polynomials and introduce an ( α -generalized) variant of the Walsh–Hadamard Transform (over finite rings instead of the usual real numbers), featuring a convolution property that relates the coefficient-wise representation with the transformed domain. This transform can be very efficiently computed with FFT algorithms (specifically, with a variant of the Fast Walsh–Hadamard Transform) whose computational cost is only O ( n log n ) additions, hence being much more amenable for a practical implementation. It is worth noting that the effect of the efficiency improvement brought about by our approach goes beyond somewhat homomorphic encryption schemes (including also the NTRU setting [69,70]), also enhancing any cryptographic primitives involving polynomial multiplications, e.g., the candidates of the NIST Post-Quantum challenge [67]. We also exemplify in [43] its use for the efficient implementation of Oblivious Linear Function evaluation.
For this section, we deal with a specific version of m-RLWE where all the used polynomial functions have the same form f i ( x i ) = d i + x i 2 (see Definition 9).
The security reduction from Theorem 2 applies to this particular version of the m-RLWE problem. To this aim, parameteres d i have to be chosen as indicated in the beginning of Section 5. Additionally, Proposition 5 gives a sufficient condition to make the problem secure against the attacks described in Section 7.1.
We introduce next the ( α -generalized) Hadamard transform, that we apply to reach the aforementioned performance gains on polynomial convolutions.

Faster Polynomial Arithmetic over Multivariate Rings

The Hadamard transform over real numbers is usually applied by means of the recursion
H i = 1 2 H i 1 H i 1 H i 1 H i 1 ,
where i N and H 0 = 1 .
It can be seen that the matrix H i with i 1 is equivalent to the Kronecker product of i Discrete Fourier Transform (DFT) matrices of size 2 ( H 1 equals the DFT matrix of size 2); that is, it can be seen as a 2 × 2 × × 2 i t i m e s -DFT transform (defined over i dimensions of length 2 each).
Analogously to the DFT, the Walsh–Hadamard Transform (WHT) of size n possesses a particular fast algorithm called Fast Walsh–Hadamard Transform (FWHT) which can be very efficiently computed with no products and with a cost of O ( n log n ) additions and subtractions (see [71,72]). Hence, when working over rings satisfying a convolution property with the Hadamard transform, it is possible to efficiently compute the multiplication of elements from these rings with a cost of O ( n ) elemental multiplications.
Security reasons prevent us from directly working over rings satisfying this convolution property with the Walsh–Hadamard transform (that is, multivariate quotient rings whose polynomial functions are f ( x i ) = x i 2 1 ), as they can be easily factored into ( x i 1 ) ( x i + 1 ) over Z . Therefore, we resort to the type of multivariate rings presented in Definition 9 and apply an ( α -generalized) variant of the WHT.
α -generalized convolutions:
An α -generalized convolution corresponds to the ring operation defined over polynomials belonging to Z q [ z ] / ( 1 α z n ) . For example, with  α = 1 we have a negacyclic convolution. In the literature, this convolution operation is also called negative wrapped convolution. Figure 1 shows the realization of an α -generalized convolution between vectors of length N (with l = 0 , , N 1 ), by means of a cyclic convolution combined with an element-wise pre/post-processing applied before/after [7,36].
As the cyclic convolution can be efficiently computed by means of standard fast algorithms, this means that an α -generalized convolution can be implemented with only a light overhead ( O ( n ) scalar products). It is common to include these additional scalar products inside the butterflies of the FFT algorithms to further enhance the efficiency.
α -generalized Walsh–Hadamard transform:
We are mainly interested in polynomial functions with the form x i 2 + d i . We can rewrite 1 α x n as α ( ( α ) 1 + x n ) . Hence for x i 2 + d i we have d i = ( α i ) 1 = α i 1 . For this particular type of polynomial rings we can define the following direct and inverse transforms:
W 1 = H 1 1 0 0 ( α 1 ) 1 / 2 , and W 1 1 = 2 1 1 0 0 ( α 1 ) 1 / 2 H 1 ,
where the square-roots ( α i ) 1 2 and ( α i ) 1 2 have to exist in R q for all i (see Definition 9). Equivalently, if q is an odd prime, we can make use of the Legendre symbol d mod p p to check when the multivariate ring factors into linear terms. To this aim we need that d i mod q q = 1 for a prime q and for all i. We also redefine H 1 = 1 1 1 1 without taking into account the normalizing factor 1 2 .
Therefore, now we can extend this definition to multivariate quotient rings with polynomial ideals of the form ( x i 2 + d i ) : we consider the Kronecker product of the matrices W 1 and W 1 1 as W i = j [ i ] W 1 and W i 1 = j [ i ] W 1 1 , arriving to the following expression:
W i = H i j [ i ] 1 0 0 ( α j ) 1 / 2 , and W i 1 = 2 i j [ i ] 1 0 0 ( α j ) 1 / 2 H i ,
where the normalizing factors are again left outside H i .
Consequently, if we define the vector α = α 1 , , α l T , when working over the multivariate ring R q [ x 1 , , x l ] with f j ( x j ) = d j + x j 2 for j = 1 , , l we can use the transforms W l and W l 1 analogously to the use of negacyclic NTTs in the univariate RLWE. Both W l and W l 1 transforms can be efficiently computed in O ( n ) (where n = 2 l ) elemental multiplications thanks to the FWHT. This enables the computation of the H l matrix multiplications with only O ( n log n ) additions and subtractions and no products, which brings a net improvement with respect to the analogous and wide-spread radix implementation of the NTT.
Implementation of the Fast Walsh–Hadamard Transform (FWHT):
Algorithm 1 shows a pseudocode implementation of the (cyclic) Fast Walsh–Hadamard Transform (FWHT) implementation (see [71,72]), computing the Hadamard transform of a length-n vector a . It can be easily seen that this algorithm requires a total of n log 2 n additions (specifically, n log 2 n 2 additions and n log 2 n 2 subtractions), instead of the n 2 additions/subtractions required when directly applying the matrix multiplication.
Algorithm 1  Fast Walsh–Hadamard Transform ( H i a with i 1 ).
1:
procedureFastWalsh–HadamardTransform( a )
2:
Input:
3:
     a such that length ( a ) = n = 2 i and i 1
4:
Algorithm for FWHT ( a ) (computing H i a ):
5:
     depth = 1 ;
6:
    for j = 0 until log 2 n 1 do
7:
         scale = 2 depth ;
8:
        for k = 0 until length ( a ) 1 scale do
9:
           for l = scale k until scale k + depth 1 do
10:
                ac = a [ l ] ;
11:
                a [ l ] = a [ l ] + a [ l + depth ] ;
12:
                a [ l + depth ] = ac a [ l + depth ] ;
13:
         depth = 2 depth ;
14:
Output:
15:
     a H i a
Finally, the α -generalized version of the direct (inverse) FWHT can be defined by adding a right (left) product by a diagonal matrix, so that the total cost for the α -generalized FWHT on a length-n vector is n elemental multiplications and n log 2 n additions.
Implementation and evaluation:
Polynomial multiplications are the main bottleneck of lattice cryptography, as they are the most time-consuming basic blocks of any cryptographic algorithm, from encryption/decryption to relinearization and bootstrapping. The replacement of the traditional NTTs by FWHT by transitioning from cryptographic constructions built on univariate RLWE to the proposed multivariate version can bring a considerable improvement in terms of computational efficiency. To showcase the achieved gains, we have implemented Algorithm 1 in C++ and compared it with one of the currently most efficient radix-2 implementations of the NTT [6]; this is the algorithm featured in the NFLlib, one of the fastest lattice-based cryptographic libraries available for homomorphic encryption. NFL also off-loads the complexity of the bit-reversal operation to the INTT, in order to speed up the NTT, and makes use of SSE and AVX2 optimizations to further enhance the obtained performance. Figure 2 shows the comparison of the obtained run times for a wide range of practical values of n (vector size or polynomial degree), when using our FWHT implementations, including an SSE/AVX2 vectorized version. It can be seen that we obtain a reduction to about 45–50% of the time of the NTT (38–43% of the INTT) in the non-vectorized implementation of the FWHT with respect to the fast NTT of NFLlib, while the vectorized one further reduces this figure to 22–24% (19–22% of the INTT). Finally, it is worth noting that the memory consumption of the FWHT is much lower, as it does not need to store the tables of the twiddle factors.

9. Slot Manipulation in Multivariate Rings

In this section we introduce the main improvements that m-RLWE brings to slot manipulation when packing several plaintext inputs into a ciphertext, with applications in relinearization and bootstrapping operations. Packing into slots [73] helps to take advantage of the available space in the plaintext ring, therefore improving cipher expansion. The use of this packing strategy also enables working with homomorphic “slot”-wise additions and multiplications, i.e., Single Instruction, Multiple Data (SIMD) operations with encrypted data.
This is usually combined with a mechanism to efficiently move and exchange the plaintext contents across slots, by taking advantage of the properties of the available automorphisms in the used ring. In general, in the ring R t = Z t [ z ] / ( Φ m ( z ) ) , we can define a set of automorphisms ϕ ( m ) as different transformations ρ i : R t R t with i Z m * , which apply a change of variable z z i over the elements in R t .
Current lattice-based homomorphic cryptosystems leverage automorphisms to perform linear transformations across plaintext slots. Whereas applying an automorphism is a very efficient operation, it produces a ciphertext encrypted under a different secret key, and consequently, a switching key operation is needed to recover a ciphertext under the original secret key. This switching key process has two main drawbacks [74]: (a) a notable computational overhead and (b) an increase in the memory requirements due to the need of adding additional public information (“switching key/relinearization” matrices, a.k.a. evaluation keys).
In general, there is a tradeoff between these two dimensions: when the number of evaluation keys increases, the involved switching key runtime decreases, and conversely, when the number of keys is reduced, a chain of several switching key operations is needed, hence increasing the runtime. In a recent work [74], Halevi and Shoup explore several strategies to optimize this tradeoff, claiming improvements of even 75 times faster runtimes than those of their previous implementation, together with a reduction of up to a half in the required memory space to store the evaluation keys.
This section focuses on two different aspects: (1) We show how the introduced multivariate rings over the RLWE problem (see Section 5 and Section 6) enable considerable improvements in the efficiency of the homomorphic packing/unpacking into slots, therefore greatly improving essential blocks for homomorphic encryption, such as bootstrapping, and (2) we analyze the structure of the available set of automorphisms on these rings, also showing that our solution can improve on both the runtime and the memory requirements with respect to the state of the art [74].
It is worth highlighting that some of the exemplified solutions in this section are sketched out with negacyclic rings. For completeness, in Section 9.4 we give some insights on how to extend these results to the more general multivariate rings showcased in this manuscript.

9.1. Efficient Slot Packing/Unpacking

The homomorphic packing/unpacking of plaintext values into slots is one of the most important examples of the evaluation of linear transformations on the ciphertexts, bootstrapping being one of the most representative applications [14,15,16]. The way current cryptosystems implement this packing/unpacking is by means of a decomposition of the matrix multiplication into element-wise products between the different diagonals of the matrix and different rotated versions of the ciphertext (hence by adding the result of a set of multiplications between plaintexts and rotated ciphertexts).
The main bottleneck of this process is the number of switching key matrices required to rotate the ciphertexts. Working with n slots, a total of n 1 rotations, hence n 1 switching key matrices, is required in the worst case. Available strategies to reduce this number of matrices come at the cost of also increasing the runtimes per automorphism/switching key operation.
To the best of our knowledge, the best strategy for homomorphic packing/unpacking is presented in [75] for the HEAAN cryptosystem. Their method, with an input of n slots and parameterized by a radix r, requires O ( r log r n ) constant vector multiplications, O ( r log r n ) rotations and a depth of O ( log r n ) .
Thanks to the introduced multiquadratic RLWE with l = log 2 n independent variables, we can also break the need of a number of rotations (automorphisms/switching key operations) equal to the number of slots, and we enable homomorphically packing/unpacking operations with a single switching key operation per independent ring variable.
Homomorphic Packing/Unpacking:
Considering a multiquadratic plaintext ring R t [ x 1 , , x l ] (see Definition 11), we arrive to the following packing/unpacking matrices:
V l = 2 l j [ l ] 1 0 0 ( α j ) 1 / 2 H l , and V l 1 = H l j [ l ] 1 0 0 ( α j ) 1 / 2 .
These matrices are similar to the ones introduced in Section 8, but now having
V l = 2 l W l 1 and   V l 1 = W l ,
and being defined over the plaintext ring, so satisfying α j = d j mod t for j [ l ] .
Both packing and unpacking matrices can be decomposed on a matrix of size 2 × 2 over each independent variable. Additionally, these matrices can be very efficiently computed on a quadratic ring.
Consider, without loss of generality, that we have
a ( x 1 , , x l ) = a 0 ( x 1 , , x l 1 ) + x l a 1 ( x 1 , , x l 1 ) mod x l 2 + d l .
By applying now the automorphism x l x l , we can efficiently extract both a 0 and a 1 by computing a ( x 1 , , x l ) + a ( x 1 , , x l ) , and a ( x 1 , , x l ) a ( x 1 , , x l ) .
Once we have extracted a 0 and a 1 , the multiplication with the 2 × 2 matrix can computed. This process can be recursively applied for each independent variable.
Hence, our proposed method enables homomorphic packing/unpacking on an input of n slots which requires log 2 n rotations and depth log 2 n , but now working for BFV-type cryptosytems [76].

Homomorphic Walsh–Hadamard Transform

Consider again a multiquadratic plaintext ring R t [ x 1 , , x l ] : by applying the packing method (packed-RLWE) described in [12], we can emulate over a ciphertext composed of multiquadratic rings, a ring homomorphism with a cyclic Walsh–Hadamard ring (i.e., a ring with 1-generalized Walsh–Hadamard transforms, see Section 8).
Then the required matrices for packing and unpacking are respectively:
V l = 2 l H l and   V l 1 = H l .
H l evaluation:
It can be seen that the H l matrix can be homomorphically evaluated by means of recursively applying a shift and an automorphism for each independent variable. That is, if we have encrypted a polynomial a R t [ x 1 , , x i ] , we would do:
a ˜ ( x 1 , , x l ) = i [ l ] x i a ( x 1 , , x i , , x l ) + a ( x 1 , , x i , , x l ) .
The above operations can be homomorphically evaluated by means of one shift, one automorphism and two additions per independent variable.

9.2. Automorphisms in Multiquadratic Rings and Their Hypercube Structure

We show now how m-RLWE improves on the tradeoffs between space and computational cost when dealing with automorphisms, with respect to the univariate version.
Let A [ z ] / ( 1 + z 2 ) be a polynomial ring as the one described by Definition 9, and α be an element α A [ z ] / ( 1 + z 2 ) ; then, we denote by θ i ( z ) ( α ) A [ z ] / ( 1 + z 2 ) the transformation over α which applies the change of variable z z i with i Z 4 * . For these particular rings, both transformations are, respectively, the identity z z and the negation z z . Reducing modulo t (the modulo of the plaintext ring), the effect of the latter transformation over the slots would be equivalent to a block shift where each block is composed by one half of the total slots. This shift is graphically illustrated in Figure 3 (also briefly described in Table 4), where ψ is the 4th root of unity modulo t (i.e., ψ 4 1 mod t ), and the two blocks of slots encoded respectively in α ( ψ ) and α ( ψ 3 ) get shifted by applying z z . With rings A [ z ] / ( d + z 2 ) we have similar automorphisms { z z } and { z z } .
Going back to the notation R t [ x 1 , , x l ] with f j ( x j ) = 1 + x j 2 for our ring, we can then apply combinations of these two transformations with the different variables x j for j [ l ] . Analogously to [74], this gives a multidimensional structure on the automorphisms group considering the composition of transformations
θ i 1 , , i l ( α ) = θ i 1 ( x 1 ) ( θ i 2 ( x 2 ) ( θ i l ( x l ) ( α ) ) ) R t [ x 1 , , x l ] ,
where α R t [ x 1 , , x l ] , t 1 mod 4 and i 1 , , i l Z 4 * .
This multidimensional structure of the automorphisms group can be seen as an l-tuple with two different values per component (which gives a total of 2 l different automorphisms). Hence, similarly to the shift property of a multidimensional DFT [77], this group satisfies both the abelian and sharply transitive properties required to perform any type of permutation [78].
Logarithmic Increase in Space and Computational Cost (Strategy 1):
The effect of each of the automorphisms over the slots can be visually represented as a hypercube with as many dimensions as independent variables the rings have, that is, with a total of log 2 n dimensions. As a graphical example, Figure 4 shows the slot structure corresponding to a multivariate ring with seven independent variables; in this case, each different vertex of the hypercube represents one of the n = 128 available slots, where the allowed transitions between vertices depend on the chosen strategy, as we describe next (see also Table 5).
In case of storing n switching key matrices (corresponding to all the automorphisms), any vertex transition will be allowed through one single switching key operation. However, it is possible to store less switching key matrices (which, combined, represent the whole set of automorphisms), hence increasing the number of subsequent automorphisms/switching key operations for transitioning from one vertex to another.
Due to the specific structure of our multivariate rings, we propose an optimal strategy with log 2 n switching key matrices, each one corresponding to a different transformation x i x i ; with the additional advantage that these transformations are their own inverses. Following this strategy, we can also see the different slots (vertices in Figure 4) as a binary vector of length log 2 n , where the available operations are bit-wise XOR operations with vectors
{ ( 1 , 0 , , 0 ) , ( 0 , 1 , 0 , , 0 ) , , ( 0 , , 0 , 1 ) }
belonging to the standard basis of dimension log 2 n . In the example of Figure 4 (with log 2 n = 7 ), this method would be equivalent to working with seven independent vectors (of the standard basis) enabling only movements between vertices in the dimension associated to the vector.
It can be seen that with this strategy the farthest slot to a given one is always the slot represented as its ones’ complement, i.e., the opposite vertex. This implies a total of log 2 n automorphisms/switching key operations. Hence, in the worst case we have an increase in the computational cost by a factor of log 2 n when storing log 2 n switching key matrices and working with n slots. This is a considerable reduction in the memory requirements when compared to the approximately O ( D ) and O ( D ) factors considered by Halevi and Shoup [74] when working with D slots (in one dimension).
As a quick comparison, for the practical values reported in [74], i.e., n = ϕ ( m ) = 16 , 384 , our strategy achieves an increase factor of 14 on the computational cost, which is not considerably higher than their results, but with huge savings in storage for our case: we store only 14 matrices, compared to the 51 matrices and three automorphisms/switching key operations achieved by [74] for a similar value of ϕ ( m ) = 15 , 004 and one dimension with D = 682 following a baby-step/giant-step strategy.
Finally, it must be noted that when applying a switching key, noise constraints force the need of decomposing the coefficients of the involved polynomials in some specific base. This is true unless we resort to the strategy of Bajard et al. [79] which takes advantage of the CRT decomposition over the polynomial coefficients. However, this strategy cannot be applied always, as it requires a highly composite modulo with primes of an adequate machine size (see [5]). As this base decomposition does not straightforwardly commute with the NTT/INTT (or CRT over the polynomial function) representation, the inverse and direct transforms have to be applied over the polynomials. Our setting in multivariate rings with FWHT enables a reduction on complexity for these transforms by a factor of O ( log n ) in terms of elemental products; i.e., this yields a net gain factor of log n in storage while keeping the same order of (multiplicative) computational complexity.
Efficiency/space tradeoffs:
In practical scenarios, the tradeoff between used memory and computational cost might require a different balance with less space efficiency than the log 2 n achieved by the described strategy. Consequently, we also cover two additional strategies which lead to an improvement of the computational cost by a factor of 2.
Strategy 2: Our first approach adds to the previous log 2 n matrices those which are associated to “diagonal” vectors in our hypercube representation of the autormorphisms (see Figure 4); that is, we work with automorphisms { x i x i l i , x j x j l j } where l i , l j Z 4 * and i , j [ log 2 n ] , being i j . Going back again to the binary representation of the slots, the additional automorphisms could be seen as the result of all pairwise XOR operations of different vectors of the standard basis of length log 2 n .
The number of needed switching key matrices is therefore increased to
1 + log 2 n 2 = ( 1 + log 2 n ) log 2 n 2 .
In order to calculate the associated computational cost for this strategy, we resort to induction, working first with the odd natural numbers, and afterwards with the even natural numbers. Let the multivariate ring R t [ x 1 , , x l ] with f i ( x i ) = 1 + x i 2 where i = 1 , , l and l = log 2 n , if we consider only the odd values of l we have:
  • For l = 1 , any transition can be applied with only one automorphism/relinearization operation.
  • Assuming that l variables require k automorphisms/relinearization operations, it can be shown that adding two variables (i.e., l + 2 ), k + 1 automorphisms/relinearization operations are needed. We can graphically see this by resorting to the binary representation: moving between any two slots implies, in the worst case (consider one vector and its ones’ complement), one additional XOR operation.
  • Therefore, by induction, odd values of l require l 2 automorphisms/relinearization operations.
The argument is analogous for even l. First, we consider l = 2 , where with only one automorphism/relinearization operation is enough to move between any of the slots. Next, the same reasoning as before could be applied between l and l + 2 variables, resulting in a total of l 2 automorphisms/relinearization operations for l variables.
Taking into account both results, this strategy yields an increase in the number of automorphisms/switching key operations by a factor of log 2 n 2 . Hence, we can reduce by a half the computational cost compared to our previous strategy, with a quadratic increase in the memory requirements of ( 1 + log 2 n ) log 2 n 2 instead of log 2 n . For instance, with n = 16 , 384 this would give an increase in cost by a factor of seven and a total of 105 stored matrices.
Strategy 3: The incurred increase in space requirements by Strategy 2 might not be acceptable for certain applications; therefore, our next approach preserves the cost improvement, but achieving a negligible increase in the number of required matrices: 1 + log 2 n matrices instead of O ( ( log n ) 2 ) .
The idea behind this approach is adding to the switching key matrices for transformations of the form { x i x i } for i = 1 , , log 2 n the following one
{ x 1 x 1 , , x log 2 n x log 2 n } .
As a graphical explanation, let us consider again the binary representation of the slots: in addition to working with those XOR operations with vectors belonging to the standard basis of length log 2 n , now we can also apply the ones’ complement of every “slot” in one operation (e.g., in Figure 4 we could directly move with one automorphism/switching key operation from point A to point B).
Therefore, the worst case automorphism requiring l = log 2 n 2 matrices with our first strategy can now be computed with just one matrix. Moreover, as we know that l l 2 l 2 for any l N , then the farthest slot position can be achieved by only l 2 = log 2 n 2 automorphisms. Consequently, we can see that with 1 + log 2 n matrices, we only need a maximum of log 2 n 2 automorphism/switching key operations. For instance, with n = 16 , 384 this would give an increase in cost by a factor of seven and a total of 15 matrices in terms of use of memory.

9.3. Automorphisms in Multivariate Power-of-Two Cyclotomic Rings

It can be useful to expand Definition 9 to also cover more general multivariate rings, which can be leveraged by some applications. Most of these applications consider a general multivariate ring as the R and R q from Definition 1, where each of the polynomial functions are defined as different power-of-two cyclotomic polynomials f i ( x i ) = x i n i + 1 . Hence, analogously to the procedure we followed with multiquadratics in Section 9.2, we exemplify these results with power-of-two cyclotomics. They can be similarly extended to more general rings of the form x i n i + d i . We refer the reader to Section 9.4 for more details.
In this section the discussed efficiency/space tradeoffs achievable with automorphisms on the FWHT-enabled rings will be expanded to these rings (at the cost of lacking the faster FFT algorithms for the negacyclic Hadamard transform).

Tradeoffs in the Size/Efficiency Of Automorphisms

We consider the ring R introduced in Definition 1; particularly, we work with R t [ x 1 , , x l ] where t 1 mod 2 n i for i = 1 , , l . Analogously to our derivation in Section 9.2, when working with an element α R t [ x 1 , , x l ] , we have the transformations
θ i 1 , , i l ( α ) = θ i 1 ( x 1 ) ( θ i 2 ( x 2 ) ( θ i l ( x l ) ( α ) ) ) R t [ x 1 , , x l ] ,
now with i j Z 2 n j * for all j.
This multidimensional structure can be seen again as an l-tuple, where each component has n i different values, hence giving a total of n = i = 1 l n i different automorphisms.
Strategy 4: Our main strategy works with n i 1 matrices for each variable x i , where each switching key matrix will correspond to an automorphism { x i x i l i } for l i Z 2 n i * (except { x i x i } ) and i = 1 , , l . This strategy yields a total of i = 1 l n i l matrices with a computational cost of l automorphism/switching key operations. Let us assume that all the matrices for every “univariate” change of variable have to be stored. However, the number of required matrices per “univariate” change of variable could be further improved [74] (that is, we could work with subsets A i Z 2 n i * in such a way that the corresponding automorphisms would be { x i x i l i } for l i A i and i = 1 , , l ).
We consider those n i = n 1 l for i = 1 , , l (hence being all n i equal). This gives us several tradeoffs depending on l and n where we have l ( n 1 l 1 ) matrices and an increase in the computational cost by a factor of l. Table 6 shows the number of required matrices and the increase in computational cost for n = 16384 and several values of l. As n 1 l is not always a valid value (that is, a power of two), the choice of n i can be optimized to achieve the smallest possible number of automorphisms ( n i ) such that n = n i .
Conversely, Table 7 summarizes the different tradeoffs we have presented in this section.

9.4. On the Applicability to More General Multivariate Rings

It is worth noting that all the solutions exemplified above (Section 9.2 and Section 9.3) are sketched out with negacyclic rings. In this section, we give some insights on how to extend these results to the more general multivariate rings showcased in this manuscript.
An alternative set of polynomial ideals:
Bernstein et al. [70] propose a different non-cyclotomic ring. The authors argue that with cyclotomic rings it is easy to have non-trivial ring homomorphisms (as the polynomial function usually splits in linear factors to perform FFT algorithms) and a relatively small Galois group. Consequently, the authors propose rings of the form Z q [ x ] / ( f p ( x ) ) , with an irreducible polynomial function f p ( x ) = x p x 1 and p prime, where the Galois group is the permutation group S p with p ! elements, and the modulo q is inert in the ring. Hence, Z q [ x ] / ( x p x 1 ) is indeed a finite field. See [80] for more details on the properties exhibited by functions of the form f n ( x ) = x n x 1 .
These polynomial functions are also interesting for our purposes, but for very different reasons. Let K = Q ( α ) be a number field with α one of the roots of x n x 1 . We know that [80] polynomial functions f n ( x ) = x n x 1 with n 2 are irreducible, and for 2 n 100 the discriminant of f n ( x ) is squarefree. According to Theorem 6, this means that K is monogenic and O K = Z [ x ] / ( f n ( x ) ) .
Now, from Proposition 3, we have
Δ K = ( 1 ) n ( n 1 ) 2 ( n n ( 1 ) n 1 ( n 1 ) n 1 ) ,
so it is straightforward to find coprime discriminants for different values of n.
For example, the discriminants of { f i ( x ) } i = 2 , , 7 are coprime. Therefore, we can define a multivariate RLWE sample over the ring of integers
O K = Z [ x 1 , , x 7 ] / ( f 2 ( x 2 ) , , f 7 ( x 7 ) )
for a multivariate number field of degree 5040 and 6 dimensions. In general, this gives an easy way to find multivariate number fields with many variables and a small expansion factor.
Operations over these rings are not as efficient as the ones with polynomial ideal ( x n d ) , but still acceptable; i.e., in the worst case, multiplications modulo x n x 1 can be decomposed in multiplications modulo x n x and x n 1 , hence requiring two parallel efficient “cyclic” convolutions, and afterwards, adding the obtained results.
Automorphisms for more general multivariate rings:
The multivariate rings introduced in Section 6 are, in general, separable but non-Galois field extensions. This implies that the number of available automorphisms is strictly smaller than the degree of the extension (see Corollary 4).
Corollary 4
(Corollary 4.3 from [81]). If L / K is a finite extension that is either inseparable or not normal then
| A u t ( L / K ) | < [ L : K ] ,
being [ L : K ] the degree of the field extension.
Fortunately, this is not a problem in practice as we can make use of Theorem 11 to extend the mentioned separable multivariate number fields in Section 6 to a Galois extension, where we have G a l ( L / K ) = A u t ( L / K ) = [ L : K ] ; hence, automorphisms similar to the case of power-of-two cyclotomics (see Section 9.3) can still be applied.
Theorem 11
(Theorem 4.8 from [81]). Every finite separable extension of a field can be enlarged to a finite Galois extension of the field. In particular, every finite extension of a field with characteristic 0 can be enlarged to a finite Galois extension.
A toy example for a prime-degree field extension:
Consider the number field Q ( d 1 p ) (with d > 1 and d N ) isomorphic to the polynomial ring Q [ x ] / ( x p d ) and satisfying the conditions from Section 6 (Proposition 4). We know that the roots of x p d are { d 1 p , ζ p d 1 p , , ζ p p 1 d 1 p } . These roots are separable, but Q ( d 1 p ) is not the corresponding splitting field, and hence Q ( d 1 d ) is not a Galois field extension over the rationals Q .
Even so, we know from Theorem 11 that this field can be extended to a Galois field where we have a Galois automorphism group which enables “rotations” of the slots. It suffices to add the root ζ p by means of a symbolic variable y over the cyclotomic polynomial Φ p ( y ) = i = 0 p 1 y i , i.e., we enlarge the number field (see Theorem 11) to have Q ( d 1 p , ζ p ) with d and p different primes.
For this extended number field and considering a polynomial representation with Q [ x , y ] / ( x p d , Φ p ( y ) ) (thanks to the field isomorphism d 1 p x , ζ p y ), we have the chain of transformations { x x y i , y y j } with i Z p and j Z p * , which enables homomorphic “rotation” of the slots.
As an example, consider the polynomial a ( x ) = i = 0 p 1 a i x i mod x p d . We apply the change of variable x x y
a ( x ) = i = 0 p 1 a i x i = i = 0 p 1 a i x i y i = a p 1 y p 1 x p 1 + i = 0 p 2 a i y i x i .
Consider now the following relation given by Φ p ( y )
y p 1 = i = 0 p 2 y i .
By applying it, we have:
a p 1 y p 1 x p 1 + i = 0 p 2 a i y i x i = a p 1 x p 1 i = 0 p 2 y i + i = 0 p 2 a i y i x i .
It is worth noting that the ring Z [ x , y ] / ( x p d , Φ p ( y ) ) is not, in general, the ring of integers of the field Q ( d 1 p , ζ p ) , but instead a subring of its ring of integers. This can be easily seen by inspecting the discriminants of x p d and Φ p ( y ) which are, respectively, ( 1 ) p ( p 1 ) 2 p p ( d ) p 1 and p p 2 . As they are not coprime we cannot assert that the ring of integers of Q ( d 1 p , ζ p ) is the product of Z [ x ] / ( x p d ) and Z [ y ] / ( Φ p ( y ) ) , but if x p d satisfies the conditions established in Proposition 4, Z [ x ] / ( x p d ) is the ring of integers of Q ( d 1 p ) .
Consequently, when working with rings following Definition 11 in Section 6, if we want to (1) base the security on RLWE over a general number field and also (2) make use of the automorphisms, the reduction from Theorem 2 implies a loss in the lattice dimensionality; in the previous example of Z [ x , y ] / ( x p d , Φ p ( y ) ) , we end up working with a ring of degree p ( p 1 ) , but being the original RLWE sample defined over a number field of degree p. Nevertheless, we can avoid this loss by basing the security in a generalization of RLWE called Order-LWE.
A much wider set of ring choices with Order-LWE:
Bolboceanu et al. [51] propose a generalization of RLWE which, instead of considering the ring of integers O K and its dual O K , relies on the subrings called orders O and their corresponding duals O to define the underlying ideal lattices.
For a number field K of degree n, an order O in K is a subring of O K containing a Q -basis of full-rank n of K such that O Z Q = K . The ring of integers is the maximal order of K.
Order-LWE also presents worst-case hardness with respect to short vector problems, but in the invertible-ideal lattices of the considered order [51].
This result enables a relaxation of many of the restrictions imposed for the rings in Section 5 and Section 6, by directly basing their hardness on Order-LWE. The previous example with the field Q ( d 1 p , ζ p ) and order Z ( d 1 p , ζ p ) can base its hardness on a lattice of dimension p ( p 1 ) by considering Order-LWE.
The use of the polynomial function Φ p ( y ) seems to contradict our initial requirements regarding the desired form of the polynomial ideal (see Section 1). However, for efficient polynomial products we can substitute Φ p ( y ) by y p 1 by just multiplying both polynomial elements and polynomial function with the term y 1 .
We plan to extend our results and optimizations to the corresponding relaxations offered by Order-LWE. In this direction, this work provides a wide set of concrete ring instantiations which could be considered to analyze the hardness of Order-LWE.

10. Improving on the Packing Capacity of Complex Numbers

We have addressed packing of integer numbers in Section 9, but complex numbers are more difficult to efficiently pack. Nevertheless, we can also leverage the multivariate structure to represent the complex arithmetic in a much more efficient way than previous recent approaches. Knowing that a total of n / 2 complex slots can be packed over the ring Z [ z ] / ( 1 + z n ) , Cheon et al. [39,82] expand these results to the bivariate case Z [ x , y ] / ( 1 + x n x , 1 + y n y ) , packing a total of n x 2 n y 2 = n 4 complex slots. Generalizing this strategy to l dimensions, packing is restricted to n 2 l complex slots (where n = i = 1 l n i ) when working over multivariate rings as Z [ x 1 , , x l ] / ( 1 + x 1 n 1 , 1 + x l n l ) . Consequently, this strategy leaves a huge gap of unused potential slots when transitioning to a multivariate ring. Additionally, while this strategy was introduced for a weak instance of multivariate RLWE (i.e., vulnerable to BCV attack), a similar approach works for rings following Definition 11.
Nevertheless, it is possible to achieve the same number of complex slots as the univariate counterpart (that is, n / 2 complex slots), effectively substituting the multivariate complex embedding map (as used in [39]) by its univariate version. Let us consider the ring Z [ x 1 , , x l ] / ( d 1 + x 1 n 1 , , d l + x l n l ) , and choose one of the l independent variables to work with the canonical embedding map, x 1 without loss of generality. If we have a total of n / 2 complex numbers to pack in one multivariate polynomial plaintext, we organize them as a set of n n 1 complex vectors with length n 1 / 2 ( n 1 is chosen as a power of two). For each complex vector we use the encoding from [82], defined as the composition of the inverse of the complex embedding map and a discretization. This yields n n 1 polynomials belonging to the ring A = Z t [ x 1 ] / ( d 1 + x 1 n 1 ) for an adequately chosen modulo t.
Coming back to the multivariate ring representation, we can consider the new message as a polynomial in the ring Z t [ x 1 , , x l ] / ( d 1 + x 1 n 1 , , d l + x l n l ) . Hence, we gather all the polynomials in A as the different coefficients of the ring A [ x 2 , , x l ] / ( d 2 + x 2 n 2 , , d l + x l n l ) , and we define encoding/decoding matrices working over d i + x i n i polynomial functions (i.e., α -generalized INTTs/NTTs over t, see Section 8) for i = 2 , , l , considering the identity matrix I n 1 of size n 1 × n 1 for x 1 and the polynomial function d 1 + x 1 n 1 . Using the vector representation of the plaintext polynomial, the encoding/decoding is performed by means of one matrix multiplication which can be efficiently realized with FFT-like algorithms.
This method can pack a total of n / 2 complex slots while preserving the properties for the automorphisms (whenever we enlarge the number field to a Galois extension, see Section 9.4) and also removing the gap of the method used in [39], where the fraction of used slots decreases exponentially with the number of dimensions.
Finally, it is worth looking at the case where the considered multivariate rings are those from Definition 9 in Section 5. In this case, the polynomial ideals have the form ( d i + x i 2 ) , so the variable x 1 can directly represent the imaginary unit, therefore perfectly mapping the complex arithmetic without the need of applying the canonical embedding map over the polynomials in A .

11. Conclusions

This work addresses the main security flaw of the multivariate RLWE problem revealed by Bootland et al. For this purpose, we have defined and parameterized practical and secure instantiations of the multivariate Ring Learning With Errors problem, supported by the extended reduction of the original proof by Lyubashevsky et al. [3,4]. The proposed instantiations are resilient against BCV attack to m-RLWE [25], while still preserving all the efficiency improvements that m-RLWE brings. We have shown how to find practical parameters for the proposed instantiations to make them both secure and usable, therefore enabling improved space-time tradeoffs in many practical applications, comprising the most critical fundamental lattice operations (faster polynomial multiplications through α -generalized Walsh–Hadamard Transforms), efficient cryptographic operations such as computation of automorphisms, relinearizations, packing, unpacking and homomorphic slot manipulation, and, consequently, bootstrapping, and optimization of high level applications in encrypted approximate arithmetic, complex processing, and efficient multidimensional signal manipulation.
These contributions, combined, showcase the power and versatility of secure instantiations of the multivariate RLWE problem, and open up new research paths and strategies for realizing efficient (fully) homomorphic encryption.

Author Contributions

Conceptualization, A.P.-U.; methodology, A.P.-U. and J.R.T.-P.; software, A.P.-U. and J.R.T.-P.; validation, A.P.-U., J.R.T.-P., N.G., M.G. and F.P.-G.; formal analysis, A.P.-U., N.G., M.G. and J.R.T.-P.; investigation, A.P.-U.; resources, J.R.T.-P. and F.P.-G.; data curation, A.P.-U. and J.R.T.-P.; writing—original draft preparation, A.P.-U.; writing—review and editing, A.P.-U., J.R.T.-P., N.G., M.G. and F.P.-G.; visualization, A.P.-U. and J.R.T.-P.; supervision, J.R.T.-P.; project administration, A.P.-U., J.R.T.-P. and F.P.-G.; funding acquisition, F.P.-G. All authors have read and agreed to the published version of the manuscript.

Funding

GPSC is funded by the Agencia Estatal de Investigación (Spain) and the European Regional Development Fund (ERDF) under project RODIN (PID2019-105717RB-C21). Additionally funded by the Xunta de Galicia and the European Union (European Regional Development Fund—ERDF) under projects ED431G2019/08 and Grupo de Referencia ED431C2017/53. EPFL is funded in part by the grant #2017-201 (DPPH) of the Swiss PHRT.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Regev, O. On Lattices, Learning with Errors, Random Linear Codes, and Cryptography. In Proceedings of the Thirty-Seventh Annual ACM Symposium on Theory of Computing ACM STOC, Baltimore, MD, USA, 21–24 May 2005; pp. 84–93. [Google Scholar]
  2. Regev, O. On Lattices, Learning with Errors, Random Linear Codes, and Cryptography. J. ACM 2009, 56, 34:1–34:40. [Google Scholar] [CrossRef]
  3. Lyubashevsky, V.; Peikert, C.; Regev, O. On Ideal Lattices and Learning with Errors over Rings. In Proceedings of the EUROCRYPT 2010, Monaco, France, 30 May–3 June 2010; Springer: Berlin/Heidelberg, Germany, 2010; pp. 1–23. [Google Scholar]
  4. Lyubashevsky, V.; Peikert, C.; Regev, O. On Ideal Lattices and Learning with Errors over Rings. J. ACM 2013, 60, 43:1–43:35. [Google Scholar] [CrossRef]
  5. Aguilar-Melchor, C.; Barrier, J.; Guelton, S.; Guinet, A.; Killijian, M.O.; Lepoint, T. NFLlib: NTT-Based Fast Lattice Library. In CT-RSA; Sako, K., Ed.; Springer: Berlin/Heidelberg, Germany, 2016; pp. 341–356. [Google Scholar]
  6. Harvey, D. Faster arithmetic for number-theoretic transforms. J. Symb. Comput. 2014, 60, 113–119. [Google Scholar] [CrossRef]
  7. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Number Theoretic Transforms for Secure Signal Processing. IEEE Trans. Inf. Forensics Secur. 2017, 12, 1125–1140. [Google Scholar] [CrossRef][Green Version]
  8. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Multivariate Cryptosystems for Secure Processing of Multidimensional Signals. arXiv 2017, arXiv:1712.00848. [Google Scholar]
  9. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Image denoising in the encrypted domain. In Proceedings of the 8th IEEE International Workshop on Information Forensics and Security, WIFS, Abu Dhabi, United Arab Emirates, 4–7 December 2016; pp. 1–6. [Google Scholar]
  10. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Multivariate Lattices for Encrypted Image Processing. In Proceedings of the 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brisbane, Australia, 19–24 April 2015; pp. 1707–1711. [Google Scholar]
  11. Pedrouzo-Ulloa, A.; Masciopinto, M.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Camera Attribution Forensic Analyzer in the Encrypted Domain. In Proceedings of the International Workshop on Information Forensics and Security (WIFS), Hong Kong, China, 11–13 December 2018; pp. 1–7. [Google Scholar]
  12. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. Revisiting Multivariate Lattices for Encrypted Signal Processing. In Proceedings of the ACM Workshop on Information Hiding and Multimedia Security ACM IH&MMSec, Paris, France, 3–5 July 2019; pp. 161–172. [Google Scholar]
  13. Lyubashevsky, V.; Peikert, C.; Regev, O. A Toolkit for Ring-LWE Cryptography. In LNCS, Proceedings of the EUROCRYPT 2013, Athens, Greece, 26–30 May 2013; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7881, pp. 35–54. [Google Scholar]
  14. Halevi, S.; Shoup, V. Bootstrapping for HElib. In LNCS, Proceedings of the EUROCRYPT 2015, Sofia, Bulgaria, 26–30 April 2015; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9056, pp. 641–670. [Google Scholar]
  15. Chen, H.; Han, K. Homomorphic Lower Digits Removal and Improved FHE Bootstrapping. In LNCS, Proceedings of the EUROCRYPT 2018, Tel Aviv, Israel, 29 April–3 May 2018; Springer: Berlin/Heidelberg, Germany, 2018; Volume 10820, pp. 315–337. [Google Scholar]
  16. Cheon, J.H.; Han, K.; Kim, A.; Kim, M.; Song, Y. Bootstrapping for Approximate Homomorphic Encryption. In LNCS, Proceedings of the EUROCRYPT 2018, Tel Aviv, Israel, 29 April–3 May 2018; Springer: Cham, Switzerland, 2018; Volume 10820, pp. 360–384. [Google Scholar]
  17. Chillotti, I.; Gama, N.; Georgieva, M.; Izabachène, M. TFHE: Fast Fully Homomorphic Encryption over the Torus. J. Cryptol. 2020, 33, 34–91. [Google Scholar] [CrossRef]
  18. Haviv, I.; Regev, O. Tensor-based Hardness of the Shortest Vector Problem to within Almost Polynomial Factors. Theory Comput. 2012, 8, 513–531. [Google Scholar] [CrossRef]
  19. Langlois, A.; Stehlé, D. Worst-case to average-case reductions for module lattices. Des. Codes Cryptogr. 2015, 75, 565–599. [Google Scholar] [CrossRef]
  20. Brakerski, Z.; Gentry, C.; Vaikuntanathan, V. (Leveled) fully homomorphic encryption without bootstrapping. In Proceedings of the Innovations in Theoretical Computer Science, ITCS, Cambridge, MA, USA, 8–10 January 2012; pp. 309–325. [Google Scholar]
  21. Brakerski, Z.; Gentry, C.; Vaikuntanathan, V. (Leveled) Fully Homomorphic Encryption without Bootstrapping. ACM Trans. Comput. Theory 2014, 6, 13:1–13:36. [Google Scholar] [CrossRef]
  22. Bonnoron, G.; Ducas, L.; Fillinger, M. Large FHE Gates from Tensored Homomorphic Accumulator. In LNCS, Proceedings of the International Conference on Cryptology in Africa, AFRICACRYPT 2018, Marrakesh, Morocco, 7–9 May 2018; Springer: Berlin/Heidelberg, Germany, 2018; Volume 10831, pp. 217–251. [Google Scholar]
  23. Micciancio, D.; Sorrell, J. Ring Packing and Amortized FHEW Bootstrapping. In Proceedings of the ICALP 2018, Prague, Czech Republic, 9–13 July 2018; pp. 100:1–100:14. [Google Scholar]
  24. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Pérez-González, F. On Ring Learning with Errors over the Tensor Product of Number Fields. arXiv 2016, arXiv:1607.05244. [Google Scholar]
  25. Bootland, C.; Castryck, W.; Vercauteren, F. On the Security of the Multivariate Ring Learning with Errors Problem. In Proceedings of the ANTS-XIV 2020, Auckland, New Zealand, 30 June–4 July 2020. [Google Scholar]
  26. Peikert, C.; Regev, O.; Stephens-Davidowitz, N. Pseudorandomness of ring-LWE for Any Ring and Modulus. In Proceedings of the Symposium on Theory of Computing, ACM STOC, Montreal, QC, Canada, 19–23 June 2017; pp. 461–473. [Google Scholar]
  27. Gentry, C. Fully homomorphic encryption using ideal lattices. In Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing, ACM STOC, Bethesda, MD, USA, 31 May–2 June 2009; pp. 169–178. [Google Scholar]
  28. Chillotti, I.; Gama, N.; Georgieva, M.; Izabachène, M. Faster Fully Homomorphic Encryption: Bootstrapping in Less Than 0.1 Seconds. In LNCS, Proceedings of the ASIACRYPT 2016, Hanoi, Vietnam, 4–8 December 2016; Springer: Berlin/Heidelberg, Germany, 2016; Volume 10031, pp. 3–33. [Google Scholar]
  29. Dowlin, N.; Gilad-Bachrach, R.; Laine, K.; Lauter, K.; Naehrig, M.; Wernsing, J. CryptoNets: Applying Neural Networks to Encrypted Data with High Throughput and Accuracy. In Proceedings of the International Conference on Machine Learning (ICML 2016), New York City, NY, USA, 19–24 June 2016; pp. 201–210. [Google Scholar]
  30. Aguilar-Melchor, C.; Barrier, J.; Fousse, L.; Killijian, M.O. XPIR: Private Information Retrieval for Everyone. PoPETs 2016, 2016, 155–174. [Google Scholar] [CrossRef][Green Version]
  31. Park, S.; Byun, J.; Lee, J.; Cheon, J.H.; Lee, J. HE-Friendly Algorithm for Privacy-Preserving SVM Training. IEEE Access 2020, 8, 57414–57425. [Google Scholar] [CrossRef]
  32. Halevi, S.; Shoup, V. Algorithms in HElib. In Proceedings of the CRYPTO 2014, Santa Barbara, CA, USA, 17–21 August 2014; pp. 554–571. [Google Scholar]
  33. PALISADE Lattice Cryptography Library (Release 1.10.6). 2020. Available online: https://palisade-crypto.org/ (accessed on 13 April 2021).
  34. Microsoft Research. Microsoft SEAL (Release 3.6); Microsoft Research: Redmond, WA, USA, 2020; Available online: https://github.com/Microsoft/SEAL (accessed on 13 April 2021).
  35. Mouchet, C.; Bossuat, J.P.; Troncoso-Pastoriza, J.; Hubaux, J. Lattigo: A Multiparty Homomorphic Encryption Library in Go. 2020. Available online: https://homomorphicencryption.org/workshops/wahc20/ (accessed on 13 April 2021).
  36. Murakami, H. Generalization of the cyclic convolution system and its applications. In Proceedings of the IEEE ICASSP 2000, Istanbul, Turkey, 5–9 June 2000; Volume 6, pp. 3351–3353. [Google Scholar]
  37. Peikert, C. How (Not) to Instantiate Ring-LWE. In Proceedings of the International Conference on Security and Cryptography for Networks SCN, Amalfi, Italy, 31 August–2 September 2016; pp. 411–430. [Google Scholar]
  38. Castryck, W.; Iliashenko, I.; Vercauteren, F. On Error Distributions in Ring-Based LWE. Cryptology ePrint Archive, Report 2016/240. 2016. Available online: https://eprint.iacr.org/2016/240 (accessed on 13 April 2021).
  39. Cheon, J.H.; Kim, A. Homomorphic Encryption for Approximate Matrix Arithmetic. Crypt. ePrint Archive, Report 2018/565. 2018. Available online: https://eprint.iacr.org/2018/565 (accessed on 13 April 2021).
  40. Cheon, J.H.; Kim, A.; Yhee, D. Multi-Dimensional Packing for HEAAN for Approximate Matrix Arithmetics. Crypt. ePrint Archive, Report 2018/1245. 2018. Available online: https://eprint.iacr.org/2018/1245 (accessed on 13 April 2021).
  41. Grover, C.; Ling, C.; Vehkalahti, R. Non-Commutative Ring Learning With Errors From Cyclic Algebras. Crypt. ePrint Archive, Report 2019/680. 2019. Available online: https://eprint.iacr.org/2019/680 (accessed on 13 April 2021).
  42. Vehkalahti, R.; Hollanti, C.; Lahtonen, J.T.; Ranto, K. On the Densest MIMO Lattices from Cyclic Division Algebras. IEEE Trans. Inf. Theory 2009, 55, 3751–3780. [Google Scholar] [CrossRef][Green Version]
  43. Pedrouzo-Ulloa, A.; Troncoso-Pastoriza, J.R.; Gama, N.; Georgieva, M.; Pérez-González, F. Multiquadratic Rings and Walsh-Hadamard Transforms for Oblivious Linear Function Evaluation. In Proceedings of the IEEE WIFS 2020, Online, 6–9 December 2020. [Google Scholar]
  44. Applebaum, B.; Cash, D.; Peikert, C.; Sahai, A. Fast Cryptographic Primitives and Circular-Secure Encryption Based on Hard Learning Problems. In LNCS, Proceedings of the Annual International Cryptology Conference, CRYPTO, Santa Barbara, CA, USA, 16–20 August 2009; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5677, pp. 595–618. [Google Scholar]
  45. Conrad, B.; Landesman, A. Math 154: Algebraic Number Theory. Available online: http://math.stanford.edu/~conrad/154Page/handouts/undergraduate-number-theory.pdf (accessed on 13 April 2021).
  46. Lyubashevsky, V.; Micciancio, D. Generalized Compact Knapsacks Are Collision Resistant. In Proceedings of the ICALP 2006, Venice, Italy, 10–14 July 2006; pp. 144–155. [Google Scholar]
  47. Weston, T. Algebraic Number Theory. Available online: https://people.math.umass.edu/~weston/cn/notes.pdf (accessed on 13 April 2021).
  48. Compositum. Encyclopedia of Mathematics. Available online: https://www.encyclopediaofmath.org/index.php/Compositum (accessed on 13 April 2021).
  49. Conrad, B. Math 154: Discrimant of Composite Fields. Available online: http://math.stanford.edu/~conrad/154Page/handouts/disccomposite.pdf (accessed on 13 April 2021).
  50. Conrad, K. The Different Ideal. Available online: https://kconrad.math.uconn.edu/blurbs/gradnumthy/different.pdf (accessed on 13 April 2021).
  51. Bolboceanu, M.; Brakerski, Z.; Perlman, R.; Sharma, D. Order-LWE and the Hardness of Ring-LWE with Entropic Secrets. Crypt. ePrint Archive, Report 2018/494. 2018. Available online: https://eprint.iacr.org/2018/494 (accessed on 13 April 2021).
  52. Peikert, C.; Pepin, Z. Algebraically Structured LWE, Revisited. Crypt. ePrint Archive, Report 2019/878. 2019. Available online: https://eprint.iacr.org/2019/878 (accessed on 13 April 2021).
  53. Bauch, J.; Bernstein, D.J.; de Valence, H.; Lange, T.; van Vredendaal, C. Short Generators Without Quantum Computers: The Case of Multiquadratics. In LNCS, Proceedings of the EUROCRYPT 2017, Paris, France, 30 April–4 May 2017; Springer: Berlin/Heidelberg, Germany, 2017; Volume 10210, pp. 27–59. [Google Scholar]
  54. Barile, M. Eisenstein’s Irreducibility Criterion. From MathWorld, A Wolfram Web Resource, created by Eric. W. Weisstein. Available online: http://mathworld.wolfram.com/EisensteinsIrreducibilityCriterion.html (accessed on 13 April 2021).
  55. Samuel, P. Algebraic Theory of Numbers; Dover Publications: Mineola, NY, USA, 2008. [Google Scholar]
  56. Elias, Y.; Lauter, K.E.; Ozman, E.; Stange, K.E. Provably Weak Instances of Ring-LWE. In LNCS, Proceedings of the CRYPTO 2015, Santa Barbara, CA, USA, 16–20 August 2015; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9215, pp. 63–92. [Google Scholar]
  57. Kedlaya, K.S. A construction of polynomials with squarefree discriminants. Proc. Am. Math. Soc. 2012, 140, 3025–3033. [Google Scholar] [CrossRef][Green Version]
  58. Castryck, W.; Iliashenko, I.; Vercauteren, F. Provably Weak Instances of Ring-LWE Revisited. In Proceedings of the EUROCRYPT 2016, Vienna, Austria, 8–12 May 2016; Volume 9665, pp. 147–167. [Google Scholar]
  59. Eisenträger, K.; Hallgren, S.; Lauter, K.E. Weak Instances of PLWE. In Proceedings of the SAC 2014, Gyeongju, Korea, 24–28 March 2014; pp. 183–194. [Google Scholar]
  60. Laine, K.; Lauter, K.E. Key Recovery for LWE in Polynomial Time. Crypt. ePrint Archive, Report 2015/176. 2015. Available online: https://eprint.iacr.org/2015/176 (accessed on 13 April 2021).
  61. Chen, H.; Lauter, K.E.; Stange, K.E. Vulnerable Galois RLWE Families and Improved Attacks. Crypt. ePrint Archive, Report 2016/193. 2016. Available online: https://eprint.iacr.org/2016/193/20160224:182837 (accessed on 13 April 2021).
  62. Chen, H.; Lauter, K.E.; Stange, K.E. Attacks on the Search-RLWE problem with small errors. arXiv 2017, arXiv:1710.03739. [Google Scholar] [CrossRef][Green Version]
  63. Chen, H.; Lauter, K.E.; Stange, K.E. Security considerations for Galois non-dual RLWE families. arXiv 2017, arXiv:1710.03316. [Google Scholar]
  64. Brakerski, Z.; Vaikuntanathan, V. Fully Homomorphic Encryption from Ring-LWE and Security for Key Dependent Messages. In LNCS, Proceedings of the CRYPTO 2011, Santa Barbara, CA, USA, 14–18 August 2011; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6841. [Google Scholar]
  65. Lauter, K.; Naehrig, M.; Vaikuntanathan, V. Can homomorphic encryption be practical? In Proceedings of the ACM CCSW 2011, Chicago, IL, USA, 21 October 2011; pp. 113–124. [Google Scholar]
  66. Albrecht, M.R.; Player, R.; Scott, S. On the concrete hardness of Learning with Errors. J. Math. Cryptol. 2015, 9, 169–203. [Google Scholar] [CrossRef][Green Version]
  67. Albrecht, M.R.; Curtis, B.R.; Deo, A.; Davidson, A.; Player, R.; Postlethwaite, E.W.; Virdia, F.; Wunderer, T. Estimate all the LWE, NTRU schemes! In Proceedings of the Conference on Security and Cryptography for Networks (SCN’18), Amalfi, Italy, 5–7 September 2018. [Google Scholar]
  68. Chase, M.; Chen, H.; Ding, J.; Goldwasser, S.; Gorbunov, S.; Hoffstein, J.; Lauter, K.; Lokam, S.; Moody, D.; Morrison, T.; et al. Security of Homomorphic Encryption; Technical Report; HomomorphicEncryption.org: Redmond, WA, USA, 2017. [Google Scholar]
  69. Hoffstein, J.; Pipher, J.; Silverman, J.H. NTRU: A Ring-Based Public Key Cryptosystem. In Proceedings of the ANTS-III 1998, Portland, OR, USA, 21–25 June 1998; pp. 267–288. [Google Scholar]
  70. Bernstein, D.J.; Chuengsatiansup, C.; Lange, T.; van Vredendaal, C. NTRU Prime: Reducing Attack Surface at Low Cost. In Proceedings of the SAC 2017, Marrakech, Morocco, 4–6 April 2017; pp. 235–260. [Google Scholar]
  71. Fino, B.J.; Algazi, V.R. Unified Matrix Treatment of the Fast Walsh-Hadamard Transform. IEEE Trans. Comput. 1976, C-25, 1142–1146. [Google Scholar] [CrossRef]
  72. Yarlagadda, R.K.R.; Hershey, J.E. Hadamard Matrix Analysis and Synthesis: With Applications to Communications and Signal/Image Processing; Kluwer Academic Publishers: Norwell, MA, USA, 1997. [Google Scholar]
  73. Smart, N.P.; Vercauteren, F. Fully homomorphic SIMD operations. Des. Codes Cryptogr. 2014, 71, 57–81. [Google Scholar] [CrossRef][Green Version]
  74. Halevi, S.; Shoup, V. Faster Homomorphic Linear Transformations in HElib. Crypt. ePrint Archive, Report 2018/244. 2018. Available online: https://eprint.iacr.org/2018/244 (accessed on 13 April 2021).
  75. Han, K.; Hhan, M.; Cheon, J.H. Improved Homomorphic Discrete Fourier Transforms and FHE Bootstrapping. IEEE Access 2019, 7, 57361–57370. [Google Scholar] [CrossRef]
  76. Fan, J.; Vercauteren, F. Somewhat Practical Fully Homomorphic Encryption. Crypt. ePrint Archive, Report 2012/144. 2012. Available online: https://eprint.iacr.org/2012/144 (accessed on 13 April 2021).
  77. Nussbaumer, H. Fast Fourier Transform and Convolution Algorithms; Springer: Berlin, Germany, 1982. [Google Scholar]
  78. Gentry, C.; Halevi, S.; Smart, N.P. Fully Homomorphic Encryption with Polylog Overhead. Crypt. ePrint Archive, Report 2011/566. 2011. Available online: https://eprint.iacr.org/2011/566 (accessed on 13 April 2021).
  79. Bajard, J.; Eynard, J.; Hasan, M.A.; Zucca, V. A Full RNS Variant of FV Like Somewhat Homomorphic Encryption Schemes. In Proceedings of the SAC 2016, Pisa, Italy, 4–8 April 2016; pp. 423–442. [Google Scholar]
  80. Conrad, K. The Galois Group of xnx − 1 over Q . Available online: https://kconrad.math.uconn.edu/blurbs/gradnumthy/galoisselmerpoly.pdf (accessed on 13 April 2021).
  81. Conrad, K. The Galois Correspondence. Available online: https://kconrad.math.uconn.edu/blurbs/galoistheory/galoiscorr.pdf (accessed on 13 April 2021).
  82. Cheon, J.H.; Kim, A.; Kim, M.; Song, Y.S. Homomorphic Encryption for Arithmetic of Approximate Numbers. In LNCS, Proceedings of the ASIACRYPT 2017, Hong Kong, China, 3–7 December 2017; Springer: Berlin/Heidelberg, Germany, 2017; Volume 10624, pp. 409–437. [Google Scholar]
Figure 1. Block diagram for the implementation of an α -generalized convolution.
Figure 1. Block diagram for the implementation of an α -generalized convolution.
Mathematics 09 00858 g001
Figure 2. Runtimes of the proposed Fast Walsh–Hadamard Transform (FWHT) compared to the Number Theoretic Transform (NTT)/INTT from [6].
Figure 2. Runtimes of the proposed Fast Walsh–Hadamard Transform (FWHT) compared to the Number Theoretic Transform (NTT)/INTT from [6].
Mathematics 09 00858 g002
Figure 3. Representation of the rotation between two blocks of slots encoded in α .
Figure 3. Representation of the rotation between two blocks of slots encoded in α .
Mathematics 09 00858 g003
Figure 4. Representation of the hypercube structure of the group of automorphisms available in the multivariate polynomial RLWE with Φ 4 ( · ) as polynomial functions and considering 7 independent variables { x 1 , , x 7 } .
Figure 4. Representation of the hypercube structure of the group of automorphisms available in the multivariate polynomial RLWE with Φ 4 ( · ) as polynomial functions and considering 7 independent variables { x 1 , , x 7 } .
Mathematics 09 00858 g004
Table 1. Univariate Ring Learning with Errors (RLWE) for homomorphic encryption.
Table 1. Univariate Ring Learning with Errors (RLWE) for homomorphic encryption.
A simple RLWE-based cryptosystem: Let R q be a cyclotomic polynomial ring Z q [ x ] / ( Φ 2 n ( x ) ) , where Φ 2 n ( x ) = 1 + x n is the 2 n -th power-of-two cyclotomic polynomial with a maximum degree ϕ ( 2 n ) = n (by ϕ ( · ) we denote the Euler’s totient function). We refer the reader to Table 2 for a summary of the notation used in this work. The RLWE assumption states that given a pair ( a , b = a s + e ) where a R q is uniformly random and e ψ is drawn from an error distribution (usually a discrete Gaussian distribution χ ), this sample is very hard to distinguish from the pair ( a , u ) where u R q is also uniformly random.
By assuming this indistinguishability assumption, which reduces from hard problems on ideal lattices (see Theorem 2), it is very easy to define a simple cryptosystem based on RLWE. To this aim, the plaintext information can be encoded in the noise term by working with the ring R t = Z t [ x ] / ( 1 + x n ) .
Let m R t be the plaintext, it can be encrypted by doing ( a = t a , b = a s + t e + m ) , in such a way that the plaintext is encoded in the lower bits of the error term. This cryptosytem also allows for homomorphic operations.
Homomorphic cryptography: Consider two encryptions ( a 1 , b 1 = a 1 s + t e 1 + m 1 ) and ( a 2 , b 2 = a 2 s + t e 2 + m 2 ) . If q is high enough compared to the maximum value of the noise terms, we can easily obtain a homomorphic addition of the plaintexts by doing
a add = a 1 + a 2 , b add = b 1 + b 2 = a add s + t ( e 1 + e 2 ) + ( m 1 + m 2 ) .
The process for a homomorphic multiplication is slightly more complicated, but it can still be done:
a mult , b mult , c mult = a 1 a 2 , a 1 b 2 + a 2 b 1 , b 1 b 2 .
Although we skip the details, the triple ( a mult , b mult , c mult ) can be seen as an encryption of the polynomial product m 1 m 2 mod ( 1 + x n ) .
Efficient homomorphic encryption: This type of cryptosystems brings about some useful features by taking advantage of the plaintext/ciphertext ring structure:
  • Operations in the ciphertext ring R q can be very efficiently performed by means of NTT/INTT transforms.
  • If the plaintext ring R t factors into ϕ ( 2 n ) = n linear factors, each ciphertext can directly encrypt vectors of n integers (or slots) and efficient SIMD (Single Instruction, Multiple Data) operations can be homomorphically performed.
  • The use of the existing automorphisms in both the ciphertext/plaintext rings enables to exchange the contents between different slots. Hence, this is very convenient to homomorphically rotate the components of the encrypted vectors.
As we will show, the use of multivariate rings for both plaintext and ciphertext rings, instead of the conventional choice of univariate cyclotomics, introduces significant efficiency improvements in the above three aspects.
Table 2. Notation and some basic concepts.
Table 2. Notation and some basic concepts.
NotationDescription
Polynomial Rings, Matrices and Some Operators
R [ x ] , R q [ x ] They denote, respectively, the polynomial ring Z [ x ] / ( f ( x ) ) and Z q [ x ] / ( f ( x ) ) .
R [ x 1 , , x l ] , R q [ x 1 , , x l ] It represents the quotient multivariate polynomial ring with coefficients in Z (resp. Z q ) and the l polynomial functions f i ( x i ) with 1 i l . For simplicity, if there is no ambiguity, we omit the polynomial variable.
a ( x ) , a The polynomial a ( x ) is denoted as a when there is no ambiguity. It can also be denoted by a column vector a , whose components are the corresponding polynomial coefficients.
A B It denotes the Kronecker product between matrices A and B .
[ l ] , l , l They denote, respectively, the set { 1 , 2 , , l } , the floor function and the ceiling function.
Lattices and algebraic number fields
K, K ( T ) K is a number field and K ( T ) is the result of the tensor product of several number fields.
O K , O K O K is the ring of integers of the number field K, while O K refers to its dual. We also denote them, respectively, as R and R referring to the polynomial representation considered in this work.
K R , K ( T ) , R K R and K ( T ) , R are, respectively, K R = K Q R and K ( T ) Q R .
T T is, depending on the context, K ( T ) , R / R or directly K R / R .
K = Q ( ζ m ) The m-th cyclotomic number field, where ζ m is the m-th root of unity.
K = Q ( d i ) A quadratic number field.
K = Q ( d 1 , , d l ) A multiquadratic number field.
K = Q ( a 1 1 / n 1 , , a l 1 / n l ) A multivariate number field, for which all the a i are squarefree and coprime.
Δ K Discriminant of the number field K.
I , I I is a fractional ideal of K, while I is its dual. For an integer q 2 we can have I / q I .
Φ m ( x ) The m-th cyclotomic polynomial.
ϕ ( m ) Euler’s totient function, which outputs the degree of Φ m ( x ) .
Φ 2 n ( x ) = 1 + x n The 2 n -th cyclotomic polynomial when n is a power of two. For this particular case ϕ ( 2 n ) = n .
η ( I ) Smoothing parameter of the lattice generated by I .
λ i ( I ) It refers to the i-th successive minimum distance in the lattice generated by I .
SVP, SIVP, DGSThey refer, respectively, to the Shortest Vector Problem, the Shortest Independent Vectors Problem and the Discrete Gaussian Sampling problem.
Error distributions
ψ A continuous error distribution over K R .
χ A discrete error distribution over R (also R).
Ψ A family of continuous error distributions over K R .
Υ A distribution over a family of error distributions, each over K R .
Γ ( k , θ ) Gamma distribution with shape parameter k and scale parameter θ .
e ψ , e χ They denote an element e drawn, respectively, from the error distribution ψ and the error distribution χ .
a A It denotes an element a chosen uniformly at random from the set A .
Table 3. Parameters and primitives of a somewhat homomorphic cryptosystem based on a multivariate version of RLWE (see [8,10]).
Table 3. Parameters and primitives of a somewhat homomorphic cryptosystem based on a multivariate version of RLWE (see [8,10]).
Parameters
Let R t [ x , y ] be the cleartext ring and R q [ x , y ] the ciphertext ring. The noise distribution χ [ x , y ] in R q [ x , y ] takes its coefficients from a multivariate truncated Gaussian N ( 0 , r 2 J 2 ) . q is an integer satisfying t < q and is relatively prime to t. All the previous parameters are chosen in terms of the security parameter λ where n = 2 log λ 1
Example SHE Cryptographic Primitives
SH . KeyGen Process s , e χ [ x , y ] , a 1 R q [ x , y ] ; s k = s and p k = ( a 0 = ( a 1 s + t e ) , a 1 )
SH . Enc Input p k = ( a 0 , a 1 ) and m R t [ x , y ]
Process u , f , g χ [ x , y ] and the fresh ciphertext is c = ( c 0 , c 1 ) = ( a 0 u + t g + m , a 1 u + t f )
SH . Dec Input s k and c = ( c 0 , c 1 , , c γ 1 )
Process m = i = 0 γ 1 c i s i mod q mod t
SH . Add Input c = ( c 0 , , c β 1 ) and c = ( c 0 , , c γ 1 )
Process c a d d = ( c 0 + c 0 , , c max ( β , γ ) 1 + c max ( β , γ ) 1 )
SH . Mult Input c = ( c 0 , , c β 1 ) and c = ( c 0 , , c γ 1 )
ProcessUsing a symbolic variable v their product c can be obtained from the relation i = 0 β 1 c i v i · i = 0 γ 1 c i v i = i = 0 β + γ 2 c i v i
Table 4. Rotation between two blocks of slots (description of Figure 3).
Table 4. Rotation between two blocks of slots (description of Figure 3).
To fix ideas, and without loss of generality, in Figure 3 we represent a plaintext α as an element α A [ z ] / ( 1 + z 2 ) , where A does not depend on z. By reducing modulo t, and by having a 4-th root of unity ψ , the polynomial α ( z ) = α 0 + α 1 z mod 1 + z 2 can encode a vector with two different block slots ( α ( ψ ) slot 0 , α ( ψ ) slot 1 ) A 2 . The concrete structure of these blocks depends on the ring structure of A modulo t.
Figure 3 showcases the effect of applying the transformation z z under α ( z ) , i.e., we obtain a new polynomial α ˜ ( z ) = α 0 α 1 z mod 1 + z 2 . As a result of this automorphism, the polynomial α ˜ ( z ) now encodes a rotated vector of the original block slots ( α ˜ ( ψ ) , α ˜ ( ψ ) ) = ( slot 1 , slot 0 ) A 2 .
Table 5. Hypercube structure of the group of automorphisms (description of Figure 4).
Table 5. Hypercube structure of the group of automorphisms (description of Figure 4).
Figure 4 particularizes the block structure of Figure 3 to the case on which A = Z t [ x 1 , , x 6 ] / ( 1 + x 1 2 , , 1 + x 6 2 ) . By also considering z = x 7 , we finally have B = Z t [ x 1 , , x 7 ] / ( 1 + x 1 2 , , 1 + x 7 2 ) .
An element α B can encode a vector with 128 slots such as ( slot 0 , , slot 127 ) Z t 128 , where the existing automorphisms correspond to the transformations x i x i . Figure 4 exemplifies the effect of these rotations by representing the positions of the vector ( slot 0 , , slot 127 ) as the existing vertices in a hypercube of dimension 7. The transformation x i x i corresponds to a translation vector between two different vertex locations.
For example, in order to move slot A (point A) in α to the position of slot B (point B), all the transformations x 1 x 1 , x 2 x 2 , x 3 x 3 , x 4 x 4 , x 5 x 5 , x 6 x 6 and x 7 x 7 must be applied to α ( x 1 , , x 7 ) , finally obtaining α ˜ ( x 1 , , x 7 ) = α ( x 1 , , x 7 ) .
Table 6. Practical space/efficiency tradeoffs of automorphisms for n = 16 , 384 .
Table 6. Practical space/efficiency tradeoffs of automorphisms for n = 16 , 384 .
l234567
# Matrices2568052363428
# Calls to switching key (worst-case)234567
Table 7. Space/efficiency tradeoffs of automorphisms.
Table 7. Space/efficiency tradeoffs of automorphisms.
Strategy# Matrices# Calls to Switching Key (Worst-Case)
Strategy 1 from Section 9.2 log 2 n log 2 n
Strategy 2 from Section 9.2 ( 1 + log 2 n ) log 2 n 2 log 2 n 2
Strategy 3 from Section 9.2 1 + log 2 n log 2 n 2
Strategy 4 from Section 9.3 n 1 l l l l
Strategy 4 (general) from Section 9.3 i = 1 l n i l l
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Back to TopTop