I am trying to construct a binary cyclic code of length $257$ with rate strictly greater than $\frac{1}{2}$ and distance $18$ or more.
I read about general BCH codes and implemented it.
The multiplicative order of $2$ modulo $257$ is $16$. So, I realize $\text{GF}(2^{16})$ as $\text{GF}(2)[t]/(t^{16}+t^5+t^3+t^2+1)$. I choose a $257$-primitive root of unity in $\text{GF}(2^{16})$. It is $\alpha=t^7+t^6+t^2+1$. Denote the $\text{LCM}$ of the minimal polynomials of $\alpha^{74},\dotsc,\alpha^{74+18-2}$ by $g(x)$. Then $\text{deg}(g(x))=128$.
So, the cyclic code of length $257$ generated by $g(x)$ has rate $\frac{129}{257}>\frac{1}{2}$ and distance at least $18$.
- Did I follow the steps of constructing a BCH code correctly?
- Are my calculations correct? (I used Sage, but I am very new to it and may have bugs).
- Given a generating polynomial, is there an efficient algorithm to check if the cyclic code it generates has at least a given distance? That would be handy for sanity-checks.