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

BLE_Security

Hi all,

I am having query regarding BLE Security.

Which options are provided by BLE for security.

Can anyone provide option in below category?

1. Security in Connection(Does Paring/bonding with some key will provide all security in connection)

2. Security on characteristics : Is there any way to hide service/characteristics till user authenticate any one Characteristic by writing something on that?

3. Security on data Transmission : Does BLE provid any method for Data security?or Pairing/bonding will do data security as well.Data encryption can create any burden on speed?

  • Hi BLE_Full_Stack,

     

    Link layer encryption is a part of the Bluetooth specification, and is supported natively by Android.

    The link is encrypted by using AES in CCM mode (HW block) with the encryption key exchanged during the pairing or bonding procedure.

    •  The softdevice uses the AES module to encrypt the link. Micro-ecc is optional, and can be used to make the key exchange more secure, but is not used for encryption.

     

    • This example demonstrates LE secure pairing. I.e., uses micro-ecc for secure key exchange (diffie- hellman), while the other examples support legacy pairing. Legacy pairing doesn't provide any protection against passive eavesdropping during initial key exchange.

    You can set the security level on characteristics to require encryption to access those. That is, the Central (e.g. phone) can't read or write to a characteristic before the link has been secured.

    •  All examples that includes the peer manager module support pairing and bonding. That is, all examples except from the ble_app_uart example.

    Here is a description on how you can use the Peer Manager and the Architecture.

    Some message sequence charts that illustrates the bonding procedure:

  • Hi Martin,

    Thanks for this guide.

    I  read that BLE Protocol provide these 3 methods for pairing

    1. Just Works

    2. PassKey

    3. Numeric

    4. OOB

    I am having nrf52832 ,with following I/O capability,

    Device : having 2 switch as GPIO , LCD = No, Keyboard = No.

    Android App : Keyboard = Yes, LCD = Yes

    1. So "PassKey" will works? or which method is suitable for these capabilities?I have gone through table for this.but i need suggestion from your side.

    2. Any other pairing method is suitable with this I/O capabilities?

    3. Does Hard coded Passkey is same as Passkey for BLE Secure?I guess it will not be secure to use hard coded Passkey.

    4. All data Transfer Encryption : Which method from below will encrypt all data transfer on link.

    - PassKey

    - Hard coded Passkey

    - Just Works

    Please help us.

  • Hello Martine,

    Just go through this question only.

    I want Hard coded Password at Android side.

    same password i will code in my firmware of device.

    But i need some event , when android asked for Password to device, i will press Switch and hard coded password will be sent from device.

    Android : Initiator

    Device : Responder

    Will it be possible with Just_Works/Pass_Key method??

    I am not much concerning about security.But i want this type of functionality.

  • Hi BLE_Full_Stack,

    I would recommend you to read through these three short articles to give you an understanding about the BLE security:

    1. Pairing Feature Exchange
    2. Key Generation Methods
    3. Pairing Passkey Entry
Related