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 :  /usr/lib64/python2.4/site-packages/M2Crypto/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/M2Crypto/EC.pyc
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.
    icCs0ti|ƒp
td‚||_||_dS(Ns'ec' type error(tm2tec_key_type_checktectAssertionErrortselft_pyfree(R	RR
((Rt__init__:s	cCs+t|ddƒo|i|iƒndS(NR
i(tgetattrR	tm2_ec_key_freeR(R	((Rt__del__?scCs-ti|iƒp
td‚ti|iƒS(Ns'ec' type error(RRR	RRt
ec_key_keylen(R	((Rt__len__CscCs1ti|iƒp
td‚ti|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.
        s'ec' type errorN(RRR	RRtec_key_gen_key(R	((Rtgen_keyGscCst|idƒS(Ni(tEC_pubR	R(R	((RtpubQscCs*|iƒp
td‚ti|i|ƒS(sw
        Sign the given digest using ECDSA. Returns a tuple (r,s), the two
        ECDSA signature parameters.
        skey is not initialisedN(R	t	check_keyRRt
ecdsa_signRtdigest(R	R((Rtsign_dsaUscCs0|iƒp
td‚ti|i|||ƒS(sj
        Verify the given digest using ECDSA. r and s are the ECDSA
        signature parameters.
        skey is not initialisedN(	R	RRRtecdsa_verifyRRtrts(R	RRR((Rt
verify_dsa]scCs*|iƒp
td‚ti|i|ƒS(Nskey is not initialised(R	RRRtecdsa_sign_asn1RR(R	R((Rt
sign_dsa_asn1escCs-|iƒp
td‚ti|i||ƒS(Nskey is not initialised(R	RRRtecdsa_verify_asn1RRtblob(R	RR ((Rtverify_dsa_asn1iscCs-|iƒp
td‚ti|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.
        skey is not initialisedN(R	RRRtecdh_compute_keyRtpub_key(R	R#((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(
tciphertNoneRtec_key_write_bio_no_cipherR	Rtbiot_ptrtcallbackRtcipht
ValueErrortec_key_write_bio(R	R)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)R	R/R&R+(R	R3R&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(Rtec_key_write_pubkeyR	RR)R*(R	R)((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.
        R0N(	R1R2R3R)RR5R	RR*(R	R3R)((Rtsave_pub_key­scCs-ti|iƒp
td‚ti|iƒS(Ns'ec' type error(RRR	RRtec_key_check_key(R	((RR·s(RRt__doc__Rtec_key_freeR
RRRRRRRRR!R$tutiltpassphrase_callbackR/R4R6R7R(((RR2s"				
						
			
RcBs5tZdZdd„Zd„ZeiZeiZ	RS(sc
    Object interface to an EC public key. 
    ((don't like this implementation inheritance))
    icCs ti|||ƒd|_dS(N(RRR	RR
R'tder(R	RR
((RRΒscCsG|iƒp
td‚|idjoti|iƒ|_n|iS(sJ
        Returns the public key in DER format as a buffer object.
        skey is not initialisedN(R	RRR=R'Rtec_key_get_public_derR(R	((Rtget_derΖs
(
RRR9RR?RR7R4R6R/(((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(RRtec_key_new_by_curve_nametcurve(RA((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(R1R2R3R)tload_key_bioR+(R3R+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(RRtec_key_read_bioR)R*R+(R)R+((RRCμ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(R1R2R3R)tload_pub_key_bio(R3R)((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(Rtec_key_read_pubkeyR)R*RR'tec_errorR(R)R((RRFs


cCsttitiƒƒ‚dS(N(RRterr_reason_error_stringt
err_get_error(((RRIscCstti|ƒdƒS(s!
    Create EC_pub from DER.
    iN(RRtec_key_from_pubkey_derR=(R=((Rtpub_key_from_ders(0R9R;R1Rt	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_sect571r1RRRBR<RDRCRGRFRIRM(,RSRRRhRPRQRjRIRTR\RBRFRDRgR1RaRZRXRRRRkRVRURbRcRGR_RR`R;R[RlRdRCReRMRfR]R^RiRmRWRnRY((Rt?	sV
																															Š	
			

Anon7 - 2021