nRF5 SDK v17.1.0
micro_ecc backend

The micro_ecc backend provides functionality to use micro_ecc in nrf_crypto.

All APIs in this backend are intended to be internal to nrf_crypto.


See Configuring nrf_crypto frontend and backends for details on enabling this backend.

Available frontend API

See Cryptography library - nrf_crypto for information about which nrf_crypto APIs can use this backend.

Installing micro-ecc

The cryptography library expects to find the compiled micro-ecc library in <InstallFolder>\external\micro-ecc\micro-ecc.

To install micro-ecc, complete the following steps:

  1. Install version 4.9-2015-q3-update of the GCC compiler toolchain for ARM. You can use ARM's Launchpad to find the toolchain for your operating system.
  2. Make sure that make is installed (see, for example, MinGW, GNU Make, or Xcode).
  3. Clone the micro-ecc GitHub repository into <InstallFolder>\external\micro-ecc\micro-ecc.
  4. From the InstallFolder\external\micro-ecc folder, run the provided script to build micro-ecc:
    • On Windows, run build_all.bat.
    • On Ubuntu/Linux and similar systems, run
  5. Run make to compile the micro-ecc library.
If you compile the micro-ecc library without using the provided Makefiles, make sure to use the default compilation options with -Os and optimization level 3. If you change the preprocessor macros (most importantly, uECC_VLI_NATIVE_LITTLE_ENDIAN=1), the library might not work properly.

Enabling micro-ecc support in selected examples

Some of the examples in this SDK use nrf_crypto to demonstrate the LESC functionality. For a list of these examples and the backends they support, refer to the table showing supported nrf_crypto backends. The examples marked with an asterisk in the table can be configured to use micro-ecc, but you must first manually add the micro-ecc library file to the project.

Follow these steps to enable micro-ecc support in these examples.

  1. Enable the micro-ecc backend by setting NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED to 1 in a text editor or through a graphical interface.
    Enabling micro-ecc backend

  2. Disable the corresponding configuration parameter in other nrf_crypto backends in order to enable micro-ecc.
  3. Add the micro-ecc library file to the project. Make sure to select the correct library appropriate for your architecture and compiler version.
    • SES
      Use the drag-and-drop feature to add the correct library file to any folder in the project file view. The file will be displayed in the project file list.
      Adding the library file in SES

    • IAR
      Use the drag-and-drop feature to add the correct library file to any folder in the project file view. The file will be displayed in the project file list.
      Adding the library file in IAR

    • Keil
      In the project file view, right-click the Application folder to open a context menu. Select Add existing file to group 'Application'.
      Context menu in Keil

      In the pop-up window that opens, change the file type to *.lib and select the correct version of the library to add.
      Selecting the library file in Keil

      Click Add.
    • GCC
      In the project makefile, add a line with a path to the library in the following scheme:
      LIB_FILES += \

Documentation feedback | Developer Zone | Subscribe | Updated