Reputation: 61
Are there any common ways for a BLE IoT device to generate its resolvable/non-resolvable private device addresses?
For example, it seems that in BR/EDR (classic Bluetooth) the spec demands the use of FIPS PRNGs, but I don't see the recommended/compulsory/popular ways to generate the 24-bit prand in resolvable private device addresses on Bluetooth Low Energy peripheral devices.
I wonder if resource constraints would stop IoT devices from using FIPS PRNGs. The results I found so far on MAC randomization are all about BLE on mobile devices...
Upvotes: 3
Views: 1649
Reputation: 13285
The generation of a resolvable private address is described in the Bluetooth Specification v5.2, Vol 6, Part B, Section 1.3.2.2 (Private device address generation):
To generate a resolvable private address, the device must have either the Local Identity Resolving Key (IRK) or the Peer Identity Resolving Key (IRK). The resolvable private address shall be generated with the IRK and a randomly generated 24-bit number. The random number is known as prand and shall meet the following requirements:
- At least one bit of the random part of prand shall be 0
- At least one bit of the random part of prand shall be 1
The hash itself is generated using the following formula:-
hash = ah(IRK, prand)
Where ah is a random address hash function defined in the Bluetooth Specification v5.2, Vol 3, Part H, Section 2.2.2. You are right, there aren't any recommendations for generating the prand apart from the requirements above, so this is left to the user.
As for the non-resolvable address, this is explained in the same section:-
To generate a non-resolvable address, the device shall generate a 48-bit address with the following requirements:
- At least one bit of the random part of the address shall be 1
- At least one bit of the random part of the address shall be 0
- The address shall not be equal to the public address
These are some useful links that describe BLE privacy in general:-
Upvotes: 1