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?
answer
- OOB flag is checked first
- no MITM request means Just Works
- display and keyboard pairs choose
- two models need a user to confirm
- legacy passkey is not authenticated
basics
~20 sOOB 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.
solid answer
~30 sThe Security Manager first checks the OOB flags (one side with the peer's OOB data suffices in Secure Connections, both are needed in legacy pairing). If neither side sets MITM, Just Works is used. Otherwise the IO capabilities pick: both DisplayYesNo or KeyboardDisplay gives Numeric Comparison (Secure Connections only), a display facing a keyboard gives Passkey Entry, and NoInputNoOutput gives Just Works. Authenticated MITM protection comes from Numeric Comparison, Passkey Entry in Secure Connections, or OOB over a channel that resists eavesdropping and interlopers. LE legacy Passkey Entry is classified unauthenticated.
code
pseudocode · 11 linesselect_model(a, b, secure_connections):
if secure_connections and (a.oob or b.oob): return OOB
if not secure_connections and (a.oob and b.oob): return OOB
if not a.mitm and not b.mitm: return JustWorks
# otherwise the IO capability table decides
if NoInputNoOutput in (a.io, b.io): return JustWorks
if a.io and b.io both in {DisplayYesNo, KeyboardDisplay}:
if secure_connections: return NumericComparison
return JustWorks if both are DisplayYesNo else PasskeyEntry
if neither has a keyboard: return JustWorks # e.g. DisplayOnly with DisplayYesNo
return PasskeyEntrygo deeper
Know that Just Works has no protection against an interloper and that Numeric Comparison and Passkey Entry involve the user.
Walk the selection order (OOB flag, MITM flag, IO capability table) and say which models give authenticated MITM protection in Secure Connections and in legacy pairing.
Describe the method-confusion and passkey-reflection notices at the strength each states, and the user-interface and public-key checks that answered them.
Choose which models a product line permits per device class and what each class's interface must show.
## How the model is selected The decision is made from the Pairing Request and Pairing Response in this order: 1. **OOB flag.** In LE Secure Connections, if one or both devices hold OOB authentication data, the Out of Band model is used and the authentication requirements are ignored. In legacy pairing, both must hold it. 2. **MITM flag.** If neither device requests MITM protection, the IO capabilities are ignored and **Just Works** is used. 3. **IO capabilities.** Otherwise the specification's mapping table decides. | IO capability pair (with MITM requested) | Legacy pairing | LE Secure Connections | |---|---|---| | Both DisplayYesNo | Just Works | Numeric Comparison | | DisplayYesNo or KeyboardDisplay with KeyboardDisplay | Passkey Entry | Numeric Comparison | | DisplayOnly with KeyboardOnly | Passkey Entry | Passkey Entry | | KeyboardOnly with KeyboardOnly | Passkey Entry (user types the same digits in both) | Passkey Entry | | Any pair that includes NoInputNoOutput | Just Works | Just Works | Numeric Comparison exists only in Secure Connections; the Security Manager says it is used when the MITM bit is set in either PDU and both devices are DisplayYesNo or KeyboardDisplay. ## Which models resist an active man-in-the-middle - **Numeric Comparison.** Both devices show a six-digit value and the user confirms the two match. The Core text puts the chance that a simple interloper goes unnoticed at one in a million, and a commitment sequence stops an interloper from steering the two values to match. - **Passkey Entry, Secure Connections.** The six-digit passkey (about 20 bits) is committed bit by bit in 20 rounds, so a failed guess reveals only one bit. The Core text gives the interloper's success probability as 0.000004 against 0.000001 for a blind guess. It is classified authenticated. - **Passkey Entry, legacy.** The same passkey seeds the Temporary Key, so it offers very limited protection, and the mapping table classifies the resulting key as unauthenticated. - **Out of Band.** The authentication data travels over a second channel. The key is authenticated only when that channel resists eavesdropping and interlopers; the strength depends on the channel, and the Core text requires the key to be treated as unauthenticated when the channel's protection is unknown. - **Just Works.** No comparison, no entry: no MITM protection in either pairing type. ## The values on the wire The IO Capability field takes `0x00` DisplayOnly, `0x01` DisplayYesNo, `0x02` KeyboardOnly, `0x03` NoInputNoOutput or `0x04` KeyboardDisplay. The OOB data flag is `0x00` (not present) or `0x01` (peer's OOB data present). The MITM, SC and keypress bits sit in the authentication requirements byte. A reviewer reading a capture of the two pairing messages can reproduce the model selection from these fields alone, and can see at once whether a product that claims MITM protection actually sent an IO capability and flags that allow it. Failures name their cause in the Pairing Failed reason: Passkey Entry Failed (entry cancelled), Numeric Comparison Failed (the user said no), Confirm Value Failed (a commitment did not match), DHKey Check Failed (stage 2 or an invalid public key) and Authentication Requirements (the selected method cannot give the required properties). ## What still goes wrong with a protective model - **User confusion.** The SIG notice tied to CVE-2020-10134 (Core 5.2 and earlier) describes a case where a user completes Numeric Comparison on one device and types that value as a passkey on the other. The SIG's remedy is user-interface and documentation wording that stops the comparison value from being typed anywhere. - **Passkey reflection.** CVE-2020-26558 (Core 2.1 through 5.2) concerns Passkey Entry; the SIG's remedy is to reject a peer public key identical to the local one. Core 6.3 states that two public keys with the same X coordinate must fail pairing. - **Legacy passkey on one side, Secure Connections passkey on the other.** CVE-2022-25836 (Core 4.0 through 5.3): the SIG recommends Secure Connections Only mode, under which neither device will accept legacy pairing. ## What a reviewer checks - Which IO capability and flags the product sends, and whether its stated model can actually produce the authenticated property it claims. - Whether the user interface labels the comparison value so it cannot be mistaken for a passkey.
- What did the SIG tell implementers to do about the method-confusion case, and why is that a user-interface change?The notice recommends wording in user interfaces and documentation that warns users not to enter the Numeric Comparison value on the other pairing device, or anywhere. The cryptography behaves as specified; the exposure arises when a user completes both procedures with a mistaken value, so the control is clear labelling.
- Why can a six-digit passkey be authenticated in Secure Connections yet unauthenticated in legacy pairing?In Secure Connections the passkey is not an input to the key; it is proved bit by bit with commitments tied to the ECDH public keys, so a failed guess exposes one bit and ends the run. In legacy pairing the passkey becomes the Temporary Key, which has only about 20 bits of entropy.
- Says Numeric Comparison is available in LE legacy pairing.
- Believes the IO capabilities decide even when neither side sets MITM.
- Treats legacy Passkey Entry as authenticated because the user types digits.
- Claims OOB is always authenticated whatever the second channel is.
- Assumes Passkey Entry needs a keyboard on both devices.
Assumes Core 6.3. Numeric Comparison and the authenticated Secure Connections Passkey Entry arrived with LE Secure Connections in Core 4.2; the method-confusion and passkey-reflection notices cover Core 5.2 and earlier.