Ask Your Question

Revision history [back]

I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomial

image description F = GF(p) R = PolynomialRing(F, "u") u = R.gen() equation = (3 * xG ^ 2 + a * u ^ 4) ^ 2 - (4 * xQ) * ( xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6 ) - (8 * xG) * (xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6)

roots = equation.roots(multiplicities=False)

for root in roots: print(hex(root)) print(hex(F((root ^ 4) * a))) print(hex(F((root ^ 6) * b))) I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomial

I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomial

image description F = GF(p) R = PolynomialRing(F, "u") u = R.gen() equation = (3 * xG ^ 2 + a * u ^ 4) ^ 2 - (4 * xQ) * ( xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6 ) - (8 * xG) * (xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6)

roots = equation.roots(multiplicities=False)

equation.roots(multiplicities=False)

for root in roots: print(hex(root)) print(hex(F((root ^ 4) * a))) print(hex(F((root ^ 6) * b)))

I wrote this code to find the value of u, u, but when I substitute the result back in, it doesn't satisfy the polynomial

I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomial

.

F = GF(p)
 R = PolynomialRing(F, "u")
 u = R.gen()
 equation = (3 * xG ^ 2 + a * u ^ 4) ^ 2 - (4 * xQ) * (
     xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6
 ) - (8 * xG) * (xG ^ 3 + a * u ^ 4 * xG + b * u ^ 6)

6)
roots = equation.roots(multiplicities=False)

for root in roots:
    print(hex(root))
    print(hex(F((root ^ 4) * a)))
    print(hex(F((root ^ 6) * b)))

I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomial