module documentation
(source)

Handling of RSA, DSA, ECDSA, and Ed25519 keys.

Class BadKeyError Raised when a key isn't what we expected from it.
Class EncryptedKeyError Raised when an encrypted key is presented to fromString/fromFile without a password.
Class BadFingerPrintFormat Raises when unsupported fingerprint formats are presented to fingerprint.
Class FingerprintFormats Constants representing the supported formats of key fingerprints.
Class PassphraseNormalizationError Raised when a passphrase contains Unicode characters that cannot be normalized using the available Unicode character database.
Class Key No summary
Variable _curveTable Undocumented
Variable _secToNist Undocumented
Function _normalizePassphrase Normalize a passphrase, which may be Unicode.
Function _getPersistentRSAKey This function returns a persistent Key.
_curveTable = (source)

Undocumented

_secToNist = (source)

Undocumented

(type: dict[bytes, bytes])
def _normalizePassphrase(passphrase): (source)

Normalize a passphrase, which may be Unicode.

If the passphrase is Unicode, this follows the requirements of NIST 800-63B, section 5.1.1.2 for Unicode characters in memorized secrets: it applies the Normalization Process for Stabilized Strings using NFKC normalization. The passphrase is then encoded using UTF-8.

ParameterspassphraseThe passphrase to normalize. (type: bytes or unicode or None)
ReturnsThe normalized passphrase, if any. (type: bytes or None)
RaisesPassphraseNormalizationErrorif the passphrase is Unicode and cannot be normalized using the available Unicode character database.
def _getPersistentRSAKey(location, keySize=4096): (source)

This function returns a persistent Key.

The key is loaded from a PEM file in location. If it does not exist, a key with the key size of keySize is generated and saved.

ParameterslocationWhere the key is stored. (type: twisted.python.filepath.FilePath)
keySizeThe size of the key, if it needs to be generated. (type: int)
ReturnsA persistent key. (type: Key)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.