Module Expr Str ImportFrom alias ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Call NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Call NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad NameLoad If CompareGtE NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad NameLoad If CompareGtE NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Return CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad NameLoad If CompareGtE NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad If CompareNotEq Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call NameLoad NameLoad If CompareGtE NameLoad AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr If BoolOpOr CompareNotEq SubscriptLoad NameLoad Index Num Num CompareNotEq SubscriptLoad NameLoad Index Num Num body Return NameLoad For NameStore Call NameLoad Num BinOpSub Call NameLoad NameLoad Num body If CompareEq SubscriptLoad NameLoad Index NameLoad Num body Break orelse Return NameLoad Return SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad decorator_list Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call NameLoad ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num orelse Assign NameStore Call NameLoad ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpSub Call NameLoad AttributeLoad NameLoad attr BinOpAdd Call NameLoad NameLoad Num If CompareEq NameLoad Num body Assign NameStore BinOpMult ListLoad Num NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call NameLoad ListLoad While CompareLt Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad BinOpMult NameLoad Num Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareNotEq NameLoad Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad orelse Raise Call NameLoad Assign NameStore Call NameLoad BinOpAdd BinOpAdd ListLoad Num NameLoad NameLoad ListLoad Num Assign NameStore BinOpAdd NameLoad NameLoad Return NameLoad decorator_list decorator_list
N/A N/A Abstract class for RSA. cryptomath * RSAKey N/A N/A N/A This is an abstract base class for RSA keys.

    Particular implementations of RSA keys, such as
    L{openssl_rsakey.OpenSSL_RSAKey},
    L{python_rsakey.Python_RSAKey}, and
    L{pycrypto_rsakey.PyCrypto_RSAKey},
    inherit from this.

    To create or parse an RSA key, don't use one of these classes
    directly.  Instead, use the factory functions in
    L{tlslite.utils.keyfactory}.
     __init__ N/A N/A self n e N/A 0 0 N/A N/A Create a new RSA key.

        If n and e are passed in, the new key will be initialized.

        @type n: int
        @param n: RSA modulus.

        @type e: int
        @param e: RSA public exponent.
         N/A N/A NotImplementedError N/A __len__ N/A N/A self N/A N/A N/A Return the length of this key in bits.

        @rtype: int
         N/A N/A numBits N/A self n N/A hasPrivateKey N/A N/A self N/A N/A N/A Return whether or not this key has a private component.

        @rtype: bool
         N/A N/A NotImplementedError N/A hashAndSign N/A N/A self bytes N/A N/A N/A Hash and sign the passed-in bytes.

        This requires the key to have a private component.  It performs
        a PKCS1-SHA1 signature on the passed-in data.

        @type bytes: str or L{bytearray} of unsigned bytes
        @param bytes: The value which will be hashed and signed.

        @rtype: L{bytearray} of unsigned bytes.
        @return: A PKCS1-SHA1 signature on the passed-in data.
         N/A N/A N/A isinstance bytes N/A type N/A N/A bytes N/A bytesToString bytes N/A hashBytes N/A stringToBytes N/A N/A N/A sha1 bytes digest N/A prefixedHashBytes N/A N/A self _addPKCS1SHA1Prefix hashBytes N/A sigBytes N/A N/A self sign prefixedHashBytes N/A sigBytes N/A hashAndVerify N/A N/A self sigBytes bytes N/A N/A N/A Hash and verify the passed-in bytes with the signature.

        This verifies a PKCS1-SHA1 signature on the passed-in data.

        @type sigBytes: L{bytearray} of unsigned bytes
        @param sigBytes: A PKCS1-SHA1 signature.

        @type bytes: str or L{bytearray} of unsigned bytes
        @param bytes: The value which will be hashed and verified.

        @rtype: bool
        @return: Whether the signature matches the passed-in data.
         N/A N/A N/A isinstance bytes N/A type N/A N/A bytes N/A bytesToString bytes N/A hashBytes N/A stringToBytes N/A N/A N/A sha1 bytes digest N/A prefixedHashBytes N/A N/A self _addPKCS1SHA1Prefix hashBytes N/A N/A N/A self verify sigBytes prefixedHashBytes N/A sign N/A N/A self bytes N/A N/A N/A Sign the passed-in bytes.

        This requires the key to have a private component.  It performs
        a PKCS1 signature on the passed-in data.

        @type bytes: L{bytearray} of unsigned bytes
        @param bytes: The value which will be signed.

        @rtype: L{bytearray} of unsigned bytes.
        @return: A PKCS1 signature on the passed-in data.
         N/A N/A N/A N/A self hasPrivateKey N/A N/A N/A AssertionError N/A paddedBytes N/A N/A self _addPKCS1Padding bytes 1 N/A m N/A bytesToNumber paddedBytes N/A N/A m N/A self n N/A N/A N/A ValueError N/A c N/A N/A self _rawPrivateKeyOp m N/A sigBytes N/A numberToBytes c N/A numBytes N/A self n N/A sigBytes N/A verify N/A N/A self sigBytes bytes N/A N/A N/A Verify the passed-in bytes with the signature.

        This verifies a PKCS1 signature on the passed-in data.

        @type sigBytes: L{bytearray} of unsigned bytes
        @param sigBytes: A PKCS1 signature.

        @type bytes: L{bytearray} of unsigned bytes
        @param bytes: The value which will be verified.

        @rtype: bool
        @return: Whether the signature matches the passed-in data.
         N/A N/A N/A len sigBytes N/A numBytes N/A self n N/A N/A False N/A paddedBytes N/A N/A self _addPKCS1Padding bytes 1 N/A c N/A bytesToNumber sigBytes N/A N/A c N/A self n N/A N/A False N/A m N/A N/A self _rawPublicKeyOp c N/A checkBytes N/A numberToBytes m N/A numBytes N/A self n N/A N/A checkBytes paddedBytes N/A encrypt N/A N/A self bytes N/A N/A N/A Encrypt the passed-in bytes.

        This performs PKCS1 encryption of the passed-in data.

        @type bytes: L{bytearray} of unsigned bytes
        @param bytes: The value which will be encrypted.

        @rtype: L{bytearray} of unsigned bytes.
        @return: A PKCS1 encryption of the passed-in data.
         N/A paddedBytes N/A N/A self _addPKCS1Padding bytes 2 N/A m N/A bytesToNumber paddedBytes N/A N/A m N/A self n N/A N/A N/A ValueError N/A c N/A N/A self _rawPublicKeyOp m N/A encBytes N/A numberToBytes c N/A numBytes N/A self n N/A encBytes N/A decrypt N/A N/A self encBytes N/A N/A N/A Decrypt the passed-in bytes.

        This requires the key to have a private component.  It performs
        PKCS1 decryption of the passed-in data.

        @type encBytes: L{bytearray} of unsigned bytes
        @param encBytes: The value which will be decrypted.

        @rtype: L{bytearray} of unsigned bytes or None.
        @return: A PKCS1 decryption of the passed-in data or None if
        the data is not properly formatted.
         N/A N/A N/A N/A self hasPrivateKey N/A N/A N/A AssertionError N/A N/A N/A len encBytes N/A numBytes N/A self n N/A N/A None N/A c N/A bytesToNumber encBytes N/A N/A c N/A self n N/A N/A None N/A m N/A N/A self _rawPrivateKeyOp c N/A decBytes N/A numberToBytes m N/A numBytes N/A self n N/A N/A N/A N/A decBytes N/A 0 0 N/A N/A decBytes N/A 1 2 N/A N/A None N/A x N/A range 1 N/A N/A len decBytes 1 N/A N/A N/A N/A decBytes N/A x 0 N/A N/A N/A N/A None N/A N/A decBytes N/A N/A x 1 N/A _rawPrivateKeyOp N/A N/A self m N/A N/A N/A N/A NotImplementedError N/A _rawPublicKeyOp N/A N/A self c N/A N/A N/A N/A NotImplementedError N/A acceptsPassword N/A N/A self N/A N/A N/A Return True if the write() method accepts a password for use
        in encrypting the private key.

        @rtype: bool
         N/A N/A NotImplementedError N/A write N/A N/A self password N/A None N/A N/A Return a string containing the key.

        @rtype: str
        @return: A string describing the key, in whichever format (PEM)
        is native to the implementation.
         N/A N/A NotImplementedError N/A generate N/A N/A bits N/A N/A N/A Generate a new key with the specified bit length.

        @rtype: L{tlslite.utils.RSAKey.RSAKey}
         N/A N/A NotImplementedError N/A N/A generate N/A staticmethod generate _addPKCS1SHA1Prefix N/A N/A self bytes withNULL N/A False N/A N/A N/A withNULL N/A N/A prefixBytes N/A createByteArraySequence N/A 48 31 48 7 6 5 43 14 3 2 26 4 20 N/A N/A prefixBytes N/A createByteArraySequence N/A 48 33 48 9 6 5 43 14 3 2 26 5 0 4 20 N/A prefixedBytes N/A prefixBytes bytes N/A prefixedBytes N/A _addPKCS1Padding N/A N/A self bytes blockType N/A N/A N/A padLength N/A N/A numBytes N/A self n N/A N/A len bytes 3 N/A N/A blockType 1 N/A N/A pad N/A N/A 255 padLength N/A N/A N/A blockType 2 N/A N/A pad N/A createByteArraySequence N/A N/A N/A N/A len pad padLength N/A N/A padBytes N/A getRandomBytes N/A padLength 2 N/A pad N/A b N/A b padBytes N/A b 0 N/A pad N/A pad N/A padLength N/A N/A N/A AssertionError N/A padding N/A createByteArraySequence N/A N/A N/A 0 blockType pad N/A 0 N/A paddedBytes N/A padding bytes N/A paddedBytes N/A N/A