Package tlslite :: Module messages :: Class ClientKeyExchange
[hide private]
[frames] | no frames]

Class ClientKeyExchange

source code


Handling of TLS Handshake protocol ClientKeyExchange message

Instance Methods [hide private]
 
__init__(self, cipherSuite, version=None)
Initialise ClientKeyExchange for reading or writing
source code
ClientKeyExchange
createDH(self, dh_Yc)
Set the client FFDH key share
source code
ClientKeyExchange
createECDH(self, ecdh_Yc)
Set the client ECDH key share
source code
ClientKeyExchange
createRSA(self, encryptedPreMasterSecret)
Set the encrypted PreMaster Secret
source code
ClientKeyExchange
createSRP(self, srp_A)
Set the SRP client answer
source code
ClientKeyExchange
parse(self, parser)
Deserialise the message from Parser
source code
bytearray
write(self)
Serialise the object
source code

Inherited from HandshakeMsg: postWrite

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

Instance Variables [hide private]
int cipherSuite
the cipher suite id used for the connection
int dh_Yc
client Finite Field Diffie-Hellman protocol key share
bytearray ecdh_Yc
encoded curve coordinates
bytearray encryptedPreMasterSecret
client selected PremMaster secret encrypted with server public key (from certificate)
int srp_A
SRP protocol client answer value
tuple(int, int) version
TLS protocol version used for the connection
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cipherSuite, version=None)
(Constructor)

source code 

Initialise ClientKeyExchange for reading or writing

Parameters:
  • cipherSuite (int) - id of the ciphersuite selected by server
  • version (tuple(int, int)) - protocol version selected by server
Overrides: object.__init__

createDH(self, dh_Yc)

source code 

Set the client FFDH key share

returns self

Parameters:
  • dh_Yc (int)
Returns: ClientKeyExchange

createECDH(self, ecdh_Yc)

source code 

Set the client ECDH key share

returns self

Parameters:
  • ecdh_Yc (bytearray)
Returns: ClientKeyExchange

createRSA(self, encryptedPreMasterSecret)

source code 

Set the encrypted PreMaster Secret

returns self

Parameters:
  • encryptedPreMasterSecret (bytearray)
Returns: ClientKeyExchange

createSRP(self, srp_A)

source code 

Set the SRP client answer

returns self

Parameters:
  • srp_A (int) - client SRP answer
Returns: ClientKeyExchange

parse(self, parser)

source code 

Deserialise the message from Parser

returns self

Parameters:
Returns: ClientKeyExchange