BLE data transfer use AES/CCM encryption and unencryption

Hi,

      I development a elock device to use nordic 52832 chip. I want to transfer some information between phone app and my device. Like UUID / user account / user password.

for against BLE sniffer, we need use AES method to protect our information.

Can I follow  \examples\crypto\nrf_cc310\aes example to do it? Or any suggest for us? Our data transfer flow as below

 - phone app sent unlock command to our device

 - our device sent a random number to phone app

 - phone app response

- our device check response to unlock

Thank you.

John.

Parents
  • Why do you not just rely on the security features of BLE? When you use LE Secure Connections with some kind of MITM prevention, then the connection uses AES/CCM. Just make sure, that your lock makes sure, the connection is actually encrypted with a key that was obtained by the proper pairing.

  • Hi Robitzki,

           You mean I just need to enable MITM protected.

    1. My All data should encrypted by AES.

    2. Phone app can get a key from device when pairing boths.

    3. Is MITM a standard function on BLE?

    Do you have any example that can refer it?  which Nordic SDK version can support it?  

    Also, we don't want the user to have to enter the passkey by phone. In fact the user doesn't need to pick up the phone to unlock my device(Like auto lock and unlock)

    Thank you.

    John.

  • Hi Hung,

            I fully understand what you mean. After these questions I also know how I should design my system. Thank you very much. I need your help if I have any questions in the future.

    John.

  • Hi Hung,

        After our deeper research, now there is a question

    If I already used passkey to connected between my phone and my bike。My transmission is encrypted。

    If I lend my bike to my friend,Is he able to establish other passkey secure connection? Because my bike device already has my Key,Can there be two sets of keys? or the first one will be cleared?

    Thank you.

    John.

  • Hi John, 

    When you say passkey, is it the bluetooth bonding passkey ? 

    You can have bond with two different phones. You don't need to clear the first set of bond information.

    But the question is how you enable a new phone to connect and control the bike. It's more about security question. It's similar to what I wrote in the last reply. You need to have a way of allowing a new bond. Either by using your phone that already bonded and give a command to allow a new bond. Or by using for example a physical NFC key to allow adding a new bond. 

  • Hi Hung,

    When you say passkey, is it the bluetooth bonding passkey ?   Yes

          Our current thinking as below.

    1. The device enter into pairing mode

    2. The device show passkey on display when phone A want to pair the device

    3. Enter the passkey by keyboard on Phone A. The phone A bonded the device.

    4. Make the device enter pairing mode again through a method

    5. The device show passkey on display when phone B want to pair the device

    6. Enter the passkey by keyboard on Phone B. The phone B bonded the device.

    7. User can use phone A or Phone B to lock or unlock device.

    Because a bike may be used by two people. Can two Keys be able to unlock or lock this bike?

    Thank you.

    John.

  • Hi John, 


    Then how can you avoid an attacker to steal the bike ? 

    After you bonded the first phone A.

    Then an attacker with a phone C come and bond to the device, how do you avoid it being stolen by attacker with phone C ? 

Reply Children
Related