t.c.s.t.SSHCiphers : class documentation

Part of twisted.conch.ssh.transport View Source View In Hierarchy

SSHCiphers represents all the encryption operations that need to occur to encrypt and authenticate the SSH connection.
Instance VariablesoutCipTypethe string type of the outgoing cipher.
inCipTypethe string type of the incoming cipher.
outMACTypethe string type of the incoming MAC.
inMACTypethe string type of the incoming MAC.
encBlockSizethe block size of the outgoing cipher.
decBlockSizethe block size of the incoming cipher.
verifyDigestSizethe size of the incoming MAC.
outMACa tuple of (<hash module>, <inner key>, <outer key>, <digest size>) representing the outgoing MAC.
inMAcsee outMAC, but for the incoming MAC.
Class VariablescipherMapA dictionary mapping SSH encryption names to 3-tuples of (<Crypto.Cipher.* name>, <block size>, <counter mode>)
macMapA 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>)
def __init__(self, outCip, inCip, outMac, inMac): (source)
Undocumented
def setKeys(self, outIV, outKey, inIV, inKey, outInteg, inInteg): (source)
Set up the ciphers and hashes using the given keys,
ParametersoutIVthe outgoing initialization vector
outKeythe outgoing encryption key
inIVthe incoming initialization vector
inKeythe incoming encryption key
outIntegthe outgoing integrity key
inIntegthe incoming integrity key.
def _getCipher(self, cip, iv, key): (source)
Creates an initialized cipher object.
Parameterscipthe name of the cipher: maps into Crypto.Cipher.*
ivthe initialzation vector
keythe encryption key
def _getMAC(self, mac, key): (source)
Gets a 4-tuple representing the message authentication code. (<hash module>, <inner hash value>, <outer hash value>, <digest size>)
Parametersmaca key mapping into macMap (type: str )
keythe MAC key. (type: str )
def encrypt(self, blocks): (source)
Encrypt blocks. Overridden by the encrypt method of a Crypto.Cipher.* object in setKeys().
Parametersblocks (type: str )
def decrypt(self, blocks): (source)
Decrypt blocks. See encrypt().
Parametersblocks (type: str )
def makeMAC(self, seqid, data): (source)
Create a message authentication code (MAC) for the given packet using the outgoing MAC values.
Parametersseqidthe sequence ID of the outgoing packet (type: int )
datathe data to create a MAC for (type: str )
Returns (type: str )
def verify(self, seqid, data, mac): (source)
Verify an incoming MAC using the incoming MAC values. Return True if the MAC is valid.
Parametersseqidthe sequence ID of the incoming packet (type: int )
datathe packet data to verify (type: str )
macthe MAC sent with the packet (type: str )
Returns (type: bool )
API Documentation for Twisted, generated by pydoctor at 2011-10-27 15:57:47.