mbetls with bluetooth
I want to encrypt/decrypt my bluetooth messages with the mbedtls library. I have generated an ECDH key pair successfully. Which functions are the best choice in my case? I use a Bluetooth stack to send and receive my messages.
Thank you for helping me!
Are you planning on using TLS over Bluetooth?
Note that ECDH is an algorithm for Key Exchange, which uses ECC key pair. ECC key pair can be used for key exchange ( e.g. ECDH ) and signature ( ECDSA ). For encryption, it is not commonly used. I recommend you use some hybrid solution, which you will exchange your secret key between your two devices, and then use this key for symmetric cryptography, such as AES, as mentioned in this post and this.
Note that you would have to control both peers of the Bluetooth, in order to do this, as this is not part of the Bluetooth protocol. I recommend you also check with Bluetooth spec for any security suggestion.
Mbed TLS team member