INNER CODE UNIT · Python

is_point_on_curve

AntonKueltz/fastecdsa · fastecdsa/curve.py:93

    def is_point_on_curve(self, point: Tuple[int, int]) -> bool:
        r"""Check if a point lies on this curve.

        The check is done by evaluating the curve equation :math:`y^2 \equiv x^3 + ax + b \pmod{p}`
        at the given point :math:`(x,y)` with this curve's domain parameters :math:`(a, b, p)`. If
        the congruence holds, then the point lies on this curve.

        Args:
            point (int, int): A tuple representing the point :math:`P` as an :math:`(x, y)` coordinate
            pair.

        Returns:
            bool: :code:`True` if the point lies on this curve, otherwise :code:`False`.
        """
        (
            x,
            y,
        ) = point

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…