Bluetooth & BLE · Study deck

BLE Encryption: Secure Pairing

A sensor with no screen still needs safe pairing, the step that connects it to an approved app.

Radio Remi is your guide for this deck.

securityencryptionkeys
Radio Remi, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Test pitfall: using "just works" pairing because the device has no display with a concrete scenario and pass criteria.
  • Validate deep dive: key lifecycle, privacy addresses, and signed data evidence with a concrete scenario and pass criteria.
  • Explain: A medical device manufacturer is designing a BLE-connected insulin pump.
  • Explain: Key revocation: The pump can revoke a lost or compromised bond and require a new, authorized commissioning ceremony.
iotclass.org

Major section

Worked Example: Quantifying BLE Pairing Attack Surfaces

A medical device manufacturer is designing a BLE-connected insulin pump.

  • The pump communicates with a companion smartphone app to receive bolus dose commands.
  • The design team must choose the appropriate BLE security level.
  • Threat Analysis -- What Happens If Pairing is Compromised?: An attacker who performs a MITM during pairing becomes the bonded device.

Why it matters

Just Works: The risk is active MITM or pairing hijack during the setup window because there is no user-authenticated check.

iotclass.org

Major section

Worked Example: Quantifying BLE Pairing Attack Surfaces (continued)

Key revocation: The pump can revoke a lost or compromised bond and require a new, authorized commissioning ceremony.

  • Passkey with Legacy pairing: The risk is a captured pairing exchange combined with low-entropy passkey material.
  • A PIN alone is not a signing key.
  • Rotation only limits exposure if the old key is actually removed.
iotclass.org

Major section

Worked Example: Quantifying BLE Pairing Attack Surfaces (continued)

OOB using NFC or QR: The attacker must compromise the out-of-band channel as well as the BLE exchange, which materially raises the bar.

  • The short-range tap makes remote interception harder, but staff must still protect against relay devices and unauthorized physical access.
  • OOB pairing: Adds hardware or provisioning-flow complexity, but removes the remote pairing MITM path.
  • Combined result: Pairing protects the link, authorization protects the action, and revocation limits persistence.
iotclass.org

Major section

Worked Example: Quantifying BLE Pairing Attack Surfaces (continued)

Application-layer PIN or role check: Adds a small user step for high-risk commands, but blocks unauthorized commands even if a bond is misused.

  • Periodic re-authentication: Adds occasional friction, but limits how long a compromised bond remains useful.
  • Key Insight: OOB pairing removes the primary remote MITM path, while application-layer authorization adds an independent barrier for dose commands.
  • Neither layer alone is sufficient for a life-safety device, but together they provide defense-in-depth with manageable user friction.
iotclass.org

Major section

Concept Relationships:

Key hierarchy and bonding: Session keys and stored keys determine whether reconnection can happen securely without re-pairing.

  • Pairing methods and key generation: Authentication strength during pairing determines whether encryption protects the right peer.
  • CSRK and data integrity: Signature keys verify authenticity on unencrypted LE links, but they are not a substitute for encryption where confidentiality matters.
  • AES-CCM-128 and link encryption: Link encryption protects post-pairing traffic once trusted keys are available.

Why it matters

IRK and privacy: Identity resolving keys allow bonded devices to recognize private rotating addresses without exposing a stable public address.

iotclass.org

Major section

Deep Dive: Key Lifecycle, Privacy Addresses, and Signed Data Evidence

Encryption is only part of the BLE security record.

  • Key change or trust removal then leads to a checked delete and an audit record.
  • A new owner or risk starts the loop again.
  • Resolvable Private Addresses make the IRK role concrete.
  • CSRK signed data is a different tradeoff.

Why it matters

A new key for each job limits what one lost key can allow.

A useful key remains owned, purpose-bound, protected, replaceable, revocable, and traceable from creation through verified destruction.
A useful key remains owned, purpose-bound, protected, replaceable, revocable, and traceable from creation through verified destruction.
iotclass.org

Major section

Deep Dive: Key Lifecycle, Privacy Addresses, and Signed Data Evidence (continued)

A peripheral can accept a write over an unencrypted link when the packet includes a signature computed with the CSRK and a monotonically increasing counter.

  • For BLE bonds, the list should name the owner, job, state, store, and removal path for each LTK, IRK, and CSRK.
  • The receiver checks the signature and rejects stale counters, which gives authenticity and replay protection, but not confidentiality.
  • Bond deletion must remove all relevant keys.
iotclass.org

Deck summary

Key takeaways

A medical device manufacturer is designing a BLE-connected insulin pump.

  • Key revocation: The pump can revoke a lost or compromised bond and require a new, authorized commissioning ceremony.
  • OOB using NFC or QR: The attacker must compromise the out-of-band channel as well as the BLE exchange, which materially raises the bar.
  • Application-layer PIN or role check: Adds a small user step for high-risk commands, but blocks unauthorized commands even if a bond is misused.
  • Key hierarchy and bonding: Session keys and stored keys determine whether reconnection can happen securely without re-pairing.
iotclass.org

Retrieval practice

Recall check 1 of 4

Radio Remi says: answer from memory, then check your reasoning.

Q1What is the role of the Long Term Key (LTK) in BLE security?

AIt encrypts data only during the initial pairing session and is then discarded
BIt is stored after bonding to enable secure reconnection without re-pairing
CIt resolves private MAC addresses to prevent device tracking
DIt signs unencrypted data packets to verify integrity
Show answer

Answer: B The LTK is a 128-bit key saved during bonding so that two devices can re-establish an encrypted link in future sessions without repeating the full pairing ceremony.

iotclass.org

Retrieval practice

Recall check 2 of 4

Radio Remi says: answer from memory, then check your reasoning.

Q2Which pairing method should be used for a BLE-connected medical glucose monitor?

AJust Works, relying on fast setup without authenticated user interaction.
BPasskey Entry with a fixed PIN printed permanently on the device label.
COut-of-band NFC or QR pairing plus application-layer authorization.
DNo pairing, relying solely on application encryption for the BLE link.
Show answer

Answer: C Correct for this design scenario.

iotclass.org

Retrieval practice

Recall check 3 of 4

Radio Remi says: answer from memory, then check your reasoning.

Q3What key improvement does LE Secure Connections (BLE 4.2+) provide over Legacy Pairing?

AAES-256 instead of AES-128 as the sole change from Legacy Pairing.
BElliptic-curve Diffie–Hellman key agreement during pairing.
CNo pairing method at all because connections become automatic.
DA radio-range extension from about ten to one hundred metres.
Show answer

Answer: B LE Secure Connections uses ECDH on the P-256 curve for key agreement, so a passive attacker who records the pairing exchange cannot derive the shared keys.

iotclass.org

Retrieval practice

Recall check 4 of 4

Radio Remi says: answer from memory, then check your reasoning.

Q4What protects BLE link-layer packets with confidentiality and integrity using AES-CCM?

ALong Term Key (LTK)
BAES-CCM Encryption
CIdentity Resolving Key (IRK)
DConnection Signature Key (CSRK)
Show answer

Answer: B BLE applies AES-CCM to provide confidentiality and integrity for protected link-layer packets.

Q5Complete the authorization logic for a high-risk BLE command after bonding:

Aif not ctx.ble_encrypted:
Bif ctx.rssi < -70:
Cif command not in HIGH_RISK:
Dif ctx.device_name is None:
Show answer

Answer: A Bonding and link encryption are necessary but not sufficient for high-risk commands.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. B · The LTK is a 128-bit key saved during bonding so that two devices can re-establish an encrypted link in future sessions without repeating the full pairing ceremony.
  2. C · Correct for this design scenario.
  3. B · LE Secure Connections uses ECDH on the P-256 curve for key agreement, so a passive attacker who records the pairing exchange cannot derive the shared keys.
  4. B · BLE applies AES-CCM to provide confidentiality and integrity for protected link-layer packets.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · Bonding and link encryption are necessary but not sufficient for high-risk commands.
iotclass.org