skip to content

Security Modes & Privacy

LE security modes and levels decide what a link or attribute requires, and LE Privacy rotates resolvable private addresses that only bonded peers resolve with the IRK. Interviewers ask about tracking.

on this pageshow

explore

questions

6

What do the four levels of Bluetooth LE security mode 1 require, and does a level 4 link satisfy a level 2 requirement?

level: juniorimportance: must knowfreq 60%

answer

  1. encryption plus pairing quality
  2. each level adds one requirement
  3. level 4 needs a newer pairing type
  4. higher levels satisfy the lower ones

basics

~20 s

Level 1 is no security; level 2 is encryption after unauthenticated pairing; level 3 is encryption after authenticated pairing; level 4 is authenticated LE Secure Connections pairing with a 128-bit strength key. A higher level also satisfies every lower one.

solid answer

~40 s

LE security mode 1 describes what a link must have before a service request is accepted. **Level 1** is no authentication and no encryption. **Level 2** is encryption after *unauthenticated* pairing, **level 3** is encryption after *authenticated* pairing, and **level 4** is authenticated *LE Secure Connections* pairing with a 128-bit strength key. "Authenticated" here means the pairing was run with MITM protection requested, not that a reconnection was checked. The levels nest: a link at level 4 also meets the requirements of levels 3, 2 and 1, so a server asking for level 2 accepts it. A device may also enter Secure Connections Only mode, where everything except level-1 services must be level 4. The cost is that peers without LE Secure Connections can no longer reach those services.

code

plaintext · 9 lines
plaintext
LE GATT Security Levels (UUID 0x2BF5)
attribute value, one requirement per two octets:

  0x01 0x04
    mode  = 1
    level = 4

meaning: this server requires LE security mode 1 level 4
on an LE connection

go deeper

for a junior

Recall the four levels in order: none, unauthenticated encryption, authenticated encryption, authenticated Secure Connections encryption. Say that a higher level satisfies lower ones.

for a middle

Explain that authenticated describes the pairing method, that level 3 can be met without Secure Connections, and how a server's stated requirement is compared with the link.

for a senior

Choose a level per attribute that the device's pairing hardware can reach, and know what Secure Connections Only mode does to older peers before enabling it.

for a principal

Treat the level as a product commitment: it sets the supported peer population, the pairing hardware and the evidence you owe a reviewer.

## What a security mode and level express The Generic Access Profile expresses the security needs of a device, of a service, or of a single service request as a **security mode** and a **security level**. Each service or request can carry its own requirement, and the device may have one too. Core 6.3 defines two LE security modes: mode 1 (this question) and mode 3 (encrypted broadcast groups). Mode 2, which was data signing, has been removed. Mode 1 is about a **connected** link and works by enabling encryption, so its levels answer two questions: how good was the pairing that produced the key, and is that key strong enough? ## The four levels | Level | Requirement | In plain words | |---|---|---| | 1 | No authentication, no encryption | Anything goes | | 2 | Unauthenticated pairing with encryption | Encrypted, but pairing carried no MITM protection | | 3 | Authenticated pairing with encryption | Encrypted, and pairing was run with MITM protection | | 4 | Authenticated LE Secure Connections pairing with encryption, 128-bit strength key | Level 3 plus the Secure Connections pairing type | Two details trip people up: - **"Authenticated" describes the pairing method.** It means pairing was performed with the authentication set to MITM protection. GAP adds a note that these words are unrelated to checking a previously bonded device when it reconnects. - **Level 3 does not require Secure Connections.** A level-3 requirement can be met by an authenticated key from legacy pairing; only level 4 insists on LE Secure Connections. GAP's own response table treats an authenticated key without Secure Connections as enough for a level-3 requirement and not enough for level 4. ## Levels nest, with one caveat GAP states that a connection at level 4 also satisfies the requirements of levels 3, 2 and 1, and a level 3 connection satisfies levels 2 and 1. So a server whose heart-rate characteristic needs level 2 does not reject a client that happens to be at level 4. A server can also publish what it requires in the **LE GATT Security Levels** characteristic (UUID 0x2BF5): a sequence of two-octet pairs, mode then level. The specification adds a note that the listed level is *not a minimum*: listing level 2 does not mean any number above it would do. Levels 3 and 4 work for a level-2 requirement only because the mode 1 definitions say so. ## Secure Connections Only mode A device may be placed in **Secure Connections Only** mode. Then only mode 1 level 4 is used, except for services that need nothing beyond level 1. The device accepts new connections to level-4 services only when the remote device supports LE Secure Connections and authenticated pairing is used. NIST SP 800-121 r2 upd. 1 notes that this mode arrived with Bluetooth 4.2 and is not backward compatible with 4.0 or 4.1 devices. ## Choosing a level and being honest about it 1. List the services and attributes and decide what each one needs. A live heart-rate stream differs from a battery level. 2. Pick the level the product can actually reach. GAP says a device shall not require authenticated pairing if it does not support the required IO capabilities or out-of-band data, so a headless device cannot promise level 3 or 4 by wishing. How the pairing is performed belongs to the pairing material. 3. Decide whether Secure Connections Only is acceptable for the peer population, because it is a compatibility decision as much as a security one. 4. Record the result where a reviewer can read it, for example the LE GATT Security Levels value or the per-attribute permission table. ## What a reviewer takes from it - NIST SP 800-121 r2 upd. 1 recommends mode 1 level 4 for LE connections in Bluetooth 4.2 and level 3 for 4.0 and 4.1, and says level 1 should never be used. - The level is a property of the link at the time of the request. A device that is quiet at level 1 until a protected attribute is touched is working as designed; the failure shows up as an ATT error response, covered with attribute permissions. - A product that claims "encrypted" has told you only about levels 2 and above; ask which pairing produced the key.

  • A server lists level 2 in its LE GATT Security Levels characteristic. Does that mean any level above 2 is accepted?
    No in general: GAP notes the listed value is not a minimum. Levels 3 and 4 are accepted for a mode 1 level 2 requirement because the mode 1 definitions say a higher level also satisfies the lower ones. The characteristic is not a general ordering of numbers, so read it as the requirements the server states.
  • What changes in the field when a device is put in Secure Connections Only mode?
    Only mode 1 level 4 is used, except for services that need nothing beyond level 1. New connections to level-4 services are accepted only when the remote device supports LE Secure Connections and authenticated pairing is used, so peers on older pairing lose access to those services. Plan the peer population before enabling it.
  • Can a device with no display and no input promise level 3 or 4?
    Not by declaring it. GAP says a device shall not require authenticated pairing if it does not support the IO capabilities or out-of-band data needed. The requirement must match what the pairing hardware can perform, or the service is unreachable. Which pairing models achieve it is covered with pairing.

  • Level 2 means the link is authenticated because it is encrypted
  • Level 3 and level 4 are the same because both are authenticated
  • A level 4 link cannot satisfy a level 2 attribute; levels must match exactly
  • Level 4 only means a longer key; the pairing type does not matter
  • Secure Connections Only mode refuses every service below level 4, even ones needing no security

Assumes Core 6.3. Level 4 and Secure Connections Only mode came with LE Secure Connections in Bluetooth 4.2; the nesting rule is stated in GAP 10.2.1.

open as a page

How does a Bluetooth LE device generate and change a resolvable private address, and who can still recognize it?

level: middleimportance: must knowfreq 50%

basics

~20 s

A resolvable private address joins a random 24-bit value to its hash under the device's IRK, and changes on a timer. Only peers given the IRK at bonding can map it back to the identity address.

open as a page

Which ATT error does a GATT server return when a secure attribute is accessed over an unauthenticated, unencrypted or short-key link?

level: middleimportance: should knowfreq 38%

basics

~20 s

The server sends ATT_ERROR_RSP: Insufficient Authentication (0x05) for a link not authenticated enough, Insufficient Encryption (0x0F) for an unencrypted link, Encryption Key Size Too Short (0x0C) for a short key, and Insufficient Authorization (0x08) when authorization is missing.

open as a page

A GATT client holding a bonded LTK gets Insufficient Authentication on an unencrypted link; what should it do next, and what must it avoid?

level: seniorimportance: should knowfreq 22%

basics

~20 s

Start encryption with the stored LTK and retry. Only if that fails, re-pair, and only after a user interaction confirms the remote device. Never request MITM protection merely because of the error; only the client's own requirement may.

open as a page

For a Bluetooth LE fitness wristband that must resist address tracking and keep heart-rate data behind an authenticated, encrypted link, what must the firmware commit to?

level: principalimportance: should knowfreq 14%

basics

~20 s

Require an authenticated, encrypted link on the heart-rate attributes at a level the band can reach. Use rotating resolvable private addresses from a per-unit IRK, keep stable identifiers out of advertisements, and give the IRK only to trusted bonds.

open as a page

A security questionnaire asks a Core 6.3 dual-mode product for its LE security mode 2, LE mode 3 and BR/EDR mode 4 status; how do you answer each?

level: seniorimportance: nice to knowfreq 9%

basics

~20 s

LE mode 2, data signing, was removed in Core 6.3, so a 6.3 product should not claim it. LE mode 3 applies only to encrypted broadcast groups using a Broadcast_Code. BR/EDR mode 4 grades each service from level 0 to 4.

open as a page