gf(2) Berlekamp Algorithm
If possible, factor polynomial, including at least one irreducible factor.
f = b0000000000000000000000000000000000000000000000000000000000101111
f = 0x000000000000002f
f = x5 + x3 + x2 + x + 1
Calculate vn = x2n (mod f) for n=0 to 5
v0 = x0 (mod f)v0 = b00000000000000000000000000000001
v0 = 0x00000001
v0 = 1
v1 = x2 (mod f)v1 = b00000000000000000000000000000100
v1 = 0x00000004
v1 = x2
v2 = x4 (mod f)v2 = b00000000000000000000000000010000
v2 = 0x00000010
v2 = x4
v3 = x6 (mod f)v3 = b00000000000000000000000000011110
v3 = 0x0000001e
v3 = x4 + x3 + x2 + x
v4 = x8 (mod f)v4 = b00000000000000000000000000001001
v4 = 0x00000009
v4 = x3 + 1
Represent v0-v4 as matrix Q
Q = 00001
00100
10000
11110
01001
Represent 5x5 identity matrix I
I = 00001
00010
00100
01000
10000
M = Q-I
M = 00000
00110
10100
10110
11001
Find null basis vectors of M
nv0 = b00000000000000000000000000000001
nv0 = 0x00000001
nv0 = 1
Only null basis is trivial 1, so f is irreducible.
See also: