A-5.2 Coefficient Rotation

Coefficient rotation is a process of shifting the entire coefficients of a polynomial (either to the left or right) in a polynomial ring. In order to rotate the entire coefficients of a polynomial by h positions to the left, we multiply x−h with the polynomial.

For example, suppose we have a polynomial as follows:

f(x) = c0 + c1x1 + c2x2 + ⋯ + chxh + ⋯ + cn−1xn−1 ∈R⟨n,p⟩

To shift the entire coefficients of f to the left by h positions (i.e., shift f’s h-th coefficient to the constant term), we compute f ⋅x−h, which is:

⟨Summary A-5.2⟩ Polynomial Rotation

Given the (n −1)-degree polynomial:

f(x) = c0 + c1x1 + c2x2 + ⋯ + chxh + ⋯ + cn−1xn−1 ∈R⟨n,p⟩

The coefficients of f(x) can be rotated to the left by h positions by multiplying to f(x) by x−h as follows:

f(x) ⋅x−h = c0 ⋅x−h + c1x1 ⋅x−h + c2x2 ⋅x−h + ⋯ + chxh ⋅x−h + ⋯ + cn−1xn−1 ⋅x−h ≡ch + ch+1x + ch+2x2 + ⋯ + cn−1xn−1−h −c0xn−h −⋯ −ch−1xn−1 ∈R⟨n,p⟩

Note that multiplying the two polynomials f and x−h will yield a congruent polynomial in R⟨n,p⟩. Therefore, the rotated polynomial, which is the result of f ⋅x−h, will also have a congruent polynomial in R⟨n,p⟩.

Note that the coefficient signs change when they rotate around the boundary of xn(= −1), as the computation is conducted in the polynomial ring ℤp[x]∕(xn + 1).

A-5.2.1 Example

Suppose we have a polynomial f ∈ ℤ8[x]∕(x4 + 1) as follows:

We use the centered residue system for ℤ8, i.e., {−4,−3,−2,−1,0,1,2,3}.

f = 2 + 3x −4x2 −x3

The polynomial ring ℤ8[x]∕(x4 + 1) has the following 4 congruence relationships:

x4 ≡−1

x4 ⋅x−1 ≡−1 ⋅x−1

x3 ≡−x−1

x4 ≡−1

x4 ⋅x−3 ≡−1 ⋅x−3

x ≡−x−3

x4 ≡−1

x4 ⋅x−2 ≡−1 ⋅x−2

x2 ≡−x−2

Then, based on the coefficient rotation technique in Summary A-5.2, rotating 1 position to the left is equivalent to computing f ⋅x−1 as follows:

f ⋅x−1 = 2 ⋅(x−1) + 3x ⋅(x−1) −4x2 ⋅(x−1) −x3 ⋅(x−1)

≡−2x3 + 3 −4x1 −x2

= 3 −4x1 −x2 −2x3

As another example, rotating 3 positions to the left is equivalent to computing f ⋅x−3 as follows:

f ⋅x−3 = 2 ⋅(x−3) + 3x ⋅(x−3) −4x2 ⋅(x−3) −x3 ⋅(x−3)

≡−2x −3x2 + 4x3 −1

= −1 −2x −3x2 + 4x3

= −1 −2x −3x2 + (4 ≡−4 mod 8)x3

≡−1 −2x −3x2 −4x3