Pc@s?dZddlZddlZddlTdddYZdS(s$Id$iN(t*tpubkeycBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZRS(sxAn abstract class for a public key object. :undocumented: __getstate__, __setstate__, __eq__, __ne__, validate cCsdS(N((tself((s2..\python\site-packages\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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytverifyrs cCstjdtdS(Ns0validate() method name is obsolete; use verify()(twarningstwarntDeprecationWarning(RR R#((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytvalidates cCsxd}t|tjr-t|}d}nt|tjrNt|}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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytblinds   cCsxd}t|tjr-t|}d}nt|tjrNt|}n|j||}|rpt|S|SdS(sUnblind 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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytunblinds   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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytcan_signs 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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyt can_encrypts 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((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyt can_blinds cCsdS(s_Tell the maximum number of bits that can be handled by this key. :Return: int i((R((s2..\python\site-packages\Crypto\PublicKey\pubkey.pytsizescCsdS(sSTell if the key object contains private components. :Return: bool i((R((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyRscCs|S(skConstruct a new key carrying only the public information. :Return: A new `pubkey` object. ((R((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyt publickeyscCs|j|jkS(sF__eq__(other): 0, 1 Compare us to other for equality. (R (Rtother((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyt__eq__scCs|j| S(sH__ne__(other): 0, 1 Compare us to other for inequality. (R6(RR5((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyt__ne__s(t__name__t __module__t__doc__RR R RRR!R$R(R,R/R0R1R2R3RR4R6R7(((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyR!s&              ((t __revision__RR%tCrypto.Util.numberR(((s2..\python\site-packages\Crypto\PublicKey\pubkey.pyts