fixup! feat(core): Implement OPTIGA secure channel.

Andrew Kozlik 10 months ago
parent 3b40d67cdd
commit 98c68dbf63

@ -33,7 +33,7 @@
#include "sha2.h"
// Static buffer for commands and responses.
static uint8_t tx_buffer[OPTIGA_MAX_COMMAND_SIZE] = {0};
static uint8_t tx_buffer[OPTIGA_MAX_APDU_SIZE] = {0};
static size_t tx_size = 0;
// TODO change to operational \x07

@ -130,8 +130,8 @@ static uint8_t *const sec_chan_mseq = &sec_chan_encr_nonce[4];
static uint8_t *const sec_chan_sseq = &sec_chan_decr_nonce[4];
// Static buffer for encrypted commands and responses.
static uint8_t
sec_chan_buffer[OPTIGA_MAX_COMMAND_SIZE + SEC_CHAN_OVERHEAD_SIZE] = {0};
static uint8_t sec_chan_buffer[OPTIGA_MAX_APDU_SIZE + SEC_CHAN_OVERHEAD_SIZE] =
{0};
static size_t sec_chan_size = 0;
#ifdef NDEBUG

@ -28,8 +28,8 @@
// Maximum data register length supported by OPTIGA.
#define OPTIGA_DATA_REG_LEN 277
// Maximum command and response size supported by this library.
#define OPTIGA_MAX_COMMAND_SIZE 1750
// Maximum command and response APDU size supported by OPTIGA.
#define OPTIGA_MAX_APDU_SIZE 1557
optiga_result optiga_init(void);
optiga_result optiga_sec_chan_handshake(const uint8_t *secret,

Loading…
Cancel
Save