This is an abstract base class for RSA keys.
To create or parse an RSA key, don't use one of these classes
directly. Instead, use the factory functions in tlslite.utils.keyfactory.
|
|
|
|
bytearray
|
MGF1(self,
mgfSeed,
maskLen,
hAlg)
Generate mask from passed-in seed. |
source code
|
|
|
|
|
|
|
|
int
|
__len__(self)
Return the length of this key in bits. |
source code
|
|
|
|
|
|
|
|
|
_raw_pkcs1_sign(self,
bytes)
Perform signature on raw data, add PKCS#1 padding. |
source code
|
|
|
_raw_pkcs1_verify(self,
sigBytes,
bytes)
Perform verification operation on raw PKCS#1 padded signature |
source code
|
|
bool
|
acceptsPassword(self)
Return True if the write() method accepts a password for use in
encrypting the private key. |
source code
|
|
bytearray of unsigned bytes or None.
|
|
bytearray of unsigned bytes.
|
|
bool
|
hasPrivateKey(self)
Return whether or not this key has a private component. |
source code
|
|
bytearray of unsigned bytes.
|
hashAndSign(self,
bytes,
rsaScheme=' PKCS1 ' ,
hAlg=' sha1 ' ,
sLen=0)
Hash and sign the passed-in bytes. |
source code
|
|
bool
|
hashAndVerify(self,
sigBytes,
bytes,
rsaScheme=' PKCS1 ' ,
hAlg=' sha1 ' ,
sLen=0)
Hash and verify the passed-in bytes with the signature. |
source code
|
|
bytearray of unsigned bytes.
|
sign(self,
bytes,
padding=' pkcs1 ' ,
hashAlg=None,
saltLen=None)
Sign the passed-in bytes. |
source code
|
|
bool
|
verify(self,
sigBytes,
bytes,
padding=' pkcs1 ' ,
hashAlg=None,
saltLen=None)
Verify the passed-in bytes with the signature. |
source code
|
|
str
|
|