INNER CODE UNIT · Python

right

AntonKueltz/fastecdsa · fastecdsa/curve.py:112

        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.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…