tlslite.utils.python_rsakey module¶
Pure-Python RSA implementation.
-
class
tlslite.utils.python_rsakey.
Python_RSAKey
(n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0, key_type='rsa')¶ Bases:
tlslite.utils.rsakey.RSAKey
-
__init__
(n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0, key_type='rsa')¶ Initialise key directly from integers.
see also generate() and parsePEM().
-
acceptsPassword
()¶ Does it support encrypted key files.
-
static
generate
(bits, key_type='rsa')¶ Generate a private key with modulus ‘bits’ bit big.
key_type can be “rsa” for a universal rsaEncryption key or “rsa-pss” for a key that can be used only for RSASSA-PSS.
-
hasPrivateKey
()¶ Does the key has the associated private key (True) or is it only the public part (False).
-
static
parsePEM
(data, password_callback=None)¶ Parse a string containing a PEM-encoded <privateKey>.
-