INNER CODE UNIT · Python
get_curve_by_oid
AntonKueltz/fastecdsa · fastecdsa/curve.py:80
def get_curve_by_oid(cls, oid: bytes) -> Optional[Curve]:
r"""Get a curve via its object identifier.
Args:
oid (bytes): The object identifier for the curve.
Returns:
Curve | None: The curve corresponding to the object identifier. If the identifier does
not correspond to a supported curve :code:`None` is returned.
"""
return cls._oid_lookup.get(oid, None)
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