BLE Pairing Security Workbench
BLE Pairing Security Workbench
BLE Pairing Security Workbench
Pairing the intended phone
Narrated audio tour. The full transcript is below. These are schematic teaching states, not measured protocol or elapsed lifecycle time. Choose Reduced motion for a complete still at each beat. Explanations beyond the model remain in captions.
Full transcript — ble-pairing (8 beats)
B1 — Smart-lock setup
You are setting up your smart lock with your phone. The lock controls physical access, so trusting a nearby stranger's device could give that stranger control. Your job during pairing is to help the lock trust the intended phone.
Model caption: Your phone is pairing with your smart lock. Trusting the wrong device can give a stranger control.
B2 — Capabilities and method
Bluetooth Low Energy is a short-range radio system. Pairing is the setup conversation that creates shared secret material between two devices. The devices first exchange their input and output capabilities. A display and a yes or no button on both devices allow Numeric Comparison under Low Energy Secure Connections.
Model caption: Pairing creates shared secret material. Both devices can display and confirm, allowing Numeric Comparison with Low Energy Secure Connections.
B3 — Public key exchange
Under Secure Connections, the devices exchange public keys and calculate a shared secret. Someone only listening cannot calculate that secret from the public keys. Numeric Comparison then ties a human check to the exchange, using both devices' public keys and fresh random values.
Model caption: Public keys support a shared secret that passive listeners cannot calculate. Numeric Comparison links a human check to the keys and fresh random values.
B4 — Human comparison
Each device calculates a six-digit comparison value. You compare the values and confirm a match. The comparison checks whether both devices participated in the same exchange. A relay substituting its own keys changes the exchange; a mismatch means pairing should be rejected.
Model caption: Compare both six-digit values. Confirm a match; reject a mismatch. The asset describes the comparison without supplying actual digit readouts.
B5 — Random-match arithmetic
How hard is a random match? Each of six digit positions has ten choices. Ten times ten gives one hundred. Multiply by ten four more times to reach one million possible codes. For a single random guess, divide one by one million: one chance in a million, or one ten-thousandth of one percent. Small, but still possible.
Model caption: Six positions × ten choices: 10 × 10 = 100; multiply by 10 four more times = 1,000,000 codes. One random match: 1 ÷ 1,000,000 = 0.0001%, or one in a million.
B6 — Key derivation and encryption
After the shared secret is calculated, a key derivation step called f five mixes that secret with both devices' fresh random values and addresses. It produces keys for later confirmation and encryption. For your lock, the human comparison and the key calculation serve different purposes within pairing.
Model caption: The f5 step mixes the shared secret with both devices' random values and addresses, producing keys for confirmation and encryption. Human comparison and key calculation have different jobs.
B7 — Just Works impersonation
The misconception is that an encrypted Just Works connection must belong to the intended device. Just Works has no user authentication. An active attacker can negotiate one shared secret with the phone and another with the lock, forwarding traffic between two encrypted links. Encryption alone leaves that impersonation possible.
Model caption: Just Works can encrypt a link without authenticating the intended peer. An active relay can sit between two encrypted links.
B8 — Privacy and authentication
Encryption keeps a conversation private; authentication checks who joined it.
Model caption: Encryption keeps a conversation private; authentication checks who joined it.