Blog

Bluetooth® pairing key generation methods

|

In our Bluetooth® pairing feature exchange article, we talked about the pairing feature exchange in Bluetooth® LE. The pairing feature exchange is used to make both devices, initiator and responder, understand each other’s pairing features.

The pairing features that can be enabled are:

  • OOB data flag bit
  • MITM—man-in-the-middle bit
  • SC—LE secure connection indicator bit
  • IO cap—IO capabilities

*For an introduction to these features, please refer to Bluetooth pairing feature exchange.

After this exchange, both devices can select which key generation method is used in subsequent phases. Here is the list of key generation methods for Bluetooth LE legacy pairing and Bluetooth LE secure connection.

Bluetooth LE legacy pairing:

  • Just works
  • Passkey
  • Out-of-band (OOB)

Bluetooth LE secure connection includes the three methods above and adds one new one:

  • Numeric comparison

Workflow

Here is the workflow on how a device decides which key generation method to use.

Step 1: Check SC bit in pairing feature exchange frame. If the SC bit is equal to one on both sides, an LE secure connection is used, go to step 2. Otherwise, it is LE legacy pairing, and go to step 3.

Step 2: When it is an LE secure connection, below is the matrix that the initiator and responder will follow.

  • Use OOB means out-of-band is selected
  • Check MITM means ignore OOB Data Flag and check MITM flag, Man-In-The-Middle flag
  • Use IO Capabilities, go to step 4 to select the key generation method depending on IO capabilities of both devices

Step 3: When it is LE legacy pairing, below is the matrix that initiator and responder will follow.

  • Use OOB means out-of-band is selected
  • Check MITM means ignore OOB Data Flag and check the MITM flag, Man-In-The-Middle flag
  • Use IO Capabilities, go to step 4 to select the key generation method depending on IO capabilities of both device

Step 4: Below is a mapping of the IO capabilities to key generation method. With this table, both devices, initiator and responder, will find an appropriate method for connecting depending on their pairing features.

After this, the initiator and responder understand the method that will be used in the key generation phase. In Bluetooth LE legacy pairing passkey entry, I will introduce how to generate the corresponding key in Bluetooth® LE legacy pairing by using the passkey method.