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

What are the differences between libmbedcrypto.a and libmbedcrypto-software.a?

Hello,

I am wondering that what exactly are the differences between libmbedcrypto.a and libmbedcrypto-software.a?

I read through the SDK documentation about the opethread libraries part, and assuming that these two versions are interchangable.

However, I saw in the lastest SDK for thread, the cli example is using the software version and ncp example is using the hardware acc version. And I cannot build the cli example with the hardware acc version. I tried adding the cc310 lib and also the corresponding header files. Still not working.

So could anyone tell the exact usage of the two?

Thanks in advance

Best wishes

Bo

  • Hi,

    This is described in the documentation: ARM CryptoCell support

    What errors do you get if you try to use the other library?

    Best regards,
    Jørgen

  • Hi, Jorgen

    Thanks for your reply. I got the following error log when building cli example using libmbedcrypto.a in SES at link stage:

    1> Linking sh_firmware.elf
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-aes_ecb.o): In function `ot::Crypto::AesEcb::AesEcb()':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/aes_ecb.cpp:41: undefined reference to `mbedtls_aes_init'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-aes_ecb.o): In function `ot::Crypto::AesEcb::SetKey(unsigned char const*, unsigned short)':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/aes_ecb.cpp:46: undefined reference to `mbedtls_aes_setkey_enc'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-aes_ecb.o): In function `ot::Crypto::AesEcb::Encrypt(unsigned char const*, unsigned char*)':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/aes_ecb.cpp:51: undefined reference to `mbedtls_aes_crypt_ecb'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-aes_ecb.o): In function `ot::Crypto::AesEcb::~AesEcb()':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/aes_ecb.cpp:56: undefined reference to `mbedtls_aes_free'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-sha256.o): In function `ot::Crypto::Sha256::Sha256()':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/sha256.cpp:41: undefined reference to `mbedtls_sha256_init'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-sha256.o): In function `ot::Crypto::Sha256::~Sha256()':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/sha256.cpp:46: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-sha256.o): In function `ot::Crypto::Sha256::Start()':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/sha256.cpp:51: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-sha256.o): In function `ot::Crypto::Sha256::Update(unsigned char const*, unsigned short)':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/sha256.cpp:56: undefined reference to `mbedtls_sha256_update_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libopenthread-ftd.a(libopenthread_ftd_a-sha256.o): In function `ot::Crypto::Sha256::Finish(unsigned char*)':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../src/core/crypto/sha256.cpp:61: undefined reference to `mbedtls_sha256_finish_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ctr_drbg.o): In function `block_cipher_df':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:164: undefined reference to `mbedtls_aes_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:188: undefined reference to `mbedtls_aes_setkey_enc'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:210: undefined reference to `mbedtls_aes_crypt_ecb'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:227: undefined reference to `mbedtls_aes_setkey_enc'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:236: undefined reference to `mbedtls_aes_crypt_ecb'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:244: undefined reference to `mbedtls_aes_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ctr_drbg.o): In function `ctr_drbg_update_internal':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:285: undefined reference to `mbedtls_aes_crypt_ecb'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:299: undefined reference to `mbedtls_aes_setkey_enc'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ctr_drbg.o): In function `mbedtls_ctr_drbg_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:127: undefined reference to `mbedtls_aes_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ctr_drbg.o): In function `mbedtls_ctr_drbg_seed_entropy_len':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:86: undefined reference to `mbedtls_aes_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:97: undefined reference to `mbedtls_aes_setkey_enc'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ctr_drbg.o): In function `mbedtls_ctr_drbg_random_with_add':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ctr_drbg.c:432: undefined reference to `mbedtls_aes_crypt_ecb'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-entropy.o): In function `entropy_update':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:229: undefined reference to `mbedtls_sha256_update_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:231: undefined reference to `mbedtls_sha256_update_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:224: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-entropy.o): In function `mbedtls_entropy_init':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:82: undefined reference to `mbedtls_sha256_init'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-entropy.o): In function `mbedtls_entropy_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:137: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-entropy.o): In function `mbedtls_entropy_func':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:406: undefined reference to `mbedtls_sha256_finish_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:412: undefined reference to `mbedtls_sha256_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:413: undefined reference to `mbedtls_sha256_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:414: undefined reference to `mbedtls_sha256_starts_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/entropy.c:416: undefined reference to `mbedtls_sha256_update_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_process_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:442: undefined reference to `mbedtls_internal_sha256_process'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_clone_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:436: undefined reference to `mbedtls_sha256_clone'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_ctx_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:430: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_ctx_alloc':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:423: undefined reference to `mbedtls_sha256_init'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_finish_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:408: undefined reference to `mbedtls_sha256_finish_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_update_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:402: undefined reference to `mbedtls_sha256_update_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha224_starts_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:396: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-md_wrap.o): In function `sha256_starts_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/md_wrap.c:463: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-sha256.o): In function `mbedtls_sha256_ret':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/sha256.c:388: undefined reference to `mbedtls_sha256_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/sha256.c:390: undefined reference to `mbedtls_sha256_starts_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/sha256.c:393: undefined reference to `mbedtls_sha256_update_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/sha256.c:396: undefined reference to `mbedtls_sha256_finish_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/sha256.c:400: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_srv.o): In function `ssl_parse_supported_elliptic_curves':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_srv.c:319: undefined reference to `mbedtls_ecp_curve_info_from_tls_id'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `ssl_calc_finished_tls_sha256':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5114: undefined reference to `mbedtls_sha256_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5118: undefined reference to `mbedtls_sha256_clone'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5135: undefined reference to `mbedtls_sha256_finish_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5142: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `ssl_calc_verify_tls_sha256':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:1072: undefined reference to `mbedtls_sha256_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:1076: undefined reference to `mbedtls_sha256_clone'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:1077: undefined reference to `mbedtls_sha256_finish_ret'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:1082: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `ssl_update_checksum_sha256':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:4943: undefined reference to `mbedtls_sha256_update_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `ssl_update_checksum_start':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:4920: undefined reference to `mbedtls_sha256_update_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `mbedtls_ssl_reset_checksum':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:4902: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `mbedtls_ssl_handshake_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:7427: undefined reference to `mbedtls_sha256_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `ssl_handshake_params_init':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5503: undefined reference to `mbedtls_sha256_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:5504: undefined reference to `mbedtls_sha256_starts_ret'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_tls.o): In function `mbedtls_ssl_config_defaults':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_tls.c:7790: undefined reference to `mbedtls_ecp_grp_id_list'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-cipher_wrap.o): In function `aes_ctx_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/cipher_wrap.c:177: undefined reference to `mbedtls_aes_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-cipher_wrap.o): In function `aes_ctx_alloc':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/cipher_wrap.c:170: undefined reference to `mbedtls_aes_init'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-cipher_wrap.o): In function `aes_setkey_dec_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/cipher_wrap.c:154: undefined reference to `mbedtls_aes_setkey_dec'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-cipher_wrap.o): In function `aes_setkey_enc_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/cipher_wrap.c:160: undefined reference to `mbedtls_aes_setkey_enc'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-cipher_wrap.o): In function `aes_crypt_ecb_wrap':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/cipher_wrap.c:119: undefined reference to `mbedtls_aes_crypt_ecb'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecdh.o): In function `mbedtls_ecdh_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecdh.c:105: undefined reference to `mbedtls_ecp_group_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecdh.c:106: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecdh.c:107: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecdh.c:108: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecdh.c:109: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_write_len_point':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:156: undefined reference to `mbedtls_ecp_point_write_binary'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_kkp_read':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:383: undefined reference to `mbedtls_ecp_tls_read_point'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:384: undefined reference to `mbedtls_ecp_is_zero'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_zkp_read':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:244: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:245: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:258: undefined reference to `mbedtls_ecp_tls_read_point'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:281: undefined reference to `mbedtls_ecp_muladd'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:284: undefined reference to `mbedtls_ecp_point_cmp'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:291: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:292: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_zkp_write':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:323: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:328: undefined reference to `mbedtls_ecp_gen_keypair_base'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:336: undefined reference to `mbedtls_ecp_tls_write_point'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:352: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_kkp_write':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:419: undefined reference to `mbedtls_ecp_gen_keypair_base'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:421: undefined reference to `mbedtls_ecp_tls_write_point'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `ecjpake_ecp_add3':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:541: undefined reference to `mbedtls_ecp_muladd'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:542: undefined reference to `mbedtls_ecp_muladd'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_init':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:61: undefined reference to `mbedtls_ecp_group_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:64: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:65: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:66: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:67: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:68: undefined reference to `mbedtls_ecp_point_init'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_free':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:84: undefined reference to `mbedtls_ecp_group_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:86: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:87: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:88: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:89: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:90: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_setup':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:114: undefined reference to `mbedtls_ecp_group_load'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_read_round_two':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:563: undefined reference to `mbedtls_ecp_group_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:564: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:583: undefined reference to `mbedtls_ecp_tls_read_group'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:602: undefined reference to `mbedtls_ecp_group_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:603: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_write_round_two':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:655: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:656: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:670: undefined reference to `mbedtls_ecp_mul'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:687: undefined reference to `mbedtls_ecp_tls_write_group'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:697: undefined reference to `mbedtls_ecp_tls_write_point'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:709: undefined reference to `mbedtls_ecp_point_free'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:710: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ecjpake.o): In function `mbedtls_ecjpake_derive_secret':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:734: undefined reference to `mbedtls_ecp_point_init'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:747: undefined reference to `mbedtls_ecp_muladd'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:750: undefined reference to `mbedtls_ecp_mul'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ecjpake.c:759: undefined reference to `mbedtls_ecp_point_free'
    1> ../../../../../../../external/openthread/lib/gcc/libmbedcrypto.a(libmbedcrypto_a-ssl_cli.o): In function `ssl_write_supported_elliptic_curves_ext':
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_cli.c:283: undefined reference to `mbedtls_ecp_curve_info_from_grp_id'
    1> /build/KNGP-TOLL1-JOB1/openthread/examples/../third_party/mbedtls/repo/library/ssl_cli.c:309: undefined reference to `mbedtls_ecp_curve_info_from_grp_id'

    And the libs I included are as follows:

    Any idea?

    Thanks a million

    Best wishes

    Bo

  • Both NCP (UART) and CLI (UART) should be using HW version in Therad and Zigbee SDK v2.0.0. Which exact example did you use that used the software version?

  • Hi Jorgen

    I am using cli usb example in Therad and Zigbee SDK v2.0.0. And the the default library is the SW version in my downloaded package.

    BTW there are errors as well when building the ncp spi example using the software version.

    Thanks

    Best wishes

    Bo

  • Hi,

    I was able to reproduce this issue. It seems that the nrf52840-sdk-usb library used by this example have been built with HW crypto support disabled. The solution is to rebuild the library with HW crypto support. This can be done by removing the flag "DISABLE_CC310=1" on line 110 and 141 of the Makefile found in "nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac\external\openthread\project\lib\openthread_nrf52840\sdk\usb\armgcc\Makefile", and recompile as described in above link.

    For your convenience, I have attached rebuilt library that should solve the issue: libopenthread-nrf52840-sdk-usb.a

    Please replace the file in "nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac\external\openthread\lib\gcc" with the attached file.

    I have notified the developers and this issue should be resolved in next release of SDK for Thread.

    Best regards,
    Jørgen

Related