security - Securing Bluetooth LE Messages -
i have requirement communicate custom bluetooth le device. communication needs be
- secure (plain text cannot read)
- not vulnerable replay attacks
- contained within 20 or 22 bytes per message bluetooth le restrictions (or phone api implementation restrictions)
trusting bluetooth le's native encryption alone seems poor choice based on this:
https://github.com/mikeryan/crackle/
so come implementing our own encryption. in normal client / server communication (tcp example) no message size restriction, aes-128 in cbc mode pre-shared private key might choice.
however bluetooth le
- there's not enough space transmit initialization vector each characteristic read / write
- it seems error prone keep track of changing ivs based on last block of last message received / transmitted, given multiple characteristics being broadcast etc.
have missed other way of making bluetooth le secure?
...fragment data 20 bytes , multiple write ble characteristic stored in gatt. need come protocol reassemble fragmented data.
to fight replay attack can generate, before each new connection, new challenge request , broadcast via advertisement. picked central , returned encrypted peripheral. make sure generate new challenge each new connection.
the bluetooth le pairing (not including oob) cannot trusted security point. there need encrypt data @ firmware application level on top of pairing (using work or better). implementation of symmetric encryption (aes128 or 256) challenge request way start.
lastly, suggest dig ble oob (out-of-band) pairing allows exchange of symmetric pairing key between central , peripheral. decent alternative secure communication. there couple of implementation nfc available.
Comments
Post a Comment