CN105554693A - Bluetooth device pairing method and device - Google Patents

Bluetooth device pairing method and device Download PDF

Info

Publication number
CN105554693A
CN105554693A CN201610073995.3A CN201610073995A CN105554693A CN 105554693 A CN105554693 A CN 105554693A CN 201610073995 A CN201610073995 A CN 201610073995A CN 105554693 A CN105554693 A CN 105554693A
Authority
CN
China
Prior art keywords
bluetooth equipment
comparison code
key
random number
secret value
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.)
Granted
Application number
CN201610073995.3A
Other languages
Chinese (zh)
Other versions
CN105554693B (en
Inventor
陈柳章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Excelsecu Data Technology Co Ltd
Original Assignee
Shenzhen Excelsecu Data Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Excelsecu Data Technology Co Ltd filed Critical Shenzhen Excelsecu Data Technology Co Ltd
Priority to CN201610073995.3A priority Critical patent/CN105554693B/en
Publication of CN105554693A publication Critical patent/CN105554693A/en
Application granted granted Critical
Publication of CN105554693B publication Critical patent/CN105554693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a Bluetooth device pairing method. The Bluetooth device pairing method comprises the steps that: establishing a primary connection by a first Bluetooth device and a second Bluetooth device based on a justwork mode; respectively outputting comparison codes on the first Bluetooth device and the second Bluetooth device; and receiving a comparison code confirmation instruction input by a user, and carrying out application data interaction on the first Bluetooth device and the second Bluetooth device. The Bluetooth device pairing method provided by the invention is conducive to improving the device pairing security and reducing the data leakage risk.

Description

The matching method of bluetooth equipment and device
Technical field
The invention belongs to the communications field, particularly relate to matching method and the device of bluetooth equipment.
Background technology
When carrying out data communication use between bluetooth equipment, the pairing of first setting up between the bluetooth equipment of required communication is needed to connect.In the process of connecting, safe certification is carried out to the equipment connected, or obtain connect both sides license after, carry out the transmission of data or instruction further.
Matching method between current bluetooth equipment, mainly comprises the matching method of PIN code input, the matching method of digital comparison and at once runs the matching method of (justwork), wherein:
The matching method of described PIN code input, refers to and is needing all to input PIN code in two equipment connected, and compare the PIN code of two inputs, if the PIN code of two bluetooth equipment inputs is identical, then allow to connect.
When carrying out bluetooth equipment pairing by input PIN code, if third party disabled user disguise as connection device, and during the PIN code of input correspondence, may illegal connection be set up, even cause the leakage of significant data.
Summary of the invention
The object of the present invention is to provide a kind of matching method of bluetooth equipment, to solve prior art when bluetooth equipment matches, if third party disabled user disguise as connection device, and during the PIN code of input correspondence, may illegal connection be set up, even cause the problem of the leakage of significant data.
First aspect, embodiments provides a kind of matching method of bluetooth equipment, and described method comprises:
First bluetooth equipment and the second bluetooth equipment set up based on justwork pattern to be tentatively connected;
Described first bluetooth equipment and described second bluetooth equipment export comparison code respectively;
The comparison code receiving user's input confirms instruction, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
In conjunction with first aspect, in the first possibility implementation of first aspect, before described first bluetooth equipment and described second bluetooth equipment export comparison code step respectively, described method also comprises described first bluetooth equipment and compares information on the code to described second bluetooth equipment transmission, or in described first bluetooth equipment and the second bluetooth equipment, be previously stored with described comparison code, wherein, described first bluetooth equipment comprises to described second bluetooth equipment transmission comparison code information Step:
The comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment;
Or, by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment;
Or, first bluetooth equipment generates the comparison code factor, the described comparison code factor is sent to the second bluetooth equipment, comparison code is obtained according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, the described comparison code factor is the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
In conjunction with the first possibility implementation of first aspect, in the second possibility implementation of first aspect, described first bluetooth equipment generates the comparison code factor, the described comparison code factor is sent to the second bluetooth equipment, obtains comparison code step according to account form process preset in the first bluetooth equipment and the second bluetooth equipment and comprise:
The first random number generated and the first key of prestoring are sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores;
First bluetooth equipment is according to the first random number generated and the first key prestored, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code.
In conjunction with the second possibility implementation of first aspect, in the third possibility implementation of first aspect, at described first bluetooth equipment according to the first random number generated and the first key prestored, and described second random number, the second key that receive are encrypted computing, before obtaining the first comparison code step, described method also comprises:
First bluetooth equipment, according to the cryptographic algorithm preset, is encrypted computing to described second random number, the first key, the second key, generates the first secret value;
Compared by second secret value of described first secret value and the second bluetooth equipment, described second secret value is encrypted to calculate and generates according to the cryptographic algorithm preset to the second random number, the first key, the second key by the second bluetooth equipment;
If the first secret value is different from the second secret value, then disconnect described preliminary connection, if the first secret value is identical with the second secret value, then cryptographic calculation generates the first comparison code.
In conjunction with the second possibility implementation of first aspect, in the 4th kind of possibility implementation of first aspect, confirm instruction at the comparison code of described reception user input, after carrying out application data interactive step to described first bluetooth equipment and described second bluetooth equipment, described method also comprises:
If the first bluetooth equipment and the second bluetooth equipment complete pairing, the first bluetooth equipment is encrypted the first comparison code and the second key, obtains the 3rd comparison code, and is stored by described 3rd comparison code and send to described second bluetooth equipment to store;
When the first bluetooth equipment again carry out with the second bluetooth equipment application data mutual time, directly export store described 3rd comparison code.
Second aspect, embodiments provides a kind of contrast means of bluetooth equipment, and described device comprises:
Preliminary connection establishment unit, for the first bluetooth equipment and the second bluetooth equipment are set up based on justwork pattern to be tentatively connected;
Data outputting unit, for exporting comparison code respectively on described first bluetooth equipment and described second bluetooth equipment;
Comparing unit, confirms instruction for the comparison code receiving user's input, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
In conjunction with second aspect, in the first possibility implementation of second aspect, described device also comprises data exchange unit or pre-storing unit, described data exchange unit is used for comparing information on the code by described first bluetooth equipment to described second bluetooth equipment transmission, described pre-storing unit is used for being previously stored with described comparison code in described first bluetooth equipment and the second bluetooth equipment, and wherein said data exchange unit comprises:
First sends subelement, for the comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment;
Or second sends subelement, for by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment;
Or, 3rd sends subelement, for generating the comparison code factor by the first bluetooth equipment, the described comparison code factor is sent to the second bluetooth equipment, obtain comparison code according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, described in comprise the comparison code factor be the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
In conjunction with the first possibility implementation of second aspect, in the second possibility implementation of second aspect, the described 3rd compares subelement comprises:
Data exchange module, for the first random number generated and the first key of prestoring being sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores;
Computing module, for by the first bluetooth equipment according to the first random number generated and the first key of prestoring, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code.
In conjunction with the second possibility implementation of second aspect, in the third possibility implementation of second aspect, described device also comprises:
Encrypting module, for by the first bluetooth equipment according to preset cryptographic algorithm, computing is encrypted to described second random number, the first key, the second key, generates the first secret value;
Comparison module, for being compared by the second secret value of described first secret value and the second bluetooth equipment, described second secret value is encrypted to calculate and generates according to the cryptographic algorithm preset to the second random number, the first key, the second key by the second bluetooth equipment;
Judge module, if different from the second secret value for the first secret value, then disconnects described preliminary connection, if the first secret value is identical with the second secret value, then cryptographic calculation generates the first comparison code.
In conjunction with the second possibility implementation of second aspect, in the 4th kind of possibility implementation of second aspect, described device also comprises:
Encryption transmitting element, if complete pairing for the first bluetooth equipment and the second bluetooth equipment, by the first bluetooth equipment, the first comparison code and the second key are encrypted, obtain the 3rd comparison code, and described 3rd comparison code is stored and sends to described second bluetooth equipment to store;
Display unit, for again carry out with the second bluetooth equipment when the first bluetooth equipment application data mutual time, directly export store described 3rd comparison code.
In the present invention, by to be paired two equipment are set up based on justwork pattern preliminary connection, by described preliminary connection, first bluetooth equipment and the second bluetooth equipment show described comparison code respectively, the user holding the first bluetooth equipment and the user holding the second bluetooth equipment are when the comparison code comparing display is identical, input validation information, then can effectively complete the data interaction between the first bluetooth equipment and the second bluetooth equipment.Due to foundation is preliminary connect after, the display verification of code of also comparing further, thus can on the basis of direct pairing in the prior art, both can be easy to use, also effectively can improve the fail safe of data interaction.
Accompanying drawing explanation
Fig. 1 is the realization flow figure of the matching method of the bluetooth equipment that first embodiment of the invention provides;
Fig. 2 is the realization flow figure of the matching method of the bluetooth equipment that second embodiment of the invention provides;
Fig. 3 is the realization flow figure of the matching method of the bluetooth equipment that third embodiment of the invention provides;
Fig. 4 is the realization flow figure of the matching method of the bluetooth equipment that fourth embodiment of the invention provides;
The structural representation of the contrast means of the bluetooth equipment that Fig. 5 provides for fifth embodiment of the invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The object of the embodiment of the present invention be to solve in prior art to bluetooth equipment carry out application data mutual time, use and comparatively bother, or the problem that the fail safe of data interaction is lower, be specifically described below in conjunction with accompanying drawing.
Embodiment one:
Fig. 1 shows the realization flow of the matching method of the bluetooth equipment that first embodiment of the invention provides, and details are as follows:
In step S101, the first bluetooth equipment and the second bluetooth equipment set up based on justwork pattern to be tentatively connected.
Concrete, the first bluetooth equipment described in the embodiment of the present invention and the second bluetooth equipment, it can be the smart machine with function of Bluetooth communication, such as smart mobile phone, panel computer, notebook computer etc., or also can be the Input/Output Device with bluetooth communication, such as Bluetooth audio device, bluetooth mouse, bluetooth keyboard, bluetooth earphone, bluetooth digital certificate terminal installation etc.
Described preliminary connection, in inventive embodiments, for transmission security key between bluetooth equipment and the random number that generated by bluetooth equipment, to be different from the pairing described in the embodiment of the present invention, after completing pairing, the data needing to send or receive can be transmitted between bluetooth equipment, and tentatively connect only for the random number that generates in transmitting apparatus and key.
The key of described bluetooth equipment, for security consideration, can be the PKI in bluetooth equipment.The random number that described bluetooth equipment generates, can generate automatically when matching with bluetooth equipment, thus can improve the fail safe of comparison yardage calculation.
As one in the embodiment of the present invention preferred embodiment in, described preliminary connection can be completed by the connected mode at once connecting justwork between existing bluetooth equipment.
The described connected mode at once connecting justwork, only need to be sent request by the arbitrary equipment between two bluetooth equipments, the connection communication between two bluetooth equipments can being set up, exchanging random number and key by once connecting justwork mode in embodiments of the present invention.
Can by arranging the startup button of matching method described in the embodiment of the present invention, after the enabled instruction receiving pairing, search the equipment needing to connect, can automatically set up based on justwork pattern preliminary connection.
In step s 102, described first bluetooth equipment and described second bluetooth equipment export comparison code respectively.
Concrete, the comparison code in the embodiment of the present invention, tentatively can be connected by described justwork, be sent by the first bluetooth equipment to the second bluetooth equipment, also can be stored in advance in the first bluetooth equipment and the second bluetooth equipment.
Wherein, for first kind of way, the first bluetooth equipment described in the embodiment of the present invention, sends than information on the code to described second bluetooth equipment, specifically can adopt following send mode:
1), the comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment.
Described comparison code is stored in advance in the first bluetooth equipment, when pairing set up by needs, by the first bluetooth equipment, the comparison code prestored directly is sent to the second bluetooth equipment by preliminary connection.
Described comparison code can be the combination of numeral, letter or symbol.Certainly, described comparison code can prestore multiple, different according to the object of pairing, and the comparison code that selection adapts with pairing user.
2), by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment.
Described comparison code, by the first bluetooth equipment stochastic generation, can be avoided like this, after once connecting, causing the leakage of comparison code, and making disabled user also can obtain comparison code data, illegal pairing may be caused to connect.Such as fixing comparison code, if the first bluetooth equipment needs to match with the second bluetooth equipment, if after disabled user learns comparison code, by bluetooth equipment C and the first bluetooth equipment set up based on justwork pattern to be tentatively connected, and send comparison code by bluetooth equipment D to the second bluetooth equipment, thus it is right to cause the first bluetooth equipment and illegal bluetooth equipment C to mismatch, by the mode of described stochastic generation comparison code, this defect can be avoided.
Certainly, described comparison code can also be the compound mode of random number and fixing comparison code.
3), the first bluetooth equipment generates the comparison code factor, the described comparison code factor is sent to the second bluetooth equipment, comparison code is obtained according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, the described comparison code factor that comprises is the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
In this fashion, in the first bluetooth equipment and the second bluetooth equipment, be previously provided with Processing Algorithm, after the comparison factor receiving the first bluetooth equipment transmission, by the Processing Algorithm preset, comparison code can be generated.This processing mode, even if the comparison factor that made illegality equipment steal, also effectively can ensure the safety of matching.
Wherein, export the mode of comparison code, comprise voice output, display translation etc.
In step s 103, the comparison code receiving user's input confirms instruction, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
Concrete, described application data is different according to the difference of embody rule scene.Such as, be bluetooth digital certificate terminal installation at the first bluetooth equipment, when the second bluetooth equipment is smart mobile phone, described application data can be transaction data, signed data etc.
The second bluetooth equipment receive described than information on the code after, by display pairing code, can facilitate user to pairing code compare.
In addition, as the preferred a kind of execution mode of the present invention, when the first described bluetooth equipment and the second bluetooth equipment, for the smart machine with function of Bluetooth communication, such as smart mobile phone, panel computer, during notebook computer etc., the display interface of described comparison code is by described preliminary connection, sent the application program of display interface to the second bluetooth equipment by the first bluetooth equipment, make consistent with the comparison code display interface of the second bluetooth equipment that the first bluetooth equipment connects, user can confirm further by display interface, thus improve fail safe and the ease for use of pairing further.Certainly, described comparison code display interface by preassembled mode, can also install the application program of display interface in the second bluetooth equipment, thus improves fail safe and the ease for use of user's use.
The present invention by be paired two equipment are set up based on justwork pattern preliminary connection, by described preliminary connection, first bluetooth equipment and the second bluetooth equipment show described comparison code respectively, the user holding the first bluetooth equipment and the user holding the second bluetooth equipment are when the comparison code comparing display is identical, input validation information, then can effectively complete the data interaction between the first bluetooth equipment and the second bluetooth equipment.Due to foundation is preliminary connect after, the display verification of code of also comparing further, thus can on the basis of direct pairing in the prior art, both can be easy to use, also effectively can improve the fail safe of data interaction.
Embodiment two:
Fig. 2 shows the realization flow of the matching method of the bluetooth equipment that first embodiment of the invention provides, and details are as follows:
In step s 201, the first bluetooth equipment and the second bluetooth equipment set up based on justwork pattern to be tentatively connected.
This step is substantially identical with step S101 in embodiment one.
In step S202, the first random number generated and the first key of prestoring are sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores.
In embodiments of the present invention, by described preliminary connection, the first generated random number of the first key in first bluetooth equipment of user and being used for can being matched sends to the second bluetooth equipment, equally, also can receive by the first bluetooth equipment the second random number and the second key that are sent by the second bluetooth equipment.
Described first key and the second key by equipment intrinsic, described first key and the second key can be symmetric key, random number and the intrinsic key of equipment are sent to counterpart device by the first bluetooth equipment and the second bluetooth equipment, after generation comparison code, both the identification information of equipment can have been comprised, comparison code can be made again to have the other user's attribute, improve the fail safe of comparison.
In step S203, first bluetooth equipment is according to the first random number generated and the first key prestored, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code, described first bluetooth equipment and described second bluetooth equipment export described comparison code respectively.
Concrete, described comparison code is according to the second random number received, the second key, and the first random number of bonding apparatus itself, the first key computing obtain, make the first comparison code have the random code information of the identification information of the first bluetooth equipment itself, the identification information of the second bluetooth equipment and both sides simultaneously.
Described cryptographic calculation, can for logarithm be according to the algorithm carrying out verifying, and such as redundancy check algorithm etc., are understandable that, should not be confined to this, can also comprise other is encrypted computing algorithm to data.
Equally, in the second bluetooth equipment to be paired, carry out the calculating of the second comparison code equally, the calculating of described second comparison code is according to the first random number received, the first key, second random number of the second bluetooth equipment and the second key, the cryptographic algorithm according to presetting calculates.The described cryptographic algorithm used in two bluetooth equipments is identical.
In step S204, the comparison code receiving user's input confirms instruction, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
Due to described second random number, the second key that the first comparison code is according to receiving, and the first random number that equipment generates, and the first secret key encryption that equipment prestores generates, and the second comparison code is described first random number, the first key according to receiving, and the second random number that equipment generates, and the second secret key encryption that equipment prestores generates, and the cryptographic algorithm used is identical.Therefore, when exchanges data is not made mistakes, then the first comparison code generated is identical with the second comparison code of generation.
When judgement first comparison code is more different than code from second, then illustrate that the equipment of current connection does not receive correct data, possible current data communication is made mistakes, or is disabled user's connection, therefore automatically disconnects current preliminary connection, reduces the risk of leaking data.
When the first comparison code is identical with the second comparison code, by exporting described comparison code, such as show described comparison code, or play the voice signal of comparison code, time identical with the second comparison code that the second bluetooth equipment exports, input validation instruction, then can complete the pairing to described second bluetooth equipment.
The embodiment of the present invention is on the basis of embodiment one, specifically describe the random number of key by described preliminary connection exchange two equipment and generation further, by the key received, random number and key itself and random number are encrypted computing, obtain comparison code, by to compare the comparison code of two equipment be identical thus complete the pairing to bluetooth equipment, because the equipment of pairing generates comparison code automatically by the data of encrypting exchange after swap data, and third party's illegality equipment can not generate corresponding comparison code, thus the fail safe improving device pairing is conducive to, reduce the risk of leaking data.
Embodiment three:
Fig. 2 shows the realization flow of the matching method of the bluetooth equipment that second embodiment of the invention provides, and details are as follows:
In step S301, the first bluetooth equipment and the second bluetooth equipment set up based on justwork pattern to be tentatively connected.
In step s 302, the first random number generated and the first key of prestoring are sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores.
In step S303, the first bluetooth equipment, according to the cryptographic algorithm preset, is encrypted computing to described second random number, the first key, the second key, generates the first secret value.
Concrete, described first secret value, according to the second random number received, the second key, the first cipher key calculation of bonding apparatus self obtains.
In step s 304, the second secret value of described first secret value and the second bluetooth equipment compares by the first bluetooth equipment, and described second secret value is encrypted to calculate according to the cryptographic algorithm preset generates the second random number, the first key, the second key.
According to the account form of the first secret value, in the second bluetooth equipment, calculate the second secret value.
In step S305, if the first secret value is different from the second secret value, then disconnect described preliminary connection.
By comparing the first secret value and the second secret value, can judge that whether the data of current transmission are correct, namely whether judgment device have received correct key data, and the value of correct random number.
If the first secret value is different with the second secret value, then represent that the key of reception or random number data are made mistakes, then can directly disconnect preliminary connection, terminate this time pairing, avoid connecting with illegality equipment.
In step S306, if the first secret value is identical with the second secret value, then according to the first random number generated and the first key prestored, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, described first bluetooth equipment and described second bluetooth equipment export comparison code respectively.
In step S307, the comparison code receiving user's input confirms instruction, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
The difference of the embodiment of the present invention and embodiment one is, the embodiment of the present invention compare code relatively before, also comprise the determining step to transmitting data, by comparing the first secret value and the second secret value, can judge that transfer of data is whether accurate, thus judge to provide safety guarantee for follow-up comparison code.
Embodiment four:
Fig. 4 shows the realization flow of the matching method of the bluetooth equipment that third embodiment of the invention provides, and details are as follows:
In step S401, the first bluetooth equipment and the second bluetooth equipment set up based on justwork pattern to be tentatively connected.
In step S402, the first random number generated and the first key of prestoring are sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores.
In step S403, the first bluetooth equipment is according to the first random number generated and the first key of prestoring, and described second random number received, the second key are encrypted computing, obtain the first comparison code.
In step s 404, compare according to the second comparison code that the first comparison code and the second bluetooth equipment that calculate calculate, complete pairing according to comparative result or disconnect.
Step S401-S404 is substantially identical with step S201-S204 in embodiment one, does not repeat at this.
In step S405, if the first bluetooth equipment and the second bluetooth equipment complete pairing, then the first bluetooth equipment is encrypted the first comparison code and the second key, obtains the 3rd comparison code, and is stored by described 3rd comparison code and send to described second bluetooth equipment to store.
In embodiments of the present invention, also comprise the first bluetooth equipment to the further computations of the first comparison code, be encrypted computing by the first comparison code and the second key, obtain the 3rd comparison code.The method of described cryptographic calculation can with to generate the first comparison code before identical with the cryptographic algorithm of the second comparison code, also can be different.
Described 3rd comparison code has generated after two bluetooth equipments have matched, and therefore, by the data cube computation passage after pairing, the 3rd comparison code can be sent to equipment to be paired.
Certainly, described 3rd comparison code also can generate by calculating in described second bluetooth equipment.
In step S406, when the first bluetooth equipment again carry out with the second bluetooth equipment application data mutual time, whether the described 3rd comparison code comparing storage identical, if identical, then completes pairing.
Store the 3rd comparison code, set up the connection of pairing before representing these two equipment, therefore, when the equipment that two have the 3rd identical comparison code needs to match again, whether identically only need to search the 3rd comparison code, if identical, then directly can complete pairing.
One or more the 3rd comparison code can be stored in described bluetooth equipment.Thus the matching efficiency that can complete more efficiently between the bluetooth equipment that matched.
Embodiment five:
Fig. 5 shows the structural representation of the contrast means of the bluetooth equipment that fourth embodiment of the invention provides, and details are as follows:
The contrast means of bluetooth equipment described in the embodiment of the present invention, comprising:
Preliminary connection establishment unit 501, for the first bluetooth equipment and the second bluetooth equipment are set up based on justwork pattern to be tentatively connected;
Data outputting unit 502, for exporting comparison code respectively on described first bluetooth equipment and described second bluetooth equipment;
Comparing unit 503, confirms instruction for the comparison code receiving user's input, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
Preferably, described device also comprises data exchange unit or pre-storing unit, described data exchange unit is used for comparing information on the code by described first bluetooth equipment to described second bluetooth equipment transmission, described pre-storing unit is used for being previously stored with described comparison code in described first bluetooth equipment and the second bluetooth equipment, and wherein said data exchange unit comprises:
First sends subelement, for the comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment;
Or second sends subelement, for by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment;
Or, 3rd sends subelement, for generating the comparison code factor by the first bluetooth equipment, the described comparison code factor is sent to the second bluetooth equipment, obtain comparison code according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, described in comprise the comparison code factor be the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
Preferably, the described 3rd compares subelement and comprises:
Data exchange module, for the first random number generated and the first key of prestoring being sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores;
Computing module, for by the first bluetooth equipment according to the first random number generated and the first key of prestoring, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code.
Preferably, described device also comprises:
Encrypting module, for by the first bluetooth equipment according to preset cryptographic algorithm, computing is encrypted to described second random number, the first key, the second key, generates the first secret value;
Comparison module, for being compared by the second secret value of described first secret value and the second bluetooth equipment, described second secret value is encrypted to calculate and generates according to the cryptographic algorithm preset to the second random number, the first key, the second key by the second bluetooth equipment;
Judge module, if different from the second secret value for the first secret value, then disconnects described preliminary connection, if the first secret value is identical with the second secret value, then cryptographic calculation generates the first comparison code.
Preferably, described device also comprises:
Encryption transmitting element, if complete pairing for the first bluetooth equipment and the second bluetooth equipment, by the first bluetooth equipment, the first comparison code and the second key are encrypted, obtain the 3rd comparison code, and described 3rd comparison code is stored and sends to described second bluetooth equipment to store;
Display unit, for again carry out with the second bluetooth equipment when the first bluetooth equipment application data mutual time, directly export store described 3rd comparison code.
The contrast means of bluetooth equipment described in the embodiment of the present invention, corresponding with the matching method of bluetooth equipment described in embodiment one to three, do not repeat at this.
In several embodiment provided by the present invention, should be understood that, disclosed apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a matching method for bluetooth equipment, is characterized in that, described method comprises:
First bluetooth equipment is set up with the second bluetooth equipment and is connected based on the preliminary of justwork pattern;
Described first bluetooth equipment and described second bluetooth equipment export comparison code respectively;
The comparison code receiving user's input confirms instruction, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
2. method according to claim 1, it is characterized in that, before described first bluetooth equipment and described second bluetooth equipment export comparison code step respectively, described method also comprises described first bluetooth equipment and compares information on the code to described second bluetooth equipment transmission, or in described first bluetooth equipment and the second bluetooth equipment, be previously stored with described comparison code, wherein, described first bluetooth equipment comprises to described second bluetooth equipment transmission comparison code information Step:
The comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment;
Or, by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment;
Or, first bluetooth equipment generates the comparison code factor, the described comparison code factor is sent to the second bluetooth equipment, comparison code is obtained according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, the described comparison code factor is the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
3. method according to claim 2, it is characterized in that, described first bluetooth equipment generates the comparison code factor, the described comparison code factor is sent to the second bluetooth equipment, obtains comparison code step comprise according to account form process preset in the first bluetooth equipment and the second bluetooth equipment:
The first random number generated and the first key of prestoring are sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores;
First bluetooth equipment is according to the first random number generated and the first key prestored, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code.
4. method according to claim 3, it is characterized in that, at described first bluetooth equipment according to the first random number generated and the first key of prestoring, and described second random number received, the second key are encrypted computing, before obtaining the first comparison code step, described method also comprises:
First bluetooth equipment, according to the cryptographic algorithm preset, is encrypted computing to described second random number, the first key, the second key, generates the first secret value;
Compared by second secret value of described first secret value and the second bluetooth equipment, described second secret value is encrypted to calculate and generates according to the cryptographic algorithm preset to the second random number, the first key, the second key by the second bluetooth equipment;
If the first secret value is different from the second secret value, then disconnect described preliminary connection, if the first secret value is identical with the second secret value, then cryptographic calculation generates the first comparison code.
5. method according to claim 3, is characterized in that, confirm instruction at the comparison code of described reception user input, after carrying out application data interactive step to described first bluetooth equipment and described second bluetooth equipment, described method also comprises:
If the first bluetooth equipment and the second bluetooth equipment complete pairing, the first bluetooth equipment is encrypted the first comparison code and the second key, obtains the 3rd comparison code, and is stored by described 3rd comparison code and send to described second bluetooth equipment to store;
When the first bluetooth equipment again carry out with the second bluetooth equipment application data mutual time, directly export store described 3rd comparison code.
6. a contrast means for bluetooth equipment, is characterized in that, described device comprises:
Preliminary connection establishment unit, for the first bluetooth equipment and the second bluetooth equipment are set up based on justwork pattern to be tentatively connected;
Data outputting unit, for exporting comparison code respectively on described first bluetooth equipment and described second bluetooth equipment;
Comparing unit, confirms instruction for the comparison code receiving user's input, carries out application data mutual to described first bluetooth equipment and described second bluetooth equipment.
7. device according to claim 6, it is characterized in that, described device also comprises data exchange unit or pre-storing unit, described data exchange unit is used for comparing information on the code by described first bluetooth equipment to described second bluetooth equipment transmission, described pre-storing unit is used for being previously stored with described comparison code in described first bluetooth equipment and the second bluetooth equipment, and wherein said data exchange unit comprises:
First sends subelement, for the comparison code be pre-stored in the first bluetooth equipment is sent to the second bluetooth equipment;
Or second sends subelement, for by comparison code described in the first bluetooth equipment stochastic generation, and the comparison code of stochastic generation is sent to the second bluetooth equipment;
Or, 3rd sends subelement, for generating the comparison code factor by the first bluetooth equipment, the described comparison code factor is sent to the second bluetooth equipment, obtain comparison code according to account form process preset in the first bluetooth equipment and the second bluetooth equipment, wherein, described in comprise the comparison code factor be the data pre-set, or the data of stochastic generation, or the data of the data pre-set and stochastic generation.
8. device according to claim 7, it is characterized in that, the described 3rd compares subelement comprises:
Data exchange module, for the first random number generated and the first key of prestoring being sent to the second bluetooth equipment by the first bluetooth equipment, and receive the second random number that described second bluetooth equipment generates and the second key that described second bluetooth equipment prestores;
Computing module, for by the first bluetooth equipment according to the first random number generated and the first key of prestoring, and described second random number, the second key that receive are encrypted computing, obtain the first comparison code, and second bluetooth equipment according to the second random number generated and the second key of prestoring, and receive the first random number and the first key, obtain the second comparison code.
9. device according to claim 8, it is characterized in that, described device also comprises:
Encrypting module, for by the first bluetooth equipment according to preset cryptographic algorithm, computing is encrypted to described second random number, the first key, the second key, generates the first secret value;
Comparison module, for being compared by the second secret value of described first secret value and the second bluetooth equipment, described second secret value is encrypted to calculate and generates according to the cryptographic algorithm preset to the second random number, the first key, the second key by the second bluetooth equipment;
Judge module, if different from the second secret value for the first secret value, then disconnects described preliminary connection, if the first secret value is identical with the second secret value, then cryptographic calculation generates the first comparison code.
10. device according to claim 8, it is characterized in that, described device also comprises:
Encryption transmitting element, if complete pairing for the first bluetooth equipment and the second bluetooth equipment, by the first bluetooth equipment, the first comparison code and the second key are encrypted, obtain the 3rd comparison code, and described 3rd comparison code is stored and sends to described second bluetooth equipment to store;
Display unit, for again carry out with the second bluetooth equipment when the first bluetooth equipment application data mutual time, directly export store described 3rd comparison code.
CN201610073995.3A 2016-02-02 2016-02-02 The matching method and device of bluetooth equipment Active CN105554693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610073995.3A CN105554693B (en) 2016-02-02 2016-02-02 The matching method and device of bluetooth equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610073995.3A CN105554693B (en) 2016-02-02 2016-02-02 The matching method and device of bluetooth equipment

Publications (2)

Publication Number Publication Date
CN105554693A true CN105554693A (en) 2016-05-04
CN105554693B CN105554693B (en) 2019-02-01

Family

ID=55833583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610073995.3A Active CN105554693B (en) 2016-02-02 2016-02-02 The matching method and device of bluetooth equipment

Country Status (1)

Country Link
CN (1) CN105554693B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851540A (en) * 2017-02-08 2017-06-13 飞天诚信科技股份有限公司 The implementation method and device of a kind of Bluetooth pairing
CN107071709A (en) * 2017-04-06 2017-08-18 飞天诚信科技股份有限公司 A kind of matching method and device with bluetooth equipment
CN108174370A (en) * 2017-12-14 2018-06-15 北京明华联盟科技有限公司 Bluetooth security connection method, device, terminal and computer readable storage medium
CN114403819A (en) * 2021-12-09 2022-04-29 重庆医药高等专科学校 Children's prevention exogenous warning machine

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127538A (en) * 2007-09-19 2008-02-20 中兴通讯股份有限公司 Self-adapted match method between different Bluetooth devices
CN102983892A (en) * 2012-11-19 2013-03-20 深圳市文鼎创数据科技有限公司 Method and system for bluetooth pairing
CN103067055A (en) * 2012-12-26 2013-04-24 深圳天珑无线科技有限公司 Bluetooth connecting method and mobile terminal
CN103209007A (en) * 2012-01-11 2013-07-17 中兴通讯股份有限公司 Bluetooth device quick pairing method and Bluetooth device
CN103826221A (en) * 2013-12-31 2014-05-28 广东岭南通股份有限公司 Bluetooth based encryption communication method, and correlation systems and methods
CN104158653A (en) * 2014-08-14 2014-11-19 华北电力大学句容研究中心 Method of secure communication based on commercial cipher algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127538A (en) * 2007-09-19 2008-02-20 中兴通讯股份有限公司 Self-adapted match method between different Bluetooth devices
CN103209007A (en) * 2012-01-11 2013-07-17 中兴通讯股份有限公司 Bluetooth device quick pairing method and Bluetooth device
CN102983892A (en) * 2012-11-19 2013-03-20 深圳市文鼎创数据科技有限公司 Method and system for bluetooth pairing
CN103067055A (en) * 2012-12-26 2013-04-24 深圳天珑无线科技有限公司 Bluetooth connecting method and mobile terminal
CN103826221A (en) * 2013-12-31 2014-05-28 广东岭南通股份有限公司 Bluetooth based encryption communication method, and correlation systems and methods
CN104158653A (en) * 2014-08-14 2014-11-19 华北电力大学句容研究中心 Method of secure communication based on commercial cipher algorithm

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851540A (en) * 2017-02-08 2017-06-13 飞天诚信科技股份有限公司 The implementation method and device of a kind of Bluetooth pairing
CN106851540B (en) * 2017-02-08 2019-11-15 飞天诚信科技股份有限公司 A kind of implementation method and device of Bluetooth pairing
CN107071709A (en) * 2017-04-06 2017-08-18 飞天诚信科技股份有限公司 A kind of matching method and device with bluetooth equipment
CN107071709B (en) * 2017-04-06 2021-06-08 飞天诚信科技股份有限公司 Pairing method and device with Bluetooth equipment
CN108174370A (en) * 2017-12-14 2018-06-15 北京明华联盟科技有限公司 Bluetooth security connection method, device, terminal and computer readable storage medium
CN114403819A (en) * 2021-12-09 2022-04-29 重庆医药高等专科学校 Children's prevention exogenous warning machine

Also Published As

Publication number Publication date
CN105554693B (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN105790938B (en) Safe unit key generation system and method based on credible performing environment
CN107358441B (en) Payment verification method and system, mobile device and security authentication device
EP2999189B1 (en) Network authentication method for secure electronic transactions
WO2020072551A1 (en) Contactless card emulation system and method
CN101527633B (en) Method for intelligent key devices to obtain digital certificates
CN103152366B (en) Obtain the method for terminal authorization, terminal and server
WO2014182557A1 (en) Systems and methods for secure communication
CN102013001B (en) Card reader with authentication function and authentication method thereof
CN105722013A (en) Bluetooth pairing method and device
CN101291224A (en) Method and system for processing data in communication system
CN108683674A (en) Verification method, device, terminal and the computer readable storage medium of door lock communication
CN104283688A (en) USB Key safety certification system and safety certification method
CN104618116A (en) Collaborative digital signature system and method
CN112055019B (en) Method for establishing communication channel and user terminal
US20180240109A1 (en) Data Processing Method and System, and Wearable Electronic Device
CN105554693A (en) Bluetooth device pairing method and device
KR101561499B1 (en) Authentication method using the NFC authentication card
CN105635062A (en) Network access equipment verification method and device
CN112769574B (en) Key injection method and system, key management system, device and machine readable medium
CN106357679A (en) Method, system and client for password authentication, and server and intelligent equipment
CN104301288A (en) Method and system for online identity authentication, online transaction certification, and online certification protection
CN103198401A (en) Smart card transaction method and smart card transaction system with electronic signature function
CN104579659A (en) Device for safety information interaction
CN101478547A (en) Apparatus for trustable digital signature to intelligent cipher key and working method thereof
CN114139176A (en) Industrial internet core data protection method and system based on state secret

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant