Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad Call NameLoad attr If CompareGt NameLoad BinOpMult BinOpPow Num Num NameLoad body Raise Call NameLoad Str Assign NameStore Str For NameStore Call NameLoad Call NameLoad Call NameLoad BinOpDiv NameLoad BinOpMult NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd BinOpMult Str BinOpSub Num Call NameLoad NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Num Str AugAssignAdd NameStore Call AttributeLoad Call NameLoad BinOpAdd NameLoad NameLoad attr Assert CompareGtE Call NameLoad NameLoad NameLoad Str Return SubscriptLoad NameLoad Slice NameLoad decorator_list Return NameLoad decorator_list Assign NameStore Call NameLoad NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body Expr Str If NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str NameLoad If BoolOpAnd NameLoad CompareGt Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt NameLoad BinOpSub BinOpSub NameLoad BinOpMult Num NameLoad Num body Raise Call NameLoad Str Assign NameStore BinOpMult Str BinOpSub BinOpSub BinOpSub NameLoad NameLoad BinOpMult Num NameLoad Num Assign NameStore BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad Str NameLoad Assert CompareEq Call NameLoad NameLoad BinOpSub BinOpSub NameLoad NameLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpSub BinOpSub NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return BinOpAdd BinOpAdd Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Slice Num BinOpAdd NameLoad Num Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpSub BinOpSub NameLoad NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore NameLoad While BoolOpAnd CompareLt NameLoad Call NameLoad NameLoad CompareNotEq SubscriptLoad NameLoad Index NameLoad Str body AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Assign NameStore NameLoad If CompareEq NameLoad Call NameLoad NameLoad body Assign NameStore NameLoad If CompareNotEq NameLoad NameLoad body Assign NameStore NameLoad If CompareNotEq NameLoad Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Str Return NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Expr Str ImportFrom alias Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad Num Num body For NameStore Call NameLoad Num Num body Assign NameStore BinOpMod NameLoad BinOpSub BinOpSub NameLoad BinOpMult Num Num Num If CompareEq NameLoad Num body Assign NameStore Num orelse Assign NameStore BinOpMod NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareNotEq NameLoad NameLoad Str Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Str TryExcept body If CompareEq NameLoad Num body Raise NameLoad Assign NameStore Call NameLoad Num While CompareEq NameLoad SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call NameLoad Num Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Slice NameLoad NameLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass orelse Raise Call NameLoad Str decorator_list
N/A math ceil hashlib sha1 Crypto.Util.strxor strxor Crypto.Util.number long_to_bytes make_mgf1 N/A N/A hash N/A N/A N/A Make an MFG1 function using the given hash function.

    Given a hash function implementing the standard hash function interface,
    this function returns a Mask Generation Function using that hash.
     mgf1 N/A N/A mgfSeed maskLen N/A N/A N/A Mask Generation Function based on a hash function.

        Given a seed byte string 'mgfSeed', this function will generate
        and return a mask byte string  of length 'maskLen' in a manner
        approximating a Random Oracle.

        The algorithm is from PKCS#1 version 2.1, appendix B.2.1.
         N/A hLen N/A N/A hash digest_size N/A N/A maskLen N/A N/A 2 32 hLen N/A N/A N/A ValueError mask too long N/A T N/A counter N/A range N/A int N/A ceil N/A maskLen N/A hLen 1.0 N/A N/A C N/A long_to_bytes counter N/A C N/A N/A N/A 4 N/A len C C N/A N/A N/A len C 4 counter was too big N/A T N/A N/A N/A hash N/A mgfSeed C digest N/A N/A N/A len T maskLen generated mask was too short N/A N/A T N/A maskLen N/A N/A mgf1 N/A N/A MGF1_SHA1 N/A make_mgf1 sha1 OAEP N/A object N/A N/A Class implementing OAEP encoding/decoding.

    This class can be used to encode/decode byte strings using the
    Optimal Asymmetic Encryption Padding Scheme.  It requires a source
    of random bytes, a hash function and a mask generation function.
    By default SHA-1 is used as the hash function, and MGF1-SHA1 is used
    as the mask generation function.

    The method 'encode' will encode a byte string using this padding
    scheme, and the complimenary method 'decode' will decode it.

    The algorithms are from PKCS#1 version 2.1, section 7.1
     __init__ N/A N/A self randbytes hash mgf N/A sha1 MGF1_SHA1 N/A N/A N/A self randbytes randbytes N/A N/A self hash hash N/A N/A self mgf mgf N/A encode N/A N/A self k M L N/A N/A N/A Encode a message using OAEP.

        This method encodes a byte string 'M' using Optimal Asymmetric
        Encryption Padding.  The argument 'k' must be the size of the
        private key modulus in bytes.  If specified, 'L' is a label
        for the encoding.
         N/A L N/A N/A limit N/A getattr N/A self hash input_limit None N/A N/A limit N/A N/A len L limit N/A N/A N/A ValueError label too long N/A lHash N/A N/A N/A N/A self hash L digest N/A mLen N/A len M N/A hLen N/A len lHash N/A N/A mLen N/A N/A k N/A 2 hLen 2 N/A N/A N/A ValueError message too long N/A PS N/A N/A N/A N/A k mLen N/A 2 hLen 2 N/A DB N/A N/A N/A lHash PS M N/A N/A N/A len DB N/A N/A k hLen 1 DB length is incorrect N/A seed N/A N/A self randbytes hLen N/A dbMask N/A N/A self mgf seed N/A N/A k hLen 1 N/A maskedDB N/A strxor DB dbMask N/A seedMask N/A N/A self mgf maskedDB hLen N/A maskedSeed N/A strxor seed seedMask N/A N/A N/A maskedSeed maskedDB N/A decode N/A N/A self k EM L N/A N/A N/A Decode a message using OAEP.

        This method decodes a byte string 'EM' using Optimal Asymmetric
        Encryption Padding.  The argument 'k' must be the size of the
        private key modulus in bytes.  If specified, 'L' is the label
        used for the encoding.
         N/A lHash N/A N/A N/A N/A self hash L digest N/A hLen N/A len lHash N/A Y N/A EM N/A 0 N/A maskedSeed N/A EM N/A 1 N/A hLen 1 N/A maskedDB N/A EM N/A N/A hLen 1 N/A seedMask N/A N/A self mgf maskedDB hLen N/A seed N/A strxor maskedSeed seedMask N/A dbMask N/A N/A self mgf seed N/A N/A k hLen 1 N/A DB N/A strxor maskedDB dbMask N/A lHash1 N/A DB N/A hLen N/A x01pos hLen N/A N/A N/A x01pos N/A len DB N/A N/A DB N/A x01pos N/A N/A x01pos 1 N/A PS N/A DB N/A hLen x01pos N/A M N/A DB N/A N/A x01pos 1 N/A valid True N/A N/A x01pos N/A len DB N/A N/A valid False N/A N/A lHash1 lHash N/A N/A valid False N/A N/A Y N/A N/A valid False N/A N/A valid N/A N/A N/A ValueError decryption error N/A M N/A N/A test_oaep N/A N/A N/A N/A N/A Run through the OAEP encode/decode for lots of random values. os urandom N/A p N/A OAEP urandom N/A k N/A xrange 45 300 N/A N/A i N/A xrange 0 1000 N/A N/A b N/A i N/A N/A k N/A 2 20 3 N/A N/A b 0 N/A N/A j -1 N/A N/A j N/A i b N/A N/A test %s:%s (%s bytes, corrupt at %s) N/A k i b j N/A msg N/A urandom b N/A pmsg N/A N/A p encode k msg N/A N/A msg pmsg padded message was just the message N/A N/A N/A N/A p decode k pmsg msg message was not decoded properly N/A N/A N/A N/A b 0 N/A N/A ValueError N/A newb N/A urandom 1 N/A N/A newb N/A pmsg N/A j N/A N/A newb N/A urandom 1 N/A pmsg2 N/A N/A N/A pmsg N/A j newb N/A pmsg N/A N/A j 1 N/A N/A N/A p decode k pmsg2 N/A N/A N/A ValueError N/A N/A N/A N/A N/A AssertionError corrupted padding was still decoded N/A