PROTOCOL_NAME = b'Noise_KK1_25519_AESGCM_SHA256\x00\x00\x00'

COMMAND_SIZE_LEN = 2
CFG_ADDRESS_SIZE = 2
MEM_ADDRESS_SIZE = 2
MEM_DATA_MAX_SIZE = 444

MCOUNTER_MAX = 15

MAC_AND_DESTROY_MAX = 127
MAC_AND_DESTROY_DATA_SIZE = 32  # Fixed size for MAC_And_Destroy data (API spec Table 37)

PAIRING_ADDRESS_SIZE = 2
PAIRING_KEY_MAX = 3
PAIRING_KEY_SIZE = 32

# Format [Optional command Length, Command ID]
# L3 Command IDs
CMD_ID_PING = 0x01

CMD_ID_PAIRING_KEY_WRITE = 0x10
CMD_ID_PAIRING_KEY_READ = 0x11
CMD_ID_PAIRING_KEY_INVALIDATE = 0x12

CMD_ID_R_CFG_WRITE = 0x20
CMD_ID_R_CFG_READ = 0x21
CMD_ID_R_CFG_ERASE = 0x22

CMD_ID_I_CFG_WRITE = 0x30
CMD_ID_I_CFG_READ = 0x31

CMD_ID_R_MEMDATA_WRITE = 0x40
CMD_ID_R_MEMDATA_READ = 0x41
CMD_ID_R_MEMDATA_ERASE = 0x42

CMD_ID_RANDOM_VALUE = 0x50

CMD_ID_ECC_KEY_GENERATE = 0x60
CMD_ID_ECC_KEY_STORE = 0x61
CMD_ID_ECC_KEY_READ = 0x62
CMD_ID_ECC_KEY_ERASE = 0x63

CMD_ID_ECDSA_SIGN = 0x70
CMD_ID_EDDSA_SIGN = 0x71

CMD_ID_MCOUNTER_INIT = 0x80
CMD_ID_MCOUNTER_UPDATE = 0x81
CMD_ID_MCOUNTER_GET = 0x82

CMD_ID_MAC_AND_DESTROY = 0x90
