twisted.conch.ssh._kex
module documentationtwisted.conch.ssh
View Source
SSH key exchange handling.
Function | getKex | Get a description of a named key exchange algorithm. |
Function | isFixedGroup | Returns True if kexAlgorithm has a fixed prime
/ generator group. |
Function | getHashProcessor | Get the hash algorithm callable to use in key exchange. |
Function | getDHGeneratorAndPrime | Get the generator and the prime to use in key exchange. |
Function | getSupportedKeyExchanges | Get a list of supported key exchange algorithm names in order of preference. |
Interface | _IKexAlgorithm | An _IKexAlgorithm
describes a key exchange algorithm. |
Interface | _IFixedGroupKexAlgorithm | An _IFixedGroupKexAlgorithm
describes a key exchange algorithm with a fixed prime / generator
group. |
Interface | _IGroupExchangeKexAlgorithm | An _IGroupExchangeKexAlgorithm
describes a key exchange algorithm that uses group exchange between the
client and server. |
Class | _DHGroupExchangeSHA256 | Diffie-Hellman Group and Key Exchange with SHA-256 as HASH. Defined in RFC 4419, 4.2. |
Class | _DHGroupExchangeSHA1 | Diffie-Hellman Group and Key Exchange with SHA-1 as HASH. Defined in RFC 4419, 4.1. |
Class | _DHGroup1SHA1 | Diffie-Hellman key exchange with SHA-1 as HASH, and Oakley Group 2 (1024-bit MODP Group). Defined in RFC 4253, 8.1. |
Class | _DHGroup14SHA1 | Diffie-Hellman key exchange with SHA-1 as HASH and Oakley Group 14 (2048-bit MODP Group). Defined in RFC 4253, 8.2. |
Get a description of a named key exchange algorithm.
Parameters | kexAlgorithm | The key exchange algorithm name. (type: str ) |
Returns | A description of the key exchange algorithm named by
kexAlgorithm . (type: _IKexAlgorithm ) | |
Raises | ConchError | if the key exchange algorithm is not found. |
Returns True
if kexAlgorithm
has a fixed prime
/ generator group.
Parameters | kexAlgorithm | The key exchange algorithm name. (type: str ) |
Returns | True if kexAlgorithm has a fixed prime /
generator group, otherwise False . (type: bool ) |
Get the hash algorithm callable to use in key exchange.
Parameters | kexAlgorithm | The key exchange algorithm name. (type: str ) |
Returns | A callable hash algorithm constructor (e.g. hashlib.sha256 ). (type: callable ) |
Get the generator and the prime to use in key exchange.
Parameters | kexAlgorithm | The key exchange algorithm name. (type: str ) |
Returns | A tuple containing long generator and
long prime. (type: tuple ) |
Get a list of supported key exchange algorithm names in order of preference.
Returns | A list of supported key exchange algorithm names. (type: list of str ) |