蓝牙配对如何工作? [英] How does Bluetooth pairing work?

查看:26
本文介绍了蓝牙配对如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

蓝牙配对究竟是如何工作的?配对过程中每个设备之间的通信是什么?

How exactly does Bluetooth paring work? What is communicated between each device during the pairing process?

有人告诉我,如果您有 device-A 想要与 device-B 配对:

I was told if you had device-A wanting to pair with device-B:

  • A 在某个波长/频率上向设备 B 发送唯一密钥"
  • BA 返回一个回声",因此设备对.

  • A sends a 'unique key' to device B on some wavelength/frequency
  • B returns an 'echo' back to A, and hence the devices pair.

+-----+     key    +-----+ 
|     |  ---->     |     |
|  A  |            |  B  |
|     |     <----  |     |
+-----+     echoed +-----+ 

这似乎是不准确的,那么任何人都可以进一步扩展或实际解释如何/什么通信以导致设备成功配对?

This seems to be inaccurate, so would anyone be able to either expand further or actually explain how/what is communicated to result in a successful pairing of the devices?

我正在考虑将这项研究的一部分纳入最后一年的项目(大学),但至少需要先了解蓝牙编程配对的一些东西.

I was thinking of incorporating some of this research into a final year project (University), but would at least need to know the something of the Bluetooth programming pairing first.

描述这些初始通信如何工作方面的任何帮助将不胜感激.

Any help would be much appreciated in describing how these initial communications work.

我在我的研究中听说过诸如停放模式"和被动模式"之类的术语,但我还没有在设计背后的编程中找到任何有用"的信息,(因此我问了这个问题).谷歌搜索这类话题也很困难,因为它似乎带来了诸如如何打开蓝牙"之类的页面,而不是背后的编程设计.

I've heard of terms such as 'parked mode', and 'passive mode' within my research, but am yet to find any 'useful' information in the programming behind the design, (and hence I have asked this question). The likes of googling this type of topic is also quite difficult as it seems to bring up stuff like 'how to turn your bluetooth on' pages, and not the design of the programming behind it.

推荐答案

Bluetooth Secure Simple Pairing 使用 Elliptic Curve Diffie Hellman (ECDH) 公钥密码术,使用 FIPS 批准的 P192 椭圆曲线大约 95 位熵.

Bluetooth Secure Simple Pairing uses Elliptic Curve Diffie Hellman (ECDH) public key cryptography with approximately 95 bits of entropy using the FIPS approved P192 elliptic curve.

E:y2=x3 +ax+b(modp)

给出以下参数:

  • 素数模p,阶r,基点x坐标Gx,基点y坐标Gy.
  • 整数p和r以十进制形式给出;位串和字段元素以十六进制给出.

  • The prime modulus p, order r, base point x-coordinate Gx, base point y- coordinate Gy.
  • The integers p and r are given in decimal form; bit strings and field elements are given in hex.

p = 6277101735386680763835789423207666416083908700390324961279
r = 6277101735386680763835789423176059013767194773182842284081
b = 64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1
Gx = 188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012
Gy = 07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811

1.公钥交换

每个设备都会生成自己的椭圆曲线 Diffie-Hellman (ECDH) 公私密钥对.

Each device generates its own Elliptic Curve Diffie-Hellman (ECDH) public-private key pair.

2.身份验证阶段 1

3 个协议选项中的 1 个由连接设备根据两个设备的 IO 能力选择.它们是:

1 of 3 protocol options is chosen by the connecting devices based on the IO capabilities of the two devices. These are:

  • 数值比较,
  • 带外,
  • 密码输入

3.身份验证阶段 2

每台设备确认两台设备都按照上一步中选择和使用的协议的规定成功完成了交换.

Each device confirms that both devices have successfully completed the exchange as stipulated by which of protocol was chosen and used in the previous step.

4.链接键计算

链接密钥是根据派生的共享密钥和公开交换的数据计算得出的.这是显示给用户的数字代码.

A link key is computed from the derived shared key and the publicly exchanged data. This is the numeric code shown to the user.

5.LMP 身份验证和加密

生成加密密钥.设备连接成功.

The encryption keys are generated. The devices are successfully connected.

      

           

核心规范有 138 页,要完整回答您的问题至少需要 20 页,因此要完整回答您的问题,您需要阅读参考资料

这篇关于蓝牙配对如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆