TEJVONTechnologies Pvt. Ltd.
Back to Insights
BLE · Security 2 min readJune 2026

Secure BLE pairing on Android: the stage that stops a man in the middle

Just Works pairing is easy and offers no protection against interception. Here is what secure pairing actually does, and what the app is responsible for.

T

Surendra — Tejvon

Senior Android & BLE Engineer

BLE pairing is often treated as a checkbox, and many products ship with the simplest model, Just Works. It needs no user interaction, and it gives no protection against a man-in-the-middle attacker who sits between the phone and the device.

There are three common models. Just Works: no interaction, no protection against interception. Passkey Entry: the user types a six-digit code, which protects against passive listening but can be observed. Numeric Comparison, part of LE Secure Connections: both screens show the same six-digit number and the user confirms they match. For products where intercepted commands or injected data would cause harm, Numeric Comparison is the one to use.

Secure pairing runs in stages. The two sides exchange their capabilities and security requirements. Each generates an elliptic-curve key pair, P-256, and they swap public keys. They then exchange random values, and in Numeric Comparison the user confirms the six-digit number derived from them.

The next stage is the one that matters. Each side computes a check value from the shared secret it derived and sends it to the other. An attacker who relayed the public keys cannot produce a valid check, because they do not hold the same secret. This is where a man in the middle is caught.

Finally a long-term key is derived and stored, so the devices can reconnect securely later without pairing again, and the remaining keys are distributed.

On Android, the operating system's Bluetooth stack performs the cryptography. The app's responsibilities are elsewhere, and they are where implementations usually go wrong. The device must require encrypted, MITM-protected access on its sensitive characteristics, so that an unpaired read fails with an authentication error and triggers pairing. The app must listen for pairing requests and bond state changes, show the confirmation to the user, and clear a stale bond before pairing again.

On Android 12 and later, the app also needs the BLUETOOTH_CONNECT permission at runtime. Without it, pairing can fail without any visible error.

Secure pairing costs one confirmation tap for the user. For anything that controls hardware or carries sensitive data, that is a small price for closing the most direct attack on the link.

Topics

BLESecurity

Working on a similar challenge?

Let's discuss the architecture before you build.

BLE system design, OTA reliability, and connected product engineering — this is what TEJVON does every day.

Book a Technical Consultation