File: //usr/local/CyberCP/lib/python3.10/site-packages/ecdsa/__pycache__/ellipticcurve.cpython-310.pyc
o
�h� � @ s$ d dl mZ z
d dlmZ dZW n ey/ z
d dlmZ dZW n ey, dZY nw Y nw d dlmZ ddl m
Z
ddlmZm
Z
mZmZ dd lmZ dd
lmZmZmZ eG dd� de��ZG d
d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Zeddd�ZdS )� )�division)�mpzTF)�python_2_unicode_compatible� )�numbertheory)�normalise_bytes�int_to_bytes�
bit_length�bytes_to_int)�MalformedPointError)�orderlen�string_to_number�number_to_stringc @ sr e Zd ZdZerddd�Znddd�Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� ZdS )�CurveFpzd
:term:`Short Weierstrass Elliptic Curve <short Weierstrass curve>` over a
prime field.
Nc C s( t |�| _t |�| _t |�| _|| _dS �a�
The curve of points satisfying y^2 = x^3 + a*x + b (mod p).
h is an integer that is the cofactor of the elliptic curve domain
parameters; it is the number of points satisfying the elliptic
curve equation divided by the order of the base point. It is used
for selection of efficient algorithm for public point verification.
N)r �_CurveFp__p�_CurveFp__a�_CurveFp__b�_CurveFp__h��self�p�a�b�h� r �F/usr/local/CyberCP/lib/python3.10/site-packages/ecdsa/ellipticcurve.py�__init__B s
zCurveFp.__init__c C s || _ || _|| _|| _dS r )r r r r r r r r r T s
c C �H t |t�r"| j}| j|jko!| j| |j| ko!| j| |j| kS tS )a^ Return True if other is an identical curve, False otherwise.
Note: the value of the cofactor of the curve is not taken into account
when comparing curves, as it's derived from the base point and
intrinsic curve characteristic (but it's complex to compute),
only the prime and curve parameters are considered.
)�
isinstancer r r r �NotImplemented�r �otherr r r r �__eq__b s
��zCurveFp.__eq__c C �
| |k S )z<Return False if other is an identical curve, True otherwise.r �r r"