module documentation
(source)

SSH key exchange handling.
Function get​DHGenerator​And​Prime Get the generator and the prime to use in key exchange.
Function get​Hash​Processor Get the hash algorithm callable to use in key exchange.
Function get​Kex Get a description of a named key exchange algorithm.
Function get​Supported​Key​Exchanges Get a list of supported key exchange algorithm names in order of preference.
Function is​Elliptic​Curve Returns True if kexAlgorithm is an elliptic curve.
Function is​Fixed​Group Returns True if kexAlgorithm has a fixed prime / generator group.
Interface _​IElliptic​Curve​Exchange​Kex​Algorithm An _IEllipticCurveExchangeKexAlgorithm describes a key exchange algorithm that uses an elliptic curve exchange between the client and server.
Interface _​IFixed​Group​Kex​Algorithm An _IFixedGroupKexAlgorithm describes a key exchange algorithm with a fixed prime / generator group.
Interface _​IGroup​Exchange​Kex​Algorithm An _IGroupExchangeKexAlgorithm describes a key exchange algorithm that uses group exchange between the client and server.
Interface _​IKex​Algorithm An _IKexAlgorithm describes a key exchange algorithm.
Class _​Curve25519​SHA256 Elliptic Curve Key Exchange using Curve25519 and SHA256. Defined in https://datatracker.ietf.org/doc/draft-ietf-curdle-ssh-curves/.
Class _​Curve25519​SHA256​Lib​SSH As _Curve25519SHA256, but with a pre-standardized algorithm name.
Class _​DHGroup14​SHA1 Diffie-Hellman key exchange with SHA-1 as HASH and Oakley Group 14 (2048-bit MODP Group). Defined in RFC 4253, 8.2.
Class _​DHGroup​Exchange​SHA1 Diffie-Hellman Group and Key Exchange with SHA-1 as HASH. Defined in RFC 4419, 4.1.
Class _​DHGroup​Exchange​SHA256 Diffie-Hellman Group and Key Exchange with SHA-256 as HASH. Defined in RFC 4419, 4.2.
Class _ECDH256 Elliptic Curve Key Exchange with SHA-256 as HASH. Defined in RFC 5656.
Class _ECDH384 Elliptic Curve Key Exchange with SHA-384 as HASH. Defined in RFC 5656.
Class _ECDH512 Elliptic Curve Key Exchange with SHA-512 as HASH. Defined in RFC 5656.
Variable _kex​Algorithms Undocumented
def getDHGeneratorAndPrime(kexAlgorithm): (source)
Get the generator and the prime to use in key exchange.
Parameters
kex​Algorithm:bytesThe key exchange algorithm name.
Returns
tupleA tuple containing int generator and int prime.
def getHashProcessor(kexAlgorithm): (source)
Get the hash algorithm callable to use in key exchange.
Parameters
kex​Algorithm:bytesThe key exchange algorithm name.
Returns
callableA callable hash algorithm constructor (e.g. hashlib.sha256).
def getKex(kexAlgorithm): (source)
Get a description of a named key exchange algorithm.
Parameters
kex​Algorithm:bytesThe key exchange algorithm name.
Returns
_IKexAlgorithmA description of the key exchange algorithm named by kexAlgorithm.
Raises
ConchErrorif the key exchange algorithm is not found.
def getSupportedKeyExchanges(): (source)
Get a list of supported key exchange algorithm names in order of preference.
Returns
list of bytesA list of supported key exchange algorithm names.
def isEllipticCurve(kexAlgorithm): (source)
Returns True if kexAlgorithm is an elliptic curve.
Parameters
kex​Algorithm:strThe key exchange algorithm name.
Returns
boolTrue if kexAlgorithm is an elliptic curve, otherwise False.
def isFixedGroup(kexAlgorithm): (source)
Returns True if kexAlgorithm has a fixed prime / generator group.
Parameters
kex​Algorithm:bytesThe key exchange algorithm name.
Returns
boolTrue if kexAlgorithm has a fixed prime / generator group, otherwise False.
_kexAlgorithms = (source)

Undocumented