最終更新:2022-08-18 (木) 06:45:26 (216d)
BLE/ペアリング
仕様
BLE/GAP
BLE/SM
用語
ペアリング
- 鍵を交換すること自体
- 通信経路の暗号化に必要。
- ペアリングしなくても暗号化が必要とされてないない特性は読み書き可能
ボンディング
- ペアリングを実施し、生成された鍵を保存することで、以降の暗号化通信ができるようにしておくこと
BLE/ペアリング/手順
BLE/ペアリング/手順/フェーズ1
- フェーズ2で使うアソシエーションモデルを決めるために認証の要件とIO Capabilityを交換
BLE/ペアリング/手順/フェーズ2
- フェーズ1で交換した情報を元に鍵の生成方法を決定し、ペアリング(LTKの生成)を行う
BLE/ペアリング/手順/フェーズ3
- Transport Specific Key Distribution
- 配布するキーはフェーズ1のPairing Feature Exchangeのときのパラメータによって決まる
鍵
LTK
STK
IRK
- Identity Resolving Key
CSRK
iOS
- Pairing is initiated any time that you attempt to write to or read from a characteristic on the BLE device.
- However, if the device is not set to require authentication and/or bonding, you will not see the iOS popup which requests the PIN code.
ペアリング手法
- Bluetooth 4.0の時に最初に定義したペアリング方法に脆弱性があるため、Bluetooth 4.2でより強度の強い方法が追加された
- LE pairing as defined in versions 4.0 and 4.1 of the specification is referred to as LE legacy pairing.
LE Legacy Pairing
- 最初にSTK(Short Term Key)を生成し、STKによる暗号化通信でLTKを無線通信で交換
- 脆弱
アソシエーションモデル
- Just Works
- パスキー表示
- OOB
LE Secure Connections Pairing
- Bluetooth 4.2で追加
- 鍵交換に公開鍵暗号を使用
- LTKはパスキー認証などによって各デバイス上で生成 (無線では送らない)
アソシエーションモデル
- Just Works
- パスキー表示
- Numeric Comparison
- OOB
アソシエーションモデル
Numeric Comparison
- 両端末に共通の6つの数字を表示し、同一であることを確認させる(Secure Connectionのみ)
Just Works
- Numeric Comparisonにおいて固定の数字を利用し、両端末にはその数字を表示しない
Passkey Entry
- 片方の端末で6つの数字(PIN)を表示し、もう片方の端末でその数字を入力させる
Out of Band(OOB)
- BLEと外の経路で鍵を渡す
メモ
- Just Works and Passkey Entry? do not provide any passive eavesdropping protection.
- This is because Secure Simple Pairing uses Elliptic Curve Diffie-Hellman and LE Legacy Pairing does not.