Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`conch`.`ssh`.`keys``

module documentation
(source)

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

Class | `FingerprintFormats` | Constants representing the supported formats of key fingerprints.
Class | `Key` | An object representing a key. A key can be either a public or private key. A public key can verify a signature; a private key can create or verify a signature. To generate a string that can be stored on disk, use the toString method...
Exception | `BadFingerPrintFormat` | Raises when unsupported fingerprint formats are presented to fingerprint.
Exception | `BadKeyError` | Raised when a key isn't what we expected from it.
Exception | `BadSignatureAlgorithmError` | Raised when a public key signature algorithm name isn't defined for this public key format.
Exception | `EncryptedKeyError` | Raised when an encrypted key is presented to fromString/fromFile without a password.
Exception | `PassphraseNormalizationError` | Raised when a passphrase contains Unicode characters that cannot be normalized using the available Unicode character database.
Variable | `Ed25519PrivateKey` | Undocumented
Variable | `Ed25519PublicKey` | Undocumented
Function | `_getPersistentRSAKey` | This function returns a persistent `Key`.
Function | `_normalizePassphrase` | Normalize a passphrase, which may be Unicode.
Variable | `_curveTable` | Undocumented
Variable | `_secToNist` | Undocumented

Ed25519PrivateKey = (source)

Undocumented

Ed25519PublicKey = (source)

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.FilePath` | Where the key is stored.
keySize:`int` | The size of the key, if it needs to be generated.
Returns
`Key` | A 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 `None` | The passphrase to normalize.
Returns
`bytes` or `None` | The normalized passphrase, if any.
Raises
`PassphraseNormalizationError` | if the passphrase is Unicode and cannot be normalized using the available Unicode character database.

_curveTable = (source)

Undocumented

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

Undocumented