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

Enabling Crypto Hardware backend feature on nRF52840

Hello,

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image. I am using ‘ble_app_blinky’.

I have queries on enabling HW crpto accelerator and back end mode.

1) If I want to enable HW crypto accelerator then do I need to enable NRF_CRYPTO_BACKEND_CC310_ENABLED or already taken care by NRF_CRYPTO_BACKEND_CC310_BL_ENABLED ?

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_crypto_config.html

2) If I enable NRF_CRYPTO_BACKEND_CC310_ENABLED, whether there is no need of micro-ecc and can I disable NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED ?

a) Even whether there is no need to compile and include micro_ecc_lib_nrf52.a if HW crypto accelerator is enabled.

Whether my above assumptions are correct ?

3) If I want to enable backend crypto, then whether do I need to disable NRF_CRYPTO_ENABLED.

a) As per below statement for frontend still needs backend functionality. But if I want backend functionality, still do I need front end by enabling NRF_CRYPTO_ENABLED.

“Keep in mind that at least one of the nrf_crypto backends is required to use the API functions”

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_crypto_config.html&anchor=lib_crypto_config_automatic_defines_usage

4) Whether all above macros changes to be enabled only in "Secure BLE bootloader" or even at application (Ex: ble_app_blinky).

5) What is the difference between “pca10056_s140_ble_debug” and “pca10056_s140_ble” (With and without _debug).

 

6) What is the difference between cryptography library with backend and frontend

a) (Is backend mean crypto runs in hardware and frontend mean crypto runs is in software. Then in that case what is “software backend” and “hardware backend”. Bit confusion about the terminology.

 

Thanks & Regards

Vishnu Beema

Parents
  • Hi Vishnu,

    Both DFU and crypto are complex issues, so I understand you need time to grasp it all. Please note that you can use an unmodified bootloader example project form the SDK (examples\dfu\secure_bootloader\pca10056_s140_ble), since that has all the relevant configuration for you (though you will need to change the public key, and potentially adopt a few things to your custom HW).

    beemavishnu said:
    My last query on above point '2a' is, without NRF_CRYPTO_BACKEND_CC310_BL_ENABLED enabled (But already enabled in secure ble bootloader), I generated ble_app_blinky package and able to do DFU over BLE secure Bluetooth. Even I enabled "Static Pass key" and tested the feature without enabling NRF_CRYPTO_BACKEND_CC310_BL_ENABLED macro. Sorry I may be confusing you.

    I think you are missing several concepts here. For DFU, the only thing that is relevant is the crypto support in the bootloader. So what you have enabled for the application is irrelevant in this regard. Also, you mention "Static Pass Key". This is relevant for the BLE pairing process, but is not relevant with regards to DFU, and is not related to crypto in DFU context (signature verification).

    Br,

    Einar

Reply
  • Hi Vishnu,

    Both DFU and crypto are complex issues, so I understand you need time to grasp it all. Please note that you can use an unmodified bootloader example project form the SDK (examples\dfu\secure_bootloader\pca10056_s140_ble), since that has all the relevant configuration for you (though you will need to change the public key, and potentially adopt a few things to your custom HW).

    beemavishnu said:
    My last query on above point '2a' is, without NRF_CRYPTO_BACKEND_CC310_BL_ENABLED enabled (But already enabled in secure ble bootloader), I generated ble_app_blinky package and able to do DFU over BLE secure Bluetooth. Even I enabled "Static Pass key" and tested the feature without enabling NRF_CRYPTO_BACKEND_CC310_BL_ENABLED macro. Sorry I may be confusing you.

    I think you are missing several concepts here. For DFU, the only thing that is relevant is the crypto support in the bootloader. So what you have enabled for the application is irrelevant in this regard. Also, you mention "Static Pass Key". This is relevant for the BLE pairing process, but is not relevant with regards to DFU, and is not related to crypto in DFU context (signature verification).

    Br,

    Einar

Children
No Data
Related