一.概念
    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”)等等。

Bluetooth Security Manager的更多相关文章

  1. 卸载/更新HP Client Security Manager失败的解决方案(解决错误1722:软件包存在问题……)

    问题:当卸载较老版本/更新较老版本的HP Client Security Manager时可能会出现下图所示的错误: 解决方案:按Win+R键打开运行窗口,输入regedit回车进入注册表编辑器,依次 ...

  2. HP Client Security Manager

    HP Client Security Manager - SP77916   操作系统:windows 10 64位   HP Client Security Manager - SP77916.ex ...

  3. iOS 8.0 bluetooth peripheral manager giving no callback for addService

    I am adding the service using: [self.peripheralManager addService:myService]; Is this method depreca ...

  4. 解决RMI 客户端异常no security manager: RMI class loader disabled

    解决方法: 客户端和服务端的Service包名改一致 ok!!

  5. java.lang.ClassNotFoundException: XXX (no security manager: RMI class loader disabled)

    在搞RMI远程发布,consumer去获取rmi远程服务的代理对象的时候出现了如下的错误 问题发现: 由于我发布的对象的包路径和获取的对象的包路径不一致,导致了这样的问题 解决方案: 包路径改为一致就 ...

  6. Overview and Evaluation of Bluetooth Low Energy: An Emerging Low-Power Wireless Technology

    转自:http://www.mdpi.com/1424-8220/12/9/11734/htm Sensors 2012, 12(9), 11734-11753; doi:10.3390/s12091 ...

  7. Azure 新的管理模式 —— Resource Manager

    var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...

  8. Java Se:Java Security

    Java API中有很多都使用了SecurityManager,这到底是什么玩意?最近看公司的产品的源码,也有不少SecurityManager.AccessControlContext等相关的代码, ...

  9. What is XMLHTTP? How to use security zones in Internet Explorer

    Types of Security Zones Internet Zone This zone contains Web sites that are not on your computer or ...

随机推荐

  1. poj 1114 完全背包 dp

    如果可以每个物品拿多件,则从小到大遍历,否则从大到小遍历. G - Piggy-Bank Time Limit:1000MS     Memory Limit:32768KB     64bit IO ...

  2. 模拟 POJ 2996 Help Me with the Game

    题目地址:http://poj.org/problem?id=2996 /* 题意:给出白方和黑方的棋子和对应的坐标,输出该副棋盘的样子 模拟题 + 结构体排序:无算法,switch区分读入的字符,按 ...

  3. Codeforces 498C Array and Operations(最大流)

    题目是给一些数和<数对>的下标,然后进行操作:对某个<数对>中的两个数同时除以一个都能被它们整除且不等于1的数,要求的就是最多能进行多少次操作. 除数一定是素数,就是要决定某素 ...

  4. 【Linux/unix网络编程】之使用socket进行TCP编程

    实验一 TCP数据发送与接收 [实验目的] 1.熟练掌握套接字函数的使用方法. 2.应用套接字函数完成基本TCP通讯,实现服务器与客户端的信息交互. [实验学时] 4学时 [实验内容] 实现一个服务器 ...

  5. 超级楼梯[HDU2041]

    超级楼梯 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  6. 浅谈MySQL索引背后的数据结构及算法

    摘要 本文以MySQL数据库为研究对象,讨论与数据库索引相关的一些话题.特别需要说明的是,MySQL支持诸多存储引擎,而各种存储引擎对索引的支持也各不相同,因此MySQL数据库支持多种索引类型,如BT ...

  7. 【BZOJ】1901: Zju2112 Dynamic Rankings(区间第k小+树状数组套主席树)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1901 首先还是吐槽时间,我在zoj交无限tle啊!!!!!!!!我一直以为是程序错了啊啊啊啊啊啊. ...

  8. Quartz与Spring整合进行热部署的实现(二)

    Spring的org.springframework.scheduling.quartz.JobDetailBean提供Job可序列化的实现(具体实现可查看源码) 此时.我们原来的job就可以继承Qu ...

  9. CentOS6.5的openssl升级

    CentOS6.5的openssl升级:(修复心脏漏血漏洞) [root@linux1 ~]# rpm -qi openssl|grep VersionVersion : 1.0.1e Vendor: ...

  10. php的具体配置学习笔记

    1.将php配置为apache的一个模块,使用loadmodule指令完成. 2.写下面的语句,此外需强调的是,每次配置都需要重新启动apache 3.php文件,要指定将其php模块来处理 4.PH ...