KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/site-packages/M2Crypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/site-packages/M2Crypto/EC.pyo
mς
ž"¬Dc@sΣdZdkZdkZdkZdefd„ƒYZeieƒeiZeiZei	Z	ei
Z
eiZeiZei
Z
eiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZei Z ei!Z!ei"Z"ei#Z#ei$Z$ei%Z%dfd„ƒYZ&de&fd„ƒYZ'd„Z(ei)d	„Z*ei)d
„Z+d„Z,d„Z-d
„Z.d„Z/dS(sδ
M2Crypto wrapper for OpenSSL ECDH/ECDSA API.

@requires: OpenSSL 0.9.8 or newer

Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved.

Portions copyright (c) 2005-2006 Vrije Universiteit Amsterdam. 
All rights reserved.NtECErrorcBstZRS(N(t__name__t
__module__(((t1/usr/lib64/python2.4/site-packages/M2Crypto/EC.pyR
stECcBs³tZdZeiZdd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„Zdeid
„Zdeid„Zd„Zd„Zd„ZRS(s,
    Object interface to a EC key pair.
    icCs||_||_dS(N(tectselft_pyfree(RRR((Rt__init__:s	cCs+t|ddƒo|i|iƒndS(NRi(tgetattrRtm2_ec_key_freeR(R((Rt__del__?scCsti|iƒS(N(tm2t
ec_key_keylenRR(R((Rt__len__CscCsti|iƒdS(s¬
        Generates the key pair from its parameters. Use
            keypair = EC.gen_params(curve)
            keypair.gen_key()
        to create an EC key pair.
        N(Rtec_key_gen_keyRR(R((Rtgen_keyGscCst|idƒS(Ni(tEC_pubRR(R((RtpubQscCsti|i|ƒS(sw
        Sign the given digest using ECDSA. Returns a tuple (r,s), the two
        ECDSA signature parameters.
        N(Rt
ecdsa_signRRtdigest(RR((Rtsign_dsaUscCsti|i|||ƒS(sj
        Verify the given digest using ECDSA. r and s are the ECDSA
        signature parameters.
        N(Rtecdsa_verifyRRRtrts(RRRR((Rt
verify_dsa]scCsti|i|ƒS(N(Rtecdsa_sign_asn1RRR(RR((Rt
sign_dsa_asn1escCsti|i||ƒS(N(Rtecdsa_verify_asn1RRRtblob(RRR((Rtverify_dsa_asn1iscCsti|i|iƒS(sω
        Compute the ECDH shared key of this key pair and the given public 
        key object. They must both use the same curve. Returns the 
        shared key in binary as a buffer object. No Key Derivation Function is 
        applied.
        N(Rtecdh_compute_keyRRtpub_key(RR ((Rtcompute_dh_keymstaes_128_cbccCs†|djo ti|i|iƒ|ƒSnVt	t|dƒ}|djotd|ƒ‚nti|i|iƒ|ƒ|ƒSdS(sR
        Save the key pair to an M2Crypto.BIO.BIO object in PEM format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.

        @type cipher: string
        @param cipher: Symmetric cipher to protect the key. The default
        cipher is 'aes_128_cbc'. If cipher is None, then the key is saved
        in the clear.

        @type callback: Python callable
        @param callback: A Python callable object that is invoked
        to acquire a passphrase with which to protect the key.
        The default is util.passphrase_callback.
        snot such cipher %sN(
tciphertNoneRtec_key_write_bio_no_cipherRRtbiot_ptrtcallbackR	tcipht
ValueErrortec_key_write_bio(RR&R#R(R)((Rtsave_key_biows
 
cCs%ti|dƒ}|i|||ƒS(s+
        Save the key pair to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.

        @type cipher: string
        @param cipher: Symmetric cipher to protect the key. The default
        cipher is 'aes_128_cbc'. If cipher is None, then the key is saved
        in the clear.

        @type callback: Python callable
        @param callback: A Python callable object that is invoked
        to acquire a passphrase with which to protect the key.
        The default is util.passphrase_callback.
        twbN(tBIOtopenfiletfileR&RR,R#R((RR0R#R(R&((Rtsave_keyscCsti|i|iƒƒS(s³
        Save the public key to an M2Crypto.BIO.BIO object in PEM format.

        @type bio: M2Crypto.BIO.BIO
        @param bio: M2Crypto.BIO.BIO object to save key to.
        N(Rtec_key_write_pubkeyRRR&R'(RR&((Rtsave_pub_key_bio€scCs+ti|dƒ}ti|i|iƒƒS(sŒ
        Save the public key to a file in PEM format.

        @type file: string
        @param file: Name of file to save key to.
        R-N(	R.R/R0R&RR2RRR'(RR0R&((Rtsave_pub_key­scCsti|iƒS(N(Rtec_key_check_keyRR(R((Rt	check_key·s(RRt__doc__Rtec_key_freeR
RRRRRRRRRR!tutiltpassphrase_callbackR,R1R3R4R6(((RR2s"				
						
			
RcBs5tZdZdd„Zd„ZeiZeiZ	RS(sc
    Object interface to an EC public key. 
    ((don't like this implementation inheritance))
    icCs ti|||ƒd|_dS(N(RRRRRR$tder(RRR((RRΒscCs0|idjoti|iƒ|_n|iS(sJ
        Returns the public key in DER format as a buffer object.
        N(RR;R$Rtec_key_get_public_derR(R((Rtget_derΖs
(
RRR7RR=RR4R1R3R,(((RRΌs
			cCstti|ƒdƒS(s«
    Factory function that generates EC parameters and 
    instantiates a EC object from the output.

    @param curve: This is the OpenSSL nid of the curve to use. 
    iN(RRtec_key_new_by_curve_nametcurve(R?((Rt
gen_paramsΤscCsti|ƒ}t||ƒS(s
    Factory function that instantiates a EC object.

    @param file: Names the file that contains the PEM representation 
    of the EC key pair.

    @param callback: Python callback object that will be invoked 
    if the EC key pair is passphrase-protected.
    N(R.R/R0R&tload_key_bioR((R0R(R&((Rtload_keyήs	cCstti|iƒ|ƒdƒS(s
    Factory function that instantiates a EC object.

    @param bio: M2Crypto.BIO object that contains the PEM
    representation of the EC key pair. 

    @param callback: Python callback object that will be invoked 
    if the EC key pair is passphrase-protected.
    iN(RRtec_key_read_bioR&R'R((R&R(((RRAμs	cCsti|ƒ}t|ƒS(sΠ
    Load an EC public key from file.

    @type file: string
    @param file: Name of file containing EC public key in PEM format.

    @rtype: M2Crypto.EC.EC_pub
    @return: M2Crypto.EC.EC_pub object.
    N(R.R/R0R&tload_pub_key_bio(R0R&((Rtload_pub_keyψs	cCs:ti|iƒƒ}|djotƒnt|dƒS(sύ
    Load an EC public key from an M2Crypto.BIO.BIO object.

    @type bio: M2Crypto.BIO.BIO
    @param bio: M2Crypto.BIO.BIO object containing EC public key in PEM
    format.

    @rtype: M2Crypto.EC.EC_pub
    @return: M2Crypto.EC.EC_pub object.
    iN(Rtec_key_read_pubkeyR&R'RR$tec_errorR(R&R((RRDs


cCsttitiƒƒ‚dS(N(RRterr_reason_error_stringt
err_get_error(((RRGscCstti|ƒdƒS(s!
    Create EC_pub from DER.
    iN(RRtec_key_from_pubkey_derR;(R;((Rtpub_key_from_ders(0R7R9R.Rt	ExceptionRtec_initt
NID_secp112r1t
NID_secp112r2t
NID_secp128r1t
NID_secp128r2t
NID_secp160k1t
NID_secp160r1t
NID_secp160r2t
NID_secp192k1t
NID_secp224k1t
NID_secp224r1t
NID_secp256k1t
NID_secp384r1t
NID_secp521r1t
NID_sect113r1t
NID_sect113r2t
NID_sect131r1t
NID_sect131r2t
NID_sect163k1t
NID_sect163r1t
NID_sect163r2t
NID_sect193r1t
NID_sect193r2t
NID_sect233k1t
NID_sect233r1t
NID_sect239k1t
NID_sect283k1t
NID_sect283r1t
NID_sect409k1t
NID_sect409r1t
NID_sect571k1t
NID_sect571r1RRR@R:RBRARERDRGRK(,RQRPRfRNRORhRGRRRZR@RDRBReR.R_RXRVRRRRiRTRSR`RaRER]RR^R9RYRjRbRARcRKRdR[R\RgRkRURlRW((Rt?	sV
																															Š	
			

Anon7 - 2021