General question about pairing with IRK and bonding connections

Hello,

I would like to get some information about the pairing procedure. Let's say I have to devices, a Smartphone (Central) and a nRF52833DK (Peripheral). I would like to pair those devices and obtain Security Level 4 with the usage of Resolvable private address. And here comes the first question:

1) How do these devices know if an IRK should be generated or not? I haven't found this information in any second-hand documents about the pairing procedure. During the first stage of pairing, IO, MITM, OOB, Bonding info and a lot of other information is exchanged between devices, but what about IRK?

Let's assume that a Peripheral device stored  bonding data and advertises itself in Non-discoverable Mode and Directed Connectable Mode with Resolvable Private Address generated from the IRK (which was exchanged earlier during pairing). Scanner at the time has the bonding info containing the same IRK, so it can correctly verify the Resolvable Private Address and make a connection with this specific Peripheral.

2) What happens in the above situation if the Peripheral uses a random static address and has changed it due to the power cycle? As far as I know, this does not affect the advertised Resolvable Private Address, since it is generated from the IRK, but does it somehow make the bonding data obsolete?

3) What if the address of a Central is also Random Static? If the address changes, does it mean that the Bonding data will become obsolete? How the Directed Connectable Mode works if the Central's address changes?

4) Can Central also use IRK to generate its address? This may be a silly question - if both devices use IRK, is the bonding data independent of the device address?

Than you!

Parents
  • Hi,

    1) How do these devices know if an IRK should be generated or not?

    The devices own IRK is not generated for every time it bonds, but once (as if it changes the IRK all existing bonds will be useless as the peers will not see it as the same device).

    During the first stage of pairing, IO, MITM, OOB, Bonding info and a lot of other information is exchanged between devices, but what about IRK?

    The IRQ is also exchanged when bonding if it is used (but never when only pairing, as it has no use in that case). This is handled automatically by the stack in the nRF Connect SDK. By default privacy is not used though, so you will need to enable it if you want the device you are making to use a random resolvable address by adding CONFIG_BT_PRIVACY=y to your project configuration.

    2) What happens in the above situation if the Peripheral uses a random static address and has changed it due to the power cycle? As far as I know, this does not affect the advertised Resolvable Private Address, since it is generated from the IRK, but does it somehow make the bonding data obsolete?

    If it advertises with the same IRK, the central will see it as the same device, and the bond will still be valid.

    4) Can Central also use IRK to generate its address? This may be a silly question - if both devices use IRK, is the bonding data independent of the device address?

    Yes, a central can also use an IRK (all modern mobile phones use resolvable private addresses), and if they only use random resolvable addresses, it would remain the same as long as neither of the IRK does not change.

Reply
  • Hi,

    1) How do these devices know if an IRK should be generated or not?

    The devices own IRK is not generated for every time it bonds, but once (as if it changes the IRK all existing bonds will be useless as the peers will not see it as the same device).

    During the first stage of pairing, IO, MITM, OOB, Bonding info and a lot of other information is exchanged between devices, but what about IRK?

    The IRQ is also exchanged when bonding if it is used (but never when only pairing, as it has no use in that case). This is handled automatically by the stack in the nRF Connect SDK. By default privacy is not used though, so you will need to enable it if you want the device you are making to use a random resolvable address by adding CONFIG_BT_PRIVACY=y to your project configuration.

    2) What happens in the above situation if the Peripheral uses a random static address and has changed it due to the power cycle? As far as I know, this does not affect the advertised Resolvable Private Address, since it is generated from the IRK, but does it somehow make the bonding data obsolete?

    If it advertises with the same IRK, the central will see it as the same device, and the bond will still be valid.

    4) Can Central also use IRK to generate its address? This may be a silly question - if both devices use IRK, is the bonding data independent of the device address?

    Yes, a central can also use an IRK (all modern mobile phones use resolvable private addresses), and if they only use random resolvable addresses, it would remain the same as long as neither of the IRK does not change.

Children
No Data
Related