twisted.conch.ssh.transport
module documentationtwisted.conch.ssh
View Source
The lowest level SSH protocol. This handles the key negotiation, the encryption and the compression. The transport layer is described in RFC 4253.
Maintainer: Paul Swartz
Class | SSHCiphers | SSHCiphers represents all the encryption operations that need to occur to encrypt and authenticate the SSH connection. |
Class | SSHTransportBase | Protocol supporting basic SSH functionality: sending/receiving packets and message dispatch. To connect to or run a server, you must use SSHClientTransport or SSHServerTransport. |
Class | SSHServerTransport | SSHServerTransport implements the server side of the SSH protocol. |
Class | SSHClientTransport | SSHClientTransport implements the client side of the SSH protocol. |
Function | _getRandomNumber | Generate a random number in the range [0, 2 ** bits). |
Function | _generateX | Generate a new value for the private key x. |
Class | _MACParams | _MACParams
represents the parameters necessary to compute SSH MAC (Message
Authenticate Codes). |
Function | _getSupportedCiphers | Build a list of ciphers that are supported by the backend in use. |
Class | _NullEncryptionContext | An encryption context that does not actually encrypt anything. |
Class | _DummyAlgorithm | An encryption algorithm that does not actually encrypt anything. |
Class | _DummyCipher | A cipher for the none encryption method. |
Generate a random number in the range [0, 2 ** bits).
Parameters | random | A callable taking a count of bytes and returning that many random bytes. (type: callable ) |
bits | The number of bits in the result. (type: int ) | |
Returns | The newly generated random number. (type: int
or long ) | |
Raises | ValueError | if bits is not a multiple of 8. |
Generate a new value for the private key x.
From RFC 2631, section 2.2:
X9.42 requires that the private key x be in the interval [2, (q - 2)]. x should be randomly generated in this interval.
Parameters | random | A callable taking a count of bytes and returning that many random bytes. (type: callable ) |
bits | The size of the key to generate, in bits. (type: int ) | |
Returns | A suitable 'x' value. (type: int ) |