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

BLE encryption

Hi,

I want to encrypt the BLE data.

If I understand it right the cryptocell can't encrypt the data sent over BLE automatically, instead the application has to encrypt the data first then has to send the encrypted data over BLE, is that right !?

I saw in ble_gap.h file a sd_ble_gap_encrypt function, is it an BLE link automatic encryption ? if yes what encryption protocol is this !? is the ble central && peripheral examples have it already?

BR

JK

Parents
  • Hi,

    If you just want to encrypt the data transmitted over BLE without any very specific needs, then I suggest you stick with standard BLE security. If you use pairing or bonding, the BLE link is encrypted with 128 bit AES-CCM. The nRF5 devices have HW support for this, and the SDK has a number of examples that use pairing or bonding (most BLE examples do).

    You should be aware that there are two fundamentally different pairing procedures. LE legacy pairing, which has the weakness that an attacker that listens in on the pairing procedure can obtain the key. However, LE Secure Connections, which is also supported by the SDK, use a Diffie–Hellman key exchange to securely generate a shared key. You may also want to look into MITM protection, if relevant.

    This site has a good introduction to BLE security.

Reply
  • Hi,

    If you just want to encrypt the data transmitted over BLE without any very specific needs, then I suggest you stick with standard BLE security. If you use pairing or bonding, the BLE link is encrypted with 128 bit AES-CCM. The nRF5 devices have HW support for this, and the SDK has a number of examples that use pairing or bonding (most BLE examples do).

    You should be aware that there are two fundamentally different pairing procedures. LE legacy pairing, which has the weakness that an attacker that listens in on the pairing procedure can obtain the key. However, LE Secure Connections, which is also supported by the SDK, use a Diffie–Hellman key exchange to securely generate a shared key. You may also want to look into MITM protection, if relevant.

    This site has a good introduction to BLE security.

Children
Related