Full name: Low Energy Secure Connections.
Definition
LE Secure Connections is the pairing §7.17 procedure that version 4.2 of the Bluetooth Core Specification added to Bluetooth Low Energy (BLE) §7.1. The devices run elliptic-curve Diffie–Hellman §19.1.5 (ECDH) key agreement on the curve P-256: each sends a public key, keeps the matching private key, and both compute the same shared secret, from which they derive the long-term key §7.28 (LTK). An eavesdropper cannot compute that secret. Protection against an active attacker comes separately, from the association method: numeric comparison §7.24, passkey entry §7.23 and out-of-band association §7.25 give it; Just Works §7.22 does not.
The idea
LE legacy pairing §7.20, the older procedure, has a weakness no user effort can repair: its only secret is the temporary key, which is zero under Just Works and a six-digit number under passkey entry, so an eavesdropper who records the pairing can compute every key. LE Secure Connections adds a Diffie–Hellman key agreement §19.1.4. Each device picks a secret number and sends a public value computed from it; from its own secret and the other’s public value, each computes the same shared secret. An eavesdropper sees both public values but neither secret, and computing the shared secret from the public values alone is believed infeasible.
Key agreement solves the listener problem, not the impostor problem. An attacker who can intercept and replace radio messages, an active man-in-the-middle §7.26 (MITM), can run one key agreement with each device. Each device then holds a strong key, shared with the attacker. Picture two people who talk through an interpreter they cannot see: each conversation is private from everyone else, but the interpreter hears both. The cure is a check the attacker cannot fake. In numeric comparison the user compares a six-digit number computed from both devices’ public keys; in passkey entry the user types one number into both devices; in out-of-band association the devices exchange data over a separate channel such as NFC (near-field communication). The picture stops in one respect: the number compared depends on the very public keys exchanged, so an attacker in the middle produces two different numbers, except with a chance of about one in a million.
How it works
Device A is the initiator (the central) and device B the responder (the peripheral). The specification’s names are used below. are the private keys; are the public keys, each a point on P-256, an elliptic curve over a 256-bit prime field §19.1.2 that NIST standardized, written as two 32-byte coordinates, 64 bytes in all; are 128-bit nonces §5.18, random numbers used once; is the 32-byte shared secret. The functions , , and are built from AES-CMAC §15.7: CMAC (cipher-based message authentication code) computed with the AES (Advanced Encryption Standard) block cipher §15.3.
Feature exchange. Both devices set the SC (Secure Connections) flag in their Pairing Request and Pairing Response; the association method follows from their flags and input and output capabilities.
Public keys. A sends and B sends . Each device checks that the received key is a point on P-256 (public-key validation); a device that finds an invalid key must not use the resulting LTK. Pairing also fails if the two public keys have the same x-coordinate, so a device rejects its own public key if an attacker sends it back.
Shared secret. A computes as the x-coordinate of the point , and B as that of ; both are the same point.
Authentication §1.6 stage 1, which depends on the method:
Just Works and numeric comparison. B sends a commitment , a value that fixes without revealing it. A sends ; B sends ; A checks . Both compute , a 32-bit number, and take it modulo , giving six digits. Under numeric comparison each device displays the six digits and the user confirms that they match. Under Just Works nothing is displayed or confirmed.
Passkey entry. The six-digit passkey is at most 999,999, which is
0xF423Fand needs 20 bits. The devices run 20 rounds, one per bit; in each round both commit to the bit with a fresh nonce and then reveal in turn.Out-of-band association. Each device sends over the out-of-band channel a random number and the commitment to its own public key; the receiver checks the commitment against the public key that arrived over the radio.
Authentication stage 2. Both compute and the LTK as , where and here stand for the two device addresses. Each then computes a check value with from , the nonces, a value set by the method (zero for Just Works and numeric comparison, the passkey, or the out-of-band random number), its own input and output capability, out-of-band flag and authentication requirements, and both addresses. A sends its check value; B verifies it and sends its own; A verifies that. A mismatch ends pairing with reason
0x0B, which the specification namesDHKey Check Failed.Encryption. A starts Link Layer §7.6 encryption with the LTK. No short-term key exists in this procedure, and the LTK is never sent; only the identity resolving key §7.29 and the signing key may be sent afterwards.
New key pair. The specification allows a device to replace its private and public key pair at any time and recommends regular replacement, but it does not require a new pair for every pairing.
Worked example
Alice’s phone A pairs with a smart lock B. An attacker M is within radio range.
Passive attacker. M records , , , , and both check values, but neither nor . Computing from and alone is the computational Diffie-Hellman problem §19.1.3 on P-256, for which the best known methods need about operations. So M learns neither nor the LTK, whatever the association method, Just Works included.
Active attacker with Just Works. M answers A as if it were B, with public key , and connects to B as if it were A, with public key . A computes from and ; M computes the same value from its private key and . B and M likewise share . Both pairings complete, because Just Works compares nothing. A holds , B holds , and M holds both.
Active attacker with numeric comparison. A displays the six digits computed from and its nonces; B displays those computed from and its nonces. Suppose gives A the 32-bit value 0x2F9ED5BA, which is 798,938,554; modulo this is 938,554, displayed as 938554. Suppose it gives B 0x1A2B3C4D, which is 439,041,101; modulo this is 41,101, displayed with a leading zero as 041101. The user sees two different numbers and rejects the pairing on both devices. To make the numbers equal, M would have to choose its nonces after seeing the honest devices’ nonces, but the commitments force M to fix at least one nonce before it sees the honest nonce it must match. So M can only hope, and succeeds with probability about per attempt.
Stated precisely
Passive secrecy. Assume (1) the computational Diffie-Hellman problem on P-256 is hard: given points , and on the curve, no feasible computation finds ; (2) each private key is uniformly random, kept secret and used for one pairing only; (3) AES-CMAC behaves as a pseudorandom function §15.1, meaning that, with a secret key, its outputs look random; and (4) each device validates the public key it receives. Then an eavesdropper who records a whole pairing, with any association method, cannot compute or the LTK.
Authentication. Under the same assumptions, an active attacker who must complete pairing with both devices without being detected succeeds in one attempt with probability
1 under Just Works;
about under numeric comparison, if the user compares the numbers;
at most about under passkey entry with a fresh random passkey, the figure the specification gives: the passkey’s 20 bits are committed and revealed one round at a time, so the attacker must guess them during the pairing instead of searching for them offline. A failed attempt still reveals the bits up to the round in which it failed, which is why a passkey must never be reused;
under out-of-band association, a probability set by the out-of-band channel, negligible if the attacker can neither read nor change it.
The specification classes the keys of Just Works as unauthenticated and the keys of the other three methods as authenticated (out-of-band association only over a channel safe from eavesdropping). LE security mode §7.33 1 level 4 is defined as authenticated LE Secure Connections pairing with encryption using a 128-bit key.
Limits and common mistakes
The name promises key agreement, not authentication. LE Secure Connections with Just Works gives an unauthenticated key: safe from eavesdroppers, open to a man-in-the-middle present during pairing.
Public-key validation is essential. In 2018 Eli Biham and Lior Neumann showed, in an attack they called the fixed coordinate invalid curve attack [279], that implementations which did not check that a received public key lies on P-256 let an active attacker who altered the public keys in transit predict the shared secret in a fraction of attempts. The flaw is listed as CVE-2018-5383 in the Common Vulnerabilities and Exposures (CVE) catalog, and the specification now requires the check.
The specification publishes a fixed debug key pair, private key included, so that test equipment can decrypt traffic. A pairing in which either device uses it has no secrecy, because anyone can compute the shared secret. A device that is not in a debug mode may reject the debug public key.
Later connections are not protected by a new key agreement. Each connection’s session key is computed from the LTK and values sent in the clear, so anyone who later obtains the LTK, for example from a device’s storage, can decrypt every recorded connection that used it.
If either device does not set the SC flag, LE legacy pairing runs instead. A device that must have LE Secure Connections has to refuse legacy pairing itself; this is called Secure Connections Only mode. The key size is still negotiated and can be shorter than 16 bytes.
A reused passkey loses its protection, because each run of passkey entry reveals bits of the passkey; the specification requires a fresh random passkey for every pairing.
Numeric comparison protects only if the user really compares. A user who confirms without looking turns it into Just Works.
Questions answered
Can Secure Connections Just Works resist passive eavesdropping yet lack MITM authentication?
Yes. LE Secure Connections pairing with the Just Works association method resists a passive eavesdropper but gives no protection against an active man-in-the-middle (MITM) attacker.
Passive eavesdropping. Every LE Secure Connections pairing, Just Works included, runs elliptic-curve Diffie–Hellman (ECDH) key agreement on the curve P-256. An eavesdropper records both public keys and all other messages, but computing the shared secret from the two public keys is believed infeasible (about operations for P-256), so the recording does not reveal the long-term key (LTK). This is the difference from Just Works under LE legacy pairing, whose temporary key is zero and whose keys any eavesdropper can compute.
No MITM authentication. Just Works shows the user nothing to compare and asks for nothing to type. An attacker who intercepts the radio messages during pairing can run one ECDH exchange with each device. Each device ends with a valid key shared with the attacker, nothing in the protocol tells the devices that their keys differ, and the attacker can decrypt, read, change and re-encrypt all later traffic.
Key agreement and authentication are separate guarantees: key agreement keeps listeners out, while authentication (numeric comparison, passkey entry or out-of-band association) binds the exchange to the intended device. The specification accordingly classes Just Works keys as unauthenticated.
Related entries: Just Works (§7.22), Numeric comparison (§7.24), MITM attack (§7.26), Key derivation function (KDF) (§5.20), Elliptic-curve Diffie–Hellman (ECDH) (§19.1.5), Authenticated key exchange and transcript binding (§19.1.6), LE legacy pairing (§7.20), Passkey entry (§7.23), Out-of-band (OOB) association (§7.25), Security level (§7.33), Cipher-based MAC (CMAC) (§15.7). Further reading: [18, 279].