skip to content

Pairing and Bonding

SMP pairing picks Just Works, Passkey, Numeric Comparison or OOB from IO capabilities, and LE Secure Connections uses ECDH where Legacy pairing leaks its key. Asked which models stop MITM.

on this pageshow

explore

questions

6

In Bluetooth LE, what is the difference between pairing and bonding, and which keys does a bond keep for reconnecting without pairing again?

level: juniorimportance: must knowfreq 58%

answer

  1. one is a procedure, one is storage
  2. three phases, the last optional
  3. a 128-bit key encrypts reconnections
  4. a second key resolves private addresses

basics

~20 s

Pairing is the Security Manager procedure that authenticates the devices and creates keys to encrypt the link; bonding stores those keys so later connections re-encrypt without pairing. A bond keeps the Long Term Key and, if distributed, the Identity Resolving Key.

solid answer

~30 s

Pairing is the Security Manager procedure in three phases: the pairing feature exchange (IO capabilities, OOB flag, bonding, MITM and Secure Connections flags, key size), key generation, and an optional transport-specific key distribution on the now encrypted link. Bonding is the choice, signalled in the Bonding_Flags of the authentication requirements, to store the results. What is kept is the Long Term Key (LTK), which encrypts reconnections, and the Identity Resolving Key (IRK), which resolves private addresses, together with the identity address. Without bonding the keys serve one connection only.

go deeper

for a junior

Recall that pairing creates keys and bonding keeps them, and name the LTK and IRK as what a bond holds.

for a middle

Explain the three phases, which phase generates the LTK in Secure Connections, and why a distributed key inherits the pairing's security properties.

for a senior

Describe the reconnection-failure policy for bonded and unbonded pairs and how cross-transport derivation must not overwrite a stronger key.

for a principal

Decide which keys a product persists, for how long, and what a factory reset or a transfer of ownership must erase.

## Pairing is a procedure, bonding is storage **Pairing** is what the Security Manager (Core Specification Vol 3 Part H) does the first time two LE devices meet: it exchanges capabilities, authenticates the peers to a degree that depends on the chosen association model, and generates a key that encrypts the link. **Bonding** is a separate decision: keep the keys and the peer's identity so that the next connection can be encrypted at once instead of pairing again. The initiator and responder each state in the Bonding_Flags field of the authentication requirements whether they want a bond (`00` is No Bonding, `01` is Bonding). ## The three phases 1. **Phase 1, pairing feature exchange.** The Pairing Request and Pairing Response carry the IO Capability, the OOB data flag, the authentication requirements (Bonding_Flags, the MITM flag, the SC flag, the keypress flag and the CT2 flag), the maximum encryption key size (7 to 16 octets) and which keys each side will distribute. 2. **Phase 2, key generation.** Legacy pairing derives a Short Term Key (STK) from a Temporary Key (TK); LE Secure Connections runs an elliptic-curve Diffie-Hellman exchange on P-256 and generates the Long Term Key (LTK) directly. 3. **Phase 3, key distribution.** Optional, and performed only on a link that is already encrypted with the phase 2 key. This is where the bond's remaining contents travel. Phases 1 and 3 look the same whichever association model phase 2 used. ## What the bond keeps | Item | Purpose | Legacy pairing | LE Secure Connections | |---|---|---|---| | LTK | Encrypts the link on every reconnection | Distributed by the Peripheral (and optionally the Central), identified by EDIV and Rand | Generated in phase 2; EDIV and Rand are zero; not distributed | | IRK | Generates and resolves private addresses | Distributed | Distributed | | Identity address | Names the peer behind a private address | Sent with the IRK | Sent with the IRK | - The LTK is shortened (masked) to the negotiated encryption key size; the IRK is not. - Every distributed key inherits the security properties of the key that carried it. A Just Works pairing therefore produces an unauthenticated bond, and no later step upgrades it. - A received identity address is trusted only after a reconnection has succeeded with that address and the LTK. - Before Core 6.3 a third key, the CSRK, was distributed for data signing. The 6.3 Security Manager has no occurrence of it because data signing was removed in 6.3. ## Why bonding is a policy choice - Without bonding the phase 2 key still encrypts the current connection, but the next connection must pair again. - A sensor that is paired once and reconnects daily wants a bond; a shared device that meets many phones may choose not to store them. - Stored keys make the device's key storage part of its security. The Core text says a distributed key is only as strong as the algorithms inside the device that generated it, that it must carry 128 bits of entropy, and that it must not be generated only from information visible outside the Peripheral. ## Key size Each device holds a maximum and a minimum encryption key length between 7 and 16 octets. The shorter of the two maxima is used, and each side checks the result against its own minimum, ending pairing with the Pairing Failed reason Encryption Key Size if it is too short. A key shorter than 16 octets is masked after generation and before it is distributed, used or stored; the IRK is exempt. ## Dual-mode devices When both ends support Secure Connections on one transport, they may derive a key of identical strength and the same MITM property for the other transport (cross-transport key derivation). The conversion uses the AES-CMAC based functions h6 and h7; h7 is used only when both devices set the CT2 flag. The Generic Access Profile forbids deriving a key over an existing stronger one. ## What a reviewer asks - Is bonding requested, and what security properties does the stored key carry? - What happens when a bonded peer reconnects and encryption fails because the other side deleted its keys? For a bonded pair the Security Manager text says to notify the user of a security failure, not to re-pair silently. - Are the IRK and LTK stored with the pairing's security properties, so a later service check can compare them?

  • A bonded peripheral reconnects but the central has deleted its stored keys. What should the peripheral side do?
    The Security Manager text distinguishes by security properties and bonding. For a bonded pair, whichever properties the key had, the device notifies the user of a security failure instead of re-pairing on its own. Only for a pair that is not bonded may it start pairing automatically (recommended for unauthenticated keys) or ask the user first (recommended for authenticated keys).
  • Why does a Secure Connections bond contain no distributed LTK, and what travels in key distribution instead?
    The LTK is generated in phase 2 by both sides from the ECDH result, so each side already holds it and EDIV and Rand are set to zero. Phase 3 then carries at most the IRK and the identity address, over the link just encrypted with that LTK.

  • Treats pairing and bonding as the same thing.
  • Says the bond stores the passkey the user typed.
  • Believes a Just Works bond can be upgraded to authenticated later.
  • Thinks Secure Connections still distributes the LTK in phase 3.
  • Says the IRK is shortened to the negotiated encryption key size.

Assumes Core 6.3. LE Secure Connections (Core 4.2) generates the LTK instead of distributing it; the CSRK is absent from the 6.3 Security Manager because data signing was removed in 6.3.

open as a page

In LE pairing, how do IO capabilities and the MITM and OOB flags select the association model, and which models resist an active man-in-the-middle?

level: middleimportance: must knowfreq 50%

basics

~20 s

OOB data wins when present, neither side requesting MITM gives Just Works, otherwise the IO capability pair decides. Numeric Comparison and Passkey Entry in Secure Connections resist an active interloper, OOB does if its channel does, and Just Works never does.

open as a page

Which LE association model does a display-less, one-button blood-pressure cuff get when pairing with a phone, and what does it not protect against?

level: juniorimportance: should knowfreq 52%

basics

~20 s

A device with no display and no numeric input reports NoInputNoOutput, so the pairing selects Just Works. The link gets encrypted, but the key is unauthenticated: Just Works gives no protection against an active man-in-the-middle during pairing.

open as a page

How does LE Secure Connections differ from legacy pairing, and why can an eavesdropper present during legacy pairing recover its keys?

level: middleimportance: should knowfreq 38%

basics

~20 s

Secure Connections agrees the key with ECDH on P-256 and never sends it. Legacy pairing derives it from a Temporary Key of zero, six digits or OOB data, so a listener at pairing can recover it unless the OOB key is strong.

open as a page

A security review of a dual-mode product cites KNOB (CVE-2019-9506) and BIAS (CVE-2020-10135): what did each expose about BR/EDR, and what did the specification and the SIG change?

level: seniorimportance: should knowfreq 22%

basics

~20 s

KNOB (CVE-2019-9506): BR/EDR key-length negotiation could be driven down, answered by a 7-octet floor. BIAS (CVE-2020-10135): an impostor of a bonded peer could pass BR/EDR authentication without the link key, answered by mutual authentication and downgrade checks.

open as a page

A maker ships a display-less, one-button LE blood-pressure cuff for patients' phones: which pairing should it ship, and what should it tell a hospital procurement review that pairing resists?

level: principalimportance: should knowfreq 14%

basics

~20 s

Ship Secure Connections, refuse legacy pairing and say plainly that Just Works is encrypted but unauthenticated. If the data needs authenticated pairing, add an OOB channel or a display; otherwise limit pairing to a user-initiated window.

open as a page