Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Which mode of AES 128 bit encryption is supported by nRF52805 and how do paring using OOB method.

Hi All,

I am using s112_nrf52_7.2.0_softdevice with nRF5_SDK_17.1.0 and Segger Embedded studio for nRF52805.

My application code is successfully patched for nRF52805 as provided in link and working fine. Now, I want to do paring & bonding using OOB method and also need to do encryption on some of the GATT Characteristic's payload. so, below points I need to clear

  1. Which type of AES 128 bit encryption is supported by nRF52805.
  2. Any Example of AES 128 bit encryption  & OOB that can work for Nrf52805.
  3. How to generate Random Number, is there any library.
  4. what will be considering points for OOB , AES 128 bit encryption and to generate random number.
  5. Is there any special hardware required for all of the above above points.

Please suggest any documents ,example, links or  helpful resources that have some implementation like this, thanks in advance.

Suresh

Parents
  • Hello Suresh,

    After reading your post my first impression is whatever you wanted to know it is already a part of Bluetooth Low Energy (BLE). So I would like to ask what you are trying to do. Is it just encrypt the link? If it is then you can use the BLE features for that ( which is supported by the SoftDevice and SDK out of the box).

    However There are the links which you can look at: 

     RNG needs an entropy source. And that is available in the nRF, and is used by the SoftDevice and other libraries that need entropy.  //infocenter.nordicsemi.com/topic/ps_nrf52805/rng.html?cp=4_6_0_5_11 

    Regarding hardware, for encryption, there is the CCM and ECB peripherals, and the CCM peripheral is specifically designed for Bluetooth encryption. https://infocenter.nordicsemi.com/topic/ps_nrf52805/ccm.html?cp=4_6_0_5_3  and https://infocenter.nordicsemi.com/topic/ps_nrf52805/ecb.html?cp=4_6_0_5_4 .This is handled by the SoftDevice and not something the application developer needs to think about. 

    but the nrf_crypto library provides a lot of SW libraries for various crypto operations (including AES variations) https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_crypto.html?cp=8_1_3_11. ''It provides APIs to run cryptographic operations in a portable way across all devices from the nRF family. nrf_crypto supports multiple implementations of the cryptographic operations, both from software libraries and hardware-accelerated crypto modules (like the ARM CC310 cryptographic subsystem that is available in nRF52840 devices).''

    I hope it helps. 

    Thanks.

    Best Regards,

    Kazi Afroza Sultana

  • thanks Kazi Afroza Sultana for reply.

    I have done everything for implementing LESC as of your suggestion, but after including necessary files and library for Crypto, I am running out of Flash memory. I am using Oberon backend as suggested in ble_app_hrs example.so now my question is that, Is it possible to implement LESC in nRF52805 as of its memory constraints. And How to minimize Memory consumptions. As hardware already designed for nRF52805 and we are almost at production stage, so I only have option to minimize the code the size and fit our application with in nRF52805. 

    Thanks in advance.

Reply
  • thanks Kazi Afroza Sultana for reply.

    I have done everything for implementing LESC as of your suggestion, but after including necessary files and library for Crypto, I am running out of Flash memory. I am using Oberon backend as suggested in ble_app_hrs example.so now my question is that, Is it possible to implement LESC in nRF52805 as of its memory constraints. And How to minimize Memory consumptions. As hardware already designed for nRF52805 and we are almost at production stage, so I only have option to minimize the code the size and fit our application with in nRF52805. 

    Thanks in advance.

Children