You could define GF(2^8) using your polynomial as modulus, then define the polynomial ring S in 8 variables x0,...,x7 over that, write x as an element in that ring. The inverse of x is also x^254, but you want to evaluate this with the side conditions xi^2=xi. So take the quotient of S by those 8 relations first. This might be better handled by the PlyBori package, but I am not familiar with that.
I tried this and it worked. The output (your y) starts like this, where xibar is your xi and a is your z. (a^6 + a^4 + a)*x0bar*x1bar*x2bar*x3bar*x4bar*x5bar*x6bar + (a^7 + a^5 + a^2)*x0bar*x1bar*x2bar*x3bar*x4bar*x5bar*x7bar + (a^6 + a^4 + a + 1)*x0bar*x1bar*x2bar*x3bar*x4bar*x6bar*x7bar + (a^7 + a^5 + a^2 + a)*x0bar*x1bar*x2bar*x3bar*x5bar*x6bar*x7bar + (a^2 + 1)*x0bar*x1bar*x2bar*x4bar*x5bar*x6bar*x7bar + (a^6 + a^4 + a^3)*x0bar*x1bar*x3bar*x4bar*x5bar*x6bar*x7bar + (a^7 + a^5 + a^4)*x0bar*x2bar*x3bar*x4bar*x5bar*x6bar*x7bar + (a^5 + a^3 + 1)*x1bar*x2bar*x3bar*x4bar*x5bar*x6bar*x7bar + (a^7 + a^6 + a^2)*x0bar*x1bar*x2bar*x3bar*x4bar*x5bar + (a^7 + a^5 + a^2 + 1)*x0bar*x1bar*x2bar*x3bar*x4bar*x6bar + (a^7 + a^4)*x0bar*x1bar*x2bar*x3bar*x5bar*x6bar + (a^6 + a^4 + a^2 + a)*x0bar*x1bar*x2bar*x4bar*x5bar*x6bar + (a^7 + a^5 + a)*x0bar*x1bar*x3bar*x4bar*x5bar*x6bar + (a^7 + a^6 + a^4 + a)*x0bar*x2bar*x3bar*x4bar*x5bar*x6bar + (a^6 + a^5 + a)*x1bar*x2bar*x3bar*x4bar*x5bar*x6bar + (a^7 + a^4 + a + 1)*x0bar*x1bar*x2bar*x3bar*x4bar*x7bar + (a^6 + a^4 + 1)*x0bar*x1bar*x2bar*x3bar*x5bar*x7bar + (a^6 + a^4 + a^3 + a + 1)*x0bar*x1bar*x2bar*x4bar*x5bar*x7bar + (a^7 + a^6 + a^3 + a^2)*x0bar*x1bar*x3bar*x4bar*x5bar*x7bar + (a^6 + a^4 + a^3 + a^2 + a + 1)*x0bar*x2bar*x3bar*x4bar*x5bar*x7bar + (a^7 + a^6 + a^4 + a^3 + a^2 + a + 1)*x1bar*x2bar*x3bar*x4bar*x5bar*x7bar + (a^5 + a^4 + a^3 + a^2 + 1)*x0bar*x1bar*x2bar*x3bar*x6bar*x7bar + (a^6 + a^4 + a^2)*x0bar*x1bar*x2bar*x4bar*x6bar*x7bar + (a^6)*x0bar*x1bar*x3bar*x4bar*x6bar*x7bar + (a^7 + a + 1)*x0bar*x2bar*x3bar*x4bar*x6bar*x7bar + (a^6 + a^3)*x1bar*x2bar*x3bar*x4bar*x6bar*x7bar + John Cremona 2008/5/28 David Joyner <[EMAIL PROTECTED]>: > > It seems you should be able to represent multiplication by y as a > matrix equation, > which you might have luck inverting. > > > On Wed, May 28, 2008 at 5:27 PM, vpv <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I am trying to solve the following equation for y in SAGE: >> >> x*y = 1 (mod z^8+z^4+z^3+z+1) >> >> where >> >> x = x0+x1*z^1+x2*z^2+x3*z^3+x4*z^4+x5*z^5+x6*z^6+x7*z^7 >> y = ? >> >> x0,...,x7 are elements of GF(2). I do not know their values. I am >> searching for y in parametric form i.e. as a polynomial of z of degree >> 7 with coefficients - some functions of x0,...,x7. >> >> I define in SAGE: >> >> P.<x0,x1,x2,x3,x4,x5,x6,x7> = BooleanPolynomialRing(8, order='lex') >> Z.<z> = PolynomialRing(P) >> >> I try to do the following in SAGE >> >> y = inverse_mod(x0+x1*z^1+x2*z^2+x3*z^3+x4*z^4+x5*z^5+x6*z^6+x7*z^7, >> z^8+z^4+z^3+z+1) >> >> but it does not work. >> >> Alternatively, I try to define a ring of univariate polynomials of z >> with coeffients in P, every element of which is reduced (mod >> z^8+z^4+z^3+z+1), but I am not able to get the right syntax to do this >> in SAGE. >> >> Any help is appreciated. >> >> Thanks! >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
