Support us and view this ad

可选:点击以支持我们的网站

免费文章

Introduction: The Security Gap in Bluetooth Mesh Provisioning Bluetooth Mesh networks are increasingly deployed in smart buildings, industrial IoT, and lighting systems. The provisioning process—where an unprovisioned device (a "node") is added to the network—is the most critical security juncture. Standard Bluetooth Mesh provisioning uses an Out-of-Band (OOB) authentication mechanism, typically based on a static PIN or numeric comparison. However, this approach is vulnerable to eavesdropping, man-in-the-middle (MITM) attacks, and replay attacks, especially when the OOB channel is weak or absent. Chinese-manufactured System-on-Chips (SoCs), such as those from Telink (TLSR825x, TLSR951x) and Beken (BK7231, BK7252), offer competitive performance and cost but often lack hardware-accelerated cryptographic engines for public-key cryptography. This article presents a custom provisioning solution that integrates Elliptic Curve Diffie-Hellman (ECDH) key exchange with a modified Secure Network Beacon (SNB) to establish a robust, authenticated session before the standard provisioning protocol begins. The implementation runs entirely on the SoC’s CPU, with careful optimization to meet real-time constraints. Core Technical Principle: ECDH Pre-Provisioning Handshake The standard Bluetooth Mesh provisioning protocol (Mesh Profile Specification v1.0+) uses a four-phase flow: Beaconing, Invitation, Provisioning, and Configuration. Our enhancement inserts a secure pre-handshake before the Invitation phase. The unprovisioned device broadcasts a custom Secure Network Beacon that includes its ECDH public key, a nonce, and a timestamp. The provisioner responds with its own public key and a signed confirmation. Both parties compute a shared secret using ECDH (curve secp256r1, also known as P-256). This shared secret is then used to derive a session key via HKDF (HMAC-based Key Derivation Function). The session key encrypts the subsequent provisioning payloads, mitigating passive eavesdropping and active MITM attacks. The packet format for the enhanced Secure Network Beacon is as follows: | Byte 0-1 | Byte 2-3 | Byte 4-19 | Byte 20-35 | Byte 36-51 | Byte 52-53 | |---------|---------|----------|----------|----------|----------| | PDU Type| AD Type | Device UUID (16B) | Public Key X (32B) | Nonce (16B) | CRC16 | PDU Type: 0x2B (Custom Mesh Beacon, non-standard). AD Type: 0x16 (Service Data - 16-bit UUID). The UUID is a custom service ID (e.g., 0xFFE0). Device UUID: Unique 128-bit identifier of the device (as per Mesh Profile). Public Key X: The X-coordinate of the ECDH public key (compressed form, 32 bytes). The Y-coordinate is derived during computation. Nonce: Random 16-byte value generated per beacon transmission to prevent replay. CRC16: CCITT CRC-16 over the entire beacon payload (excluding CRC field)....

继续阅读完整内容

支持我们的网站,请点击查看下方广告

正在加载广告...

Login