Reply
Highlighted
Posts: 4
Registered: ‎08-02-2017

AES Encryption mbedtls library problem

Hi All

I am trying to include the mbedtls library into my project for AES encryption. However I seem to have a problem.

 

As per App Note AN0955 I have added the symbol MBEDTLS_CONFIG_FILE = "config-sl-crypto-all-acceleration.h"

 

I have also added the paths for the include libraries:

 

${StudioSdkPath}/util/third_party/mbedtls/configs

${StudioSdkPath}/util/third_party/mbedtls/include

${StudioSdkPath}/util/third_party/mbedtls/include/mbedtls

${StudioSdkPath}/util/third_party/mbedtls/sl_crypto/include

 

However I am still getting "undefined reference to"   bug to various mbedstls functions . 

E.G

mbedtls_aes_setkey_enc

mbedtls_aes_crypt_cbc

mbedtls_entropy_init

etc.

 

I have the following includes:

#include "mbedtls/aes.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"

#include "mbedtls/md.h"

#if !defined(MBEDTLS_CONFIG_FILE)
#include "config.h"
/*#include "config.h" */
#else
#include MBEDTLS_CONFIG_FILE
#endif

Posts: 2,960
Registered: ‎08-25-2015

Re: AES Encryption mbedtls library problem

Hi,

 

Check this example.

 

Regards,

Tiago