Fast Fourier Transforms (FFT) can be used for efficient polynomial multiplication, which is particularly useful when dealing with large polynomials in several cryptography applications, for example, Shamir Secret Sharing, Multiparty Computation, Pairing-based Elliptic Curve, and many others.
Fourier Transform (FT)
The Fourier Transform of a function f(t) on a continuous-time domain:
F(ω)=∫−∞∞f(t)e−iωtdt
Discrete Fourier Transform (DFT)
Let x0,...,xn−1 be complex numbers. The Discrete Fourier Transform:
Xk=0..n−1=m=0∑n−1xme−i2πkm/n
where e−i2πk/n is a primitive n-th root of 1 (also known as n-th root of unity).
To work with points (x,y)∈R2 on a Cartesian coordinate, we can map R2→C.
DFT from time domain to frequency domain
Inverse Discrete Fourier Transform (DFT−1)
We follow the same notation in Discrete Fourier Transform:
xm=n1k=0∑n−1Xkei2πkm/n
Polynomial Multiplication
Giving 2 polynomials A(x) and B(x) with high degrees m and n respectively, compute C(x)=A(x)×B(x). As we see that ∣C(x)∣=m+n.
Solution. Let's represent polynomials as coefficient vectors A=[a0,a1,...,am−1],B=[b0,b1,...,bn−1], where:
A(x)B(x)=a0+a1x+a2x2+...+am−1xm−1=b0+b1x+b2x2+...+bn−1xn−1
After padding zeros to the both coefficient vetors so that they're both length N≥n+m−1 and N is a power of 2, we can transform the padded vectors to DFT(A)=[A(σ0),A(σ1),...,A(σn−1)] where 0≤k≤N,σ=e−i2πk/n is a n-th root of unity, and DFT(B) similarly.
Now we have the transformed vector DFT(C) following:
DFT(C)[k]=DFT(A)[k]×DFT(B)[k]
To compute C, just apply Inverse DFT to DFT(C), C=DFT−1(DFT(C)). Applying Lagrange interpolation, if you desire C(x). ■
To improve the efficiency, we can use Fast Fourier Transform, FFT(A) and FFT(B).