Files
noiseprotocol/noise/constants.py
Piotr Lizonczyk 865bbfe5ba Implemented cipher rekeying
noise/builder.py
- Added methods for rekeying cipherstates
- Added method for getting handshake hash (for channel binding)

noise/functions.py
- Added default rekey behavior and set it for AESGCM and ChaCha20

noise/constants.py
- Added MAX_NONCE

noise/state.py
- Added rekey method to CipherState
- Removed writing to noise_protocol instance in SymmetricState.
NoiseProtocol fills the appropriate field by taking the data from
HandshakeState now.
2017-09-02 17:38:02 +02:00

21 lines
295 B
Python

class Empty:
pass
# Handshake pattern tokens
TOKEN_E = 'e'
TOKEN_S = 's'
TOKEN_EE = 'ee'
TOKEN_ES = 'es'
TOKEN_SE = 'se'
TOKEN_SS = 'ss'
TOKEN_PSK = 'psk'
# In bytes, as in Section 8 of specification (rev 32)
MAX_PROTOCOL_NAME_LEN = 255
MAX_MESSAGE_LEN = 65535
MAX_NONCE = 2 ** 64 - 1