module documentation
(source)

Handling of RSA, DSA, ECDSA, and Ed25519 keys.
Class ​Bad​Finger​Print​Format Raises when unsupported fingerprint formats are presented to fingerprint.
Class ​Bad​Key​Error Raised when a key isn't what we expected from it.
Class ​Encrypted​Key​Error Raised when an encrypted key is presented to fromString/fromFile without a password.
Class ​Fingerprint​Formats Constants representing the supported formats of key fingerprints.
Class ​Key No summary
Class ​Passphrase​Normalization​Error Raised when a passphrase contains Unicode characters that cannot be normalized using the available Unicode character database.
Function _get​Persistent​RSAKey This function returns a persistent Key.
Function _normalize​Passphrase Normalize a passphrase, which may be Unicode.
Variable _curve​Table Undocumented
Variable _sec​To​Nist Undocumented
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.

Parameters
location:twisted.python.filepath.FilePathWhere the key is stored.
key​Size:intThe size of the key, if it needs to be generated.
Returns
KeyA persistent key.
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.

Parameters
passphrase:bytes or unicode or NoneThe passphrase to normalize.
Returns
bytes or NoneThe normalized passphrase, if any.
Raises
PassphraseNormalizationErrorif the passphrase is Unicode and cannot be normalized using the available Unicode character database.
_curveTable = (source)

Undocumented

_secToNist: dict[bytes, bytes] = (source)

Undocumented