Section 19.5.8

Protocol downgrade, negotiation, and authenticated capabilities

Definition

A protocol downgrade is an attack that makes two parties settle on a weaker option than both support. Negotiation is the protocol step that chooses the option: each party declares its capabilities, meaning the versions, algorithms §14.1, key sizes and methods it supports, and a fixed rule picks one outcome. Authenticated capabilities are declarations that the parties later verify with a key the attacker lacks, so that a change made in transit is detected. A downgrade succeeds when the declarations are unauthenticated or when a party accepts a weak outcome.

Where it fits

Main entry: Downgrade attack (§1.27).

The Downgrade attack entry gives the general rule. Capability here means a supported feature, not a capability in the access-control §1.7 sense. Pairing in Bluetooth Low Energy (BLE) §7.1, the procedure in which two devices create shared keys, shows why one check covers only one of several negotiated choices. The Security Manager Protocol §7.19, which runs pairing, starts with a pairing request and a pairing response, sent before any key exists. Each states the device’s input/output capabilities (whether it has a display, yes-or-no buttons or a keyboard), whether it holds out-of-band data, values exchanged earlier over a channel other than Bluetooth, its authentication §1.6 requirements, including whether it asks for protection against a man-in-the-middle §7.26, an attacker who relays and alters messages between the two devices, and whether it supports LE Secure Connections §7.21 (LE stands for Low Energy), and the largest encryption key size §7.27 it accepts, from 7 to 16 bytes. From these fields both devices compute three outcomes: LE Secure Connections or LE legacy pairing §7.20; the association method, the way the pairing is confirmed against a man-in-the-middle, such as Just Works §7.22 (no confirmation), passkey entry §7.23 or numeric comparison §7.24; and the key size, the smaller of the two maxima.

An attacker who changes these first messages, or impersonates one device, has four separate levers.

  1. Key size. Lower the declared maximum to 7 bytes, so that the key has 7×8=567 \times 8 = 56 secret bits instead of 128. The KNOB attack (Key Negotiation of Bluetooth; Antonioli, Tippenhauer and Rasmussen, 2019) [272] did this in Bluetooth Classic, the older Bluetooth radio, where the negotiable minimum was then 1 byte.

  2. Association method. Declare no input or output, or drop the request for man-in-the-middle protection, so that the devices use Just Works, which does not authenticate the exchanged public keys. An attacker in the middle then runs a separate key agreement with each device.

  3. Pairing procedure. Clear the Secure Connections flag, so that the devices use LE legacy pairing, whose keys a passive eavesdropper can recover when Just Works or a passkey was used.

  4. No encryption. Impersonate a peer the victim has bonded with, meaning stored keys for, and report that the key is lost; a victim that continues without encryption gives up all protection.

A minimum key-size check closes the first lever only. A 16-byte key made by Just Works pairing passes the check, and the attacker in the middle knows that key.

LE Secure Connections authenticates part of the negotiation. At the end of pairing, each device sends a check value, computed with a key derived from the shared secret of elliptic-curve Diffie–Hellman §19.1.5 (ECDH) key agreement, in which each device combines its own private key with the other’s public key, over both random nonces §5.18, both device addresses and its own input/output capabilities, out-of-band flag and authentication requirements. The other device recomputes the value from the fields it received, so a field changed in transit makes the check fail, unless the attacker knows the key behind the check value. The attacker knows it when the key agreement was not authenticated: after Just Works, the attacker in the middle holds the shared secret of each side and computes check values that match what each side saw. The maximum key size is not among the checked fields, so each device’s own minimum is its only protection there. Authenticating a negotiation protects the outcome only if every outcome a party accepts resists the attacker.

The Bluetooth Core Specification defines Secure Connections Only mode for this purpose. A device in this mode accepts new connections to its services only at level 4 of LE security mode §7.33 1: encryption with a 16-byte key made by authenticated LE Secure Connections pairing. Services that need no security are exempt. The mode thus refuses LE legacy pairing, Just Works, shorter keys and unencrypted access at once. A device without the mode gets the same protection from the same refusals: reject pairing without the Secure Connections flag, reject unauthenticated pairing, require 16-byte keys, require that level before any protected data is read or written, and after a reported key loss delete the bond and pair again with the user’s confirmation instead of continuing unencrypted.

Zhang, Weng, Dey, Jin, Lin and Fu showed in a 2020 paper, “Breaking Secure Pairing of Bluetooth Low Energy Using Downgrade Attacks” [444], that one side’s refusals are not enough. The specification defines the mode for the device that offers services, such as a sensor, but does not require it of the initiator, such as a phone. The authors found that Android gave applications no way to demand a secure association method in time and continued unencrypted when a fake device impersonating a bonded peripheral reported a missing key. They report that all 18 commercial products they tested with 5 Android phones were open to man-in-the-middle attacks through such downgrades, and that Apple’s and Microsoft’s operating systems and Linux also lacked proper support for the mode. The peripheral’s mode protects the peripheral from a fake phone; only checks on the phone protect the phone and the data it sends from a fake peripheral. Each side must check the security level its link actually reached before relying on the link.

Limits and common mistakes

Bluetooth Classic, LE legacy pairing and LE Secure Connections follow different rules, so an attack or a defense for one does not carry over to another because the name Bluetooth is shared.

Refusing weak outcomes costs compatibility. A device in Secure Connections Only mode cannot pair with a peer that lacks LE Secure Connections, or with one that has neither a display nor a keyboard for authenticated pairing and no out-of-band channel.

Questions answered

Why is a minimum key-size check not a complete pairing defense?

A minimum key-size check is not a complete pairing defense because the key size is only one of several outcomes that pairing in Bluetooth Low Energy (BLE) negotiates, and the check constrains only that one. It refuses keys shorter than the minimum, which stops an attacker from shrinking the key, as the KNOB attack (Key Negotiation of Bluetooth) did. It says nothing about how the key was made or with whom. An attacker who alters the unauthenticated opening pairing messages, or impersonates one device, can still steer the devices to Just Works pairing, which does not authenticate the exchanged public keys, to LE legacy pairing, whose keys an eavesdropper can recover, or to no encryption after a faked key loss. A full-length key made by Just Works with an attacker in the middle passes the size check, and the attacker knows it.

A complete defense states which outcomes each device accepts, for example level 4 of LE security mode 1 (authenticated LE Secure Connections pairing with a 16-byte key), as Secure Connections Only mode requires. Both devices, not only the one that offers services, must refuse every other outcome and check the security level their link actually reached before relying on it.

Related entries: LE legacy pairing (§7.20), LE Secure Connections (§7.21), Security level (§7.33), Authenticated key exchange and transcript binding (§19.1.6), Security Manager Protocol (SMP) (§7.19), Just Works (§7.22), MITM attack (§7.26), Encryption key size (§7.27). Further reading: [18, 272, 444].