%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/rfc6979.pyc

�
�ac@s�dZddlZddlmZddlmZmZmZddlm	Z	ddd	d
gZ
d�Zd�Zd
dd�Z
dS(s
RFC 6979:
    Deterministic Usage of the Digital Signature Algorithm (DSA) and
    Elliptic Curve Digital Signature Algorithm (ECDSA)

    http://tools.ietf.org/html/rfc6979

Many thanks to Coda Hale for his implementation in Go language:
    https://github.com/codahale/rfc6979
i����N(thexlifyi(tnumber_to_stringtnumber_to_string_cropt
bit_length(thmac_compatRtbits2inttbits2octetst
generate_kcCsAtt|�d�}t|�d}||kr=|||?S|S(Nii(tintRtlen(tdatatqlentxtl((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/rfc6979.pyRs
cCsAt|t|��}||}|dkr4|}nt||�S(Ni(RRR(R
tordertz1tz2((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/rfc6979.pyR s

	itcCst|�}|�j}|dd}tt||��tt||��t|�f}	d|}
d|}tj|d|�}|j|
d�x|	D]}|j|�q�W|j�}tj||
|�j�}
tj|d|�}|j|
d�x|	D]}|j|�qW|j�}tj||
|�j�}
x�t	rd}
x;t
|
�|kr�tj||
|�j�}
|
|
7}
qUWt|
|�}d|ko�|knr�|dkr�|S|d8}ntj||
d|�j�}tj||
|�j�}
qFWd	S(
s�
        order - order of the DSA generator used in the signature
        secexp - secure exponent (private key) in numeric form
        hash_func - reference to the same hash function used for generating hash
        data - hash in binary form of the signing data
        retry_gen - int - how many good 'k' values to skip before returning
        extra_entropy - extra added data in binary form as per section-3.6 of
            rfc6979
    iisst	digestmodRiiN(Rtdigest_sizeRRRthmactnewtupdatetdigesttTrueR	R(Rtsecexpt	hash_funcR
t	retry_gent
extra_entropyRtholentrolentbxtvtktitttsecret((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/rfc6979.pyR+s@



	
(t__doc__RtbinasciiRtutilRRRt_compatRt__all__RRR(((sB/opt/plesk/python/2.7/lib/python2.7/site-packages/ecdsa/rfc6979.pyt<module>
s			

Zerion Mini Shell 1.0