Invert binary field using SAGE

I am very upset about the SAGE documentation for leaf field operations. I want to do the following:

In GF (2 ^ 8) with an irreducible polynomial x ^ 8 + x ^ 4 + x ^ 3 + x + 1, I would like to find the inverse element x ^ 8 + 1. How can I do this in SAGE?

+4
source share
1 answer

you do

sage: _.<X> = GF(2)[]
sage: K.<x> = GF(2^8, modulus=X^8+X^4+X^3+X+1)
sage: (x^8 + 1)^-1
x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + 1
+4
source

Source: https://habr.com/ru/post/1545161/


All Articles