0% found this document useful (0 votes)
21 views37 pages

FFT Finite Field

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views37 pages

FFT Finite Field

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

FFT over finite fields and its application in

Reed-Solomon decoding Algorithm

Anish Sharma

Student at IITR Physics department

Anish (IITR) FFT over Finite fields Oct 2024 1 / 37


Table of Contents

1 Intro to ECC

2 FFT over extension finite fields

3 Reed-Solomon Encoding Algorithm

4 Reed-Solomon Decoding Algorithm

Anish (IITR) FFT over Finite fields Oct 2024 2 / 37


Intro to Reed-Solomon codes

An ECC (Error Correcting Code) are redundant bits that are added to the
message to resolve errors in the corrupted message this forms a codeword.
A block code (n, k) where n is the blocklength and the size of this code is
2k .

Figure: Size 4 binary codes of length 5

Anish (IITR) FFT over Finite fields Oct 2024 3 / 37


Example of Reed-Solomon codes

Reed-Solomon (RS) codes are a class of block error correcting codes, An


(n, k) RS code is constructed over Fq , for n = q − 1. An Fq is an
extension finite field with dimension q where q = p k , p is a prime number.
The (n, k) code appends n − k parity symbols to k message symbols forms
a codeword length of n.

Anish (IITR) FFT over Finite fields Oct 2024 4 / 37


Intro to ECC & Reed-Solomon codes

For example, I have some message with data symbols (A, B, C , D) now
due to some noise the message gets corrupted changes to (X , Y , C , D)
now reed-solomon first encodes a redundant symbols say E & F and using
this detect the position of error and corrupted symbol.
We will be developing reed solomon code (n, k) algorithm over F2m , for
k
n ≥ 0.5 where n − k is a power of 2.

Anish (IITR) FFT over Finite fields Oct 2024 5 / 37


Table of Contents

1 Intro to ECC

2 FFT over extension finite fields

3 Reed-Solomon Encoding Algorithm

4 Reed-Solomon Decoding Algorithm

Anish (IITR) FFT over Finite fields Oct 2024 6 / 37


DFT over a ring

Let R be any ring, let n ≥ 1 be an integer, and let α ∈ R be a principal


nth root of unity, defined by

ωn = 1
n−1
X
ω jk = 0 for 1 ≤ k < n
j=0

Anish (IITR) FFT over Finite fields Oct 2024 7 / 37


DFT over a ring

The DFT over ring is given by,


n−1
X
fk = ω jk vj
j=0

where vj is a element of our original basis and fk is element of fourier basis.

Anish (IITR) FFT over Finite fields Oct 2024 8 / 37


For Complex Field

When the field is Complex numbers, F ∈ C

ω = e −2πi/n

So we get,
n−1
X 2πi
fk = vj e − n
jk

j=0

Anish (IITR) FFT over Finite fields Oct 2024 9 / 37


For Finite fields

When we have a Galois field .i.e F = GF (q) where q is a prime power, the
multiplicative order of each element must divide the size of the
multiplicative group of F , n divides q − 1. Moreover, if for some m, n
divides q m − 1 then there exists a Fourier transform of length n over
extension field GF (q m ).

Anish (IITR) FFT over Finite fields Oct 2024 10 / 37


Inverse Fourier Transform

The inverse Fourier transform is given by,


n−1
!
1 X
−jk
vj = ω fk
n
k=0

The proof is trivial.

Anish (IITR) FFT over Finite fields Oct 2024 11 / 37


Where is FFT ?

Till now we were just discussing Discrete Fourier Transform, the time
complexity to compute is O(n2 ) by computing each element, Fast Fourier
Transforms are algorithms that have complexity of O(n log(n)) to compute
DFT some example are Cooley-Tucky algorithms.

Anish (IITR) FFT over Finite fields Oct 2024 12 / 37


m
New Polynomial Basis over F2m [x]/(x 2 − x)

Let v̄ = (v0 , v1 , . . . vn ) denote a basis of F2m where vi ∈ F2m are linearly


independent over F2 . Let Vk be a subspace of F2m .

Vk = Span(v k ) = {i0 · v0 + i1 · v1 + · · · + ik−1 · vk−1 | ∀ij ∈ {0, 1}},


m
Let {ωi }2i=0−1 denote the elements in F2m , As Vk ⊆ F2m the elements of
k
Vk are {ωi }2i=0−1 , k ≤ m also ω0 = 0 for additive identity in the field.

Anish (IITR) FFT over Finite fields Oct 2024 13 / 37


Subspace polynomial of Vk

The Subspace polynomial is given by,


Y
sk (x) = (x − a)
a∈Vk

The deg (sk ) = 2k , expanding this form as we know sk (x) is F2 - linearized


polynomial,
k
i
X
sk (x) = sk,i x 2
i=0

where sk,i ∈ F2m

Anish (IITR) FFT over Finite fields Oct 2024 14 / 37


Properties of sk (x)

sk (x + y ) = sk (x) + sk (y )∀x, y ∈ F2m .


The recursion form of sk .i.e

sj (x) = sj−1 (x)sj−1 (x − vj−1 )

Anish (IITR) FFT over Finite fields Oct 2024 15 / 37


Choosing a Polynomial basis

m
Let X̄ = {Xj ¯(x)}∀j denote a basis in F2m [x]/(x 2 − x), Each Xi ¯(x) is
defined as Qm−1 ij
j=0 (sj (x))
Xi ¯(x) = Qm−1 ij
j=0 (sj (vj ))

where deg (Xi ¯(x)) = i and thus this basis can represent all elements in
m
F2m [x]/(x 2 − x).

Anish (IITR) FFT over Finite fields Oct 2024 16 / 37


The polynomial of degree h in basis X̄ is represented as
h−1
d̄i Xi ¯(x)
X
D̄h (x) =
i=0

Anish (IITR) FFT over Finite fields Oct 2024 17 / 37


Multipoint evaluations at Vk as FFT and IFFT

We will evaluate D̄2k (Vk + β) for β ∈ F2m , the set of evaluation points
Vk + β can be broken into two cosets.

(Vk + β) = (Vk−1 + β) ∪ (Vk−1 + vk−1 + β)

Lemma 1
For any β ∈ F2m and a ∈Vk 
P k−1 sk−1 (β) ¯
D̄2k (Vk + β) = 2i=0 −1 d¯i + sk−1 (vk−1 ) di+2k−1 X̄i (a + β)

Anish (IITR) FFT over Finite fields Oct 2024 18 / 37


Now let,

(0) sk−1 (β) ¯


gi = d¯i + d k−1 i = 0, 1, . . . , 2k−1 − 1
sk−1 (vk−1 ) i+2

Hence,
2k−1
X−1 (0) (0)
gi X̄i (a + β) = D̄2k−1 (a + β) ∀a ∈ Vk
i=0
(0)
This converts D̄2k (Vk−1 + β) to D̄2k−1 (a + β) .

Anish (IITR) FFT over Finite fields Oct 2024 19 / 37


For D̄2k (Vk−1 + vk−1 + β) set

D̄2k (a + vk−1 + β) =
2k−1
X−1  
sk−1 (vk−1 + β) ¯
= d¯i + di+2k−1 X̄i (a + vk−1 + β)
sk−1 (vk−1 )
i=0
2k−1
X−1  
sk−1 (β) ¯
= d¯i + di+2k−1 + d¯i+2k−1 X̄i (a + vk−1 + β)
sk−1 (vk−1 )
i=0
2k−1
X−1  
(0)
= gi + d¯i+2k−1 X̄i (a + vk−1 + β)
i=0
2k−1
X−1 (1) (1)
= gi X̄i (a + vk−1 + β) = D̄2k−1 (a + vk−1 + β) ∀a ∈ Vk−1
i=0

Anish (IITR) FFT over Finite fields Oct 2024 20 / 37


Hence, the set of evaluation points can be expressed as

D̄2k (Vk + β)
(0) (1)
=D̄2k−1 (Vk−1 + β) ∪ D̄2k−1 (Vk−1 + vk−1 + β)
Now the time complexity to evaluate both the set has O(2k log(2k )). This
is the recursive approach in extended finite field to evaluate using some
points FFTX̄ (u, k, β) where u is the message.

Anish (IITR) FFT over Finite fields Oct 2024 21 / 37


Inverse FFT

For IFFTX̄ (u, k, β) , we just do backtracking of FFT and reformulate the


recursion formula and coefficient as
(0) (1)
d¯i+2k−1 = gi + gi
(0) sk−1 (β) ¯
d¯i = gi + d k−1 i = 0, 1, . . . , 2k−1 − 1
sk−1 (vk−1 ) i+2

Anish (IITR) FFT over Finite fields Oct 2024 22 / 37


Table of Contents

1 Intro to ECC

2 FFT over extension finite fields

3 Reed-Solomon Encoding Algorithm

4 Reed-Solomon Decoding Algorithm

Anish (IITR) FFT over Finite fields Oct 2024 23 / 37


RS Encoding

This section introduces an O(nlg (n − k)) encoding algorithm for


(n = 2m , k) RS codes over F2m , with T = 2t = n − k a power of 2.
We will take a polynomial evaluation approach, the message is interpreted
m
as a polynomial u(x) ∈ F2m [x]/(x 2 − x) of degree less than k. The
codeword v = (v0 , v1 , . . . vn−1 ) is the evaluation of u(x) at n distinct
points.

Anish (IITR) FFT over Finite fields Oct 2024 24 / 37


RS Encoding

Pk−1
Assume u(x) is in the basis X, and thus u(x) = i=0 ui X̄i (x). The vector
of coefficients is denoted as

u = (u0 , u1 , . . . , uk−1 , ω0 , ω0 , . . . , ω0 )
| {z }
T

ω0 are the redundant vectors we use for T- point FFT. The codeword v
can be computed by,
v = FFTX (u, m, ω0 )
But in this codeword is not systematic,

Anish (IITR) FFT over Finite fields Oct 2024 25 / 37


Generator polynomial method

We divide the v into Tn subvectors ,


where each vi = (vi·T , v1+i·T , . . . , vT −1+i·T ) i = 0, 1, . . . , n/T − 1
The choice of this subvectors satisfies the lemma below:
Lemma 2
ω0 = IFFTX (v0 , t, ω0 ) + IFFTX (v1 , t, ωT ) + . . .

+ IFFTX vn/T −1 , t, ωk

Anish (IITR) FFT over Finite fields Oct 2024 26 / 37


Time complexity of encoding

We assume v0 includes the parity symbols which are to added to each


block other subvector to be the message symbol

v00 = IFFTX (v1 , t, ωT ) + IFFTX (v2 , t, ω2T ) + . . .



+ IFFTX vn/T −1 , t, ωk
v =FFTX v00 , t, ω0


Hence the algorithm requires n/T-1 times T-point IFFT and T-point FFT,
the complexity of encoding algorithm is
n
O(T log(T )) + ( − 1)O(T log(T )) = O(n log(n − k))
T
where T = n − k

Anish (IITR) FFT over Finite fields Oct 2024 27 / 37


Table of Contents

1 Intro to ECC

2 FFT over extension finite fields

3 Reed-Solomon Encoding Algorithm

4 Reed-Solomon Decoding Algorithm

Anish (IITR) FFT over Finite fields Oct 2024 28 / 37


RS Decoding

The decoding Algorithm consists of four steps:


Calculate the syndrome polynomial s(x)
Determine the error locator polynomial by extended euclidean
algorithm
Find the error Locations
Calculate the error values

Anish (IITR) FFT over Finite fields Oct 2024 29 / 37


Let r = (r0 , r1 , . . . , rn−1 ) = v + e is the received vector consists of
codeword with the error patterns,

ri = u(ωi ) + ei
If ei 6= 0, ri is erroneous symbols. Suppose e contains v ≤ T /2 non-zero
symbols,

Anish (IITR) FFT over Finite fields Oct 2024 30 / 37


We define set of ωi ’s corresponding location of errors, Let

E = {ωi ∈ F2m | ei 6= 0}
and Error-locator polynomial defined as
Y
λ(x) = (x − ωi )
ωi ∈E

Anish (IITR) FFT over Finite fields Oct 2024 31 / 37


Let r(x) be a polynomial of degree less than 2m , with
r (ωi ) = ri ∀ωi ∈ F2m . Now
(
0 if ωi ∈ E
r (ωi ) · λ (ωi ) =
ri · λ (ωi ) if ωi ∈ F2m \E

This give us u(x) · λ (x) = r (x) · λ (x) ( mod (x − ωi ))


Q2m −1
We know that i=0 (x − ωi ) = sm (x)

Anish (IITR) FFT over Finite fields Oct 2024 32 / 37


The Key Equation

This gives us,

u(x) · λ (x) = r (x) · λ (x) + q(x) · sm (x)

We use syndrome decoding, Let, r (x) = r0 (x) + Xk (x)s(x) where r0 (x)


denotes the residual, and if no error occurs r (x) = u(x) and s(x) is called
the syndrome polynomial.

Anish (IITR) FFT over Finite fields Oct 2024 33 / 37


Forney’s Formula

Now the key formula called forney’s formula for syndrome decoding is

z0 (x) = s(x)λ(x) + q(x)st (x)

where st (x) is the quotient of dividing sm (x) by Xk (x). Now we can apply
extended euclidean algorithm (The extended euclidean algorithm stops
when remainder degree is less that T /2) on st (x) and s(x) to find the
λ(x).

Anish (IITR) FFT over Finite fields Oct 2024 34 / 37


Error calculation and location

To find the location of errors E just find the set of roots of λ(x). The final
step is to calculate the error values for that just take the formal derivative
of the key equation, which yields

q (ωi )
u (ωi ) − r (ωi ) = , ∀ωi ∈ E
λ0 (ωi )

To calculate s(x) we apply n/T times IFFT



s = IFFTX (r0 , t, ω0 ) + IFFTX (r1 , t, ωT ) + . . . + IFFTX rn/T −1 , t, ωk

Anish (IITR) FFT over Finite fields Oct 2024 35 / 37


Complexity of RS Decoding

The complexity of the proposed decoding algorithm is


O(n log(n − k) + (n − k) log2 (n − k)).

Anish (IITR) FFT over Finite fields Oct 2024 36 / 37


Thank you

Anish (IITR) FFT over Finite fields Oct 2024 37 / 37

You might also like