Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binary field inversion using SAGE

I am quite frustrated about the SAGE documentations on Finite field operations. What I want to do is the following:

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

like image 320
drdot Avatar asked Jun 19 '14 04:06

drdot


1 Answers

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
like image 57
Luca De Feo Avatar answered Sep 21 '22 17:09

Luca De Feo