![]() | 1 | initial version |
Based on the help I got from FrédéricC and slelievre, I managed to create the following encoder-decoder:
F.<a> = GF(8,name='a',modulus=x^3+x+1)
Fx.<x> = F[]
C = codes.ReedSolomonCode(F, 7, 3)
E = C.encoder('EvaluationPolynomial')
M = E.message_space()
D = C.decoder('BerlekampWelch')
pa = Fx(a)
p0 = Fx.zero()
p1 = Fx.one()
m = M.random_element()
n = E.encode(m)
o = D.decode_to_message(n);
print(m)
print(o)