This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I cannot build project for AES ECB based on M52840.

Hi,

I wish to use AES ECB based on M52840. I use ble_app_uart example as template.

I enabled NRF_CRYPTO_ENABLED, NRF_CRYPTO_BACKEND_CC310_ENABLED and NRF_CRYPTO_BACKEND_CC310_AES_ECB_ENABLED.

The following is snippet.

#include "nrf_crypto_aes.h"

EncryptAES128(uint8_t* AES_Key, uint8_t* Plaintext, uint8_t* Ciphertext)
{

...
uint32_t err_code;
size_t len_out = 16;
nrf_crypto_aes_context_t ecb_encr_ctx;

err_code = nrf_crypto_aes_crypt(&ecb_encr_ctx, &g_nrf_crypto_aes_ecb_128_info, NRF_CRYPTO_ENCRYPT,
AES_Key, NULL, Plaintext, 16, Ciphertext, &len_out);
APP_ERROR_CHECK(err_code);

...

}

SES said:

Output/ble_app_lock Debug/Obj/lock_crypto.o: In function `EncryptAES128':
undefined reference to `nrf_crypto_aes_crypt'
undefined reference to `g_nrf_crypto_aes_ecb_128_info'
Build failed

Could you help me?

Thanks,

Jianxuan

Related