/var/opt/nydus/ops/asn1crypto/__pycache__
NameSizeModeActions
algos.cpython-312.pyc332150644editdlrm
cms.cpython-312.pyc333320644editdlrm
core.cpython-312.pyc1752560644editdlrm
crl.cpython-312.pyc187590644editdlrm
csr.cpython-312.pyc45550644editdlrm
keys.cpython-312.pyc411450644editdlrm
ocsp.cpython-312.pyc233820644editdlrm
parser.cpython-312.pyc94080644editdlrm
pdf.cpython-312.pyc34580644editdlrm
pem.cpython-312.pyc71120644editdlrm
pkcs12.cpython-312.pyc64300644editdlrm
tsp.cpython-312.pyc111320644editdlrm
util.cpython-312.pyc276150644editdlrm
version.cpython-312.pyc3670644editdlrm
x509.cpython-312.pyc1065730644editdlrm
_errors.cpython-312.pyc15000644editdlrm
_inet.cpython-312.pyc55890644editdlrm
_int.cpython-312.pyc7960644editdlrm
_iri.cpython-312.pyc97750644editdlrm
_ordereddict.cpython-312.pyc55550644editdlrm
_teletex_codec.cpython-312.pyc37660644editdlrm
_types.cpython-312.pyc15680644editdlrm
__init__.cpython-312.pyc12440644editdlrm
Edit: /var/opt/nydus/ops/asn1crypto/__pycache__/keys.cpython-312.pyc (41145B)
M jdZddlmZmZmZmZddlZddlZddlm Z m Z ddl m Z m Z ddlmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#dd l$m%Z%m&Z&Gd d e!Z'Gd d e"Z(GddeZ)Gdde!Z*Gdde!Z+Gdde!Z,GddZ-Gddee-Z.Gddee-Z/GddeZ0GddeZ1Gd d!eZ2Gd"d#e!Z3Gd$d%e!Z4Gd&d'e!Z5Gd(d)e!Z6Gd*d+e!Z7Gd,d-eZ8Gd.d/eZ9Gd0d1eZ:Gd2d3e!Z;Gd4d5e!Z<Gd6d7e!Z=Gd8d9e#Z>Gd:d;eZ?Gd<d=ee!Z@Gd>d?e!ZAGd@dAe!ZBGdBdCe!ZCGdDdEe!ZDGdFdGeZEGdHdIee!ZFGdJdKe!ZGy)La' 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. )unicode_literalsdivisionabsolute_importprint_functionN)unwrap APIException) type_namebyte_cls)_ForceNullParametersDigestAlgorithmEncryptionAlgorithmRSAESOAEPParamsRSASSAPSSParams)Any Asn1Value BitStringChoiceIntegerIntegerOctetStringNullObjectIdentifierOctetBitString OctetStringParsableOctetStringParsableOctetBitStringSequence SequenceOfSetOf)int_from_bytes int_to_bytesc&eZdZdZdefdefdefgZy)OtherPrimeInfo= Source: https://tools.ietf.org/html/rfc3447#page-46 primeexponent coefficientN__name__ __module__ __qualname____doc__r_fields@/opt/nydus/tmp/pip-target-a90h98xg/lib/python/asn1crypto/keys.pyr#r#-s( ' W  Gr/r#ceZdZdZeZy)OtherPrimeInfosr$N)r)r*r+r,r# _child_specr.r/r0r2r29s!Kr/r2ceZdZdZdddZy)RSAPrivateKeyVersionzX Original Name: Version Source: https://tools.ietf.org/html/rfc3447#page-45 z two-primemulti)rrNr)r*r+r,_mapr.r/r0r5r5As   Dr/r5c VeZdZdZdefdefdefdefdefdefdefd efd efd ed d ifg Zy) RSAPrivateKeyz= Source: https://tools.ietf.org/html/rfc3447#page-45 versionmoduluspublic_exponentprivate_exponentprime1prime2 exponent1 exponent2r'other_prime_infosoptionalTN)r)r*r+r,r5rr2r-r.r/r0r:r:Msh () G G$ W% 7 7 g g  o D/AB Gr/r:c eZdZdZdefdefgZy) RSAPublicKeyz= Source: https://tools.ietf.org/html/rfc3447#page-44 r<r=Nr(r.r/r0rFrF`s  G G$Gr/rFc8eZdZdZdefdefdefdefdefdefgZy) DSAPrivateKeya& 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 r;pqg public_key private_keyNr(r.r/r0rHrHks= G g g g w  Gr/rHc&eZdZdZedZdZy)_ECPointa  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. cBttjtj|ddz }ttjtj|ddz }t ||}d}|t ||z }|t ||z }||S)a 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  @)width)intmathceillogmaxr!)clsxyx_bytesy_bytes num_bytes byte_strings r0 from_coordsz_ECPoint.from_coordss diiA 456diiA 456)  |AY77 |AY77 ;r/c|j}|dd}|dk(r3|dd}t|dz}t|d|}t||d}||fS|tddgvrt t dt t d ) z Returns the X and Y coordinates for this EC point, as native Python integers :return: A 2-element tuple containing integers (X, Y) rrrSNrQzQ Invalid EC public key - first byte is incorrect z| Compressed representations of EC public keys are not supported due to patent US6252960 )nativelenr set ValueErrorr)selfdata first_byte remaining field_lenr[r\s r0 to_coordsz_ECPoint.to_coordss{{!AY   QRII!+Iy956Ay45Aq6M S'7!34 4V      r/N)r)r*r+r, classmethodrarnr.r/r0rOrOs   4  r/rOc eZdZy)ECPointNr)r*r+r.r/r0rqrqr/rqc eZdZy)ECPointBitStringNrrr.r/r0rurursr/ruceZdZdZddddZy)SpecifiedECDomainVersion: Source: http://www.secg.org/sec1-v2.pdf page 104 ecdpVer1ecdpVer2ecdpVer3)rrQNr7r.r/r0rwrws    Dr/rwceZdZdZdddZy) FieldTypezR Original Name: None Source: http://www.secg.org/sec1-v2.pdf page 101 prime_fieldcharacteristic_two_field)z1.2.840.10045.1.1z1.2.840.10045.1.2Nr7r.r/r0r~r~s +7 Dr/r~ceZdZdZddddZy)CharacteristicTwoBasiszR Original Name: None Source: http://www.secg.org/sec1-v2.pdf page 102 gn_basistp_basispp_basis)z1.2.840.10045.1.2.1.1z1.2.840.10045.1.2.1.2z1.2.840.10045.1.2.1.3Nr7r.r/r0rrs ",!+!+ Dr/rc&eZdZdZdefdefdefgZy) Pentanomial: Source: http://www.secg.org/sec1-v2.pdf page 102 k1k2k3Nr(r.r/r0rrs% w w wGr/rc6eZdZdZdefdefdefgZdZe ee dZ y)CharacteristicTwoz` Original Name: Characteristic-two Source: http://www.secg.org/sec1-v2.pdf page 101 mbasis parameters)rr)rrrN) r)r*r+r,rrrr- _oid_pairrr _oid_specsr.r/r0rrs? g () sG (IJr/rc.eZdZdZdefdefgZdZee dZ y)FieldIDz: Source: http://www.secg.org/sec1-v2.pdf page 100 field_typer)rr)rrN) r)r*r+r,r~rr-rrrrr.r/r0rrs4 y! sG -I$5Jr/rc,eZdZdZdefdefdeddifgZy)CurverxabseedrDTN)r)r*r+r,rrr-r.r/r0rr$s/ k k *d!34Gr/rc JeZdZdZdefdefdefdefdefdedd ifd e dd ifgZ y ) SpecifiedECDomainz: Source: http://www.secg.org/sec1-v2.pdf page 103 r;field_idcurvebaseordercofactorrDThashN) r)r*r+r,rwrrrqrr r-r.r/r0rr0sW ,- W %  ' Wz401 :t"45Gr/rceZdZdZidddddddd d d d d ddddddddddddddddddd d!d"d#id$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;dd?d@dAdBdCdDdEidFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgidhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddddddddddZiddddddddd dd dddddddddddddddddddd dd"did$dd&dd(dd*dd,dd.dd0dd2dd4dd6dd8dd:dddd@ddBddDdidFddHddJddLddNddPddRddTddVddXddZdd\dd^dd`ddbdddddfdidhddjddlddnddpddrddtddvddxddzdd|dd~ddddddddddddddddZedZy) NamedCurvez Various named curves Original Name: None Source: https://tools.ietf.org/html/rfc3279#page-23, https://tools.ietf.org/html/rfc5480#page-5 z1.2.840.10045.3.0.1 c2pnb163v1z1.2.840.10045.3.0.2 c2pnb163v2z1.2.840.10045.3.0.3 c2pnb163v3z1.2.840.10045.3.0.4 c2pnb176w1z1.2.840.10045.3.0.5 c2tnb191v1z1.2.840.10045.3.0.6 c2tnb191v2z1.2.840.10045.3.0.7 c2tnb191v3z1.2.840.10045.3.0.8 c2onb191v4z1.2.840.10045.3.0.9 c2onb191v5z1.2.840.10045.3.0.10 c2pnb208w1z1.2.840.10045.3.0.11 c2tnb239v1z1.2.840.10045.3.0.12 c2tnb239v2z1.2.840.10045.3.0.13 c2tnb239v3z1.2.840.10045.3.0.14 c2onb239v4z1.2.840.10045.3.0.15 c2onb239v5z1.2.840.10045.3.0.16 c2pnb272w1z1.2.840.10045.3.0.17 c2pnb304w1z1.2.840.10045.3.0.18 c2tnb359v1z1.2.840.10045.3.0.19 c2pnb368w1z1.2.840.10045.3.0.20 c2tnb431r1z1.2.840.10045.3.1.2 prime192v2z1.2.840.10045.3.1.3 prime192v3z1.2.840.10045.3.1.4 prime239v1z1.2.840.10045.3.1.5 prime239v2z1.2.840.10045.3.1.6 prime239v3z1.2.840.10045.3.1.1 secp192r1z1.2.840.10045.3.1.7 secp256r1z 1.3.132.0.1 sect163k1z 1.3.132.0.2 sect163r1z 1.3.132.0.3 sect239k1z 1.3.132.0.4 sect113r1z 1.3.132.0.5 sect113r2z 1.3.132.0.6 secp112r1z 1.3.132.0.7 secp112r2z 1.3.132.0.8 secp160r1z 1.3.132.0.9 secp160k1z 1.3.132.0.10 secp256k1z 1.3.132.0.15 sect163r2z 1.3.132.0.16 sect283k1z 1.3.132.0.17 sect283r1z 1.3.132.0.22 sect131r1z 1.3.132.0.23 sect131r2z 1.3.132.0.24 sect193r1z 1.3.132.0.25 sect193r2z 1.3.132.0.26 sect233k1z 1.3.132.0.27 sect233r1z 1.3.132.0.28 secp128r1z 1.3.132.0.29 secp128r2z 1.3.132.0.30 secp160r2z 1.3.132.0.31 secp192k1z 1.3.132.0.32 secp224k1z 1.3.132.0.33 secp224r1z 1.3.132.0.34 secp384r1z 1.3.132.0.35 secp521r1z 1.3.132.0.36 sect409k1z 1.3.132.0.37 sect409r1z 1.3.132.0.38 sect571k1z 1.3.132.0.39 sect571r1z1.3.36.3.3.2.8.1.1.1brainpoolp160r1z1.3.36.3.3.2.8.1.1.2brainpoolp160t1z1.3.36.3.3.2.8.1.1.3brainpoolp192r1z1.3.36.3.3.2.8.1.1.4brainpoolp192t1z1.3.36.3.3.2.8.1.1.5brainpoolp224r1z1.3.36.3.3.2.8.1.1.6brainpoolp224t1z1.3.36.3.3.2.8.1.1.7brainpoolp256r1z1.3.36.3.3.2.8.1.1.8brainpoolp256t1z1.3.36.3.3.2.8.1.1.9brainpoolp320r1z1.3.36.3.3.2.8.1.1.10brainpoolp320t1brainpoolp384r1brainpoolp384t1brainpoolp512r1brainpoolp512t1)z1.3.36.3.3.2.8.1.1.11z1.3.36.3.3.2.8.1.1.12z1.3.36.3.3.2.8.1.1.13z1.3.36.3.3.2.8.1.1.14!%-5 $0B34H(@cv||j|<|j||j|<||j|<y)a Registers a new named elliptic curve that is not included in the default list of named curves :param name: A unicode string of the curve name :param oid: A unicode string of the dotted format OID :param key_size: An integer of the number of bytes the private key should be encoded to N)r8 _reverse_map _key_sizes)rZnameoidkey_sizes r0registerzNamedCurve.registers;"    '%(C  T "&sr/N)r)r*r+r,r8rror r.r/r0rr@sM |M  |M  | M  | M  | M  |M  |M  |M  |M   M   M   M   M   M   !M "  #M $  %M &  'M (  )M *  +M , |-M . |/M 0 |1M 2 |3M 4 |5M : {;M < {=M > {?M @ {AM B {CM D {EM F {GM H {IM J {KM L {MM N {OM P  QM R  SM T  UM V  WM X  YM Z  [M \  ]M ^  _M `  aM b  cM d  eM f  gM h  iM j  kM l  mM n  oM p  qM r  sM t  uM v  wM x  yM z  {M ~  1M @  1AM B  1CM D  1EM F  1GM H  1IM J  1KM L  1MM N  1OM P !2QM R"3!2!2!2YM D^Q rQ r Q r Q r Q rQ rQ rQ rQ rQ Q Q Q Q !Q" #Q$ %Q& 'Q( )Q* +Q, -Q. r/Q0 r1Q2 r3Q4 r5Q6 r7Q> r?Q@ rAQB rCQD rEQF rGQH rIQJ rKQL rMQN rOQP rQQR rSQT UQV WQX YQZ [Q\ ]Q^ _Q` aQb cQd eQf gQh iQj kQl mQn oQp qQr sQt uQv wQx yQz {Q| }Q~ QF GQH IQJ KQL MQN OQP QQR SQT UQV WQX YQZ"$!#!#!#aQJf''r/rc6eZdZdZdefdefdefgZedZ y)ECDomainParametersr specifiednamed implicit_cac|jdk(rttd|jdk(rE|jdj}t j t j|ddz S|jj}|tjvrttdt|tj|S)Nrz Unable to calculate key_size from ECDomainParameters that are implicitly defined by the CA key rrg@rRz The asn1crypto.keys.NamedCurve %s does not have a registered key length, please call asn1crypto.keys.NamedCurve.register() ) rrhrchosenrerVrWrXdottedrrrepr)rirr s r0r zECDomainParameters.key_size s 99 %V  99 #KK(//E99TXXeS1C78 8kk   j++ +VS  $$S))r/N) r)r*r+r,rrr _alternativespropertyr r.r/r0r r s= '( * M **r/r ceZdZdZddiZy)ECPrivateKeyVersionzR Original Name: None Source: http://www.secg.org/sec1-v2.pdf page 108 r ecPrivkeyVer1Nr7r.r/r0rr's ? Dr/rc^eZdZdZdefdefdedddfded ddfgZd Z fd Z d Z d Z xZ S) ECPrivateKeyz: Source: http://www.secg.org/sec1-v2.pdf page 108 r;rMrrT)explicitrDrLrNctt| ||}|dk(r|jV|dj}t |t rSt|dkDrE|jt|dj|S|j|j|S|dk(rCt |dtr0|djdk7r|j|dj|S)NrMrrr) superr __setitem__ _key_sizecontents isinstancer rf set_key_size_update_key_sizer rr )rikeyvalueres pkey_contents __class__s r0rzECPrivateKey.__setitem__BsL$3C? - ~~% $] 3 < < mX63};MPQ;Q%%c$}*=*F*F&GH +%%'  L Z\0BDV%W\"''=8   d<099 : r/c2||_|jy)z Sets the key_size to ensure the private key is encoded to the proper length :param key_size: An integer byte length to encode the private_key to N)r r$)rir s r0r#zECPrivateKey.set_key_sizeUs" r/c|j3t|dtr|dj|jyyy)zG Ensure the private_key explicit encoding width is set NrM)r r"rset_encoded_widthris r0r$zECPrivateKey._update_key_size`s= >> %*T-5HJ\*]   1 1$.. A+^ %r/)r)r*r+r,rrr rur-r rr#r$ __classcell__r)s@r0rr2sZ '( *+ )t+LM 'aT)JK GI&  Br/rc&eZdZdZdefdefdefgZy) DSAParamsz Parameters for a DSA public or private key Original Name: Dss-Parms Source: https://tools.ietf.org/html/rfc3279#page-9 rIrJrKNr(r.r/r0r1r1is% g g gGr/r1c&eZdZdZdefdedeifgZy) Attributezq Source: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.501-198811-S!!PDF-E&type=items page 8 typevaluesspecN)r)r*r+r,rrrr-r.r/r0r3r3xs' !" 563-(Gr/r3ceZdZdZeZy) Attributes< Source: https://tools.ietf.org/html/rfc5208#page-3 N)r)r*r+r,r3r3r.r/r0r8r8sKr/r8c &eZdZdZdddddddd d Zy ) PrivateKeyAlgorithmIdz 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 rsa rsassa_pssdsaecx25519x448ed25519ed448)1.2.840.113549.1.1.11.2.840.113549.1.1.101.2.840.10040.4.11.2.840.10045.2.1 1.3.101.110 1.3.101.111 1.3.101.112 1.3.101.113Nr7r.r/r0r;r;s(!&!-"!  Dr/r;c6eZdZdZdefdeddifgZdZee e dZ y) PrivateKeyAlgorithmzm Original Name: PrivateKeyAlgorithmIdentifier Source: https://tools.ietf.org/html/rfc5208#page-3 algorithmrrDTrNr)r>r?r=N) r)r*r+r,r;rr-rr1r rrr.r/r0rMrMs? +, sZ./G ,I %Jr/rMceZdZdZdefdefdefdedddfgZd Z de iZ d Z d Z d Z d Zed Zfd Zd ZedZedZedZedZedZedZedZedZxZS)PrivateKeyInfor9r;private_key_algorithmrM attributesrT)implicitrDc |ddj}ttttttttd|S)NrRrN)r<r=r>r?r@rArBrC)rer:rrrrirNs r0_private_key_specz PrivateKeyInfo._private_key_specsF01+>EE  '""      r/Nct|ts.t|tstt dt ||dk(s|dk(r0t|t st j|}t}n|dk(rRt|tstj|}t}|d|d<|d|d<|d|d<|d}|d }nb|d k(r?t|tstj|}n|j}|d }|d =ntt d t|t}t!||d <||d <|}||_t%d|d<||d<||d <|dk(r|_|S)a' 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 zX private_key must be a byte string or Asn1Value, not %s r<r=r>rIrJrKrLrMr?rzU algorithm must be one of "rsa", "dsa", "ec", not %s rNrr;rR)r"r r TypeErrorrr r:loadrrHr1rcopyrhrrMr; _algorithmr _public_key)rZrMrNparamsrLprivate_key_algo containers r0wrapzPrivateKeyInfo.wraps+x0KQZ9[F+&    l!:k=9+00= VF % k=9+00= [F%c*F3K%c*F3K%c*F3K$\2J%m4K $ k<8*// < )..0  .FL)VY  /0(=i(H%)/&E ( &qz )-= )*#. -   $.I !r/crtt| ||}|d}|dk(s|dk(r|djdk(rt |dt rm|dj dk7r[t |dtrHt |djtr+|djj|dj|S)NrRrMrNr?rr) rrQrrer"r rrparsedrr#r )rir%r&r'rNr)s r0rzPrivateKeyInfo.__setitem__"sND5c5A01  * *c].B+&--59\24FG,',, =4 .0CD4 .55|D   & & 3 3Il4K4T4T U r/ctd)z Unwraps the private key into an RSAPrivateKey, DSAPrivateKey or ECPrivateKey object :return: An RSAPrivateKey, DSAPrivateKey or ECPrivateKey object zxasn1crypto.keys.PrivateKeyInfo().unwrap() has been removed, please use oscrypto.asymmetric.PrivateKey().unwrap() insteadr r-s r0rzPrivateKeyInfo.unwrap3s KL Lr/c|jdk7r-ttd|jj|dd}|j}|j dk(rd}n |j }|j |fS)# 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. r?K Only EC keys have a curve, this key is %s rRrrNrNrhrupperrrrerir^rr&s r0rzPrivateKeyInfo.curve@s >>T !V$$&  -.|< ;;- 'EMME U##r/c|jdk7r-ttd|jjt j |dddj ddz }|dkrd Sd S) z 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" r>t Only DSA keys are generated using a hash algorithm, this key is %s rRrrJrQrsha1sha2)rNrhrrjrVrXre)ribyte_lens r0 hash_algozPrivateKeyInfo.hash_algobs{ >>U "V$$&  88D!89,GLSSUVWZ[[!Rv3V3r/c`|j|ddj|_|jS)] :return: A unicode string of "rsa", "rsassa_pss", "dsa" or "ec" rRrNr\rer-s r0rNzPrivateKeyInfo.algorithm|s0 ?? ""#:;KHOODOr/c|j|jdk(s|jdk(r|djdj}nP|jdk(r|dddj}n+|jd k(r|djdj}t t j t jd |_|jd z}|d k7r|xjd |z z c_|jS) zU :return: The bit size of the private key, as an integer r<r=rMr<r>rRrrIr?rQrnr) _bit_sizerNrcrerUrVrWrXrir%r<s r0bit_sizezPrivateKeyInfo.bit_sizes >> !~~&$..L*H]+229=DD5(45lCCHOO4']+22=AHH 488E1+=!>?DNnnq(G!|!g+-~~r/cXttj|jdz S)zV :return: The byte size of the private key, as an integer rnrUrVrWryr-s r0 byte_sizezPrivateKeyInfo.byte_size!499T]]Q./00r/ctd)z :return: If an RSA key, an RSAPublicKey object. If a DSA key, an Integer object. If an EC key, an ECPointBitString object. zasn1crypto.keys.PrivateKeyInfo().public_key has been removed, please use oscrypto.asymmetric.PrivateKey().public_key.unwrap() insteadrer-s r0rLzPrivateKeyInfo.public_keys VW Wr/ctd)z\ :return: A PublicKeyInfo object derived from this private key. zasn1crypto.keys.PrivateKeyInfo().public_key_info has been removed, please use oscrypto.asymmetric.PrivateKey().public_key.asn1 insteadrer-s r0public_key_infozPrivateKeyInfo.public_key_infos RS Sr/ctd)aY 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) z~asn1crypto.keys.PrivateKeyInfo().fingerprint has been removed, please use oscrypto.asymmetric.PrivateKey().fingerprint insteadrer-s r0 fingerprintzPrivateKeyInfo.fingerprints NO Or/)r)r*r+r,rrMrr8r-rW_spec_callbacksr\rwr] _fingerprintrorarrrrrrrNryr|rLrrr.r/s@r0rQrQs+ G "56 +, zt#DE G  (OJIKLAAJ" L$$B442&11 W WSSOOr/rQc eZdZdZdefdefgZy)EncryptedPrivateKeyInfoz< Source: https://tools.ietf.org/html/rfc5208#page-4 encryption_algorithmencrypted_dataN)r)r*r+r,rrr-r.r/r0rrs! !45 ;'Gr/rc eZdZdZdefdefgZy)ValidationParms= Source: https://tools.ietf.org/html/rfc3279#page-10 r pgen_counterN)r)r*r+r,rrr-r.r/r0rrs   !Gr/rc>eZdZdZdefdefdefdeddifdeddifgZy ) DomainParametersrrIrKrJjrDTvalidation_paramsN)r)r*r+r,rrr-r.r/r0rrsC g g g g D)* o D/AB Gr/rc *eZdZdZdddddddd d d d Zy )PublicKeyAlgorithmIdzM Original Name: None Source: https://tools.ietf.org/html/rfc3279 r< rsaes_oaepr=r>r?dhr@rArBrC) rDz1.2.840.113549.1.1.7rErFrGz1.2.840.10046.2.1rHrIrJrKNr7r.r/r0rrs.!& ,!-"!! # Dr/rc:eZdZdZdefdeddifgZdZee e e e dZ y) PublicKeyAlgorithmzd Original Name: AlgorithmIdentifier Source: https://tools.ietf.org/html/rfc5280#page-18 rNrrDTrO)r>r?rrr=N)r)r*r+r,rrr-rr1r rrrrr.r/r0rrsE *+ sZ./G ,I %% Jr/rceZdZdZdefdefgZdZdeiZdZ dZ dZ dZ dZ edZdZedZed Zed Zed Zed Zed ZedZedZy) PublicKeyInfoze Original Name: SubjectPublicKeyInfo Source: https://tools.ietf.org/html/rfc5280#page-17 rNrLc |ddj}tttttdfttdftdftdftdfd |S)NrN) r<rr=r>r?rr@rArBrC)rerFrrurrVs r0_public_key_speczPublicKeyInfo._public_key_spec/sf%k299 &&$T*&t,#T*&-$d+   r/Nct|ts.t|tstt dt ||dk7r#|dk7rt t dt|t}t||d<t|d<|}||d<t|tr|jj}t||d<|S)a 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 zW public_key must be a byte string or Asn1Value, not %s r<r=z> algorithm must "rsa", not %s rNrrL)r"r rrYrr rhrrrruntagdumpr)rZrLrNalgor`s r0razPublicKeyInfo.wrapLs*h/ :y8YF*%    )|";VY  "#0;[!V\E !% + j) ,#))+002J"8"D ,r/ctd)z 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 zvasn1crypto.keys.PublicKeyInfo().unwrap() has been removed, please use oscrypto.asymmetric.PublicKey().unwrap() insteadrer-s r0rzPublicKeyInfo.unwrapws JK Kr/c|jdk7r-ttd|jj|dd}|j}|j dk(rd}n |j }|j |fS)rgr?rhrNrrNrirks r0rzPublicKeyInfo.curves~ >>T !V$$&  k"<0 ;;- 'EMME U##r/c|jdk7r-ttd|jj|dd}|jyt j |djddz }|d krd Sd S) a# 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 r>rmrNrNrJrQrnrrorp)rNrhrrjrerVrX)rirrqs r0rrzPublicKeyInfo.hash_algos >>U "V$$&  +&|4    $88JsO22A6:!Rv3V3r/c`|j|ddj|_|jS)rtrNrur-s r0rNzPublicKeyInfo.algorithms/ ?? "";/ <CCDOr/cL|j |jdk(r;tt|djdz dz dz|_|jS|jdk(s|jdk(r|dj dj}n$|jd k(r|d d d j}tt jt jd|_|jdz}|d k7r|xjd|z z c_|jS)zT :return: The bit size of the public key, as an integer r?rLrrQrnr<r=r<r>rNrrIr) rwrNrUrfrercrVrWrXrxs r0ryzPublicKeyInfo.bit_sizes >> !~~%!$s4 +=+D+D'E'IQ&NRS%S!T~~>>U*dnn .L .55i@GGE^^u, -l;C@GGE!$TYYtxxq/A%B!C..1,a<NNa'k1N~~r/cXttj|jdz S)zU :return: The byte size of the public key, as an integer rnr{r-s r0r|zPublicKeyInfo.byte_sizer}r/c|j4tjt|dj |_|jS)ze :return: The SHA1 hash of the DER-encoded bytes of this public key info rL)_sha1hashlibror digestr-s r0rozPublicKeyInfo.sha1s; ::  htL/A&BCJJLDJzzr/c|j4tjt|dj |_|jS)zh :return: The SHA-256 hash of the DER-encoded bytes of this public key info rL)_sha256rsha256r rr-s r0rzPublicKeyInfo.sha256s; << ">>(4 3E*FGNNPDL||r/ctd)aZ 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) z|asn1crypto.keys.PublicKeyInfo().fingerprint has been removed, please use oscrypto.asymmetric.PublicKey().fingerprint insteadrer-s r0rzPublicKeyInfo.fingerprints MN Nr/)r)r*r+r,rrr-rrr\rwrrrrorarrrrrrNryr|rorrr.r/r0rr$s  () -.G ( &OJIL EG((T K$$B44<*11NNr/r)Hr, __future__rrrrrrV_errorsrr _typesr r algosr r rrrcorerrrrrrrrrrrrrrrutilr r!r#r2r5r:rFrHrOrqrurwr~rrrrrrrr rrr1r3r8r;rMrQrrrrrrr.r/r0rs SR )'oo"/ X !j! 7 H&8H(C C L k8  ~x w   -  ( (h" H    '!'D"*"*J'4B84Bn  ,4.&SOXSOlhh x +6-x*qNHqNr/