一.概念
    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. Mosquitto关于Connection lost的问题。

    文章发自:http://www.cnblogs.com/hark0623/p/4175048.html  转发请注明 如果当你的客户端订阅(sub)mqtt时,发现出现Connection lost ...

  2. mtr命令

    mtr 命令详解 一般在windows 来判断网络连通性用ping 和tracert,ping的话可以来判断丢包率,tracert可以用来跟踪路由,在Linux中有一个更好的网络连通性判断工具,它可以 ...

  3. JVM的启动流程

    JVM工作原理和特点主要是指操作系统装入JVM,是通过jdk中Java.exe来完成,通过下面4步来完成JVM环境. 1.创建JVM装载环境和配置 2.装载JVM.dll 3.初始化JVM.dll并挂 ...

  4. C# 中的可变参数方法(VarArgs)

    首先需要明确一点:这里提到的可变参数方法,指的是具有 CallingConventions.VarArgs 调用约定的方法,而不是包含 params 参数的方法.可以通过MethodBase.Call ...

  5. 基于Extjs的web表单设计器 第七节——取数公式设计之取数公式的使用

    基于Extjs的web表单设计器 基于Extjs的web表单设计器 第一节 基于Extjs的web表单设计器 第二节——表单控件设计 基于Extjs的web表单设计器 第三节——控件拖放 基于Extj ...

  6. BZOJ2674 : Attack

    整体二分+树状数组套Treap,时间复杂度$O(n\log^3n)$. #include<cstdio> #include<cstdlib> #include<algor ...

  7. iOS开发之--UITextField属性

    UITextField属性 0.     enablesReturnKeyAutomatically 默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的. ...

  8. FlyCapture2 fc2Image OpenCV IplImage Conversion 两种图像格式之间的转换

    fc2Image是FlyCapture SDK的C语言库中的图片格式,由于在Windows上的MinGW无法编译FlyCapture2的C++库,只能使用C语言库,所以当我们在同时使用OpenCV的图 ...

  9. Notepad++ Shortcuts 快捷键

    Ctrl-C   Copy Ctrl-X   Cut Ctrl-V   Paste Ctrl-Z   Undo Ctrl-Y   Redo Ctrl-A   Select All Ctrl-F   L ...

  10. 应用服务器上部署自己的 blog 和 wiki 组件。

    协作性应用程序 这就是 Web 2.0 的全部,尽管该术语出现才几乎一年的时间,但现在好像只有烹饪杂志还没有加入到讨论 Web 2.0 未来出路的行列中.自从出现了里程碑式的文章 "What ...