How does a Bluetooth LE device generate and change a resolvable private address, and who can still recognize it?
answer
- address changes on a timer
- random part plus a keyed hash
- bonded peers hold the key
- identity address stays hidden
basics
~20 sA 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.
solid answer
~40 sWith LE Privacy on, a device advertises or connects with a **resolvable private address** (RPA) instead of its identity address. The RPA is `prand || hash`, where `prand` is a random 24-bit number and `hash = ah(IRK, prand)`. A peer that was given the IRK during pairing recomputes the hash for each IRK it stores, and a match identifies the device; everyone else sees a changing, random-looking value. A host timer replaces the RPA when it expires, and GAP's appendix recommends 15 minutes. The controller can generate and resolve addresses itself from a resolving list of identity addresses and IRKs. Two limits remain: any device holding the IRK can recognize the device, and a fixed name or other unique advertising data still identifies it.
go deeper
Say that LE Privacy swaps the fixed address for one that changes, so a stranger cannot follow the device by address.
Explain prand and the hash under the IRK, resolution by recomputing the hash, and that the IRK reaches a peer during pairing.
Name the residual risks: every IRK holder, a hash collision across IRKs, and advertising data that stays stable across address changes.
Decide which devices may ever receive the IRK and how often addresses rotate, weighing tracking resistance against connection setup time.
## The problem LE Privacy solves A Bluetooth device that always advertises one fixed address can be followed by anything that listens in more than one place. The GAP privacy feature "provides a level of privacy which makes it more difficult for an attacker to track a device over a period of time". It does this by replacing the address on the air with one that changes, while letting devices that were given the right key still recognize it. ## How the address is built and resolved A **resolvable private address** is 48 bits made of two 24-bit halves. The generating device needs its Identity Resolving Key (**IRK**). 1. Pick a random 24-bit number, `prand`, that has at least one 0 bit and one 1 bit in its random part. 2. Compute `hash = ah(IRK, prand)`, the random address function from the Security Manager specification. 3. Concatenate them: `RPA = prand || hash`. A peer that holds the IRK resolves it like this: 1. Split the received address into `prand` and `hash`. 2. Compute `localHash = ah(IRK, prand)` for each IRK it stores. 3. If `localHash` equals the received `hash`, the address belongs to that IRK's device. ```pseudocode prand = random 24 bits # random part has a 0 bit and a 1 bit hash = ah(IRK, prand) # 24-bit result RPA = prand || hash # on the receiving side, for every stored IRK resolved = ah(IRK, prand_of(RPA)) == hash_of(RPA) ``` Because the hash is shorter than the IRK, the specification notes that the same RPA can resolve against more than one IRK, more often when many advertisers are in range, so "additional steps might have to be carried out to identify a device uniquely". A **non-resolvable** private address cannot be resolved at all. ## Who holds the IRK The IRK reaches a peer in the key distribution phase of pairing, which may only run on an encrypted link, together with the device's identity address (public or static random). The Security Manager text is blunt about the boundary: "The privacy concept only protects against devices that are not part of the set to which the IRK has been given." - A bonded phone can resolve the band's RPAs and reconnect to it. - A stranger's scanner sees only changing values. - Every extra bond is another party able to recognize the device. ## Where resolution happens A device may do privacy in the host only, or in the host and the controller. With controller-based privacy the host fills a **resolving list** of device identities (identity address plus local and peer IRK); the controller resolves addresses itself and reports the peer's identity to the host. Privacy mode is chosen per peer: | Mode | Behaviour | |---|---| | Network privacy | Controller accepts only RPAs generated from the distributed IRK; the default when the controller resolves | | Device privacy | Controller also accepts the peer's identity address; only the device's own privacy is considered | An all-zero IRK in a resolving list entry means the identity address is used or accepted for that peer, so address privacy does not apply to that peer. ## How often it changes The host sets a timer; when it expires a new RPA is generated. GAP's appendix gives 15 minutes as the recommended value of the private address interval, and the Link Layer text says the timer should be set to 15 minutes and warns that generating RPAs frequently can affect connection establishment times. In Core 6.3 the Link Layer re-arms the timer with a value chosen randomly within the range the host specified, and, if the host asks, generates a new RPA whenever advertising or scan response data changes. Core 6.1 lists **Randomized RPA Updates** as its one new feature; the change-history entry gives the name only, so confirm the exact behaviour in the controller's documentation. ## What a reviewer checks - The advertised address is an RPA when the device is connectable and privacy is on. - The advertisement carries no device name or other unique data that can be used to recognize the device (GAP says it should not). - Changes to advertising data are aligned with address changes where data changes regularly. - The set of devices holding the IRK is the set the owner expects.
- What is the difference between device privacy mode and network privacy mode?In device privacy mode a device is concerned only with its own privacy and also accepts a peer's identity address, even if the peer has distributed its IRK. In network privacy mode it shall not accept the identity address of peers that distributed their IRK. Network privacy is the default when the controller resolves addresses.
- If an RPA resolves against a stored IRK, is the identity proven?Not proven. The 24-bit hash is shorter than the IRK, so the same RPA can resolve against more than one IRK, and this becomes likelier as the number of advertisers in range grows. The specification says additional steps might be needed to identify a device uniquely, so treat a match as strong evidence rather than proof.
- What does Core 6.1's Randomized RPA Updates change?The v6.1 change history lists it as the single new feature and gives only its name. Core 6.3's Link Layer text sets the next RPA timer to a value chosen randomly within a host-given range, which is the behaviour the name points to. Verify the product's controller behaviour rather than assuming a fixed period.
A parcel sticker that shows a fresh code each hour, readable only by recipients who hold the matching decoder card: strangers see meaningless labels, and every decoder card handed out is another person who can follow the parcel.
- A resolvable private address hides the device even from every bonded peer
- Rotating the address is enough even if the advertisement carries a fixed device name
- The IRK is broadcast in the clear so any scanner can resolve the address
- The 15 minute address interval is a requirement of the specification
- A non-resolvable private address can still be resolved by a bonded peer
Assumes Core 6.3. Core 6.1 added the feature named Randomized RPA Updates; the 15 minute interval is a recommended value, not a requirement.