Part of twisted.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 SwartzClass | 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. |
Class | SSHCiphers | SSHCiphers represents all the encryption operations that need to occur to encrypt and authenticate the SSH connection. |
Function | _getRandomNumber | Generate a random number in the range [0, 2 ** bits). |
Function | _generateX | Generate a new value for the private key x. |
Class | _DummyCipher | A cipher for the none encryption method. |
Class | _Counter | Stateful counter which returns results packed in a byte string |
Parameters | 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.