CN102983892B - Bluetooth pairing method and system - Google Patents
Bluetooth pairing method and system Download PDFInfo
- Publication number
- CN102983892B CN102983892B CN201210468491.3A CN201210468491A CN102983892B CN 102983892 B CN102983892 B CN 102983892B CN 201210468491 A CN201210468491 A CN 201210468491A CN 102983892 B CN102983892 B CN 102983892B
- Authority
- CN
- China
- Prior art keywords
- key device
- smart key
- bluetooth
- terminal
- pairing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000004891 communication Methods 0.000 claims abstract description 40
- 230000003993 interaction Effects 0.000 claims abstract description 26
- 238000005516 engineering process Methods 0.000 abstract description 10
- 230000005540 biological transmission Effects 0.000 abstract description 8
- 230000009286 beneficial effect Effects 0.000 abstract description 5
- 230000004044 response Effects 0.000 description 39
- 230000008569 process Effects 0.000 description 12
- 238000012795 verification Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开一种蓝牙配对方法,该方法包括以下步骤:智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将所述蓝牙配对码输出;终端开启蓝牙功能,接收用户输入的所述蓝牙配对码,与所述智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互。本发明还公开一种蓝牙配对系统。本发明通过智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将蓝牙配对码输出;终端开启蓝牙功能,接收用户输入的蓝牙配对码,与智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互的方法,具有利用蓝牙通信技术在智能密钥设备中安全地进行数据传输的有益效果,提高了信息传输安全性的同时,提升了用户体验。<!--1-->
The invention discloses a bluetooth pairing method, which comprises the following steps: a smart key device turns on the bluetooth function, enters a discoverable mode, generates a bluetooth pairing code, and outputs the bluetooth pairing code; a terminal turns on the bluetooth function, and receives user input The Bluetooth pairing code is paired with the smart key device; after the pairing is successful, a communication link is established for data interaction. The invention also discloses a bluetooth pairing system. The invention enables the Bluetooth function through the smart key device, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code; the terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; After success, the method of establishing a communication link and performing data interaction has the beneficial effect of using Bluetooth communication technology to safely perform data transmission in the smart key device, which improves the security of information transmission and improves user experience. <!--1-->
Description
技术领域technical field
本发明涉及信息安全技术领域,尤其涉及一种蓝牙配对方法及系统。The invention relates to the technical field of information security, in particular to a Bluetooth pairing method and system.
背景技术Background technique
随着因特网技术的快速发展,电子商务和网上交易也得以迅猛发展,人们对网络用户身份认证的易用性和安全性也提出了更高的要求。现有的用于网络用户身份认证的智能密钥设备一般都采用USB(UniversalSerialBus,通用串行总线)接口与主机进行通信,这种直接的机械接触和有线连接的方式给用户的使用带来了诸多不便。With the rapid development of Internet technology, e-commerce and online transactions have also developed rapidly, and people have put forward higher requirements for the ease of use and security of network user authentication. Existing smart key devices for network user identity authentication generally use a USB (UniversalSerialBus, Universal Serial Bus) interface to communicate with the host. This direct mechanical contact and wired connection mode brings users A lot of inconvenience.
由于无线通信技术的迅速发展,蓝牙通信技术在手机、PAD(PureAudioDesign,平板电脑)等移动终端中得以普及应用。但现有的蓝牙配对及通信技术中,大多采用固定PIN(PersonalIdentificationNumber,个人身份识别码)的方式,固定的PIN码通常为“0000”、“1111”等类似的数字组合;这种固定PIN码的安全性非常有限,很容易被非法窃取,从而给通过蓝牙链路传输的信息带来安全威胁。因此,蓝牙通信技术还没有在智能密钥设备这类对安全性要求较高的领域中得以推广应用。Due to the rapid development of wireless communication technology, Bluetooth communication technology has been widely used in mobile terminals such as mobile phones and PADs (Pure Audio Design, tablet computers). But in the existing bluetooth pairing and communication technology, adopt the mode of fixed PIN (PersonalIdentificationNumber, personal identification code) mostly, fixed PIN code is usually " 0000 ", " 1111 " etc. similar numerical combination; This fixed PIN code The security of Bluetooth is very limited, and it is easy to be stolen illegally, thus posing a security threat to the information transmitted through the Bluetooth link. Therefore, the bluetooth communication technology has not yet been popularized and applied in fields such as smart key devices that require high security.
发明内容Contents of the invention
本发明的主要目的是提供一种蓝牙配对方法及系统,旨在解决蓝牙通信技术在智能密钥设备中进行数据传输的安全性问题,提高信息传输的安全性。The main purpose of the present invention is to provide a bluetooth pairing method and system, aiming to solve the security problem of data transmission in smart key equipment by bluetooth communication technology, and improve the security of information transmission.
本发明公开了一种蓝牙配对方法,包括以下步骤:The invention discloses a bluetooth pairing method, comprising the following steps:
智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将所述蓝牙配对码输出;The smart key device turns on the Bluetooth function, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code;
终端开启蓝牙功能,接收用户输入的所述蓝牙配对码,与所述智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互。The terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; after the pairing is successful, establishes a communication link for data interaction.
优选地,所述智能密钥设备输出所述蓝牙配对码的方式包括显示输出和发声输出。Preferably, the way for the smart key device to output the Bluetooth pairing code includes display output and sound output.
优选地,所述智能密钥设备将所述蓝牙配对码通过显示屏显示输出。Preferably, the smart key device displays and outputs the Bluetooth pairing code through a display screen.
优选地,所述蓝牙配对码为所述智能密钥设备随机生成的动态蓝牙配对码。Preferably, the Bluetooth pairing code is a dynamic Bluetooth pairing code randomly generated by the smart key device.
优选地,所述终端与智能密钥设备进行配对,配对成功后,建立通信链路,进行数据交互的步骤包括:Preferably, the terminal is paired with the smart key device, and after the pairing is successful, establishing a communication link and performing data interaction include:
所述终端发送包括随机数和终端地址的配对请求至所述智能密钥设备;The terminal sends a pairing request including a random number and a terminal address to the smart key device;
所述智能密钥设备接收所述配对请求,对包括所述配对码信息、随机数和终端地址的输入参数进行加密运算,获取初始化密钥,并基于所述初始化化密钥对所述终端进行校验;The smart key device receives the pairing request, performs an encryption operation on input parameters including the pairing code information, a random number, and a terminal address, acquires an initialization key, and performs an encryption operation on the terminal based on the initialization key. check;
所述终端用与所述智能密钥设备相同的方法运算得到所述初始化密钥,并基于所述初始化密钥,对所述智能密钥设备进行校验;若所述智能密钥设备与终端相互校验均通过,则二者配对成功,所述终端与所述智能密钥设备建立通信链路,进行数据交互。The terminal uses the same method as the smart key device to obtain the initialization key, and based on the initialization key, checks the smart key device; if the smart key device and the terminal If both of the mutual checks pass, the pairing between the two is successful, and the terminal establishes a communication link with the smart key device for data interaction.
本发明还公开一种蓝牙配对系统,包括:The invention also discloses a bluetooth pairing system, including:
智能密钥设备,用于开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将所述蓝牙配对码输出;The smart key device is used to enable the Bluetooth function, enter a discoverable mode, generate a Bluetooth pairing code, and output the Bluetooth pairing code;
终端,用于开启蓝牙功能,接收用户输入的所述蓝牙配对码,与所述智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互。The terminal is used to enable the Bluetooth function, receive the Bluetooth pairing code input by the user, and perform pairing with the smart key device; after the pairing is successful, establish a communication link for data interaction.
优选地,所述智能密钥设备具体用于,通过显示或发声的方式输出所述蓝牙配对码。Preferably, the smart key device is specifically configured to output the Bluetooth pairing code by displaying or sounding.
优选地,所述智能密钥设备还具体用于:将所述蓝牙配对码通过显示屏显示输出。Preferably, the smart key device is further specifically configured to: display and output the Bluetooth pairing code through a display screen.
优选地,所述智能密钥设备具体用于,随机生成的动态蓝牙配对码。Preferably, the smart key device is specifically used for a randomly generated dynamic Bluetooth pairing code.
优选地,所述终端具体用于,发送包括随机数和终端地址的配对请求至所述智能密钥设备;Preferably, the terminal is specifically configured to send a pairing request including a random number and a terminal address to the smart key device;
还用于,用与所述智能密钥设备相同的方法运算得到所述初始化密钥,并基于所述初始化密钥,对所述智能密钥设备进行校验;并在与所述智能密钥设备配对成功时,与所述智能密钥设备建立通信链路,进行数据交互;It is also used to obtain the initialization key by the same method as the smart key device, and verify the smart key device based on the initialization key; When the device pairing is successful, establish a communication link with the smart key device to perform data interaction;
所述智能密钥设备具体用于,接收所述终端发送的所述配对请求,对包括所述配对码信息、随机数和终端地址的输入参数进行加密运算,获取初始化密钥,并基于所述初始化化密钥对所述终端进行校验。The smart key device is specifically configured to receive the pairing request sent by the terminal, perform an encryption operation on input parameters including the pairing code information, a random number, and a terminal address, obtain an initialization key, and based on the The initialization key is used to verify the terminal.
本发明通过智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将蓝牙配对码输出;终端开启蓝牙功能,接收用户输入的蓝牙配对码,与智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互的方法,具有利用蓝牙通信技术在智能密钥设备中安全地进行数据传输的有益效果,提升了用户体验;由于采用的是随机生成的动态蓝牙配对码,因此极大地提高了信息传输的安全性。The invention enables the Bluetooth function through the smart key device, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code; the terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; After success, the method of establishing a communication link and performing data interaction has the beneficial effect of using Bluetooth communication technology to safely transmit data in the smart key device, which improves the user experience; because the randomly generated dynamic Bluetooth pairing code is used , thus greatly improving the security of information transmission.
附图说明Description of drawings
图1是本发明蓝牙配对方法一实施例流程示意图;Fig. 1 is a schematic flow chart of an embodiment of the Bluetooth pairing method of the present invention;
图2是本发明蓝牙配对方法中终端与智能密钥设备进行配对,在配对成功时建立通信链路,进行数据交互一实施例流程示意图;Fig. 2 is a schematic flow diagram of an embodiment of the Bluetooth pairing method of the present invention in which the terminal and the smart key device are paired, and a communication link is established when the pairing is successful, and data interaction is performed;
图3是本发明蓝牙配对系统一实施例结构示意图。FIG. 3 is a schematic structural diagram of an embodiment of the Bluetooth pairing system of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
以下结合说明书附图及具体实施例进一步说明本发明的技术方案。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明实施例所述的终端包括PC(PersonalComputer,个人电脑)、移动终端、ATM(AutomaticTellerMachine,自动柜员机)等任何能够与智能密钥设备进行蓝牙通信的主机设备。The terminal described in the embodiment of the present invention includes PC (Personal Computer, personal computer), mobile terminal, ATM (Automatic Teller Machine, automatic teller machine) and any host device capable of performing Bluetooth communication with the smart key device.
参照图1,图1是本发明蓝牙配对方法一实施例流程示意图;如图1所示,本发明蓝牙配对方法包括以下步骤:With reference to Fig. 1, Fig. 1 is a schematic flow chart of an embodiment of the bluetooth pairing method of the present invention; As shown in Fig. 1, the bluetooth pairing method of the present invention comprises the following steps:
步骤S01、智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将所述蓝牙配对码输出;Step S01, the smart key device turns on the Bluetooth function, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code;
具体地,通过智能密钥设备的蓝牙开启模块,开启智能密钥设备的蓝牙功能,使智能密钥设备进入可发现模式,以便主机设备这一终端能够发现智能密钥设备,并进行配对。Specifically, through the Bluetooth activation module of the smart key device, the Bluetooth function of the smart key device is turned on, so that the smart key device enters a discoverable mode, so that the host device, a terminal, can discover the smart key device and perform pairing.
同时,智能密钥设备控制自身的蓝牙配对码生成模块生成蓝牙配对码并通过智能密钥设备的输出模块输出给用户,供用户获取后输入到终端,用于与该智能密钥设备进行配对。At the same time, the smart key device controls its own Bluetooth pairing code generation module to generate a Bluetooth pairing code and outputs it to the user through the output module of the smart key device for the user to obtain and input to the terminal for pairing with the smart key device.
在一优选的实施例中,智能密钥设备通过随机方式生成动态的蓝牙配对码,这很好地克服了现有技术中使用固定PIN码被非法窃取的问题;智能密钥设备通过显示装置比如显示屏显示所述蓝牙配对码,供用户读取;或者通过发声装置以发声的方式输出所述蓝牙配对码,供用户听取。In a preferred embodiment, the smart key device generates a dynamic Bluetooth pairing code in a random manner, which well overcomes the problem of being illegally stolen by using a fixed PIN code in the prior art; the smart key device uses a display device such as The display screen displays the bluetooth pairing code for the user to read; or the bluetooth pairing code is output in a sounding manner through the sounding device for the user to listen to.
步骤S02、终端开启蓝牙功能,接收用户输入的所述蓝牙配对码,与所述智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互。Step S02, the terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; after the pairing is successful, establishes a communication link for data interaction.
终端通过蓝牙开启模块,开启终端自身的蓝牙功能,通过其输入装置接收用户输入的蓝牙配对码后,终端主动向智能密钥设备发起配对请求,开始配对过程。The terminal activates the module through Bluetooth to enable the Bluetooth function of the terminal itself, and after receiving the Bluetooth pairing code input by the user through its input device, the terminal initiates a pairing request to the smart key device to start the pairing process.
在一优选的实施例中,所述终端在向智能密钥设备发起配对请求前,先生成一随机数R1,将包含该随机数R1和终端地址ADDR1(Address,地址)的配对请求通过蓝牙链路发送给所述智能密钥设备,开始与智能密钥设备的配对过程。智能密钥设备接收终端发送的配对请求,与终端基于所述蓝牙配对码进行相互认证,若二者认证通过,则说明智能密钥设备与终端配对成功,则终端建立通信链路,与智能密钥设备进行数据交互。In a preferred embodiment, before the terminal initiates a pairing request to the smart key device, it first generates a random number R1, and passes the pairing request including the random number R1 and the terminal address ADDR1 (Address, address) through the Bluetooth link sent to the smart key device to start the pairing process with the smart key device. The smart key device receives the pairing request sent by the terminal, and conducts mutual authentication with the terminal based on the Bluetooth pairing code. key device for data exchange.
本实施例通过智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将蓝牙配对码输出;终端开启蓝牙功能,接收用户输入的蓝牙配对码,与智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互的方法,具有利用蓝牙通信技术在智能密钥设备中安全地进行数据传输的有益效果,提升了用户体验;由于采用的是随机生成的动态蓝牙配对码,因此极大地提高了信息传输的安全性。In this embodiment, the Bluetooth function is enabled by the smart key device, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code; the terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; After the pairing is successful, the method of establishing a communication link and performing data interaction has the beneficial effect of using Bluetooth communication technology to safely transmit data in the smart key device, which improves the user experience; since the randomly generated dynamic Bluetooth pairing is used Code, thus greatly improving the security of information transmission.
参照图2,图2是本发明蓝牙配对方法中终端与智能密钥设备进行配对,在配对成功时建立通信链路,进行数据交互一实施例流程示意图;本实施例仅对本发明终端与智能密钥设备进行配对,在配对成功时建立通信链路,进行数据交互的过程进行进一步描述,本发明蓝牙配对方法所涉及的其他步骤,请参照图1所述实施例的具体描述,在此不再赘述。Referring to Fig. 2, Fig. 2 is a schematic flow diagram of an embodiment of pairing the terminal and the smart key device in the Bluetooth pairing method of the present invention, establishing a communication link and performing data interaction when the pairing is successful; this embodiment is only for the terminal and the smart key device of the present invention The process of pairing with the key device, establishing a communication link when the pairing is successful, and performing data interaction will be further described. For other steps involved in the Bluetooth pairing method of the present invention, please refer to the specific description of the embodiment shown in FIG. 1 , which will not be repeated here. repeat.
如图2所述,本发明蓝牙配对方法中,终端与智能密钥设备进行配对,在配对成功时建立通信链路,进行数据交互的过程包括以下步骤:As shown in Figure 2, in the Bluetooth pairing method of the present invention, the terminal is paired with the smart key device, and a communication link is established when the pairing is successful, and the process of data interaction includes the following steps:
步骤S11、所述终端发送包括随机数和终端地址的配对请求至所述智能密钥设备;Step S11, the terminal sends a pairing request including a random number and a terminal address to the smart key device;
终端通过蓝牙通信发现处于可发现模式的智能密钥设备时,终端首先发送配对请求,与智能密钥设备进行配对;该配对请求包括终端产生的随机数R1、终端地址等。When the terminal discovers the smart key device in discoverable mode through Bluetooth communication, the terminal first sends a pairing request to pair with the smart key device; the pairing request includes the random number R1 generated by the terminal, the terminal address, and so on.
步骤S12、所述智能密钥设备接收所述配对请求,对包括所述配对码信息、随机数和终端地址的输入参数进行加密运算,获取初始化密钥,并基于所述初始化化密钥对所述终端进行校验;Step S12, the smart key device receives the pairing request, performs an encryption operation on the input parameters including the pairing code information, a random number, and a terminal address, obtains an initialization key, and uses the initialization key to pair the The terminal is verified;
智能密钥设备通过蓝牙链路接收包含所述随机数R1和终端地址ADDR1的配对请求,智能密钥设备和终端分别对包括所述随机数R1和蓝牙配对码及蓝牙配对码长度Blooth_Len和/或终端地址ADDR1的输入参数进行加密运算,生成初始化密钥KEY1;在一优选的实施例中,所述加密运算使用的加密算法为E22算法。The smart key device receives the pairing request including the random number R1 and the terminal address ADDR1 through the Bluetooth link, and the smart key device and the terminal respectively pair the random number R1 and the Bluetooth pairing code and the Bluetooth pairing code length Blooth_Len and/or The input parameters of the terminal address ADDR1 are encrypted to generate the initialization key KEY1; in a preferred embodiment, the encryption algorithm used in the encryption operation is the E22 algorithm.
智能密钥设备对终端基于所述初始化化密钥进行校验的具体过程为:The specific process for the smart key device to verify the terminal based on the initialization key is:
智能密钥设备生成第一鉴别随机数R2,并将该第一鉴别随机数R2通过蓝牙链路发送给所述终端;所述终端按照与智能密钥设备相同的方法运算得到所述初始化密钥KEY1,之后,按照第一预置加密算法对包括所述初始化密钥KEY1、第一鉴别随机数R2和终端地址的ADDR1的输入参数进行加密运算,生成第一响应数SRES1,并将所述第一响应数SRES1通过所述蓝牙链路发送给所述智能密钥设备。所述智能密钥设备接收所述第一响应数SRES1,利用与所述终端生成所述第一响应数SRES1相同的加密函数即第一预置加密算法及上述的输入参数生成第二响应数SRES2,比较所述第一响应数SRES1与所述第二响应数SRES2是否一致;若第一响应数SRES1与第二响应数SRES2一致,则所述智能密钥设备对所述终端的校验通过,若二者不一致,则所述智能密钥设备对所述终端的验证失败。The smart key device generates the first authentication random number R2, and sends the first authentication random number R2 to the terminal through the Bluetooth link; the terminal obtains the initialization key according to the same method as the smart key device KEY1, after that, according to the first preset encryption algorithm, the input parameters including the initialization key KEY1, the first authentication random number R2 and the terminal address ADDR1 are encrypted to generate the first response number SRES1, and the second A response number SRES1 is sent to the smart key device through the Bluetooth link. The smart key device receives the first response number SRES1, and generates a second response number SRES2 by using the same encryption function as that generated by the terminal to generate the first response number SRES1, that is, the first preset encryption algorithm and the above-mentioned input parameters , comparing whether the first response number SRES1 is consistent with the second response number SRES2; if the first response number SRES1 is consistent with the second response number SRES2, the smart key device passes the verification of the terminal, If the two are inconsistent, the verification of the terminal by the smart key device fails.
步骤S13、所述终端根据所述初始化密钥,对所述智能密钥设备进行校验;若所述智能密钥设备与终端相互校验均通过,则二者配对成功,所述终端建立的通信链路,进行数据交互。Step S13, the terminal verifies the smart key device according to the initialization key; if the smart key device and the terminal pass mutual verification, the pairing of the two is successful, and the terminal establishes Communication link for data exchange.
终端对智能密钥设备基于所述初始化化密钥进行校验的具体过程为:The specific process for the terminal to verify the smart key device based on the initialization key is as follows:
所述终端生成第二鉴别随机数R3,并将所述第二鉴别随机数R3通过蓝牙链路发送给所述智能密钥设备,所述智能密钥设备按照第二预置加密算法对包括所述初始化密钥KEY1、第二鉴别随机数R3和终端地址的ADDR1的输入参数进行加密运算,生成第三响应数SRES3,并将其通过所述蓝牙链路发送给所述终端。所述终端接收所述第三响应数SRES3,利用与所述智能密钥设备生成所述第三响应数SRES3相同的加密函数即第二预置加密算法及输入参数生成第四响应数SRES4,比较所述第三响应数SRES3与所述第四响应数SRES4是否一致;若所述第三响应数SRES3与所述第四响应数SRES4一致,则所述终端对所述智能密钥设备的验证通过,建立智能密钥设备与所述终端间的通信链路,进行数据交互;若所述第三响应数SRES3与所述第四响应数SRES4不一致,则所述终端对所述智能密钥设备的验证失败。The terminal generates a second authentication random number R3, and sends the second authentication random number R3 to the smart key device through a Bluetooth link, and the smart key device uses a second preset encryption algorithm to include the Encrypt the input parameters of the initialization key KEY1, the second authentication random number R3 and the terminal address ADDR1 to generate a third response number SRES3, and send it to the terminal through the Bluetooth link. The terminal receives the third response number SRES3, uses the same encryption function as that generated by the smart key device to generate the third response number SRES3, that is, the second preset encryption algorithm and input parameters to generate a fourth response number SRES4, and compares Whether the third response number SRES3 is consistent with the fourth response number SRES4; if the third response number SRES3 is consistent with the fourth response number SRES4, the verification of the smart key device by the terminal is passed , establish a communication link between the smart key device and the terminal, and perform data interaction; if the third response number SRES3 is inconsistent with the fourth response number SRES4, the terminal’s response to the smart key device verification failed.
本领域技术人员可以理解,所述第一预置加密算法与第二预置加密算法可以为同一加密算法,也可以为两种不同的加密算法;本实施例对第一预置加密算法与第二预置加密算法的具体类型不做限定。Those skilled in the art can understand that the first preset encryption algorithm and the second preset encryption algorithm can be the same encryption algorithm, or two different encryption algorithms; The specific type of the second preset encryption algorithm is not limited.
本实施例通过终端与智能密钥设备进行配对,在配对成功时建立通信链路,进行数据交互的方法,具有更进一步提高通过蓝牙通信进行智能密钥设备的数据传输安全性的有益效果。In this embodiment, the method of pairing the terminal with the smart key device, establishing a communication link and performing data interaction when the pairing is successful has the beneficial effect of further improving the data transmission security of the smart key device through Bluetooth communication.
参照图3,图3是本发明蓝牙配对系统一实施例结构示意图。如图3所示,本发明蓝牙配对系统包括:智能密钥设备01和终端02。Referring to FIG. 3 , FIG. 3 is a structural diagram of an embodiment of the Bluetooth pairing system of the present invention. As shown in FIG. 3 , the Bluetooth pairing system of the present invention includes: a smart key device 01 and a terminal 02 .
所述智能密钥设备01用于,开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将所述蓝牙配对码输出;The smart key device 01 is used to enable the Bluetooth function, enter a discoverable mode, generate a Bluetooth pairing code, and output the Bluetooth pairing code;
所述终端02用于,开启蓝牙功能,接收用户输入的所述蓝牙配对码,与所述智能密钥设备01进行配对;配对成功后,建立通信链路,进行数据交互。The terminal 02 is used to enable the Bluetooth function, receive the Bluetooth pairing code input by the user, and perform pairing with the smart key device 01; after the pairing is successful, establish a communication link for data interaction.
具体地,通过智能密钥设备01的蓝牙开启模块,开启智能密钥设备01的蓝牙功能,使智能密钥设备01进入可发现模式,以便主机设备这一终端02能够发现智能密钥设备01,并进行配对。同时,智能密钥设备01控制自身的蓝牙配对码生成模块生成蓝牙配对码并通过智能密钥设备01的输出模块输出给用户,供用户获取后输入到终端02,用于与该智能密钥设备01进行配对。在一优选的实施例中,智能密钥设备01通过随机方式生成动态的蓝牙配对码,这很好地克服了现有技术中使用PIN码被非法窃取的问题;智能密钥设备01通过显示装置比如显示屏显示所述蓝牙配对码,供用户读取;或者通过发声装置以发声的方式输出所述蓝牙配对码,供用户听取。Specifically, through the Bluetooth activation module of the smart key device 01, the Bluetooth function of the smart key device 01 is turned on, so that the smart key device 01 enters a discoverable mode, so that the host device, the terminal 02, can discover the smart key device 01, and make a pair. At the same time, the smart key device 01 controls its own Bluetooth pairing code generation module to generate a Bluetooth pairing code and outputs it to the user through the output module of the smart key device 01, for the user to obtain and input it to the terminal 02 for use with the smart key device 01 for pairing. In a preferred embodiment, the smart key device 01 generates a dynamic Bluetooth pairing code in a random manner, which well overcomes the problem of illegal theft of PIN codes in the prior art; For example, the display screen displays the bluetooth pairing code for the user to read; or the bluetooth pairing code is output in a sounding manner through the sounding device for the user to listen to.
终端02通过蓝牙开启模块,开启终端02自身的蓝牙功能,通过其输入装置接收用户输入的蓝牙配对码后,终端02主动向智能密钥设备01发起配对请求,开始配对过程。The terminal 02 activates the Bluetooth function of the terminal 02 itself through the Bluetooth activation module, and after receiving the Bluetooth pairing code input by the user through its input device, the terminal 02 initiates a pairing request to the smart key device 01 to start the pairing process.
在一优选的实施例中,所述终端02在向智能密钥设备01发起配对请求前,先生成一随机数R1,将包含该随机数R1和终端02地址ADDR1(Address,地址)的配对请求通过蓝牙链路发送给所述智能密钥设备01,开始与智能密钥设备01的配对过程。智能密钥设备01接收终端02发送的配对请求,与终端02基于所述蓝牙配对码进行相互认证,若二者认证通过,则说明智能密钥设备01与终端02配对成功,则终端02建立通信链路,与智能密钥设备01进行数据交互。In a preferred embodiment, the terminal 02 first generates a random number R1 before initiating a pairing request to the smart key device 01, and passes the pairing request including the random number R1 and the address ADDR1 (Address, address) of the terminal 02 through The Bluetooth link is sent to the smart key device 01, and the pairing process with the smart key device 01 is started. The smart key device 01 receives the pairing request sent by the terminal 02, and performs mutual authentication with the terminal 02 based on the Bluetooth pairing code. If the two authentications pass, it means that the smart key device 01 and the terminal 02 are successfully paired, and the terminal 02 establishes communication link, for data interaction with the smart key device 01.
在一优选的实施例中,终端02与智能密钥设备01进行配对,在配对成功时建立通信链路,进行数据交互的具体过程如下:In a preferred embodiment, the terminal 02 is paired with the smart key device 01, and a communication link is established when the pairing is successful, and the specific process of data interaction is as follows:
终端02通过蓝牙通信发现处于可发现模式的智能密钥设备01时,终端02首先发送配对请求,与智能密钥设备01进行配对;该配对请求包括终端02产生的随机数R1、终端02地址等。When the terminal 02 finds the smart key device 01 in the discoverable mode through Bluetooth communication, the terminal 02 first sends a pairing request to pair with the smart key device 01; the pairing request includes the random number R1 generated by the terminal 02, the address of the terminal 02, etc. .
智能密钥设备01通过蓝牙链路接收包含所述配对码信息、随机数R1和终端02地址ADDR1的配对请求,智能密钥设备01和终端02分别对包括所述随机数R1和蓝牙配对码及蓝牙配对码长度Blooth_Len和/或终端02地址ADDR1的输入参数进行加密运算,生成初始化密钥KEY1;在一优选的实施例中,所述加密运算使用的加密算法为E22算法。The smart key device 01 receives the pairing request including the pairing code information, the random number R1 and the address ADDR1 of the terminal 02 through the Bluetooth link, and the smart key device 01 and the terminal 02 respectively pair the pairing request including the random number R1 and the Bluetooth pairing code and The Bluetooth pairing code length Blooth_Len and/or the input parameters of the terminal 02 address ADDR1 are encrypted to generate the initialization key KEY1; in a preferred embodiment, the encryption algorithm used in the encryption operation is the E22 algorithm.
智能密钥设备01对终端02基于所述初始化化密钥进行校验的具体过程为:The specific process for the smart key device 01 to verify the terminal 02 based on the initialization key is as follows:
智能密钥设备01生成第一鉴别随机数R2,并将该第一鉴别随机数R2通过蓝牙链路发送给所述终端02;所述终端02按照与智能密钥设备相同的方法运算得到所述初始化密钥KEY1,之后,按照第一预置加密算法对包括所述初始化密钥KEY1、第一鉴别随机数R2和终端02地址的ADDR1的输入参数进行加密运算,生成第一响应数SRES1,并将所述第一响应数SRES1通过所述蓝牙链路发送给所述智能密钥设备01。所述智能密钥设备01接收所述第一响应数SRES1,利用与所述终端02生成所述第一响应数SRES1相同的加密函数即第一预置加密算法及上述的输入参数生成第二响应数SRES2,比较所述第一响应数SRES1与所述第二响应数SRES2是否一致;若第一响应数SRES1与第二响应数SRES2一致,则所述智能密钥设备01对所述终端02的校验通过,若二者不一致,则所述智能密钥设备01对所述终端02的验证失败。The smart key device 01 generates the first authentication random number R2, and sends the first authentication random number R2 to the terminal 02 through the Bluetooth link; the terminal 02 calculates the same method as the smart key device to obtain the Initialize the key KEY1, and then perform an encryption operation on the input parameters including the initialization key KEY1, the first authentication random number R2 and the address of the terminal 02 ADDR1 according to the first preset encryption algorithm to generate the first response number SRES1, and Send the first response number SRES1 to the smart key device 01 through the Bluetooth link. The smart key device 01 receives the first response number SRES1, and uses the same encryption function as that generated by the terminal 02 to generate the first response number SRES1, that is, the first preset encryption algorithm and the above-mentioned input parameters to generate a second response SRES2, compare whether the first response number SRES1 is consistent with the second response number SRES2; if the first response number SRES1 is consistent with the second response number SRES2, then the smart key device 01 will If the verification passes, if the two are not consistent, the verification of the terminal 02 by the smart key device 01 fails.
终端02对智能密钥设备01基于所述初始化化密钥进行校验的具体过程为:The specific process for the terminal 02 to verify the smart key device 01 based on the initialization key is as follows:
所述终端02生成第二鉴别随机数R3,并将所述第二鉴别随机数R3通过蓝牙链路发送给所述智能密钥设备01,所述智能密钥设备01按照第二预置加密算法对包括所述初始化密钥KEY1、第二鉴别随机数R3和终端02地址的ADDR1的输入参数进行加密运算,生成第三响应数SRES3,并将其通过所述蓝牙链路发送给所述终端02。所述终端02接收所述第三响应数SRES3,利用与所述智能密钥设备01生成所述第三响应数SRES3相同的加密函数即第二预置加密算法及输入参数生成第四响应数SRES4,比较所述第三响应数SRES3与所述第四响应数SRES4是否一致;若所述第三响应数SRES3与所述第四响应数SRES4一致,则所述终端02对所述智能密钥设备01的验证通过,建立智能密钥设备01与所述终端02间的通信链路,进行数据交互;若所述第三响应数SRES3与所述第四响应数SRES4不一致,则所述终端02对所述智能密钥设备01的验证失败。The terminal 02 generates a second authentication random number R3, and sends the second authentication random number R3 to the smart key device 01 through the Bluetooth link, and the smart key device 01 uses the second preset encryption algorithm Encrypt the input parameters including the initialization key KEY1, the second authentication random number R3 and the terminal 02 address ADDR1, generate a third response number SRES3, and send it to the terminal 02 through the Bluetooth link . The terminal 02 receives the third response number SRES3, and generates a fourth response number SRES4 by using the same encryption function as that generated by the smart key device 01 to generate the third response number SRES3, that is, the second preset encryption algorithm and input parameters , comparing whether the third response number SRES3 is consistent with the fourth response number SRES4; if the third response number SRES3 is consistent with the fourth response number SRES4, then the terminal 02 is responsible for the smart key device If the verification of 01 is passed, the communication link between the smart key device 01 and the terminal 02 is established to perform data interaction; if the third response number SRES3 is inconsistent with the fourth response number SRES4, the terminal 02 will The verification of the smart key device 01 fails.
本领域技术人员可以理解,所述第一预置加密算法与第二预置加密算法可以为同一加密算法,也可以为两种不同的加密算法;本实施例对第一预置加密算法与第二预置加密算法的具体类型不做限定。Those skilled in the art can understand that the first preset encryption algorithm and the second preset encryption algorithm can be the same encryption algorithm, or two different encryption algorithms; The specific type of the second preset encryption algorithm is not limited.
本实施例通过智能密钥设备开启蓝牙功能,进入可发现模式,生成蓝牙配对码,并将蓝牙配对码输出;终端开启蓝牙功能,接收用户输入的蓝牙配对码,与智能密钥设备进行配对;配对成功后,建立通信链路,进行数据交互,具有利用蓝牙通信技术在智能密钥设备中安全地进行数据传输的有益效果,提升了用户体验;由于采用的是随机生成的动态蓝牙配对码,因此极大地提高了信息传输的安全性。In this embodiment, the Bluetooth function is enabled by the smart key device, enters the discoverable mode, generates a Bluetooth pairing code, and outputs the Bluetooth pairing code; the terminal turns on the Bluetooth function, receives the Bluetooth pairing code input by the user, and performs pairing with the smart key device; After the pairing is successful, a communication link is established for data interaction, which has the beneficial effect of using Bluetooth communication technology to securely transmit data in the smart key device and improves user experience; since a randomly generated dynamic Bluetooth pairing code is used, Therefore, the security of information transmission is greatly improved.
以上所述仅为本发明的优选实施例,并非因此限制其专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only a preferred embodiment of the present invention, and does not limit the scope of its patents. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings is directly or indirectly used in other related technical fields. All are included in the scope of patent protection of the present invention in the same way.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210468491.3A CN102983892B (en) | 2012-11-19 | 2012-11-19 | Bluetooth pairing method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210468491.3A CN102983892B (en) | 2012-11-19 | 2012-11-19 | Bluetooth pairing method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102983892A CN102983892A (en) | 2013-03-20 |
| CN102983892B true CN102983892B (en) | 2016-01-20 |
Family
ID=47857673
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210468491.3A Expired - Fee Related CN102983892B (en) | 2012-11-19 | 2012-11-19 | Bluetooth pairing method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102983892B (en) |
Families Citing this family (24)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9344185B2 (en) * | 2013-03-27 | 2016-05-17 | BBPOS Limited | System and method for secure pairing of bluetooth devices |
| CN103235680B (en) * | 2013-04-02 | 2016-08-03 | 深圳市文鼎创数据科技有限公司 | The processing method and processing device that bluetooth connects |
| CN103228059B (en) * | 2013-04-02 | 2017-02-08 | 深圳市文鼎创数据科技有限公司 | Method and device for processing bluetooth pairing information |
| CN103236096B (en) * | 2013-04-02 | 2016-06-08 | 深圳市文鼎创数据科技有限公司 | Bluetooth-type intelligent code key |
| CN103248543B (en) * | 2013-04-24 | 2017-01-25 | 华为技术有限公司 | Code verification method, code verification control equipment and code verification equipment |
| CN103246839B (en) * | 2013-04-27 | 2015-10-28 | 飞天诚信科技股份有限公司 | A kind of method of work of intelligent cipher key equipment |
| CN103679937A (en) * | 2013-12-18 | 2014-03-26 | 河海大学常州校区 | ATM automatic reminding system with anti-card-retaining function |
| CN103973343B (en) * | 2014-04-23 | 2017-01-11 | 广东华邦云计算股份有限公司 | Communication method and system |
| KR102279301B1 (en) * | 2014-09-29 | 2021-07-20 | 현대모비스 주식회사 | Mirroring device in vehicle and pairng method thereof |
| CN104507037B (en) | 2014-12-12 | 2017-11-28 | 飞天诚信科技股份有限公司 | A kind of method realized intelligent key apparatus and bluetooth binding is carried out with mobile device |
| CN104539320B (en) * | 2015-01-15 | 2018-01-30 | 北京深思数盾科技股份有限公司 | The matching method of bluetooth equipment |
| CN105407453A (en) * | 2015-11-23 | 2016-03-16 | 深圳还是威健康科技有限公司 | Bluetooth pairing method and device |
| CN105430605B (en) * | 2015-12-10 | 2018-09-25 | 飞天诚信科技股份有限公司 | A kind of method that bluetooth master-slave equipment and the two establish escape way |
| CN105407109A (en) * | 2015-12-25 | 2016-03-16 | 武汉信安珞珈科技有限公司 | Data secure transmission method between Bluetooth devices |
| CN105554693B (en) * | 2016-02-02 | 2019-02-01 | 深圳市文鼎创数据科技有限公司 | The matching method and device of bluetooth equipment |
| CN106788977A (en) * | 2016-12-28 | 2017-05-31 | 北京握奇数据系统有限公司 | Low-power consumption bluetooth device talk encryption method and system |
| CN108270554B (en) * | 2016-12-30 | 2022-06-10 | 国民技术股份有限公司 | Terminal pairing method and system |
| CN107197346B (en) * | 2017-05-27 | 2021-06-15 | 深圳Tcl新技术有限公司 | Television terminal, Bluetooth device reconnection method and computer readable storage medium |
| CN107249170B (en) * | 2017-06-13 | 2020-04-10 | 天地融科技股份有限公司 | Method and system for safe communication of Bluetooth equipment |
| CN108540889B (en) * | 2018-05-28 | 2020-01-31 | 广东小天才科技有限公司 | TWS headset pairing method, device, TWS headset and storage medium |
| CN110933484A (en) * | 2019-11-25 | 2020-03-27 | 泰康保险集团股份有限公司 | Management method and device of wireless screen projection equipment |
| CN112383903B (en) * | 2020-09-24 | 2023-07-25 | 深圳Tcl新技术有限公司 | Bluetooth code matching control method and device and computer storage medium |
| CN113570841A (en) * | 2021-06-07 | 2021-10-29 | 宁波奥克斯电气股份有限公司 | Bluetooth pairing control method, device, Bluetooth remote control and home appliance |
| CN115620426A (en) * | 2021-07-12 | 2023-01-17 | 中国移动通信有限公司研究院 | Vehicle key control device, method, electronic device and readable storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102420642A (en) * | 2011-12-15 | 2012-04-18 | 北京握奇数据系统有限公司 | Bluetooth device and communication method thereof |
| CN102469453A (en) * | 2010-11-12 | 2012-05-23 | 国民技术股份有限公司 | Security certificate method and system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101304313A (en) * | 2007-05-08 | 2008-11-12 | 华硕电脑股份有限公司 | Bluetooth device online method and related Bluetooth device |
| CN102545965A (en) * | 2010-12-31 | 2012-07-04 | 上海博泰悦臻电子设备制造有限公司 | Bluetooth-based mobile phone as well as cooperation processing method and system of vehicle-mounted device |
-
2012
- 2012-11-19 CN CN201210468491.3A patent/CN102983892B/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102469453A (en) * | 2010-11-12 | 2012-05-23 | 国民技术股份有限公司 | Security certificate method and system |
| CN102420642A (en) * | 2011-12-15 | 2012-04-18 | 北京握奇数据系统有限公司 | Bluetooth device and communication method thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102983892A (en) | 2013-03-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102983892B (en) | Bluetooth pairing method and system | |
| CN106533687B (en) | An identity authentication method and device | |
| TWI676945B (en) | Method and device for binding wearable device, electronic payment method and device | |
| US8745392B2 (en) | Two-way authentication between two communication endpoints using a one-way out-of band (OOB) channel | |
| CN106034028B (en) | A terminal equipment authentication method, device and system | |
| US9635018B2 (en) | User identity verification method and system, password protection apparatus and storage medium | |
| CN108604338A (en) | Verifying online access to security device functionality | |
| JP2018515011A (en) | Method and apparatus for authenticating user, method and apparatus for registering wearable device | |
| JP2017507549A (en) | Authentication device with Bluetooth interface | |
| JP2008512891A5 (en) | ||
| TWI611358B (en) | Transaction device, transaction system using the same and transaction method using the same | |
| CN103905400B (en) | A kind of service authentication method, apparatus and system | |
| CN105069864A (en) | Door lock control secure communication scheme based on NFC (near field communication) function of smart phone | |
| CN115104283A (en) | Electronic device and method for performing peer-to-peer service in electronic device | |
| TWI715833B (en) | Air card issuing method, device, computing equipment, computer readable storage medium and computer program product | |
| WO2016116890A1 (en) | Method and system for establishing a secure communication tunnel | |
| CN104994098A (en) | File transmission method and relevant device and transmission system | |
| CN114329541A (en) | Data encryption method, device, device and storage medium | |
| CN104468099A (en) | Dynamic password generating method and device based on CPK (Combined Public Key) and dynamic password authentication method and device based on CPK (Combined Public Key) | |
| JP5849149B2 (en) | One-time password generation method and apparatus for executing the same | |
| CN110278083A (en) | Identity authentication request processing method and device, and equipment resetting method and device | |
| WO2015055120A1 (en) | Device for secure information exchange | |
| CN108702606A (en) | Handshake method and device for wireless communication | |
| CN103596175A (en) | Mobile intelligent terminal certification system and method based on near field communication technology | |
| CN106779672A (en) | The method and device that mobile terminal safety pays |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160120 |