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

asked 2024-02-07 01:14:26 +0100

losu gravatar image

updated 2024-02-09 03:50:18 +0100

Max Alekseyev gravatar image

.

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

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Max Alekseyev
close date 2024-02-09 03:52:13.532957