Mistake on this page?
Report an issue in GitHub or email us

Mbed Crypto

Mbed OS provides Mbed Crypto for targets that require support for entropy injection. For information about Mbed Crypto, please refer to the Mbed Crypto repository.

Both targets newly ported to Mbed OS and existing targets that use entropy injection require passing tests to validate Mbed Crypto functionality.

We run tests by default on several supported boards. To run the tests on a custom board, you can also run the tests manually by specifying additional compiler flags from the command-line.

Testing

Mbed OS currently provides two tests for Mbed Crypto:

  • A test for initialization of the Mbed Crypto module.
  • A test for entropy injection feature.

To run these tests, make sure make sure your target configuration is set:

  1. extra_labels contains the label PSA. Please see an example using the K64F or Future Sequana.
  2. MBEDTLS_PSA_CRYPTO_C macro is enabled. Please see an example using the K64F or Future Sequana.
  3. MBEDTLS_ENTROPY_NV_SEED macro is enabled in the SPE if the device does not have TRNG or if you want the entropy injection test. Please see an example using the Future Sequana.
  4. MBEDTLS_PLATFORM_NV_SEED_READ_MACRO macro is set to mbed_default_seed_read in the SPE if the device does not have TRNG or if you want the entropy injection test. Please see an example using the Future Sequana.
  5. MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO macro is set to mbed_default_seed_write in the SPE if the device does not have TRNG or if you want the entropy injection test. Please see an example using the Future Sequana.

Compile and run

To compile and run the Mbed Crypto tests, run the following command:

mbed test -t <toolchain> -m <target> -n *entropy_inject,*crypto_init
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.