Definition
An identity resolving key (IRK) is a 128-bit secret key with which a BLE §7.1 (Bluetooth Low Energy) device lets chosen peers recognize it behind its changing addresses. The device computes each of its resolvable private addresses from a fresh random number and its IRK. A peer that holds the IRK can test any address it receives and look up the device’s identity address §7.30 when the check matches. Without the IRK, the address alone shows no such tie.
The idea
A fitness band that transmits the same address all day can be followed by anyone with a radio receiver: receivers at a shop entrance, a till and a bus stop log the address with a time, and the logs join into one route. BLE therefore lets a device use resolvable private addresses, replacing its address at intervals with a random-looking one. The Bluetooth Core Specification recommends a maximum interval of 15 minutes. Once the band changes its address, the shop cannot join sightings by address equality alone. The owner’s phone needs another way to recognize it too. The phone and the band have gone through bonding §7.18: they paired once and stored the resulting keys. The phone must recognize the band under each new address to reconnect and to pick the right stored keys.
The IRK resolves the conflict. Each address carries a random part and a short check value computed from that random part with the IRK. The band hands its IRK to the phone once, during pairing §7.17. From then on the phone recomputes the check value for each address it hears, and a match points to the band’s identity record. To anyone else the check value looks like more random bits. Picture a new name tag every day, each stamped with a seal that only friends know how to check. The picture stops in one place: anyone can copy yesterday’s tag, seal included. A match says the check value fits the stored key. A copied address also fits, and a short check value can match by chance.
Holding the IRK is therefore the ability to track. Giving the IRK to a peer lets that peer link the resolvable private addresses made with that IRK, wherever and whenever the peer hears it.
How it works
An IRK is 16 bytes long. A device creates it once, normally at random, keeps it in non-volatile storage and can distribute that identity’s IRK to selected peers. A stack that lets a device present several identities gives each identity its own identity address and IRK. The IRK takes part in four steps.
Making an address. The device picks a 24-bit value that the specification calls
prand: the bits01, which mark a resolvable private address §7.31, followed by 22 random bits that are not all zero and not all one. It computes a 24-bit valuehashwith the function that the specification names : it encrypts, with the block cipher §15.3 AES (Advanced Encryption Standard) keyed with the IRK, a 16-byte block of 13 zero bytes followed by the 3 bytes ofprand, and keeps the last 3 bytes of the result. The address isprandfollowed byhash, 48 bits in all.Handing over the IRK. Pairing, run by the Security Manager Protocol (SMP) §7.19, ends with a key distribution phase on the newly encrypted link. A device that agreed to distribute its identity information sends an Identity Information message holding its IRK and an Identity Address Information message holding its identity address, the device’s fixed public or static random address, together with that address’s type. The receiver stores the distributed identity address and IRK together. They can also be provisioned in advance.
Resolving. A peer that receives a random address whose top two bits are
01splits it intoprandandhash, computes ofprandunder each IRK it has stored, and compares each result withhash. A matching key identifies a candidate in the receiver’s records. If none matches, this lookup leaves the address unresolved. Host software can do this, or the Bluetooth controller §7.4, the radio-side part of the system, can do it from a table of identity addresses and IRKs called the resolving list, which Bluetooth 4.2 introduced.Linking. Every address that resolves under one IRK maps to one identity address, so the peer treats an address heard at 10:00 and a different address heard at 10:15 as one device.
The IRK encrypts nothing that travels. Link encryption uses keys derived from the long-term key §7.28 (LTK) that pairing creates; the IRK only makes and tests addresses.
Worked example
The IRK here is the sample key that the Bluetooth Core Specification prints for , in hexadecimal ec0234a357c8ad05341010a60a397d9b. A phone has bonded with the device that owns this IRK and with a second device, whose IRK is 00112233445566778899aabbccddeeff. Addresses are printed most significant byte first.
At 10:00 the phone hears the random address 70:81:94:0D:FB:AA. Its first byte, 0x70, is 0111 0000 in binary, and the top two bits 01 mark a resolvable private address. So prand is 0x708194 and hash is 0x0DFBAA. AES under the first IRK turns the block 00000000000000000000000000708194 into
159d5fb72ebe2311a48c1bdcc40dfbaa
whose last 3 bytes, 0dfbaa, equal hash. The address resolves to the first device. Under the second IRK the same block encrypts to a value ending in 55b63b, which does not match.
At 10:15 the phone hears 5A:3C:21:A3:B9:22, whose first byte 0x5A is 0101 1010, again with top bits 01. AES under the first IRK of the block of 13 zero bytes followed by 5a3c21 gives 4fdad5c2f3016d3f9f4dfc8f93a3b922, which ends in a3b922, the hash part of the address. Both addresses resolve to one device, so the phone links the two sightings. A receiver without the IRK sees two addresses that share no byte.
Each test costs one AES computation per stored IRK, here at most 2 per address. A wrong IRK matches only by chance, with probability per address. With 2 stored IRKs, an address from some third device is wrongly matched with probability at most .
Stated precisely
Let be a 128-bit IRK, and let be AES encryption of the 128-bit block under the key . Let be the 24-bit prand value. The specification defines where is a string of 104 zero bits, is the bit string followed by the bit string , and keeps the least significant 24 bits. The address is the 48-bit number . A received random address resolves under a stored IRK exactly when its two most significant bits are 01 and , where is rounded down.
A holder of can decide for any address whether produced it, answering wrongly yes with probability for an address that did not produce. A holder can also make new addresses that resolve under , because that needs only and a random prand. Linking reaches back to every address recorded earlier and forward to every address the device makes until it replaces its IRK.
An observer without cannot tell addresses made with from random addresses of the same format, so their bits do not link them; this property is called unlinkability §5.46. It rests on three assumptions: AES behaves as a pseudorandom permutation §15.2, meaning that under a secret random key its outputs cannot feasibly be told apart from those of a permutation chosen at random; the IRK is uniformly random and known only to its holders; and the comparison concerns distinct random prand values. Only 22 bits vary. If the random part repeats under the same key, the check value repeats too and a listener sees the same address again.
Limits and common mistakes
Resolving is recognition, not authentication §1.6. Anyone who records 70:81:94:0D:FB:AA can transmit it unchanged, and every holder of the IRK resolves it to the device. A completed link-encryption procedure using the bond’s long-term key provides separate evidence that the peer possesses that key.
A leaked IRK lets its new holder track the device and also make fresh addresses that resolve to the device, so other holders attribute the attacker’s transmissions to the device. A leaked IRK does not decrypt the device’s links.
The IRK is only as secret as the pairing that delivered it, because the key distribution phase is encrypted with the key that pairing has just made. In LE legacy pairing §7.20 (LE stands for Low Energy), an eavesdropper who recorded the pairing can compute that key: with Just Works §7.22 the temporary key that pairing starts from is zero, and with passkey entry §7.23 the eavesdropper tries all 1,000,000 six-digit passkeys. LE Secure Connections §7.21 stops a passive eavesdropper, but with Just Works a man-in-the-middle §7.26 (MITM) attacker, who relays the pairing while posing as each device to the other, receives the IRK directly.
Each peer that received and retained this identity’s IRK can keep recognizing its addresses, including one that has since been sold or lost; deleting the bond on the device does not delete the IRK from the peer. Replacing the IRK ends this, and ends recognition by all peers at once.
Rotation hides only the address. A constant name, serial number or counter in the advertising data, a steady advertising rhythm, signal strength and the physical quirks of a radio transmitter all link sightings without the IRK. A device that advertises with its public or static random address is trackable whatever IRK it has.
Questions answered
Who can correlate rotating addresses when they hold the IRK?
Every holder of a device’s identity resolving key (IRK) can correlate that device’s rotating addresses. In BLE (Bluetooth Low Energy) these are resolvable private addresses, each a 24-bit field (two type bits and 22 random bits) followed by a 24-bit check value computed from it with the IRK. A holder recomputes the check value with one AES (Advanced Encryption Standard) encryption per address, and a match ties the address to the device’s fixed identity address. The holder can thus link every such address: those heard live, those recorded earlier, and those still to come until the device replaces its IRK.
The holders are the device itself; every peer that received the IRK during pairing, whether or not that peer is still trusted; any backup, software or second device to which such a peer copies its keys; and anyone who obtains the key in another way, for example through disclosure of a stored key or through a legacy Just Works pairing whose key distribution a listener recorded. The IRK does not decrypt traffic or pass the encryption step with a bonded peer, which needs the long-term key. When the random parts differ, their bits alone give listeners without the IRK no practical way to link the addresses. Repeated addresses, constant advertising fields, timing and signal strength can still connect sightings.
Related entries: Resolvable private address (RPA) (§7.31), Long-term key (LTK) (§7.28), Unlinkability (§5.46), Public, static random, and private addresses (§7.30), Bonding (§7.18). Further reading: [18, 93, 283].