Part of twisted.conch.ssh.transport View Source View In Hierarchy
Instance Variables | outCipType | the string type of the outgoing cipher. |
inCipType | the string type of the incoming cipher. | |
outMACType | the string type of the incoming MAC. | |
inMACType | the string type of the incoming MAC. | |
encBlockSize | the block size of the outgoing cipher. | |
decBlockSize | the block size of the incoming cipher. | |
verifyDigestSize | the size of the incoming MAC. | |
outMAC | a tuple of (<hash module>, <inner key>, <outer key>, <digest size>) representing the outgoing MAC. | |
inMAc | see outMAC, but for the incoming MAC. | |
Class Variables | cipherMap | A dictionary mapping SSH encryption names to 3-tuples of (<Crypto.Cipher.* name>, <block size>, <counter mode>) |
macMap | A dictionary mapping SSH MAC names to hash modules. |
Method | __init__ | Undocumented |
Method | setKeys | Set up the ciphers and hashes using the given keys, |
Method | encrypt | Encrypt blocks. Overridden by the encrypt method of a Crypto.Cipher.* object in setKeys(). |
Method | decrypt | Decrypt blocks. See encrypt(). |
Method | makeMAC | Create a message authentication code (MAC) for the given packet using the outgoing MAC values. |
Method | verify | Verify an incoming MAC using the incoming MAC values. Return True if the MAC is valid. |
Method | _getCipher | Creates an initialized cipher object. |
Method | _getMAC | Gets a 4-tuple representing the message authentication code. (<hash module>, <inner hash value>, <outer hash value>, <digest size>) |
Parameters | outIV | the outgoing initialization vector |
outKey | the outgoing encryption key | |
inIV | the incoming initialization vector | |
inKey | the incoming encryption key | |
outInteg | the outgoing integrity key | |
inInteg | the incoming integrity key. |
Parameters | cip | the name of the cipher: maps into Crypto.Cipher.* |
iv | the initialzation vector | |
key | the encryption key |
Parameters | mac | a key mapping into macMap
(type: str
) |
key | the MAC key.
(type: str
) |
Parameters | blocks | (type: str
) |
Parameters | seqid | the sequence ID of the outgoing packet
(type: int
) |
data | the data to create a MAC for
(type: str
) | |
Returns | (type: str
) |
Parameters | seqid | the sequence ID of the incoming packet
(type: int
) |
data | the packet data to verify
(type: str
) | |
mac | the MAC sent with the packet
(type: str
) | |
Returns | (type: bool
) |