Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't verify that a polynomial is correct

You are working on a problem that involves tampering with the domain parameters of an ECDSA. I'm trying to find a value for u that satisfies the following expression, but when I use sagemath to find the value and then do the inverse, the value doesn't fit. what could be the problem?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))