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.
def _getRandomNumber(random, bits): (source)

Generate a random number in the range [0, 2 ** bits).

ParametersrandomA callable taking a count of bytes and returning that many random bytes. (type: callable)
bitsThe number of bits in the result. (type: int)
ReturnsThe newly generated random number. (type: int or long)
RaisesValueErrorif bits is not a multiple of 8.
def _generateX(random, bits): (source)

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.
ParametersrandomA callable taking a count of bytes and returning that many random bytes. (type: callable)
bitsThe size of the key to generate, in bits. (type: int)
ReturnsA suitable 'x' value. (type: int)
def _getSupportedCiphers(): (source)

Build a list of ciphers that are supported by the backend in use.

Returnsa list of supported ciphers. (type: list of str)
API Documentation for Twisted, generated by pydoctor at 2016-10-29 16:19:29.