ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 07 Feb 2024 01:14:26 +0100I wrote this code to find the value of u, but when I substitute the result back in, it doesn't satisfy the polynomialhttps://ask.sagemath.org/question/75852/i-wrote-this-code-to-find-the-value-of-u-but-when-i-substitute-the-result-back-in-it-doesnt-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)
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 polynomialWed, 07 Feb 2024 01:14:26 +0100https://ask.sagemath.org/question/75852/i-wrote-this-code-to-find-the-value-of-u-but-when-i-substitute-the-result-back-in-it-doesnt-satisfy-the-polynomial/