一.概念
    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. C#环境datagidview添加删除操作

    添加 行 dataGridView1.Rows.Add();//添加空行 dataGridView1.Rows.Add("a","b"……);//添加指定列数的 ...

  2. JavaScript案例四:全选练习

    JavaScript实现全选,全不选等效果... <!DOCTYPE html> <html> <head> <title>JavaScript全选练习 ...

  3. 【JUnit 报错】 method initializationerror not found:JUnit4单元测试报错问题

    今天是用JUnit测试一段代码,报错method initializationerror not found::出现如下问题: 双击这个就显示出现如下的错误: 查询网上,说是junit版本的问题: 那 ...

  4. vi-11

    vi编辑器linux命令大全 作者:xiaoru  出处:本站整理  发布时间:2013-04-29 13:20:23 -     vi就是linux命令行下的最著名的编辑器之一,Vim常被称作“程序 ...

  5. 贪心 Gym 100502E Opening Ceremony

    题目传送门 /* 题意:有一堆砖块,每一次操作可以选择消去任意一行,也可以选择消去任意一列.求要消去所有的砖块需要最小的操作数 贪心:首先清楚的是消去最高列的最佳,消去第一行最佳,行列的顺序只对中间过 ...

  6. MVC 路由模块分析(一)

    概述 主要分为四个部分进行分析. First ——Usage: then ——Extension: and then ——Design: last ——Test. 1. Usage 1.1 Displ ...

  7. HDU3729 I'm Telling the Truth(字典序最大的最大流)

    题目大概说n个学生,都各自有一个互不相同的成绩排名,他们各自说了他们成绩排名所在区间,问最多有几个学生没说谎以及字典序最大的没说谎的学生序列. 学生作为一个X部的点,排名作为Y部的点,学生与其成绩排名 ...

  8. SPOJ962 Intergalactic Map(最大流)

    题目问一张无向图能否从1点走到2点再走到3点,且一个点只走一次. 思维定势思维定势..建图关键在于,源点向2点连边,1点和3点向汇点连边! 另外,题目数据听说有点问题,出现点大于n的数据.. #inc ...

  9. ural 1243. Divorce of the Seven Dwarfs

    1243. Divorce of the Seven Dwarfs Time limit: 1.0 secondMemory limit: 64 MB After the Snow White wit ...

  10. python 代码片段5

    #coding=utf-8 # python 有两个主要数据类型:int和float.根据Kiss原则,python只有一宗整数类型int. print 3**3 print int('123') p ...