/opt/imunify360/venv/lib/python3.11/site-packages/Crypto/PublicKey/__pycache__
NameSizeModeActions
DSA.cpython-311.pyc305080644editdlrm
ECC.cpython-311.pyc770760644editdlrm
ElGamal.cpython-311.pyc113410644editdlrm
RSA.cpython-311.pyc355940644editdlrm
_openssh.cpython-311.pyc59240644editdlrm
__init__.cpython-311.pyc31800644editdlrm
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/PublicKey/__pycache__/RSA.cpython-311.pyc (35594B)
§ QÉ Šb—/ãóè—gd¢ZddlZddlZddlmZddlmZmZmZddl m Z m Z ddl m Z ddlmZmZmZddlmZmZmZGd „d e¦«Zdd „Zdd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z dd„Z!e!Z"dZ#dS))ÚgenerateÚ constructÚ import_keyÚRsaKeyÚoidéN)ÚRandom)ÚtobytesÚbordÚtostr)Ú DerSequenceÚDerNull)ÚInteger)Útest_probable_primeÚgenerate_probable_primeÚ COMPOSITE)Ú_expand_subject_public_key_infoÚ_create_subject_public_key_infoÚ _extract_subject_public_key_infocó€—eZdZdZd„Zed„¦«Zed„¦«Zed„¦«Zed„¦«Z ed„¦«Z ed„¦«Z ed „¦«Z ed „¦«Z ed „¦«Zed „¦«Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d%d„ZeZeZd„Z d„Z!d „Z"d!„Z#d"„Z$d#„Z%d$„Z&dS)&raôClass defining an actual RSA key. Do not instantiate directly. Use :func:`generate`, :func:`construct` or :func:`import_key` instead. :ivar n: RSA modulus :vartype n: integer :ivar e: RSA public exponent :vartype e: integer :ivar d: RSA private exponent :vartype d: integer :ivar p: First factor of the RSA modulus :vartype p: integer :ivar q: Second factor of the RSA modulus :vartype q: integer :ivar invp: Chinese remainder component (:math:`p^{-1} \text{mod } q`) :vartype invp: integer :ivar invq: Chinese remainder component (:math:`q^{-1} \text{mod } p`) :vartype invq: integer :ivar u: Same as ``invp`` :vartype u: integer :undocumented: exportKey, publickey c óŠ—t| ¦«¦«}td¦«}|td¦«z}|||fvrtd¦«‚| ¦«D]\}}t |d|z|¦«Œ||kr7|j|jdz z|_|j|jdz z|_ d|_ dSdS)a.Build an RSA key. :Keywords: n : integer The modulus. e : integer The public exponent. d : integer The private exponent. Only required for private keys. p : integer The first factor of the modulus. Only required for private keys. q : integer The second factor of the modulus. Only required for private keys. u : integer The CRT coefficient (inverse of p modulo q). Only required for private keys. ©ÚnÚe)ÚpÚqÚdÚuzSome RSA components are missingÚ_éN) ÚsetÚkeysÚ ValueErrorÚitemsÚsetattrÚ_dÚ_pÚ_dpÚ_qÚ_dqÚ_invq)ÚselfÚkwargsÚ input_setÚ public_setÚ private_setÚ componentÚvalues úv/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/PublicKey/RSA.pyÚ__init__zRsaKey.__init__SsÑ€õ&˜Ÿ š ™ œ Ñ&Ô&ˆ ݘ‘_”_ˆ Ø ¥3Ð';Ñ#<Ô#<Ñ<ˆ Ø ˜[¨*Ð5Ð 5Ð 5ÝÐ>Ñ?Ô?Ð ?Ø &§ ¢ ¡¤ð 2ð 2Ñ ˆI�uÝ �D˜#  ™/¨5Ñ 1Ô 1Ð 1Ð 1Ø ˜ Ò #Ð #Ø”w $¤'¨A¡+Ñ.ˆDŒHØ”w $¤'¨A¡+Ñ.ˆDŒH؈DŒJˆJˆJð $Ð #ócó*—t|j¦«S©N)ÚintÚ_n©r+s r2rzRsaKey.nró€å�4”7‰|Œ|Ðr4có*—t|j¦«Sr6)r7Ú_er9s r2rzRsaKey.evr:r4cóp—| ¦«std¦«‚t|j¦«S)Nz-No private exponent available for public keys)Ú has_privateÚAttributeErrorr7r%r9s r2rzRsaKey.dzs4€à×ÒÑ!Ô!ð RÝ Ð!PÑQÔQÐ QÝ�4”7‰|Œ|Ðr4cóp—| ¦«std¦«‚t|j¦«S)Nz.No CRT component 'p' available for public keys)r>r?r7r&r9s r2rzRsaKey.p€ó4€à×ÒÑ!Ô!ð SÝ Ð!QÑRÔRÐ RÝ�4”7‰|Œ|Ðr4cóp—| ¦«std¦«‚t|j¦«S)Nz.No CRT component 'q' available for public keys)r>r?r7r(r9s r2rzRsaKey.q†rAr4cóp—| ¦«std¦«‚t|j¦«S)Nz/No CRT component 'dp' available for public keys)r>r?r7r'r9s r2Údpz RsaKey.dpŒó4€à×ÒÑ!Ô!ð TÝ Ð!RÑSÔSÐ SÝ�4”8‰}Œ}Ðr4cóp—| ¦«std¦«‚t|j¦«S)Nz/No CRT component 'dq' available for public keys)r>r?r7r)r9s r2Údqz RsaKey.dq’rEr4cóÆ—| ¦«std¦«‚|j€$|j |j¦«|_t |j¦«S)Nz1No CRT component 'invq' available for public keys)r>r?r*r(Úinverser&r7r9s r2Úinvqz RsaKey.invq˜sS€à×ÒÑ!Ô!ð VÝ Ð!TÑUÔUÐ UØ Œ:Ð ØœŸš¨¬Ñ1Ô1ˆDŒJÝ�4”:‰ŒÐr4có—|jSr6)rr9s r2Úinvpz RsaKey.invp s €àŒvˆ r4cóp—| ¦«std¦«‚t|j¦«S)Nz.No CRT component 'u' available for public keys)r>r?r7Ú_ur9s r2rzRsaKey.u¤rAr4có4—|j ¦«S)zSize of the RSA modulus in bits©r8Ú size_in_bitsr9s r2rQzRsaKey.size_in_bitsªs€àŒw×#Ò#Ñ%Ô%Ð%r4cóF—|j ¦«dz dzdzS)z9The minimal amount of bytes that can hold the RSA modulusrérPr9s r2Ú size_in_byteszRsaKey.size_in_bytes®s%€à”×$Ò$Ñ&Ô&¨Ñ*¨qÑ0°1Ñ4Ð4r4có²—d|cxkr |jksntd¦«‚ttt |¦«|j|j¦«¦«S)NrzPlaintext too large)r8r"r7Úpowrr<)r+Ú plaintexts r2Ú_encryptzRsaKey._encrypt²sX€Ø�IÐ'Ð'Ò'Ð' ¤Ò'Ð'Ð'Ð'ÝÐ2Ñ3Ô3Ð 3Ý•3•w˜yÑ)Ô)¨4¬7°D´GÑ<Ô<Ñ=Ô=Ð=r4có„—d|cxkr |jksntd¦«‚| ¦«std¦«‚t jd|j¬¦«}t |¦«t ||j|j¦«z|jz}t ||j|j ¦«}t ||j |j ¦«}||z |j z|j z}||j z|z}|  |j¦«|z|jz}|t ||j|j¦«krtd¦«‚|S)NrzCiphertext too largezThis is not a private keyr)Ú min_inclusiveÚ max_exclusivez Fault detected in RSA decryption)r8r"r>Ú TypeErrorrÚ random_rangerVr<r'r&r)r(rNrI) r+Ú ciphertextÚrÚcpÚm1Úm2ÚhÚmpÚresults r2Ú_decryptzRsaKey._decrypt·s6€Ø�JÐ(Ð(Ò(Ð( ¤Ò(Ð(Ð(Ð(ÝÐ3Ñ4Ô4Ð 4Ø×ÒÑ!Ô!ð 9ÝÐ7Ñ8Ô8Ð 8õ Ô ¨qÀÄÐ HÑ HÔ Hˆå �ZÑ Ô ¥3 q¨$¬'°4´7Ñ#;Ô#;Ñ ;¸d¼gÑ Eˆå ��T”X˜tœwÑ 'Ô 'ˆÝ ��T”X˜tœwÑ 'Ô 'ˆØ�2‰g˜œÑ  D¤GÑ +ˆØ �”‰[˜2Ñ ˆà—)’)˜DœGÑ$Ô$ rÑ)¨T¬WÑ4ˆà �˜V T¤W¨d¬gÑ6Ô6Ò 6Ð 6ÝÐ?Ñ@Ô@Ð @؈ r4có"—t|d¦«S)z"Whether this is an RSA private keyr%)Úhasattrr9s r2r>zRsaKey.has_privateÏs€õ�t˜TÑ"Ô"Ð"r4có—dS©NT©r9s r2Ú can_encryptzRsaKey.can_encryptÔó€Øˆtr4có—dSrjrkr9s r2Úcan_signzRsaKey.can_sign×rmr4có8—t|j|j¬¦«S)z^A matching RSA public key. Returns: a new :class:`RsaKey` object r)rr8r<r9s r2Ú public_keyzRsaKey.public_keyÚs€õ ˜œ 4¤7Ð+Ñ+Ô+Ð+r4cóê—| ¦«| ¦«krdS|j|jks|j|jkrdS| ¦«sdS|j|jkS)NFT)r>rrr©r+Úothers r2Ú__eq__z RsaKey.__eq__âst€Ø × Ò Ñ Ô  ×!2Ò!2Ñ!4Ô!4Ò 4Ð 4Ø�5Ø Œ6�U”WÒ Ð  ¤¨%¬'Ò 1Ð 1Ø�5Ø×ÒÑ!Ô!ð Ø�4Ø”˜%œ'Ò!Ð"r4có—||k Sr6rkrss r2Ú__ne__z RsaKey.__ne__ës€Ø˜E’MÐ"Ð"r4có—ddlm}|‚)Nr)Ú PicklingError)Úpicklery)r+rys r2Ú __getstate__zRsaKey.__getstate__îs€à(Ð(Ð(Ð(Ð(Ð(ØÐr4có*—| ¦«rRdt|j¦«t|j¦«t|j¦«t|j¦«fz}nd}dt|j¦«t|j¦«|fzS)Nz, d=%d, p=%d, q=%d, u=%dÚzRsaKey(n=%d, e=%d%s))r>r7r%r&r(rNr8r<)r+Úextras r2Ú__repr__zRsaKey.__repr__ós{€Ø × Ò Ñ Ô ð Ø.µ#°d´g±,´,ÅÀDÄGÁ Ä Ý25°d´g±,´,ÅÀDÄGÁ Ä ð2NñNˆEˆEðˆEØ%­¨T¬W©¬µs¸4¼7±|´|ÀUÐ(KÑKÐKr4có\—| ¦«rd}nd}d|t|¦«fzS)NÚPrivateÚPublicz%s RSA key at 0x%X)r>Úid)r+Úkey_types r2Ú__str__zRsaKey.__str__ûs8€Ø × Ò Ñ Ô ð Ø ˆHˆHàˆHØ# xµ°D±´Ð&:Ñ:Ð:r4ÚPEMNrc óò—|�t|¦«}|€ tj}|dkr˜d„|j|jfD¦«\}}t |d¦«dzrd|z}t |d¦«dzrd|z}d||g}d d „|D¦«¦«} d tj| ¦«dd …zS|  ¦«�rtd|j |j |j |j|j|j |jd z z|j |jd z zt!|j¦« |j¦«g ¦« ¦«} |d krd } |dkr|rt'd¦«‚n¬ddlm} |dkr/|€-d} |  | t.dt1¦«¬¦«} nqd} |sd}|  | t.||t1¦«¬¦«} d}n=d} t3t.t|j |j g¦«t1¦«¦«} |dkr| S|dkr-ddlm} |  | | ||¦«}t|¦«St'd|z¦«‚)a% Export this RSA key. Args: format (string): The format to use for wrapping the key: - *'PEM'*. (*Default*) Text encoding, done according to `RFC1421`_/`RFC1423`_. - *'DER'*. Binary encoding. - *'OpenSSH'*. Textual encoding, done according to OpenSSH specification. Only suitable for public keys (not private keys). passphrase (string): (*For private keys only*) The pass phrase used for protecting the output. pkcs (integer): (*For private keys only*) The ASN.1 structure to use for serializing the key. Note that even in case of PEM encoding, there is an inner ASN.1 DER structure. With ``pkcs=1`` (*default*), the private key is encoded in a simple `PKCS#1`_ structure (``RSAPrivateKey``). With ``pkcs=8``, the private key is encoded in a `PKCS#8`_ structure (``PrivateKeyInfo``). .. note:: This parameter is ignored for a public key. For DER and PEM, an ASN.1 DER ``SubjectPublicKeyInfo`` structure is always used. protection (string): (*For private keys only*) The encryption scheme to use for protecting the private key. If ``None`` (default), the behavior depends on :attr:`format`: - For *'DER'*, the *PBKDF2WithHMAC-SHA1AndDES-EDE3-CBC* scheme is used. The following operations are performed: 1. A 16 byte Triple DES key is derived from the passphrase using :func:`Crypto.Protocol.KDF.PBKDF2` with 8 bytes salt, and 1 000 iterations of :mod:`Crypto.Hash.HMAC`. 2. The private key is encrypted using CBC. 3. The encrypted key is encoded according to PKCS#8. - For *'PEM'*, the obsolete PEM encryption scheme is used. It is based on MD5 for key derivation, and Triple DES for encryption. Specifying a value for :attr:`protection` is only meaningful for PKCS#8 (that is, ``pkcs=8``) and only if a pass phrase is present too. The supported schemes for PKCS#8 are listed in the :mod:`Crypto.IO.PKCS8` module (see :attr:`wrap_algo` parameter). randfunc (callable): A function that provides random bytes. Only used for PEM encoding. The default is :func:`Crypto.Random.get_random_bytes`. Returns: byte string: the encoded key Raises: ValueError:when the format is unknown or when you try to encrypt a private key with *DER* format and PKCS#1. .. warning:: If you don't provide a pass phrase, the private key will be exported in the clear! .. _RFC1421: http://www.ietf.org/rfc/rfc1421.txt .. _RFC1423: http://www.ietf.org/rfc/rfc1423.txt .. _`PKCS#1`: http://www.ietf.org/rfc/rfc3447.txt .. _`PKCS#8`: http://www.ietf.org/rfc/rfc5208.txt NÚOpenSSHcó6—g|]}| ¦«‘ŒSrk)Úto_bytes©Ú.0Úxs r2ú z%RsaKey.export_key..Vs €ÐIÐIÐI° § ¢ ¡ ¤ ÐIÐIÐIr4ré€ósssh-rsar4cóX—g|]'}tjdt|¦«¦«|z‘Œ(S)ú>I)ÚstructÚpackÚlen)rŒÚkps r2rŽz%RsaKey.export_key..\s/€Ð!UÐ!UÐ!UÀb¥&¤+¨dµC¸±G´GÑ"<Ô"<¸rÑ"AÐ!UÐ!UÐ!Ur4óssh-rsa éÿÿÿÿrzRSA PRIVATE KEYÚDERz&PKCS#1 private key cannot be encrypted©ÚPKCS8r†z PRIVATE KEY)Ú key_paramszENCRYPTED PRIVATE KEYz"PBKDF2WithHMAC-SHA1AndDES-EDE3-CBCz PUBLIC KEY©r†z3Unknown key format '%s'. Cannot export the RSA key.)r rÚget_random_bytesr<r8r ÚjoinÚbinasciiÚ b2a_base64r>r rrrrrrrIÚencoder"Ú Crypto.IOr›Úwraprr rr†)r+ÚformatÚ passphraseÚpkcsÚ protectionÚrandfuncÚe_bytesÚn_bytesÚkeypartsÚ keystringÚ binary_keyr„r›r†Úpem_strs r2Ú export_keyzRsaKey.export_keysÖ€ðZ Ð !Ý  Ñ,Ô,ˆJà Ð ÝÔ.ˆHà �YÒ Ð ØIÐI°t´wÀÄÐ6HÐIÑIÔIÑ ˆG�WÝ�G˜A”JÑÔ $Ñ&ð ,Ø! GÑ+�Ý�G˜A”JÑÔ $Ñ&ð ,Ø! GÑ+�Ø" G¨WÐ5ˆHØŸšÐ!UÐ!UÈHÐ!UÑ!UÔ!UÑVÔVˆIØ¥Ô!4°YÑ!?Ô!?ÀÀÀÔ!DÑDÐ Dð × Ò Ñ Ô ñ$ ;Ý$ aØ&*¤fØ&*¤fØ&*¤fØ&*¤fØ&*¤fØ&*¤f°´°q±Ñ&9Ø&*¤f°´°q±Ñ&9Ý&-¨d¬f¡o¤o×&=Ò&=¸d¼fÑ&EÔ&Eð &(ñ )ô )÷*0ª©¬ð ð�qŠyˆyØ,�ؘU’?�? z�?Ý$Ð%MÑNÔNÐNøà+Ð+Ð+Ð+Ð+Ð+à˜U’?�? zÐ'9Ø,�HØ!&§¢¨J½¸TÝ7>±y´yð",ñ"Bô"B�J�Jð 7�HØ%ðJØ%I˜ Ø!&§¢¨J½Ø,6¸ Ý7>±y´yð",ñ"Bô"B�Jð"&�J�Jà#ˆHÝ8½Ý9DÀdÄfØFJÄfðFNñ:Oô:Oå9@¹¼ñ;ô;ˆJð �UŠ?ˆ?ØÐ Ø �UŠ?ˆ?Ø %Ð %Ð %Ð %Ð %Ð %à—j’j ¨X°zÀ8ÑLÔLˆGݘ7Ñ#Ô#Ð #åÐNÐQWÑWÑXÔXÐXr4có —td¦«‚©Nz,Use module Crypto.Signature.pkcs1_15 instead©ÚNotImplementedError)r+ÚMÚKs r2Úsignz RsaKey.sign–ó€Ý!Ð"PÑQÔQÐQr4có —td¦«‚r²r³)r+rµÚ signatures r2Úverifyz RsaKey.verify™r¸r4có —td¦«‚©Nz+Use module Crypto.Cipher.PKCS1_OAEP insteadr³)r+rWr¶s r2ÚencryptzRsaKey.encryptœó€Ý!Ð"OÑPÔPÐPr4có —td¦«‚r½r³)r+r^s r2ÚdecryptzRsaKey.decryptŸr¿r4có—t‚r6r³©r+rµÚBs r2Úblindz RsaKey.blind¢ó€Ý!Ð!r4có—t‚r6r³rÃs r2ÚunblindzRsaKey.unblind¥rÆr4có—t‚r6r³r9s r2Úsizez RsaKey.size¨rÆr4)r†NrNN)'Ú__name__Ú __module__Ú __qualname__Ú__doc__r3ÚpropertyrrrrrrDrGrJrLrrQrTrXrfr>rlrorqrurwr{rr…r°Ú exportKeyÚ publickeyr·r»r¾rÁrÅrÈrÊrkr4r2rr3s§€€€€€ððð>ððð>ððñ„Xððððñ„Xððððñ„Xðð ððñ„Xðð ððñ„Xðð ððñ„Xðð ððñ„Xðð ððñ„Xððððñ„Xððððñ„Xðð &ð&ð&ð5ð5ð5ð>ð>ð>ð ððð0#ð#ð#ð ðððððð,ð,ð,ð#ð#ð#ð#ð#ð#ðððð LðLðLð;ð;ð;ð>?Ø-1ðMYðMYðMYðMYð`€IØ€IðRðRðRðRðRðRðQðQðQðQðQðQð"ð"ð"ð"ð"ð"ð"ð"ð"ð"ð"r4réc󘇇 ‡ ‡‡—|dkrtd¦«‚‰dzdks‰dkrtd¦«‚|€ tj}td¦«x}}t‰¦«Š| ¦«|k�r|d|dzzk�r |dz}||z }td¦«d|zdz z ¦«xŠ Š||kr*td¦«d|zdz z ¦«Š ˆˆ fd „}t |||¬ ¦«Štd¦«|dzd z zŠ ˆˆ ˆˆfd „}t |||¬ ¦«} ‰| z}‰dz  | dz ¦«} ‰ | ¦«}| ¦«|kr |d|dzzk�° ‰| kr| ‰cŠ} ‰ | ¦«} t|‰|‰| | ¬ ¦«S)a0Create a new RSA key pair. The algorithm closely follows NIST `FIPS 186-4`_ in its sections B.3.1 and B.3.3. The modulus is the product of two non-strong probable primes. Each prime passes a suitable number of Miller-Rabin tests with random bases and a single Lucas test. Args: bits (integer): Key length, or size (in bits) of the RSA modulus. It must be at least 1024, but **2048 is recommended.** The FIPS standard only defines 1024, 2048 and 3072. randfunc (callable): Function that returns random bytes. The default is :func:`Crypto.Random.get_random_bytes`. e (integer): Public RSA exponent. It must be an odd positive integer. It is typically a small number with very few ones in its binary representation. The FIPS standard requires the public exponent to be at least 65537 (the default). Returns: an RSA key object (:class:`RsaKey`, with private key). .. _FIPS 186-4: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf iz"RSA modulus length must be >= 1024érézBRSA public exponent must be a positive, odd integer larger than 2.NrcóH•—|‰ko|dz  ‰¦«dkS©Nr)Úgcd)Ú candidaterÚmin_ps €€r2Úfilter_pzgenerate..filter_pßs*ø€Ø˜uÒ$ÐD¨)°a©-×)<Ò)<¸QÑ)?Ô)?À1Ò)DÐ Dr4)Ú exact_bitsr©Ú prime_filterédcót•—|‰ko1|dz  ‰¦«dkot|‰z ¦«‰kSr×)rØÚabs)rÙrÚ min_distanceÚmin_qrs €€€€r2Úfilter_qzgenerate..filter_qèsHø€Ø Ò%ð6Ø ‘]×'Ò'¨Ñ*Ô*¨aÒ/ð6å˜  A™ Ñ&Ô&¨Ò5ð 7r4©rrrrrr) r"rržrrQÚsqrtrÚlcmrIr)Úbitsr©rrrÚsize_qÚsize_prÛrãrrærrárÚrârs ` @@@@r2rr¬sBøøøøø€ð: ˆd‚{€{ÝÐ=Ñ>Ô>Ð>؈1�u�‚z€z�Q˜’U�UÝÐ]Ñ^Ô^Ð^àÐÝÔ*ˆå �A‰JŒJЀAˆÝ�‰ Œ €Aà �.Š.Ñ Ô ˜dÒ "Ñ " q¨A°$¸!±)Ñ,<Ò'=Ñ'=𘑈ؘ‘ˆå  ™œ¨¨F© °Q©Ñ7×=Ò=Ñ?Ô?Ð?ˆ�Ø �VÒ Ð Ý˜Q‘Z”Z A¨¡J°¡NÑ3×9Ò9Ñ;Ô;ˆEð Eð Eð Eð Eð Eð Eõ $¨vØ-5Ø19ð ;ñ ;ô ;ˆõ˜q‘z”z d¨a¡i°#¡oÑ6ˆ ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7õ $¨vØ-5Ø19ð ;ñ ;ô ;ˆð �‰EˆØ�1‰u�kŠk˜!˜a™%Ñ Ô ˆØ �IŠI�c‰NŒNˆð? �.Š.Ñ Ô ˜dÒ "Ð " q¨A°$¸!±)Ñ,<Ò'=Ñ'=ðB ˆ1‚u€uØ�!ˆˆˆ1à � Š �!‰ Œ €Aå �A˜˜a 1¨¨QÐ /Ñ /Ô /Ð/r4Tcó6—Gd„dt¦«}|¦«}td|¦«D]#\}}t||t|¦«¦«Œ$|j}|j}t |d¦«st||¬¦«}�nM|j} t |d¦«r|j } |j } nå| |zdz } | } | dzd kr| dz} | dzd k°d }td¦«}|s�|d krŠt| ¦«}|| krht|||¦«}|dkrF||dz kr=t|d|¦«dkr(t|¦«  |dz¦«} d }n |dz}|| k°h|dz }|s|d k°Š|std ¦«‚|| zd ksJ‚|| z} t |d¦«r|j}n|  | ¦«}t||| | | |¬¦«}|�rÆ|dks||krtd¦«‚t|¦«  |¦«dkrtd¦«‚|dzstd¦«‚| ¦«�rM| dks| |krtd¦«‚t|¦«  | ¦«dkrtd¦«‚| | z|krtd¦«‚t#| ¦«t$krtd¦«‚t#| ¦«t$krtd¦«‚| dz | dz z}|| dz   | dz ¦«z}|| zt'|¦«zdkrtd¦«‚t |d¦«r6|dks|| krtd¦«‚| |z| zdkrtd¦«‚|S)a!Construct an RSA key from a tuple of valid RSA components. The modulus **n** must be the product of two primes. The public exponent **e** must be odd and larger than 1. In case of a private key, the following equations must apply: .. math:: \begin{align} p*q &= n \\ e*d &\equiv 1 ( \text{mod lcm} [(p-1)(q-1)]) \\ p*u &\equiv 1 ( \text{mod } q) \end{align} Args: rsa_components (tuple): A tuple of integers, with at least 2 and no more than 6 items. The items come in the following order: 1. RSA modulus *n*. 2. Public exponent *e*. 3. Private exponent *d*. Only required if the key is private. 4. First factor of *n* (*p*). Optional, but the other factor *q* must also be present. 5. Second factor of *n* (*q*). Optional. 6. CRT coefficient *q*, that is :math:`p^{-1} \text{mod }q`. Optional. consistency_check (boolean): If ``True``, the library will verify that the provided components fulfil the main RSA properties. Raises: ValueError: when the key being imported fails the most basic RSA validity checks. Returns: An RSA key object (:class:`RsaKey`). có—eZdZdS)úconstruct..InputCompsN)rËrÌrÍrkr4r2Ú InputCompsrì%s€€€€€Ø ˆr4rírärrrrrÔrFrÞTz2Unable to compute factors p and q from exponent d.rzInvalid RSA public exponentz-RSA public exponent is not coprime to moduluszRSA modulus is not oddzInvalid RSA private exponentz.RSA private exponent is not coprime to modulusz RSA factors do not match moduluszRSA factor p is compositezRSA factor q is compositezInvalid RSA conditionzInvalid RSA component uzInvalid RSA component u with p)ÚobjectÚzipr$rrrrhrrrrrVrØr"rrIr>rrr7)Úrsa_componentsÚconsistency_checkríÚ input_compsÚcompr1rrÚkeyrrrÚktotÚtÚspottedÚaÚkÚcandrÚphiræs r2rrýs1€ðP ð ð ð ð •Vñ ô ð ð�*‘,”,€KÝÐ;¸^ÑLÔLð3ð3‰ ˆˆuÝ� ˜T¥7¨5¡>¤>Ñ2Ô2Ð2Ð2àŒ €AØŒ €AÝ �; Ñ $Ô $ð33Ý�q˜AÐÑÔˆ‰à ŒMˆÝ �; Ñ $Ô $ð' Ø” ˆAØ” ˆAˆAð �q‘5˜1‘9ˆDðˆAØ�a‘%˜1’*�*Ø�a‘�ð�a‘%˜1’*�*ðˆGݘ‘ ” ˆAØð  ! c¢' 'ݘA‘J”J�à˜$’h�hݘq ! Q™<œ<�Dà˜q’y�y T¨a°!©e¢_ _½¸TÀ1Àa¹¼ÈAÒ9MÐ9Mõ$ A™JœJŸNšN¨4°!©8Ñ4Ô4˜Ø"&˜ØØ˜‘F�Að˜$’h�hð�Q‘�ðð  ! c¢' 'ðð WÝ Ð!UÑVÔVÐVà˜‘U˜q’L�L�L�LØ�Q‘ˆAå �; Ñ $Ô $ð Ø” ˆAˆAà— ’ ˜!‘ ” ˆAõ�q˜A  a¨1°Ð2Ñ2Ô2ˆðñ#Gð �Š6ˆ6�Q˜!’V�VÝÐ:Ñ;Ô;Ð ;Ý �1‰:Œ:�>Š>˜!Ñ Ô  Ò !Ð !ÝÐLÑMÔMÐ Mð�1‰uð 7ÝÐ5Ñ6Ô6Ð 6à �?Š?Ñ Ô ñ Gà�AŠvˆv˜˜aš˜Ý Ð!?Ñ@Ô@Ð@Ý�q‰zŒz�~Š~˜aÑ Ô  AÒ%Ð%Ý Ð!QÑRÔRÐRà�1‰u˜ŠzˆzÝ Ð!CÑDÔDÐDÝ" 1Ñ%Ô%­Ò2Ð2Ý Ð!<Ñ=Ô=Ð=Ý" 1Ñ%Ô%­Ò2Ð2Ý Ð!<Ñ=Ô=Ð=à�q‘5˜Q ™UÑ#ˆCؘ!˜a™%Ÿš Q¨¡UÑ+Ô+Ñ+ˆCØ�A‘�˜C™œÑ  QÒ&Ð&Ý Ð!8Ñ9Ô9Ð9Ý�s˜CÑ Ô ð Gà˜’6�6˜Q !šV˜VÝ$Ð%>Ñ?Ô?Ð?ؘ‘E˜A‘I !Ò#Ð#Ý$Ð%EÑFÔFÐFà €Jr4có—t¦« |dd¬¦«}|ddkrtd¦«‚t|dd…t |d¦« |d ¦«gz¦«S) Né T©Ú nr_elementsÚonly_ints_expectedrz(No PKCS#1 encoding of an RSA private keyrééé)r Údecoder"rrrI©Úencodedr,Úders r2Ú_import_pkcs1_privaterŒsx€õ ‰-Œ-× Ò ˜w°AÈ$Ð Ñ OÔ O€CØ ˆ1„v�‚{€{ÝÐCÑDÔDÐDÝ �S˜˜1˜”X¥¨¨Q¬¡¤×!8Ò!8¸¸Q¼Ñ!@Ô!@Ð AÑAÑ BÔ BÐBr4cóh—t¦« |dd¬¦«}t|¦«S)NrÔTrþ)r rrrs r2Ú_import_pkcs1_publicr  s.€õ ‰-Œ-× Ò ˜w°AÈ$Ð Ñ OÔ O€CÝ �S‰>Œ>Ðr4có~—t|¦«\}}}|tks|�td¦«‚t|¦«S)NzNo RSA subjectPublicKeyInfo)rrr"r )rr,ÚalgoidÚ encoded_keyÚparamss r2Ú_import_subjectPublicKeyInfor©sA€å"AÀ'Ñ"JÔ"JÑ€FˆK˜Ø •‚}€}˜Ð*ÝÐ6Ñ7Ô7Ð7Ý   Ñ ,Ô ,Ð,r4có>—t|¦«}t|¦«Sr6)rr)rr,Úsp_infos r2Ú_import_x509_certr±s€å.¨wÑ7Ô7€GÝ '¨Ñ 0Ô 0Ð0r4có¦—ddlm}| ||¦«}|dtkrt d¦«‚t |d|¦«S)NrršzNo PKCS#8 encoded RSA keyr)r£r›Úunwraprr"Ú_import_keyDER)rr¦r›rùs r2Ú _import_pkcs8r·sW€ØÐÐÐÐÐà � Š �W˜jÑ)Ô)€A؈„t�s‚{€{ÝÐ4Ñ5Ô5Ð5Ý ˜!˜Aœ$  Ñ +Ô +Ð+r4có¦—tttttf}|D] } |||¦«cS#t $rYŒwxYwt d¦«‚)z@Import an RSA key (public or private half), encoded in DER form.úRSA key format is not supported)rr rrrr")Ú extern_keyr¦Ú decodingsÚdecodings r2rrÀsy€õ'Ý%Ý-Ý"Ýð  €Ið ððˆð Ø�8˜J¨ Ñ3Ô3Ð 3Ð 3Ð 3øÝð ð ð Ø ˆDð øøøõ Ð6Ñ 7Ô 7Ð7s¦ 4´ AÁAcó~—ddlm}m}m}m}|||¦«\}}|dkrt d¦«‚||¦«\}}||¦«\} }||¦«\} }||¦«\} }||¦«\} }||¦«\} }||¦«\}}||¦«d„|| | | | | fD¦«}t |¦«S)Nr)Úimport_openssh_private_genericÚ read_bytesÚ read_stringÚ check_paddingzssh-rsazThis SSH key is not RSAcó6—g|]}tj|¦«‘ŒSrk)rÚ from_bytesr‹s r2rŽz/_import_openssh_private_rsa..æs#€Ð BÐ BÐ B q�WÔ  Ñ "Ô "Ð BÐ BÐ Br4)Ú_opensshrrrr r"r)ÚdataÚpasswordrrrr Ússh_nameÚ decryptedrrrÚiqmprrrÚpaddedÚbuilds r2Ú_import_openssh_private_rsar+Òs@€ðCðCðCðCðCðCðCðCðCðCðCðCð9Ð8¸¸xÑHÔHÑ€Hˆià�9ÒÐÝÐ2Ñ3Ô3Ð3à�:˜iÑ(Ô(�L€A€yØ�:˜iÑ(Ô(�L€A€yØ�:˜iÑ(Ô(�L€A€yØ �j Ñ+Ô+�O€Dˆ)Ø�:˜iÑ(Ô(�L€A€yØ�:˜iÑ(Ô(�L€A€yà� ˜IÑ&Ô&�I€A€vØ€M�&ÑÔÐà BÐ B¨Q°°1°a¸¸DÐ,AÐ BÑ BÔ B€EÝ �UÑ Ô Ðr4có"—ddlm}t|¦«}|�t|¦«}| d¦«r;t |¦«}| ||¦«\}}}t ||¦«}|S| d¦«r;| t |¦«|¦«\}}}|rd}t||¦«S| d¦«rêtj |  d¦«d¦«} g} t| ¦«d krctj d | dd …¦«d} |  | d d | z…¦«| d | zd…} t| ¦«d k°ctj| d¦«} tj| d ¦«} t#| | g¦«St|¦«dkr)t%|d¦«d krt||¦«St'd ¦«‚)aéImport an RSA key (public or private). Args: extern_key (string or byte string): The RSA key to import. The following formats are supported for an RSA **public key**: - X.509 certificate (binary or PEM format) - X.509 ``subjectPublicKeyInfo`` DER SEQUENCE (binary or PEM encoding) - `PKCS#1`_ ``RSAPublicKey`` DER SEQUENCE (binary or PEM encoding) - An OpenSSH line (e.g. the content of ``~/.ssh/id_ecdsa``, ASCII) The following formats are supported for an RSA **private key**: - PKCS#1 ``RSAPrivateKey`` DER SEQUENCE (binary or PEM encoding) - `PKCS#8`_ ``PrivateKeyInfo`` or ``EncryptedPrivateKeyInfo`` DER SEQUENCE (binary or PEM encoding) - OpenSSH (text format, introduced in `OpenSSH 6.5`_) For details about the PEM encoding, see `RFC1421`_/`RFC1423`_. passphrase (string or byte string): For private keys only, the pass phrase that encrypts the key. Returns: An RSA key object (:class:`RsaKey`). Raises: ValueError/IndexError/TypeError: When the given key cannot be parsed (possibly because the pass phrase is wrong). .. _RFC1421: http://www.ietf.org/rfc/rfc1421.txt .. _RFC1423: http://www.ietf.org/rfc/rfc1423.txt .. _`PKCS#1`: http://www.ietf.org/rfc/rfc3447.txt .. _`PKCS#8`: http://www.ietf.org/rfc/rfc5208.txt .. _`OpenSSH 6.5`: https://flak.tedunangst.com/post/new-openssh-key-format-and-bcrypt-pbkdf rr�Ns-----BEGIN OPENSSH PRIVATE KEYs-----r—ó rrr’rÔé0r)r£r†r Ú startswithr rr+rr Ú a2b_base64Úsplitr•r“ÚunpackÚappendrr"rr r")rr¦r†Ú text_encodedÚopenssh_encodedÚmarkerÚenc_flagrerr­r¬Úlengthrrs r2rrês€ðRÐÐÐÐÐå˜Ñ$Ô$€JØÐݘZÑ(Ô(ˆ à×ÒÐ>Ñ?Ô?ðݘZÑ(Ô(ˆ Ø,/¯JªJ°|ÀZÑ,PÔ,PÑ)ˆ˜ Ý,¨_¸jÑIÔIˆØˆ à×Ò˜XÑ&Ô&ð/à"%§*¢*­U°:Ñ->Ô->À Ñ"KÔ"Kшˆf�hØ ð ØˆJݘc :Ñ.Ô.Ð.à×Ò˜[Ñ)Ô)ð !åÔ'¨ ×(8Ò(8¸Ñ(>Ô(>¸qÔ(AÑBÔBˆ ؈Ý�)‰nŒn˜qÒ Ð Ý”] 4¨°2°A°2¬Ñ7Ô7¸Ô:ˆFØ �OŠO˜I a¨¨F©  lÔ3Ñ 4Ô 4Ð 4Ø! ! f¡* + +Ô.ˆIõ�)‰nŒn˜qÒ Ð õ Ô ˜x¨œ{Ñ +Ô +ˆÝ Ô ˜x¨œ{Ñ +Ô +ˆÝ˜!˜Q˜Ñ Ô Ð å ˆ:�„˜ÒÐ�t J¨q¤MÑ2Ô2°dÒ:Ð:å˜j¨*Ñ5Ô5Ð5å Ð6Ñ 7Ô 7Ð7r4z1.2.840.113549.1.1.1)NrÒ)Tr6)$Ú__all__r r“ÚCryptorÚCrypto.Util.py3compatr r r ÚCrypto.Util.asn1r r ÚCrypto.Math.NumbersrÚCrypto.Math.PrimalityrrrÚCrypto.PublicKeyrrrrîrrrrr rrrrr+rÚ importKeyrrkr4r2úrAsùðð@ ð ð €ð€€€Ø € € € àÐÐÐÐÐØ6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ð6Ø1Ð1Ð1Ð1Ð1Ð1Ð1Ð1à'Ð'Ð'Ð'Ð'Ð'ðGðGðGðGðGðGðGðGðGðGð@ð@ð@ð@ð@ð@ð@ð@ð@ð@ð v"ðv"ðv"ðv"ðv"ˆVñv"ôv"ðv"ðr N0ðN0ðN0ðN0ðbLðLðLðLð^CðCðCð(ððð-ð-ð-ð1ð1ð1ð ,ð,ð,ð8ð8ð8ð$ððð0L8ðL8ðL8ðL8ð` € ð€€€r4