第 6 章 メッセージ・シーケンス・チャート 32
6.3 認証および暗号化
のイベントである. しかし,これらセキュリティ・モードのイベントは, ローカル側 では, HCI Accept Connection Request コマンドを実行するまで得ることができな いため, リモート側でのACL確立後にローカル側のセキュリティ・モードを得るこ とになる. このため,提案システムではリモート側においてACL 確立時にセキュリ ティが要求されず, ローカル側においてセキュリティ・モードの要求を受けた際は, 一度リモート側 ACL の切断を行う. その後, ローカル側の要求に合わせてリモー
ト側の Bluetooth インターフェースを設定し直し,再接続することでセキュリティ・
モードの一致を図る.
ローカル側の Bluetooth 機器が暗号化を要求した場合
図6.9にリモート側のBluetooth 機器がなにもセキュリティを要求せず,ローカル側
のBluetooth 機器が暗号化を要求した場合におけるメッセージ・シーケンス・チャー
トを示す. この場合も, 同様にリモート側 ACL の切断, セキュリティ・モードの再 設定を行うことで, ローカル側, リモート側の ACL確立セットアップ時のセキュリ ティ・モードの一致を図る.
Bluetooth-A Bluetooth Bluetooth-B Interface-R
Manager-R Bluetooth
Interface-L Manager-L
LMP_in_rand(rand_nr)
HCI PIN Code Request event(BD_ADDR)
HCI_Authentication_Enable(enable) HCI Command Complete event
LMP_accepted(opecode)
HCI Command Status event
HCI_Accepte_Connection_Request(..., Role=Slave)
HCI Connection Complete event
(Local_ConHandle,Encryption_Mode=disable)
Bluetooth-B accept the ACL Connection Request.
But, Bluetooth-B requires Authentication.
HCI_PIN_Code_Request_Reply (BD_ADDR,PIN_Length,PIN) HCI Command Complete event
Authentication Process
HCI Link Key Notification event HCI Connection Complete event
(Remote_ConHandle,Encryption_mode=disable)
Authentication Process
HCI_PIN_Code_Request_Reply (BD_ADDR,PIN_Length,PIN) HCI Command Complete event HCI PIN Code Request event(BD_ADDR)
Connecting
LMP_accepted(opcode) WIRED_PIN_Code_Request
WIRED_Connection_Complete
(Status=Success,Encryption_mode=disable)
WIRED_PIN_Code_Request
HCI Connection Complete event
(Status=Success,Encryption_Mode=disable) HCI Link Key Notification event
HCI Link Key Request event(BD_ADDR) HCI_Link_Key_Negativet_Reply(BD_ADDR)
HCI Command Complete event
HCI Link Key Request event(BD_ADDR) HCI_Link_Key_Negativet_Reply(BD_ADDR)
HCI Command Complete event
図 6.6: リモート側のBluetooth 機器がペアリング・認証を要求
Bluetooth-A Bluetooth Bluetooth-B Interface-R
Manager-R Bluetooth
Interface-L Manager-L
LMP_in_rand(rand_nr) HCI Link Key Request event(BD_ADDR)
HCI_Authentication_Enable(enable) HCI Command Complete event
HCI Command Status event HCI_Accepte_Connection_Request (..., Role=Slave)
HCI Connection Complete event
(Local_ConHandle,Encryption_Mode=point to point)
HCI_Link_Key_Request_Reply (BD_ADDR,Link_Key) HCI Command Complete event
Authentication Process
HCI Connection Complete event
(Remote_ConHandle,Encryption_mode=point to point)
Authentication Process
HCI_Link_Key_Request_Reply (BD_ADDR,Link_Key) HCI Command Complete event HCI Link Key Request event(BD_ADDR)
Connecting
LMP_accepted(opcode) WIRED_Link_Key_Request
WIRED_Connection_Complete
(Status=Success,Encryption_mode=point to point)
WIRED_Link_Key_Request
HCI Connection Complete event
(Status=Success,Encryption_Mode=point to point) Bluetooth-B accept the ACL Connection Request.
But, Bluetooth-B requires Authentication and Encryption.
HCI_Encryption_Mode(point to point) HCI Command Complete event
Encryption Process LMP_setup_completed()
図 6.7: リモート側のBluetooth 機器が暗号化を要求
Bluetooth-A Bluetooth Bluetooth-B Interface-R
Manager-R Bluetooth
Interface-L Manager-L
LMP_accepted(opecode) HCI Connection Complete event
(Remote_ConHandle, Encryption_Mode=disable)
HCI_Accepte_Connection_Request (..., Role=Slave )
LMP_accepted(opecode)
HCI Command Status event
Authentication Process
HCI Connection Complete event
(Local_ConHandle, Encryption_Mode=disable)
Authentication Process
Connecting
Bluetooth-B accept the ACL Connection Request.
But, Bluetooth-A requires Authentication
WIRED_Connection_Complete (status=success,Encryption_Mode=disable)
HCI_Authentication_Enable(enable) HCI Command Complete event HCI_Disconnect
(Remote_ConHandle,Reason)
HCI Disconnection Complete event (Status=success,Remot_ConHandle,Reason)
LMP_detach(reason)
WIRED_Connection_Complete (status=success,Encryption_Mode=disable)
HCI_Create_Connection(Allow_Role_Switch) HCI Command Status event
Page and Page Response LMP_host_connection_req() LMP_not_accepted(opecode,reason)
HCI Connection Complete event
(Remote_ConHandle, Encryption_Mode=disable) WIRED_Connection_Complete
(Status=Success, Encryption_Mode=disable) HCI_Link_Key_Request_Reply
(BD_ADDR,Link_Key) HCI Command Complete event HCI Link Key Request event(BD_ADDR)
WIRED_Link_Key_Request
HCI_Link_Key_Request_Reply (BD_ADDR,Link_Key)
HCI Command Complete event HCI Link Key Request event(BD_ADDR)
WIRED_Link_Key_Request
図 6.8: ローカル側の Bluetooth 機器が認証を要求
Bluetooth-A Bluetooth Bluetooth-B Interface-R
Manager-R Bluetooth
Interface-L Manager-L
LMP_accepted(opecode) HCI Connection Complete event
(Remote_ConHandle, Encryption_Mode=disable)
HCI_Accepte_Connection_Request (..., Role=Slave )
LMP_accepted(opecode)
HCI Command Status event
Authentication Process
HCI Connection Complete event
(Local_ConHandle, Encryption_Mode=disable)
Connecting
Bluetooth-B accept the ACL Connection Request.
But, Bluetooth-A requires Authentication
WIRED_Connection_Complete (status=success,Encryption_Mode=disable)
HCI_Authentication_Enable(enable) HCI Command Complete event HCI_Disconnect
(Remote_ConHandle,Reason)
HCI Disconnection Complete event (Status=success,Remot_ConHandle,Reason)
LMP_detach(reason)
WIRED_Connection_Complete
(status=success,Encryption_Mode=peer to peer)
HCI_Create_Connection(Allow_Role_Switch) HCI Command Status event
Page and Page Response LMP_host_connection_req() LMP_not_accepted(opecode,reason)
HCI Connection Complete event
(Remote_ConHandle, Encryption_Mode=disable) WIRED_Connection_Complete
(Status=Success, Encryption_Mode=disable) HCI_Link_Key_Request_Reply
(BD_ADDR,Link_Key) HCI Command Complete event HCI Link Key Request event(BD_ADDR)
WIRED_Link_Key_Request
HCI_Link_Key_Request_Reply (BD_ADDR,Link_Key)
HCI Command Complete event HCI Link Key Request event(BD_ADDR)
WIRED_Link_Key_Request
HCI_Encryption_Mode(point to point) HCI Command Complete event
Authentication &
encryption Process
図 6.9: ローカル側のBluetooth 機器が暗号化を要求
6.3.1 ACL 切断
図 6.10に ACL切断時のメッセージ・シーケンス・チャートを示す. 片方の ACLが切 断された場合, Manager へは HCI Disconnection Completeイベントが戻る. このイベン トに対して, WIRED Disconnection Complete を送信し, HCI Disconnection コマンドを 実行することでイベントの転送を実現しACL を切断する.
Bluetooth-A Bluetooth Bluetooth-B
Interface-R Manager-R
Bluetooth
Interface-L Manager-L
LMP_detach(reason)
HCI Disconnection Complete event (Status=success,Local_ConHandle,Reason)
HCI_Disconnect
(Remote_ConHandle,Reason)
HCI Disconnection Complete event (Status=success,.,Reason) ACL Connection established.
Bluetooth A disconnects the ACL Connection.
LMP_detach(reason) Connecting
WIRED_Disconnection_Complete (Status=success,..,Reason)
WIRED_Disconnection_Complete (Status=success,.,Reason) HCI Command Status event
HCI Command Status event
図 6.10: ACL 切断