This blog is describe how the bonding / pair works on the Bluetooth Low Energy.
In the Bluetooth Core Specification, there are three major architectural layers: Controller, Host and Application. Security Manager (SM) at the Host layer is to define the methods and protocols for pairing and key distribution, the corresponding security toolbox and Security Manager Protocol (SMP).
Pairing is performed to establish keys which can then be used to encrypt a link. A transport specific key distribution is then performed to share the keys. The keys can be used to encrypt a link in future reconnections, verify signed data, or perform random address resolution. In general, there are 3-phase for paring.
- Phase 1: Pairing Feature Exchange
- Phase 2 (LE legacy pairing): Short Term Key (STK) Generation
- Phase 2 (LE Secure Connections): Long Term Key (LTK) Generation
- Phase 3: Transport Specific Key Distribution
There are two difference pairings on the bluetooth specification.
- LE Legacy pairing
- LE Secure Connections (ready on the Bluetooth 4.2 specification)