    from tinyec.ec import SubGroup, Curve

    # Define the parameters for the curve
    p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F
    a = 0
    b = 7
    g_x = 55066263022277343669578718895168534326250603453777594175500187360389116729240
    g_y = 32670510020758816978083085130507043184471273380659243275938904335757337482424
    n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
    h = 1

    # Create the subgroup and curve
    field = SubGroup(p, g_x, g_y, n, h)
    curve = Curve(a, b, field, name='CustomCurve')

    print(f"Curve: {curve}")
    print(f"Generator point: {curve.g}")

    #
    #	key pair
    #
    #
    from tinyec import registry
    from tinyec.ec import Point
    import secrets

    # Generate a private key
    priv_key = secrets.randbelow(curve.field.n)
    print(f"Private key: {priv_key}")

    # Calculate the public key
    pub_key = priv_key * curve.g
    print(f"Public key: ({pub_key.x}, {pub_key.y})")