Section 7.25

Out-of-band (OOB) association

Definition

Out-of-band (OOB) association is an association model of BLE §7.1 (Bluetooth Low Energy) pairing §7.17: one of the alternative ways in which pairing checks that a new shared key is shared with the intended device. The devices pass authentication §1.6 data over a channel other than the Bluetooth radio, such as NFC (Near Field Communication). In LE legacy pairing §7.20, that data is a 128-bit secret; in LE Secure Connections §7.21, it is a random number and a commitment to the sender’s public key. The protection is only as good as the other channel.

The idea

Anyone in radio range can send BLE messages, so the radio cannot tell a device which device sent a message. Passkey entry §7.23 and numeric comparison §7.24 let the user carry a short value between the devices, but they need a display or a keyboard, and a person can carry only about 20 bits. A second channel that the user controls physically avoids both limits: holding a phone against a device’s NFC tag, connecting a cable, or scanning a printed code moves 128 bits or more with no typing, and a long random value makes guessing hopeless.

The name says where the data travels, not how well it is protected. A second channel helps only if it has the property that the pairing protocol assumes: that the attacker cannot change the data and, in some cases, that the attacker cannot read it. To confirm that an email really comes from their bank, a careful customer calls the telephone number printed on their bank card rather than the one in the email; this works because the attacker wrote the email but not the card. If the attacker also printed the card, the second route adds nothing.

How it works

Choosing the model. In the first pairing message, each device states whether it holds out-of-band data from the other. In LE legacy pairing, OOB association is used only if both devices hold the other’s data. In LE Secure Connections (LE stands for Low Energy), it is used if at least one device holds the other’s data. When OOB association is chosen, the devices’ requests for MITM §7.26 (man-in-the-middle) protection play no part in the choice.

LE legacy pairing. The out-of-band data is the temporary key (TK), which the specification requires to be a 128-bit random number. Pairing then runs as for passkey entry: each device sends a confirm value computed from the TK and its own random number, reveals the random number, and checks the other’s confirm value; both derive the short-term key (STK) from the TK and the random numbers. The TK is the only secret in this computation. Anyone who reads the TK can compute the STK from a recording of the pairing. Anyone who replaces the TK on its way can pair with each device in turn.

LE Secure Connections. The devices use ECDH §19.1.5 (elliptic-curve Diffie–Hellman key agreement): each keeps a private number, sends a public key derived from it, and combines its private number with the other’s public key to reach a shared secret that listeners cannot compute. Each device that can send out-of-band data:

  1. picks a 128-bit random number rr;

  2. computes a commitment CC to its own public key PP: a value computed from PP and rr with a keyed function built from the AES (Advanced Encryption Standard) block cipher §15.3, which binds CC to PP, because an attacker cannot find another public key, with a private number the attacker knows, that gives the same CC;

  3. sends its address, rr and CC over the out-of-band channel.

The devices then exchange public keys by radio. A device that received out-of-band data recomputes CC from the public key that arrived by radio and the received rr, and aborts if the result differs. Finally both devices exchange check values that include the rr values, and derive the long-term key §7.28 (LTK) from the ECDH shared secret.

Two jobs of the out-of-band data. The specification gives the commitment and the random number different jobs.

The specification adds a rule for the record: the key is recorded as authenticated only if the out-of-band channel is known to be secure from eavesdropping. If it is not, or if that is unknown, the key is recorded as unauthenticated.

Worked example

Guessing a 128-bit value. The legacy TK has 2128≈3.4×10382^{128} \approx 3.4 \times 10^{38} possible values. A listener who recorded the pairing tests a candidate with 2 AES encryptions, as for passkey entry. At 10710^7 encryptions per second, that is 5×1065 \times 10^6 candidates per second, and testing all candidates takes 3.4×1038/(5×106)≈6.8×10313.4 \times 10^{38} / (5 \times 10^6) \approx 6.8 \times 10^{31} seconds, about 2.2×10242.2 \times 10^{24} years. The six-digit passkey of the same protocol falls in 0.2 seconds. With OOB association, guessing is no longer the attack; reading or replacing the TK on the out-of-band channel is.

A replaced label. A sensor B carries a printed code with its address, rBr_B and CBC_B. A phone A scans the code and pairs. An attacker M has stuck a label over it with M’s own address, rMr_M and a commitment CMC_M to M’s public key. The phone receives M’s public key by radio, recomputes the commitment, gets CMC_M, and accepts. The cryptography worked: the phone faithfully authenticated whoever controlled the label. The channel lacked integrity §1.9.

A photographed label. The label is genuine, but anyone near the sensor can photograph it, and rBr_B never changes. The phone’s check is still sound, because nobody can make another public key match CBC_B. The sensor’s check is not. The sensor received no out-of-band data, so it relies on its partner knowing rBr_B, and the attacker now knows rBr_B. The attacker can pair with the sensor and pass the sensor’s check. The channel had integrity but not the secrecy that this direction needs.

Stated precisely

Let the out-of-band data travel from device B to device A. Write PBP_B for B’s public key, rBr_B for B’s random number and CBC_B for B’s commitment to PBP_B under rBr_B. The channel must supply these properties:

If the properties that apply hold, and the attacker cannot compute the ECDH shared secret from the public keys, an attacker who alters the radio exchange is detected. Separately, the specification records the key as authenticated only if the channel is known to be secure from eavesdropping.

Limits and common mistakes

A second channel is not an independent one. A phone reads the NFC tag and runs the Bluetooth software under one operating system; an attacker who controls the phone controls both channels.

The short range of NFC raises the attacker’s cost but does not remove the attack. An attacker can listen with a large antenna from further away than touching distance, or relay the exchange between a victim’s tag and a distant phone.

OOB association authenticates whoever controls the out-of-band data. A sticker authenticates whoever placed it, not the device’s maker and not its name.

Fixed out-of-band data fixes rr, and under LE Secure Connections the public key that CC commits to, for the lifetime of the device. Everyone who reads the data once can use it forever.

If the out-of-band exchange fails and the devices fall back to Just Works §7.22, an attacker can force the fallback by blocking the out-of-band channel. That is a downgrade attack §1.27; a device that needs an authenticated key must refuse the weaker result.

Elsewhere in networking, out-of-band means control signals sent outside the main data stream. In BLE pairing it means only that authentication data travels outside the Bluetooth radio link.

Questions answered

Which security properties must the OOB channel supply?

The out-of-band (OOB) channel must always supply integrity and origin authentication, and it must also supply confidentiality wherever the pairing protocol relies on a value carried on it staying secret. In BLE (Bluetooth Low Energy) pairing, OOB association passes authentication data over a channel other than the radio, such as NFC (Near Field Communication). Integrity and origin mean that the receiving device gets exactly the data that the intended device sent; otherwise it authenticates whoever replaced the data.

Confidentiality is needed in two cases. In LE legacy pairing, the OOB data is the 128-bit temporary key, the only secret in the key computation, so a reader of the channel can decrypt a recorded pairing and act as a man-in-the-middle (MITM). The specification grants MITM protection only with a channel that resists both eavesdropping and MITM attacks. In LE Secure Connections, the data is a random number rr and a commitment to the sender’s public key. The commitment needs only integrity. If data flows in one direction only, the sending device authenticates its partner by the partner’s knowledge of rr, so rr must be secret and either new for each pairing or kept on a device with restricted access. The specification also records the key as authenticated only if the channel is known to be secure from eavesdropping. Finally, the devices that read and write the channel must be outside the attacker’s control. The name of the medium, such as NFC, supplies none of these properties by itself.

Related entries: Trust boundary (§1.3), Confidentiality (§1.8), Integrity (§1.9), MITM attack (§7.26), Pairing (§7.17), Numeric comparison (§7.24). Further reading: [18].