NONCE_BITS = 64
PICKLE_SERIALIZE = 'serialize'
PICKLE_DESERIALIZE = 'deserialize'
CLIENT_RECEIVE_BUFFER_BYTES = 1024
SERVER_RECEIVE_BUFFER_BYTES = 1024

KEY_SIZE_BYTES = 32
IV_SIZE_BYTES = 16

BLOCK_LENGTH = 128
SEPARATOR = ','

# Packet Types
CONNECT_PACKET_TYPE = 'connect'
DH_PACKET_TYPE = 'dh_contribution'
LOGIN_CREDENTIALS_PACKET_TYPE = 'login_credentials'
COMMAND_PACKET_TYPE = 'command'
COMMAND_REPLY_PACKET_TYPE = 'command_reply'
INVALID_PACKET_TYPE = 'invalid'
RECEIVED_PACKET_TYPE = 'receipt'


# Server State
SERVER_LOGIN_SUCCESS_STATUS = 'login_success'
SERVER_LOGIN_FAILURE_STATUS = 'login_failure'
SERVER_NONCE_MISMATCH_STATUS = 'nonce_failure'
SERVER_VERIFYING_CREDENTIALS_STATUS = 'verifying_credentials'
SERVER_LOGGED_OUT_STATUS = 'logged_out'
SERVER_INVALID_COMMAND_STATUS = 'invalid'

# Keys
PACKET_USERNAME_KEY = 'username'
PACKET_PASSWORD_KEY = 'password'
PACKET_PACKET_TYPE_KEY = 'packet_type'
PACKET_ENCRYPTED_KEY = 'encrypted'
PACKET_NONCE_RECEIVED_KEY = 'nonce_received'
PACKET_NONCE_KEY = 'nonce'
PACKET_NONCE_1_KEY = PACKET_NONCE_KEY + '_1'
PACKET_NONCE_2_KEY = PACKET_NONCE_KEY + '_2'
PACKET_CLIENT_PUBLIC_KEY_KEY = 'client_public_key'
PACKET_COMMAND_KEY = 'command'
PACKET_LIST_KEY = 'list'
PACKET_COMMAND_OUTPUT_KEY = 'command_output'
PACKET_KEY_KEY = 'key'
PACKET_IV_KEY = 'iv'
PACKET_ERROR_KEY = 'error'

# Commands
COMMAND_LIST = 'list'
COMMAND_LOGOUT = 'logout'
COMMAND_SEND = 'send'


