ó J(Zc@s?dZddlZddlZddlTddd„ƒYZdS(s$Id$i˙˙˙˙N(t*tpubkeycBs°eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„ZRS(sxAn abstract class for a public key object. :undocumented: __getstate__, __setstate__, __eq__, __ne__, validate cCsdS(N((tself((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt__init__&scCsG|j}x7|jD],}|j|ƒrt||ƒ||Verify the validity of a signature. :Parameter M: The expected message. :Type M: byte string or long :Parameter signature: The signature to verify. :Type signature: tuple with two items, as return by `sign` :Return: True if the signature is correct, False otherwise. (R RRRt_verify(RR t signature((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytverifyrs cCstjdtƒdS(Ns0validate() method name is obsolete; use verify()(twarningstwarntDeprecationWarning(RR R#((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytvalidates cCsxd}t|tjƒr-t|ƒ}d}nt|tjƒrNt|ƒ}n|j||ƒ}|rpt|ƒS|SdS(s&Blind a message to prevent certain side-channel attacks. :Parameter M: The message to blind. :Type M: byte string or long :Parameter B: Blinding factor. :Type B: byte string or long :Return: A byte string if M was so. A long otherwise. iiN(R RRRt_blindR(RR tBRtblindedmessage((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytblind…s   cCsxd}t|tjƒr-t|ƒ}d}nt|tjƒrNt|ƒ}n|j||ƒ}|rpt|ƒS|SdS(sëUnblind a message after cryptographic processing. :Parameter M: The encoded message to unblind. :Type M: byte string or long :Parameter B: Blinding factor. :Type B: byte string or long iiN(R RRRt_unblindR(RR R*Rtunblindedmessage((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytunblind˜s   cCsdS(s(Tell if the algorithm can deal with cryptographic signatures. This property concerns the *algorithm*, not the key itself. It may happen that this particular key object hasn't got the private information required to generate a signature. :Return: boolean i((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytcan_sign­s cCsdS(sTell if the algorithm can deal with data encryption. This property concerns the *algorithm*, not the key itself. It may happen that this particular key object hasn't got the private information required to decrypt data. :Return: boolean i((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt can_encrypt¸s cCsdS(sTell if the algorithm can deal with data blinding. This property concerns the *algorithm*, not the key itself. It may happen that this particular key object hasn't got the private information required carry out blinding. :Return: boolean i((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt can_blindĂs cCsdS(s_Tell the maximum number of bits that can be handled by this key. :Return: int i((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pytsizeŃscCsdS(sSTell if the key object contains private components. :Return: bool i((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyRŘscCs|S(skConstruct a new key carrying only the public information. :Return: A new `pubkey` object. ((R((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt publickeyßscCs|jƒ|jƒkS(sF__eq__(other): 0, 1 Compare us to other for equality. (R (Rtother((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt__eq__ćscCs|j|ƒ S(sH__ne__(other): 0, 1 Compare us to other for inequality. (R6(RR5((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyt__ne__ěs(t__name__t __module__t__doc__RR R RRR!R$R(R,R/R0R1R2R3RR4R6R7(((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyR!s&              ((t __revision__RR%tCrypto.Util.numberR(((s9/tmp/pip-build-LvEk9W/pycrypto/Crypto/PublicKey/pubkey.pyts