Skip to content

Commit 9048839

Browse files
committed
samples: drivers: crypto: Add support for cc23x0
For the CCM mode, increase slightly the output buffer size because the cc23x0 directly fills this buffer with 16-byte blocks. This prevents from doing unnecessary memcpy that would have an impact on the driver's performance. Signed-off-by: Julien Panis <[email protected]>
1 parent d809bb7 commit 9048839

File tree

1 file changed

+3
-1
lines changed
  • samples/drivers/crypto/src

1 file changed

+3
-1
lines changed

samples/drivers/crypto/src/main.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ LOG_MODULE_REGISTER(main);
3131
#define CRYPTO_DEV_COMPAT nordic_nrf_ecb
3232
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_smartbond_crypto)
3333
#define CRYPTO_DEV_COMPAT renesas_smartbond_crypto
34+
#elif DT_HAS_COMPAT_STATUS_OKAY(ti_cc23x0_aes)
35+
#define CRYPTO_DEV_COMPAT ti_cc23x0_aes
3436
#elif CONFIG_CRYPTO_SI32
3537
#define CRYPTO_DEV_COMPAT silabs_si32_aes
3638
#else
@@ -396,7 +398,7 @@ static const uint8_t ccm_expected[31] = {0x58, 0x8c, 0x97, 0x9a, 0x61, 0xc6, 0x6
396398
void ccm_mode(const struct device *dev)
397399
{
398400
uint8_t encrypted[50] __aligned(IO_ALIGNMENT_BYTES);
399-
uint8_t decrypted[25] __aligned(IO_ALIGNMENT_BYTES);
401+
uint8_t decrypted[32] __aligned(IO_ALIGNMENT_BYTES);
400402
struct cipher_ctx ini = {
401403
.keylen = sizeof(ccm_key),
402404
.key.bit_stream = ccm_key,

0 commit comments

Comments
 (0)