Bluetooth Security Manager
2024-10-10 05:39:10
一.概念
The Security Manager defines methods of pairing and key distribution, a protocol for those methods and a security toolbox to be used by those methods and other parts of an LE device.
二.pairing过程
分为3个phase:
• Phase 1: Pairing Feature Exchange
• Phase 2: Short Term Key (STK) Generation
• Phase 3: Transport Specific Key Distribution
其中,在phase2生成Short Term Key (STK)的过程,可以用到以下三种方法:
• Just Works
• Passkey Entry
• Out Of Band (OOB)
下面是一些chart,可以具体看三个phase实现的一些动作:
1.总的过程如下
可以看到第二个生成STK的过程有三个方法。
2.先看第一个phase:Pairing Feature Exchange
分为master主动发起和slave要求发起,多了一个slave发起的Security Request (AuthReq)
:
3.第二个phase:Authenticating and Encrypting
分别对应上面 Just Works, Passkey Entry 和Out Of Band (OOB)三种方法。
我们来比较一下这三种方法,Just Works Pairing Method使用的TK = 0x00,Passkey Entry Pairing Method使用的TK是用户输入的,而OOB Pairing Method使用的TK = OOB TK Value,其余过程都是一样的。我们在phase1中进行Feature Exchange,获得一些参数,通过函数:
c1(TK, Mrand, Pairing Request command, Pairing Response command,initiating device address type, initiating device address, responding device address type, responding device address)
分别在master和slave端计算得到Mconfirm和Sconfirm,通过Pairing Confirm和Pairing Random交换Mconfirm和Sconfirm以及Mrand和Srand,两端再进行Check for confirm value match,通过函数:
STK = s1(TK, Srand, Mrand)
计算出最终的STK。然后用这个STK来对LE link进行encrypted。
3.phase3: Transport Specific Key Distribution
生成STK并对link进行加密后,就可以进行这一步了:
然后可能使用LTK来进行re-establish security,举例如下:
三.错误处理
在这三个phase过程中,可能出错。
例如在phase1中可能出现:
Pairing Failed (“Encryption Key Size”)
Pairing Failed (“Encryption Key Size”)
在phase2中:
Pairing Failed (“Passkey Entry Failed”)
Pairing Failed (“Confirm Value Failed”)等等。
最新文章
- javascript继承的三种模式
- JavaScript数组去重
- %格式化和format格式化--python
- gulp的使用
- Delphi版本顺序
- qml 一些知识点
- 【英语】Bingo口语笔记(62) - 生气道歉场景的表达
- php xml常用函数的集合(比较详细)
- 如何让虚拟目录里面的webconfig不继承网站的设置
- 三十项调整助力 Ubuntu 13.04 更上一层楼
- noi 7221 拯救公主 (状态压缩+bfs)
- Web Server (IIS) Administration Cmdlets in Windows PowerShell
- php:跨域
- java和.net的类比
- 个人VIM配置实例
- Ubuntu 环境 TensorFlow (最新版1.4) 源码编译、安装
- ubuntu批量更改文件权限
- AngularJS进阶(十四)AngularJS灵异代码事件
- spring-data-redis和jedis版本对应收集总结
- 微信小程序 获得用户输入内容