Bluetooth Pairing
Understanding Bluetooth Pairing
The pairing process has three phases: (1) Feature Exchange (devices announce I/O capabilities and security requirements), (2) Key Generation (ECDH exchange creates a shared secret, association model authenticates it), and (3) Key Distribution (Long-Term Key, Identity Resolving Key, Connection Signature Key are shared and optionally stored for bonding).
MITM (Man-in-the-Middle) protection depends on the association model. Just Works provides encryption but no MITM protection. Numeric Comparison and Passkey Entry provide MITM protection. OOB provides the strongest security by exchanging keys over a separate channel (NFC tap).
Mode 1 Level 2: Unauthenticated (Just Works)
Mode 1 Level 3: Authenticated (Passkey/NC)
Mode 1 Level 4: Authenticated + LE SC (ECDH P-256)
Level 4 provides forward secrecy
Association Model Comparison
| Model | User Action | MITM | Use Case |
|---|---|---|---|
| Just Works | None | No | Headsets, speakers |
| Numeric Comparison | Confirm 6-digit | Yes | Phone-to-phone |
| Passkey Entry | Enter 6-digit | Yes | Keyboards |
| OOB (NFC) | Tap devices | Yes | Quick pair |
Frequently Asked Questions
Pairing vs Bonding?
Pairing: one-time key generation via ECDH. Bonding: storing keys for automatic reconnection. Without bonding, must re-pair each time.
Association models?
Just Works (no MITM), Numeric Comparison (confirm code), Passkey (enter code), OOB (NFC tap, strongest).
Legacy vs Secure Connections?
Legacy (4.0): TK/STK, vulnerable to eavesdropping. Secure Connections (4.2+): ECDH P-256, forward secrecy.