A-5.1 Overview

A polynomial ring is a set of polynomials where polynomial computations over the (+,⋅) operators (e.g., f1 + f2, f1 (f2 f3), f1 + f2 + f4) are closed, associative, commutative, and distributive.

A polynomial ring q[x](xn + 1) is the set of all polynomials fi that have the following properties:

Summary A-5.1 Ring

For a polynomial f q[x](xn + 1) where f = c0 + c1x1 +    + cn1xn1:

To make the notation simple, we denote the polynomial ring q[x](xn + 1) as Rn,q

Recall that in a ring p, a big number b can be divided by p and b = q p + r r mod p (the quotient q gets eliminated). Similarly, in a polynomial ring Rn,q, a high-degree polynomial f𝑏𝑖𝑔 can be divided by a polynomial modulo xn + 1, which gives:

f𝑏𝑖𝑔 = (Xn + 1) (fq) + fr fr Rn,q

, whereas fq is a quotient polynomial and fr is a remainder polynomial. In this case, f𝑏𝑖𝑔 is congruent to (i.e., is in the same equivalence class as) fr. Thus, fq can be eliminated and fr (i.e., the simplified version of f𝑏𝑖𝑔) can be interchangeably used for polynomial operations (+,⋅) in the polynomial ring. Polynomial simplification in a polynomial ring is done by substituting xn 1 into f𝑏𝑖𝑔, because xn + 1 0 in the polynomial ring (this is the same as the case of a number ring modulo p where p 0). This way, a high-degree polynomial f𝑏𝑖𝑔 can be recursively simplified to a polynomial of degree less than n by recursively substituting xn 1 into f𝑏𝑖𝑔.

For a polynomial modulo, we normally choose a cyclotomic polynomial xn + 1 (where n is 2p for some integer p) as the divisor, as it provides computational efficiency.

A-5.1.1 Example

Given f 7[x](x2 + 1), suppose f = x4 + 3x3 + 11x2 + 6x + 10. Then,

f = (x2) (x2) + 3x (x2) + 11x2 + 6x + 10

(1)(1) + 3x(1) + (11 mod 7)(1) + 6x + (10 mod 7)

= 3x 7[x](x2 + 1)

Thus, f(x) = x4 + 3x3 + 11x2 + 6x + 10 is equivalent to ( ) 3x in the polynomial ring 7[x](x2 + 1).

A-5.1.2 Discussion

Ring Polynomial Ring
Set Elements number polynomial
Ring Notation p = {0,1,  ,p 1} p[x](xn + 1)
& Definition The set of all integers between 0 and p The set of all polynomials f such that
f = c0 + c1x1 + c 2x2 + c n1xn1
where each coefficient ci p
and f’s degree is less than n
Supported (+,⋅) (+,⋅)
Operations (Addition, Multiplication) (Addition, Multiplication)
(+) Operation We know how to add numbers fa = a0 + a1x1 + a 2x2 + a da1xda1
fb = b0 + b1x1 + b 2x2 + b db1xdb1
Then, fa + fb is computed as:
fc = i=0𝗆𝖺𝗑(da,db)(a i + bi)xi
() Operation We know how to multiply numbers fa = a0 + a1x1 + a 2x2 + a da1xda1
fb = b0 + b1x1 + b 2x2 + b db1xdb1
Then, fa fb is computed as:
fc = i=0da+db j=0ia jbijxi
For a,b p For fa,fb p[X](xx + 1),
Commutative a + b = b + a fa + fb = fb + fa
Associative (a + b) + c = a + (b + c) (fa + fb) + fc = fa + (fb + fc)
Distributive a (b + c) = a b + a c fa (fb + fc) = fa fb + fa fc
Closed a + b c p, a b d p fa + fb fc Rn,q,
fa fb fd Rn,q
Congruency ( ) Two numbers a b in modulo p if: Two polynomials fa fb in p[x](xn + 1) if:
(a mod p) = (b mod p) fa = f a mod (xn + 1) = i=0da aixi
fb = f b mod (xn + 1) = i=0db bixi,
da = db and ai bi in modulo p
for all 0 i da
Table 1: Comparison between a number ring and a polynomial ring.

Congruency: If two numbers are congruent, they are in the same congruency class. The same is true for two congruent polynomials. If the computation results of two mathematical formulas belong to the same congruency class, then their computations wrap around within modulo of their congruency. This is a useful property for cryptographic schemes where encryption & decryption computations wrap around their values within a limited set of binary bits. Congruency is useful for simplifying computation. For example, a big number or a complex polynomial can be normalized to a simpler number or polynomial by using the congruency rule, which reduces the computation overhead.

Polynomial Evaluation: Note that two numbers that belong to the same congruency class are not necessarily the same number. For example, 5 10 modulo 5, but these two numbers are not the same. Likewise, two congruent polynomials are not the same. While two congruent polynomials in a polynomial ring can be interchangeably used for polynomial operations supported in the ring (i.e., (+,⋅)), such as f1 + f2 or f1 (f2 f3), two congruent polynomials do not necessarily give the same result when they are evaluated for a certain variable value x = a. For example, in the previous example of §A-5.1.1, the two polynomials x4 + 3x3 + 11x2 + 6x + 10 and 3x are congruent in the polynomial ring 7[x](x2 + 1). However, these two polynomials do not give the same evaluation results for x = 0: the original polynomial gives 10, whereas the reduced (i.e., simplified) polynomial gives 0. This discrepency in evaluation occurs because we defined two polynomials M1 and M2 to be congruent over xn + 1 (i.e., M1 M2) if their remainder is the same after being divided by Xn + 1 (i.e., M1 = Q (Xn + 1) + M2 for some polynomial Q). Therefore, M1 and M2 will be evaluated to the same polynomial M2 if they are evaluated at the x values such that Xn = 1, which make the Xn + 1 term 0. The solutions for xn = 1 are called the n-th roots of unity, which we will learn in §A-7 and §A-9. We summarize as follows:

Summary A-5.1.2 Polynomial Evaluation over Polynomial Ring

Suppose polynomials M1 and M2 are congruent over the polynomial ring xn + 1. This is equivalent to the following relation: M1 = Q (Xn + 1) + M2 Q for some polynomial Q. Then, M1(X) and M2(X) are guaranteed to be evaluated to the same value if X = xi is the solution for Xn + 1 (i.e., X is the n-th root of unity). That is , M1(xi) = M2(xi).

Number Ring & Polynomial Ring: These two rings share many common characteristics, which are summarized in Table 1.