Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias TryExcept body ImportFrom alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assert CompareGt NameLoad Num FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Str Import alias Import alias FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Num For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num Num Num body Assign NameStore SubscriptLoad NameLoad Index NameLoad AugAssignAdd NameStore BinOpMult NameLoad NameLoad AugAssignMult NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad BinOpSub NameLoad Num Num Num body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad BinOpMod NameLoad Num AugAssignRShift NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareNotEq BinOpBitAnd Call NameLoad SubscriptLoad NameLoad Index Num Num Num body Raise Call NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Num If CompareEq BinOpBitAnd Call NameLoad NameLoad Num Num body Assign NameStore Num Assign NameStore BinOpAdd Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd Call NameLoad BinOpAdd Num NameLoad NameLoad Assign SubscriptStore NameLoad Index Num BinOpBitAnd BinOpRShift NameLoad Num Num Assign SubscriptStore NameLoad Index Num BinOpBitAnd BinOpRShift NameLoad Num Num Assign SubscriptStore NameLoad Index Num BinOpBitAnd BinOpRShift NameLoad Num Num Assign SubscriptStore NameLoad Index Num BinOpBitAnd NameLoad Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad Num body Return Num Assign NameStore BinOpMod Str NameLoad Return BinOpAdd BinOpMult BinOpSub Call NameLoad NameLoad Num Num SubscriptLoad Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Index SubscriptLoad NameLoad Index Num Return Call NameLoad BinOpAdd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad Num body Return Num Assign NameStore Call NameLoad NameLoad Return Call NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareGtE NameLoad NameLoad body Raise Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpMod NameLoad Num While Num body Assign NameStore Call NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Num BinOpMod SubscriptLoad NameLoad Index Num BinOpLShift Num NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd CompareGtE NameLoad NameLoad CompareLt NameLoad NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad While NameLoad body Assign TupleStore NameStore NameStore TupleLoad NameLoad BinOpMod NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpFloorDiv BinOpMult NameLoad NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad Num Num While CompareNotEq NameLoad Num body Assign NameStore BinOpFloorDiv NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad BinOpSub NameLoad BinOpMult NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return BinOpMod NameLoad NameLoad Return Num decorator_list If NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return Call NameLoad NameLoad decorator_list orelse FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareLt NameLoad Num body Assign NameStore Call NameLoad NameLoad BinOpMult NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad orelse Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call NameLoad NameLoad For NameStore Call NameLoad Num BinOpAdd Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num body If CompareEq SubscriptLoad NameLoad Index NameLoad Num body Continue Assign NameStore BinOpMult SubscriptLoad NameLoad Index NameLoad Num While CompareLt NameLoad Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Num AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore ListComp NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num NameLoad Return NameLoad decorator_list Assign NameStore Call NameLoad Num FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body For NameStore NameLoad body If CompareGtE NameLoad NameLoad body Return NameLoad If CompareEq BinOpMod NameLoad NameLoad Num body Return NameLoad If NameLoad body Expr Call NameLoad Str keyword Str Assign TupleStore NameStore NameStore TupleLoad BinOpSub NameLoad Num Num While CompareEq BinOpMod NameLoad Num Num body Assign TupleStore NameStore NameStore TupleLoad BinOpFloorDiv NameLoad Num BinOpAdd NameLoad Num Assign NameStore Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Continue Assign NameStore Num While CompareNotEq NameLoad BinOpSub NameLoad Num body If CompareEq NameLoad BinOpSub NameLoad Num body Return NameLoad orelse Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Num NameLoad BinOpAdd NameLoad Num Assign NameStore Call NameLoad Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareLt NameLoad Num body Raise Call NameLoad Assign NameStore BinOpFloorDiv BinOpMult BinOpPow Num BinOpSub NameLoad Num Num Num Assign NameStore BinOpSub BinOpPow Num NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpSub Num BinOpMod NameLoad Num While Num body If NameLoad body Expr Call NameLoad Str keyword Str AugAssignAdd NameStore Num If CompareGtE NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpSub Num BinOpMod NameLoad Num If Call NameLoad NameLoad keyword NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareLt NameLoad Num body Raise Call NameLoad Assign NameStore BinOpFloorDiv BinOpMult BinOpPow Num BinOpSub NameLoad Num Num Num Assign NameStore BinOpSub BinOpPow Num BinOpSub NameLoad Num Num Assign NameStore Call NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpSub Num BinOpMod NameLoad Num While Num body If NameLoad body Expr Call NameLoad Str keyword Str AugAssignAdd NameStore Num If CompareGtE NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad AugAssignAdd NameStore BinOpSub Num BinOpMod NameLoad Num If Call NameLoad NameLoad Num keyword NameLoad body Assign NameStore BinOpAdd BinOpMult Num NameLoad Num If Call NameLoad NameLoad keyword NameLoad body If Call NameLoad NameLoad keyword NameLoad body Return NameLoad decorator_list
N/A N/A cryptomath module

This module has basic math/crypto code. __future__ print_function N/A os N/A math N/A base64 N/A binascii compat * N/A N/A M2Crypto m2 N/A m2cryptoLoaded True N/A N/A N/A ImportError N/A N/A m2cryptoLoaded False N/A N/A N/A gmpy N/A gmpyLoaded True N/A N/A N/A ImportError N/A N/A gmpyLoaded False N/A N/A N/A Crypto.Cipher.AES N/A pycryptoLoaded True N/A N/A N/A ImportError N/A N/A pycryptoLoaded False N/A zlib N/A length N/A len N/A N/A zlib compress N/A N/A os urandom 1000 N/A N/A length 900 getRandomBytes N/A N/A howMany N/A N/A N/A b N/A bytearray N/A N/A os urandom howMany N/A N/A N/A len b howMany N/A b N/A N/A prngName os.urandom N/A hmac N/A hashlib MD5 N/A N/A b N/A N/A N/A N/A bytearray N/A N/A N/A N/A hashlib md5 N/A compat26Str b digest N/A SHA1 N/A N/A b N/A N/A N/A N/A bytearray N/A N/A N/A N/A hashlib sha1 N/A compat26Str b digest N/A HMAC_MD5 N/A N/A k b N/A N/A N/A k N/A compatHMAC k N/A b N/A compatHMAC b N/A N/A bytearray N/A N/A N/A N/A hmac new k b N/A hashlib md5 digest N/A HMAC_SHA1 N/A N/A k b N/A N/A N/A k N/A compatHMAC k N/A b N/A compatHMAC b N/A N/A bytearray N/A N/A N/A N/A hmac new k b N/A hashlib sha1 digest N/A HMAC_SHA256 N/A N/A k b N/A N/A N/A k N/A compatHMAC k N/A b N/A compatHMAC b N/A N/A bytearray N/A N/A N/A N/A hmac new k b N/A hashlib sha256 digest N/A bytesToNumber N/A N/A b N/A N/A N/A total 0 N/A multiplier 1 N/A count N/A range N/A N/A len b 1 -1 -1 N/A N/A byte N/A b N/A count N/A total N/A multiplier byte N/A multiplier 256 N/A total N/A numberToByteArray N/A N/A n howManyBytes N/A None N/A N/A Convert an integer into a bytearray, zero-pad to howManyBytes.

    The returned bytearray may be smaller than howManyBytes, but will
    not be larger.  The returned bytearray will contain a big-endian
    encoding of the input integer (n).
     N/A N/A howManyBytes None N/A N/A howManyBytes N/A numBytes n N/A b N/A bytearray howManyBytes N/A count N/A range N/A howManyBytes 1 -1 -1 N/A N/A N/A b N/A count N/A int N/A n 256 N/A n 8 N/A b N/A mpiToNumber N/A N/A mpi N/A N/A N/A N/A N/A N/A ord N/A mpi N/A 4 128 0 N/A N/A N/A AssertionError N/A b N/A bytearray N/A mpi N/A 4 N/A N/A bytesToNumber b N/A numberToMPI N/A N/A n N/A N/A N/A b N/A numberToByteArray n N/A ext 0 N/A N/A N/A N/A numBits n 7 0 N/A N/A ext 1 N/A length N/A N/A numBytes n ext N/A b N/A N/A bytearray N/A 4 ext b N/A N/A b N/A 0 N/A N/A length 24 255 N/A N/A b N/A 1 N/A N/A length 16 255 N/A N/A b N/A 2 N/A N/A length 8 255 N/A N/A b N/A 3 N/A length 255 N/A N/A bytes b N/A numBits N/A N/A n N/A N/A N/A N/A n 0 N/A N/A 0 N/A s N/A %x n N/A N/A N/A N/A N/A len s 1 4 N/A N/A 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 N/A N/A s N/A 0 N/A N/A int N/A N/A N/A math floor N/A N/A math log n 2 1 N/A numBytes N/A N/A n N/A N/A N/A N/A n 0 N/A N/A 0 N/A bits N/A numBits n N/A N/A int N/A N/A math ceil N/A bits 8.0 N/A getRandomNumber N/A N/A low high N/A N/A N/A N/A low high N/A N/A N/A AssertionError N/A howManyBits N/A numBits high N/A howManyBytes N/A numBytes high N/A lastBits N/A howManyBits 8 N/A 1 N/A N/A bytes N/A getRandomBytes howManyBytes N/A lastBits N/A N/A N/A bytes N/A 0 N/A N/A bytes N/A 0 N/A 1 lastBits N/A n N/A bytesToNumber bytes N/A N/A N/A n low N/A n high N/A N/A n N/A gcd N/A N/A a b N/A N/A N/A N/A a b N/A N/A max a b N/A min a b N/A b N/A N/A N/A a b N/A b N/A a b N/A a N/A lcm N/A N/A a b N/A N/A N/A N/A N/A a b N/A gcd a b N/A invMod N/A N/A a b N/A N/A N/A N/A c d N/A a b N/A N/A uc ud N/A 1 0 N/A N/A c 0 N/A N/A q N/A d c N/A N/A c d N/A N/A d N/A q c c N/A N/A uc ud N/A N/A ud N/A q uc uc N/A N/A d 1 N/A N/A N/A ud b N/A 0 N/A N/A gmpyLoaded N/A powMod N/A N/A base power modulus N/A N/A N/A base N/A N/A gmpy mpz base N/A power N/A N/A gmpy mpz power N/A modulus N/A N/A gmpy mpz modulus N/A result N/A pow base power modulus N/A N/A long result N/A N/A powMod N/A N/A base power modulus N/A N/A N/A N/A power 0 N/A N/A result N/A pow base N/A power -1 modulus N/A result N/A invMod result modulus N/A result N/A N/A N/A pow base power modulus N/A makeSieve N/A N/A n N/A N/A N/A sieve N/A list N/A range n N/A count N/A range 2 N/A N/A int N/A N/A math sqrt n 1 N/A N/A N/A N/A sieve N/A count 0 N/A N/A N/A x N/A N/A sieve N/A count 2 N/A N/A x N/A len sieve N/A N/A N/A sieve N/A x 0 N/A x N/A sieve N/A count N/A sieve N/A x N/A x N/A sieve N/A 2 x N/A sieve N/A N/A sieve N/A makeSieve 1000 isPrime N/A N/A n iterations display N/A 5 False N/A N/A x sieve N/A N/A N/A x n N/A N/A True N/A N/A N/A n x 0 N/A N/A False N/A display N/A N/A N/A print * end N/A N/A s t N/A N/A n 1 0 N/A N/A N/A s 2 0 N/A N/A N/A s t N/A N/A s 2 N/A t 1 N/A a 2 N/A count N/A range iterations N/A N/A v N/A powMod a s n N/A N/A v 1 N/A N/A N/A i 0 N/A N/A v N/A n 1 N/A N/A N/A i N/A t 1 N/A N/A False N/A N/A N/A v i N/A N/A powMod v 2 n N/A i 1 N/A a N/A getRandomNumber 2 n N/A True N/A getRandomPrime N/A N/A bits display N/A False N/A N/A N/A bits 10 N/A N/A N/A AssertionError N/A low N/A N/A N/A 2 N/A bits 1 3 2 N/A high N/A N/A 2 bits 30 N/A p N/A getRandomNumber low high N/A p N/A 29 N/A p 30 N/A 1 N/A N/A display N/A N/A N/A print . end N/A p 30 N/A N/A p high N/A N/A p N/A getRandomNumber low high N/A p N/A 29 N/A p 30 N/A N/A isPrime p display display N/A N/A p N/A getRandomSafePrime N/A N/A bits display N/A False N/A N/A N/A bits 10 N/A N/A N/A AssertionError N/A low N/A N/A N/A 2 N/A bits 2 3 2 N/A high N/A N/A 2 N/A bits 1 30 N/A q N/A getRandomNumber low high N/A q N/A 29 N/A q 30 N/A 1 N/A N/A display N/A N/A N/A print . end N/A q 30 N/A N/A q high N/A N/A q N/A getRandomNumber low high N/A q N/A 29 N/A q 30 N/A N/A isPrime q 0 display display N/A N/A p N/A N/A 2 q 1 N/A N/A isPrime p display display N/A N/A N/A isPrime q display display N/A N/A p N/A