INNER CODE UNIT · Python
left
AntonKueltz/fastecdsa · fastecdsa/curve.py:111
left = y * y
right = (x * x * x) + (self.a * x) + self.b
return (left - right) % self.p == 0
def evaluate(self, x: int) -> int:
r"""Evaluate the elliptic curve polynomial at 'x'
Args:
x (int): The position to evaluate the polynomial at
Returns:
int: the value of :math:`(x^3 + ax + b) \bmod{p}`
"""
return (x**3 + self.a * x + self.b) % self.p
@property
def G(self) -> Point:
"""The base point of the curve.