Package dpkt :: Module ssl_ciphersuites :: Class CipherSuite
[hide private]
[frames] | no frames]

Class CipherSuite

source code

object --+
         |
        CipherSuite


Encapsulates a cipher suite.

Members/args:
* code: two-byte ID code, as int
* kx: key exchange algorithm, e.g. 'RSA' or 'DHE'
* auth: authentication algorithm, e.g. 'RSA' or 'DSS'
* cipher: stream or block cipher algorithm, e.g. 'AES_128'
* mode: mode of operation for block ciphers, e.g. 'CBC' or 'GCM'
* mac: message authentication code algorithm, e.g. 'MD5' or 'SHA256'
* name: cipher suite name as defined in the RFCs,
    e.g. 'TLS_RSA_WITH_RC4_40_MD5', can be generated by default from the
    other parameters
* encoding: encoding algorithm, defaults to cipher+mode
Additional members:
* kx_auth: kx+auth algorithm, as 'KeyExchangeAlgorithm' in RFCs

Instance Methods [hide private]
 
__init__(self, code, kx, auth, cipher, mode, mac, name=None, encoding=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  MAC_SIZES = {'MD5': 16, 'SHA': 20, 'SHA256': 32, 'SHA384': 48}
  BLOCK_SIZES = {'AES_128': 16, 'AES_256': 16}
Properties [hide private]
  kx
  auth
  kx_auth
  encoding
  name
  mac_size
In bytes.
  block_size
In bytes.

Inherited from object: __class__

Method Details [hide private]

__init__(self, code, kx, auth, cipher, mode, mac, name=None, encoding=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details [hide private]

kx

Get Method:
unreachable.kx(self)

auth

Get Method:
unreachable.auth(self)

kx_auth

Get Method:
unreachable.kx_auth(self)

encoding

Get Method:
unreachable.encoding(self)

name

Get Method:
unreachable.name(self)

mac_size

In bytes. Default to 0.

Get Method:
unreachable.mac_size(self) - In bytes.

block_size

In bytes. Default to 1.

Get Method:
unreachable.block_size(self) - In bytes.