| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/MySQL/MySQL Workbench 6.3 CE/python/site-packages/ecdsa/ |
Upload File : |
�
2�Xc @ s� d d l m Z d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ e d d d � Z
d � Z e d
k r� e � n d S( i����( t divisioni ( t print_( t numbertheoryt CurveFpc B s; e Z d Z d � Z d � Z d � Z d � Z d � Z RS( s9 Elliptic Curve over the field of integers modulo a prime.c C s | | _ | | _ | | _ d S( s; The curve of points satisfying y^2 = x^3 + a*x + b (mod p).N( t _CurveFp__pt _CurveFp__at _CurveFp__b( t selft pt at b( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyt __init__* s c C s | j S( N( R ( R ( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyR 0 s c C s | j S( N( R ( R ( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyR 3 s c C s | j S( N( R ( R ( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyR
6 s c C s3 | | | | | | j | | j | j d k S( s! Is the point (x,y) on this curve?i ( R R R ( R t xt y( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyt contains_point9 s ( t __name__t
__module__t __doc__R R R R
R ( ( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyR ( s t Pointc B st e Z d Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z d � Z d
� Z
d � Z RS(
ss A point on an elliptic curve. Altering x and y is forbidding,
but they can be read by the x() and y() methods.c C sn | | _ | | _ | | _ | | _ | j rK | j j | | � sK t � n | rj | | t k sj t � n d S( s@ curve, x, y, order; order (optional) is the order of this point.N( t
_Point__curvet _Point__xt _Point__yt
_Point__orderR t AssertionErrort INFINITY( R t curveR R
t order( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyR B s c C sB | j | j k r: | j | j k r: | j | j k r: t St Sd S( s9 Return True if the points are identical, False otherwise.N( R R R t Truet False( R t other( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyt __eq__L s
c C s | t k r | S| t k r | S| j | j k s8 t � | j | j k r~ | j | j | j j � d k rq t S| j � Sn | j j � } | j | j t j | j | j | � | } | | | j | j | } | | j | | j | } t | j | | � S( s Add one point to another point.i (
R R R R R R t doubleR t inverse_modR ( R R R t lt x3t y3( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyt __add__U s #
!c C s# d � } | } | j r( | | j } n | d k r8 t S| t k rH t S| d k sZ t � d | } t | j | j | j | j � } | | � d } | } x� | d k r| j � } | | @d k r� | | @d k r� | | } n | | @d k r| | @d k r| | } n | d } q� W| S( s Multiply a point by an integer.c S s= | d k s t � d } x | | k r4 d | } q W| d S( Ni i i ( R ( R t result( ( sY C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\ecdsa\ellipticcurve.pyt leftmost_bitp s
i i i i ( R R R R R R R R ( R R R&