Bluetooth pairing method, device and equipment and computer readable storage medium
By modifying the capability identification information of Bluetooth adapter devices, it can broadcast the device identification or encrypted pairing password during the pairing process, and verify the identity of the main device, the problem of low security in existing Bluetooth pairing is solved, and higher security and intelligent verification process is achieved.
Patent Information
- Application Number
- CN202311085856.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-25
AI Technical Summary
During the existing Bluetooth pairing process, Bluetooth devices without input and output and display capabilities can only use the just work model, which cannot provide protection for man-in-the-middle attacks, and have low security.
By modifying the capability identification information of the Bluetooth adapter device, it has the display capability, so that the device identification or encrypted pairing password is broadcast during the pairing process, and verify the identity of the main device based on this information to establish a Bluetooth communication connection.
Improves the security of Bluetooth connection, and by verifying the identity of the master device, preventing man-in-the-middle attacks, enhancing the security of the pairing process.
Smart Images

Figure CN119521226A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to wireless connection technology, and in particular to a Bluetooth pairing method, device, equipment and computer-readable storage medium. Background Art
[0002] With the popularization of wireless communication technology and smart terminal devices, users can use wireless communication to connect different smart terminal devices. Among them, Bluetooth communication technology, as a short-range wireless communication method, is widely used in smart terminal devices. For example, palm or face recognition devices are connected to commercial sales machines (merchant POS machines) via Bluetooth.
[0003] Before smart terminal devices use Bluetooth communication technology to communicate, they need to be paired with Bluetooth. Currently, during the Bluetooth pairing process, if a Bluetooth device has no input or display capabilities and cannot provide out-of-band transmission capabilities, it can only use the just work model, which cannot provide protection against man-in-the-middle attacks and therefore has low security. Summary of the invention
[0004] Embodiments of the present application provide a Bluetooth pairing method, apparatus, device, and computer-readable storage medium, which can improve the security of Bluetooth connections.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a Bluetooth pairing method, the method comprising:
[0007] Obtaining capability identification information of the Bluetooth adapter device;
[0008] When the capability identification information indicates that the Bluetooth adapter device has display capability, obtaining information to be broadcast, and broadcasting the information to be broadcast, wherein the information to be broadcast is the device identification of the Bluetooth adapter device or an encrypted pairing password;
[0009] Receive a Bluetooth pairing request sent by the master device, and obtain the information to be verified carried in the Bluetooth pairing request;
[0010] When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device.
[0011] The present application provides a Bluetooth pairing device, including:
[0012] A first acquisition module, used to acquire capability identification information of the Bluetooth adapter device;
[0013] A broadcast module, used for obtaining information to be broadcasted and broadcasting the information to be broadcasted when the capability identification information indicates that the Bluetooth adapter device has display capability, wherein the information to be broadcasted is the device identification of the Bluetooth adapter device or the encrypted pairing password;
[0014] A first receiving module, configured to receive a Bluetooth pairing request sent by a master device, and obtain information to be verified carried in the Bluetooth pairing request;
[0015] The communication connection module is used to establish a Bluetooth communication connection between the Bluetooth adapter device and the main device when it is determined that the main device has passed the verification based on the information to be broadcast and the information to be verified.
[0016] In some embodiments, the first acquisition module is further used to:
[0017] Obtaining the device identification of the Bluetooth adapter device, and determining the device identification as the information to be broadcast; or,
[0018] The pairing password of the Bluetooth adapter device is obtained, the pairing password is encrypted to obtain the encrypted pairing password, and the encrypted pairing password is determined as the information to be broadcast, wherein the pairing password is assigned by the server when the Bluetooth adapter device leaves the factory.
[0019] In some embodiments, the apparatus further comprises:
[0020] The verification module is used to determine that the master device has passed the verification if the information to be broadcast is the device identification and the information to be verified is the same as the pairing password. The information to be verified is the password information corresponding to the device identification obtained by the master device from the server.
[0021] In some embodiments, the verification module is further used to:
[0022] When the information to be broadcast is the encrypted pairing password, determine whether the information to be verified is the same as the pairing password, wherein the information to be verified is obtained after the main device decrypts the information to be broadcast according to a preset decryption method; if the information to be verified is the same as the pairing password, determine that the main device has passed the verification.
[0023] In some embodiments, the apparatus further comprises:
[0024] A second receiving module is used to receive a modification operation on the Bluetooth protocol information of the Bluetooth adapter device;
[0025] The second acquisition module is used to acquire the modified Bluetooth protocol information based on the modification operation, wherein the capability identification information in the modified Bluetooth protocol information is a capability identification corresponding to the display capability.
[0026] In some embodiments, the communication connection module is further used to:
[0027] When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, sending a notification message of successful pairing to the master device;
[0028] receiving a connection request sent by a master device, wherein the connection request includes a first connection parameter;
[0029] Determine a target connection parameter of the Bluetooth communication connection based on the first connection parameter, and send a connection response carrying the target connection parameter to the master device;
[0030] Receive a first communication public key sent by the master device, generate a second communication public key, and send the second communication public key to the master device;
[0031] A second communication private key is generated according to the second communication public key, the target connection parameter and the pairing password.
[0032] In some embodiments, the apparatus further comprises:
[0033] A third receiving module, used for receiving first transmission data sent by the master device;
[0034] a data decryption module, configured to decrypt the first transmission data using the first communication key to obtain the decrypted first transmission data;
[0035] a data encryption module, used to obtain second transmission data, and encrypt the second transmission data using the second communication private key to obtain encrypted second transmission data;
[0036] The first sending module is used to send the encrypted second transmission data to the main device through the Bluetooth communication connection.
[0037] An embodiment of the present application provides an electronic device, including:
[0038] A memory for storing computer executable instructions;
[0039] The processor is used to implement the Bluetooth pairing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0040] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the Bluetooth pairing method provided in the embodiment of the present application when executed by a processor.
[0041] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the Bluetooth pairing method provided in the embodiment of the present application is implemented.
[0042] The embodiments of the present application have the following beneficial effects: when a Bluetooth adapter device without input / output and display capabilities is to perform Bluetooth pairing with a main device, the capability identification information of the Bluetooth adapter device is first obtained. When the capability identification information indicates that the Bluetooth adapter device has display capability, it indicates that the capability identification information of the Bluetooth adapter device has been modified by modifying the Bluetooth protocol stack information in the Bluetooth adapter device, so that the Bluetooth adapter device without input / output and display capabilities broadcasts the device identification or encrypted pairing password of the Bluetooth adapter device during the pairing process. After receiving the Bluetooth pairing request sent by the main device, the Bluetooth adapter device obtains the information to be verified carried in the Bluetooth pairing request. The Bluetooth pairing device verifies the main device based on the information to be broadcast and the information to be verified sent by the main device. When it is determined that the verification of the main device is passed, a Bluetooth communication connection between the Bluetooth adapter device and the main device is established. In this way, the main device is verified and authenticated during the pairing connection process of the Bluetooth device without input and display capabilities, which can prevent man-in-the-middle attacks and thus improve the security of the Bluetooth connection. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a schematic diagram of the network architecture of the Bluetooth communication system 100 provided in an embodiment of the present application;
[0044] Figure 2 is a schematic diagram of the structure of a Bluetooth adapter device 400 provided in an embodiment of the present application;
[0045] Figure 3 This is a schematic diagram of the first implementation flow of the Bluetooth pairing method provided in the embodiment of the present application;
[0046] Figure 4 This is a schematic diagram of a second implementation flow of the Bluetooth pairing method provided in an embodiment of the present application;
[0047] Figure 5 This is a schematic diagram of the implementation process of establishing a Bluetooth communication connection provided in an embodiment of the present application;
[0048] Figure 6 This is a schematic diagram of a third implementation flow of the Bluetooth pairing method provided in an embodiment of the present application;
[0049] Figure 7 It is a schematic diagram of wireless pairing of a face recognition device and a Dongle device (Bluetooth adapter device) provided in an embodiment of the present application;
[0050] Figure 8 This is a fourth implementation flow chart of the Bluetooth pairing method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0052] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0053] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0054] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0055] 1) Man in the middle attack (MITM) refers to an attacker who creates independent connections with both ends of the communication and exchanges the data they receive, making the two ends of the communication believe that they are talking directly to each other through a private connection, but in fact the entire conversation is completely controlled by the attacker.
[0056] 2) Out of Band (OOB) pairing mode, in which pairing information is provided by external communication.
[0057] 3) Bluetooth Low Energy (BLE) can reduce power consumption and cost while maintaining the same communication range as classic Bluetooth, allowing devices with higher power consumption requirements to remain powered for a long time.
[0058] 4) Bluetooth (BT), a radio technology that supports short-range communication between devices (usually within 10m). It can exchange wireless information between many devices including mobile phones, wireless headphones, laptops, and related peripherals.
[0059] 5) Temporary Key (TK): a temporary key generated during device interaction.
[0060] 6) Long Term Key (LTK) When the authentication is successful, the two devices that need to establish a connection start calculating the LTK for link encryption. This is the last step of pairing and reconnection. In different pairing modes, the two devices authenticate with each other to prevent man in the middle (MITM) attacks. That is, the long-term key is mainly used to encrypt the connection after pairing and subsequent encrypted communications.
[0061] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0062] In order to better understand the Bluetooth pairing method provided in the embodiment of the present application, the Bluetooth pairing method for a Bluetooth adapter device with no input and no display capability in the related art and its existing shortcomings are first described.
[0063] The latest BLE Bluetooth devices have a secure connection foundation. Through pairing security and transmission encryption, they ensure the security of Bluetooth data connection and transmission, and provide four pairing models: Just work, PassKey Entry, Number comparison, and OOB. The Bluetooth protocol stipulates that when a Bluetooth device has no input capability, no output display capability, and no other out-of-band transmission capability, it can only select the just work model and can only use the just work model for Bluetooth pairing. This model cannot provide protection against man-in-the-middle attacks and has extremely low security.
[0064] Based on the problems existing in the related art, the embodiments of the present application provide a Bluetooth pairing method, apparatus, device and computer-readable storage medium, which can enable a Bluetooth adapter device without input and display capabilities to adopt a more secure PassKey Entry mode when pairing with a main device via Bluetooth, thereby improving the security of the Bluetooth connection. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as a Bluetooth adapter device. The following describes an exemplary application when the electronic device is implemented as a Bluetooth adapter device.
[0065] See also Figure 1 , is a schematic diagram of a network architecture of a Bluetooth transmission system 100 provided in an embodiment of the present application. Figure 1 As shown, the Bluetooth transmission system may include a main device 200 , a peripheral device 300 and a Bluetooth adapter device 400 .
[0066] The main device 200 may be an electronic device with Bluetooth function, including but not limited to: palm scanning device, face scanning device, laptop computer, tablet computer, desktop computer, mobile device (for example, mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable gaming device), smart phone, smart speaker, smart TV, vehicle-mounted terminal, etc. The Bluetooth adapter device 400 may be a Bluetooth adapter (Dongle) without input and display capability and without out-of-band transmission capability. The peripheral device 300 may be a merchant payment device, such as a merchant POS machine, or a wireless input device, such as a wireless mouse, wireless keyboard, etc. Figure 1 In the figure, the main device 200 is a face recognition device, the peripheral device 300 is a merchant POS machine, and the Bluetooth adapter device is a Dongle.
[0067] In the embodiment of the present application, the Bluetooth adapter device 400 itself is a device without input and display capabilities, and does not have out-of-band transmission capabilities, but by modifying the capability identification information of the Bluetooth adapter device, the capability identification information of the Bluetooth adapter device is modified to have capability identification information corresponding to input and display capabilities, so that the main device 200 can adopt a safer pairing method when performing Bluetooth pairing with the Bluetooth adapter device 400. When the Bluetooth adapter device 400 is connected to the peripheral device 200 through the universal serial bus, the Bluetooth adapter device 400 is powered on by the peripheral device 200. After the Bluetooth adapter device 400 is powered on, the information to be broadcast is obtained, and the information to be broadcast can be the device identification of the Bluetooth adapter device 400, or it can be the encrypted pairing password of the Bluetooth adapter device. After receiving the information to be broadcast sent by the Bluetooth adapter device 400, the main device 200 obtains the information to be verified according to the received information to be broadcast, and sends a Bluetooth pairing request to the Bluetooth adapter device 400, and the Bluetooth pairing request carries the information to be verified. After receiving the Bluetooth pairing request from the main device 200, the Bluetooth adapter device 400 obtains the information to be verified carried in the Bluetooth pairing request. When the information to be verified is the same as its own pairing password, it is determined that the main device 200 is verified, thereby establishing a Bluetooth communication connection with the main device 200. After a Bluetooth communication connection is established between the Bluetooth adapter device 400 and the main device 200, the Bluetooth adapter device 400 obtains the connection parameters of the Bluetooth communication connection and generates a communication key according to the connection parameters, wherein the Bluetooth adapter device 400 can receive the second transmission data sent by the main device 200, and use the communication key to decrypt the second transmission data to obtain the decrypted second transmission data; the Bluetooth adapter device 400 can also use the communication key to encrypt the first transmission data to obtain the encrypted first transmission data, and then send the encrypted first transmission data to the main device 200 through the Bluetooth communication connection. That is to say, the Bluetooth adapter device 400 can both receive and send transmission data. For example, the main device 200 is a face scanning device, the peripheral device 300 is a merchant POS machine, the Bluetooth adapter device is a Dongle, and the transmission data is the user information and payment information of the paying user. After the Dongle establishes a communication connection with the face scanning device, the cashier pushes the electronic receipt and the payment interface to the face scanning device. After the user completes the payment through the face scanning device, the merchant POS machine can read the user information and payment information of the paying user from the face scanning device through the Dongle. With this method, users are not required to enter credit card or bank account information, so they don't have to worry about their information being leaked.
[0068] Figure 2 is a schematic diagram of the structure of a Bluetooth adapter device 400 provided in an embodiment of the present application, Figure 2The Bluetooth adapter device includes: a processor 410, a memory 430, and a network interface 420. The various components in the Bluetooth adapter device 400 are coupled together via a bus system 440. It can be understood that the bus system 440 is used to achieve connection and communication between these components.
[0069] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0070] The memory 430 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 430 may optionally include one or more storage devices that are physically remote from the processor 410.
[0071] The memory 430 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 430 described in the embodiments of the present application is intended to include any suitable type of memory.
[0072] In some embodiments, memory 430 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0073] Operating system 431, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0074] A network communication module 432, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0075] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2The Bluetooth adapter 433 stored in the memory 430 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a first acquisition module 4331, a broadcast module 4332, a first receiving module 4333 and a communication connection module 4334. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0076] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the Bluetooth pairing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (Application Specific Integ rated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic device (Complex Programmable Logic Device, CPLD), field programmable gate array (Field-Programmable Gate Array, FPGA) or other electronic components.
[0077] The following will illustrate the Bluetooth pairing method provided in the embodiment of the present application in combination with the exemplary application and implementation of the Bluetooth adapter device provided in the embodiment of the present application.
[0078] Figure 3 This is a schematic diagram of the first implementation flow of the Bluetooth pairing method provided in the embodiment of the present application. Figure 3 The steps shown are explained as Figure 3 As shown, the method includes the following steps S101 to S104:
[0079] Step S101, obtaining capability identification information of the Bluetooth adapter device.
[0080] Here, the Bluetooth adapter device may be an electronic device with a Bluetooth pairing function, including but not limited to a Bluetooth dongle, etc. In the embodiment of the present application, the Bluetooth adapter device is a device that does not have input and output capabilities, display capabilities, and out-of-band transmission capabilities.
[0081] The capability identification information may be used to indicate the capabilities possessed by the device, for example, whether the device has input capability, output capability, display capability, out-of-band transmission capability, etc. Exemplarily, the capability identification information may be identified by a four-bit binary number, assuming that the four-bit binary number indicates whether the device has input capability, output capability, display capability, and out-of-band transmission capability, respectively. When the first binary number is 0, it indicates that the device does not have input capability, and when the first binary number is 1, it indicates that the device has input capability. For example, if the capability identification information of a device is 0010, it indicates that the device does not have input capability, does not have output capability, has display capability, and does not have out-of-band transmission capability. For another example, if the capability identification information of a device is 1011, it indicates that the device has input capability, does not have output capability, has display capability, and has out-of-band transmission capability.
[0082] The capability identification information of the Bluetooth adapter device may represent the real capability of the Bluetooth adapter device, or may not represent the real capability of the Bluetooth adapter device. For example, the real capability of the Bluetooth adapter device is no input capability, no output capability, no display capability, and no out-of-band transmission capability. The real capability identification information of the Bluetooth adapter device should be 0000, but the capability identification information representing the real capability of the Bluetooth adapter device in the Bluetooth protocol stack can be modified to obtain the modified capability identification information. For example, the modified capability identification information is 0010, that is, the modified capability identification information indicates that the Bluetooth adapter device has no input capability, no output capability, display capability, and no out-of-band transmission capability.
[0083] Step S102: when the capability identification information indicates that the Bluetooth adapter device has display capability, obtain information to be broadcast, and broadcast the information to be broadcast.
[0084] In an embodiment of the present application, after obtaining the capability identification information of the Bluetooth adapter device, it is determined whether the capability identification information indicates that the Bluetooth adapter device has display capability. In some embodiments, the capability identification bit corresponding to the display capability in the capability identification information can be obtained to determine whether the capability identification bit corresponding to the display capability is a preset value, and the preset value is a capability identification value with display capability. Exemplarily, the preset value can be 1, that is, it is determined whether the capability identification bit corresponding to the display capability is 1. When the capability identification bit corresponding to the display capability is 1, it is determined that the capability identification information indicates that the Bluetooth adapter device has display capability. At this time, the information to be broadcast is obtained and broadcast. When the capability identification bit corresponding to the display capability is not 1, it is determined that the capability identification information indicates that the Bluetooth adapter device does not have display capability. At this time, the Bluetooth pairing method provided in the embodiment of the present application is not executed.
[0085] In some embodiments, the "obtaining information to be broadcast" in step 102 can be implemented in the following two ways:
[0086] The first method is to obtain the device identification of the Bluetooth adapter device, and determine the device identification as the information to be broadcast.
[0087] In some embodiments, the information to be broadcast may be a device identifier of a Bluetooth adapter device. The device identifier is a unique identifier used to distinguish the device from other devices. Exemplarily, the device identifier may be a serial number of a product.
[0088] Among them, each device identification has a unique pairing password (passkey) corresponding to it, and the correspondence between the device identification and the pairing password is stored in the server, so that the corresponding pairing password can be found in the server according to the device identification. For example, the device identification of device A is ABC, and the corresponding pairing password is 123456. The pairing password of device A can be queried in the server through ABC, which is 123456.
[0089] The second method is to obtain the pairing password of the Bluetooth adapter device, encrypt the pairing password to obtain the encrypted pairing password, and determine the encrypted pairing password as the information to be broadcast. The pairing password is assigned by the server when the Bluetooth adapter device leaves the factory.
[0090] That is to say, the information to be broadcasted may also be an encrypted pairing password, wherein the pairing password is a fixed passkey assigned by the server to each Bluetooth adapter device before the Bluetooth adapter device leaves the factory, and can be used for identity verification.
[0091] It should be noted that in the embodiment of the present application, the pairing password assigned at the factory and stored in the Bluetooth adapter device is encrypted by the Bluetooth adapter device using a preset encryption algorithm, and the encrypted pairing password is determined as the information to be broadcast. The encryption algorithm can be one or more of the following encryption technologies: DES encryption algorithm, 3DES encryption algorithm, AES encryption algorithm, SM encryption algorithm, RSA encryption algorithm, etc. The embodiment of the present application does not limit the specific encryption algorithm used.
[0092] It should be noted that the encryption algorithm used by the Bluetooth adapter device to encrypt the pairing password corresponds to the decryption algorithm used by the host device to treat the broadcast information.
[0093] It can be understood that in the second implementation method, the Bluetooth adapter device does not directly broadcast the pairing password, but encrypts the pairing password and then broadcasts the encrypted data. In this way, during the pairing process with the main device, the identity information of the two parties in the pairing can be determined through the encrypted pairing password. This can avoid the situation in which, during the pairing process with the main device, if the pairing password is not encrypted, the pairing password may be brute-force cracked and connected by other devices, and the identity of the connected device cannot be verified. By broadcasting the pairing password after encryption, even if other devices obtain the encrypted data, there is no corresponding decryption method to decrypt it, and the pairing password cannot be obtained, thereby preventing man-in-the-middle attacks and improving the security of Bluetooth pairing.
[0094] In some embodiments, the broadcast information sent by the Bluetooth adapter device can be a non-directional broadcast method or a directional broadcast method. The directional broadcast method is to broadcast to a specific object, for example, the Bluetooth adapter device broadcasts to the master device of a specific object. The non-directional broadcast method is to broadcast to all devices in the same network that can receive the broadcast information.
[0095] In actual applications, the Bluetooth adapter device sends the information to be broadcast in a broadcasting manner. It can be a fit of one or more communication technologies such as WIFI protocol, Zifeng protocol technology, Bluetooth technology, ultra-wideband communication technology, near-field communication technology, etc., to send the information to be broadcast to the pairable devices in the current broadcast channel. No specific limitation is made here.
[0096] In some embodiments, the Bluetooth adapter device sends the information to be broadcast once at a preset broadcast event interval. Exemplarily, the broadcast event interval can be 1 second, that is, the Bluetooth adapter device turns on the radio frequency module every 1 second to send the information to be broadcast, turns off the radio frequency module after sending, and turns on the radio frequency module again after an interval of 1 second to send the information to be broadcast.
[0097] Step S103: receiving a Bluetooth pairing request sent by the master device, and obtaining information to be verified carried in the Bluetooth pairing request.
[0098] In some embodiments, the master device can be understood as a device that actively initiates Bluetooth pairing. When the Bluetooth adapter device starts broadcasting the information to be broadcast, the master device needs to open the radio frequency receiving window. The master device can only receive the information to be broadcast sent by the Bluetooth adapter device after opening the scanning window, and only when the radio frequency receiving window of the master device successfully matches the transmission window corresponding to the information to be broadcast, the master device can receive the information to be broadcast sent by the Bluetooth adapter device. Since this successful matching is a probabilistic event, it is also a probabilistic event for the master device to scan the Bluetooth adapter device. That is to say, the master device may scan the Bluetooth adapter device very quickly, such as only one broadcast event interval, assuming 1 second, or it may be very slow to scan the Bluetooth adapter device, such as 10 broadcast event intervals or even more. Only after the master device scans the Bluetooth adapter device that sends the information to be broadcast will it trigger a Bluetooth pairing request with the Bluetooth adapter device.
[0099] In some embodiments, when the master device receives a message to be broadcast, and the message to be broadcast is a device identification, after receiving the information to be broadcast, the master device sends a pairing password acquisition request to the server, and the pairing password acquisition request carries the device identification of the Bluetooth adapter device. After receiving the pairing password acquisition request, the server parses the key acquisition request to obtain the device identification, and obtains the key corresponding to the device identification from the pre-established device identification and key correspondence table. The server sends the pairing password corresponding to the device identification to the master device. After receiving the pairing password corresponding to the device identification, the master device uses the pairing password as the information to be verified of the master device. In response to the received pairing instruction for the Bluetooth adapter device, the master device sends a Bluetooth pairing request to the Bluetooth adapter device, and the Bluetooth pairing request carries the information to be verified. After receiving the Bluetooth pairing request, the Bluetooth adapter device parses the Bluetooth pairing request and obtains the information to be verified.
[0100] The pairing instruction may be triggered by a touch operation on a display mark of the Bluetooth adapter device, or by receiving a voice message for pairing with the Bluetooth adapter device, or by receiving gesture information for pairing with the Bluetooth adapter device. It should be noted that there are many ways to trigger the pairing instruction, which may be one or more of the above, and are not specifically limited here.
[0101] In some embodiments, when the master device receives a message to be broadcast, and the message to be broadcast is an encrypted pairing password, the master device uses a decryption algorithm corresponding to the encrypted pairing password to decrypt the encrypted pairing password, obtain the pairing password, and determine the pairing password as the information to be verified. Similarly, the master device sends a Bluetooth pairing request to the Bluetooth adapter device in response to the received pairing instruction for the Bluetooth adapter device, and the Bluetooth pairing request carries the information to be verified. After receiving the Bluetooth pairing request, the Bluetooth adapter device parses the Bluetooth pairing request and obtains the information to be verified.
[0102] Step S104: when it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device.
[0103] In some embodiments, Figure 4 As shown, before step 104, it is also possible to determine whether the main device has passed the verification through the following steps, which are described in detail below.
[0104] Step 001, determining whether the information to be verified is the same as the pairing password of the Bluetooth adapter device.
[0105] Here, the information to be verified may be a pairing password obtained by the master device from the server according to the device identification of the Bluetooth device, or may be obtained by decrypting the information to be broadcast according to a preset decryption method.
[0106] In some embodiments, the pairing password of the Bluetooth adapter device is generally more than two characters or numbers, or a combination of characters and numbers. To determine whether the information to be verified is the same as the pairing password of the Bluetooth adapter device, it is to determine whether each character or number in the information to be verified is the same as each character or number in the pairing password of the Bluetooth adapter device. When each character or number in the information to be verified is the same as each character or number in the pairing password of the Bluetooth adapter device, it is determined that the information to be verified is the same as the pairing password of the Bluetooth adapter device, and step 002 is entered at this time; when there is at least one character or number in the information to be verified that is different from the character or number in the pairing password of the Bluetooth adapter device, it is determined that the information to be verified is different from the pairing password of the Bluetooth adapter device, and step 003 is entered at this time.
[0107] Exemplarily, the information to be verified is 1234, and the pairing password of the Bluetooth adapter device is 1111. Since the second to fourth digits of the information to be verified and the pairing password of the Bluetooth adapter device are different, it is determined that the information to be verified is different from the pairing password, and step 003 is entered.
[0108] Step S002, determining whether the master device has passed verification.
[0109] In some embodiments, when all characters in the information to be verified correspond to all characters in the pairing password, it is determined that the master device has passed the verification, and then the process proceeds to step 104. In this way, the identity information of the device in the Bluetooth matching process is verified through the pairing password, which avoids man-in-the-middle attacks and improves the security of Bluetooth pairing.
[0110] Step 003, determine whether the master device verification fails.
[0111] When the information to be verified is different from the pairing password of the Bluetooth adapter device, it means that the information to be verified sent by the master device is not the pairing password of the Bluetooth adapter device. In this case, it is determined that the master device verification fails.
[0112] Step 004: Send a pairing failure notification message to the master device.
[0113] In some embodiments, when the master device fails verification, the Bluetooth adapter device sends a pairing failure notification message to the master device, notifying the master device that the Bluetooth pairing has failed, so that the master device obtains the information to be verified again and initiates a Bluetooth pairing request.
[0114] In some embodiments, when referring to Figure 5 Step 104 "When it is determined that the main device has passed the verification based on the information to be broadcast and the information to be verified, a Bluetooth communication connection is established between the Bluetooth adapter device and the main device," can be implemented through the following steps 1041 to 1044, which are described in detail below.
[0115] Step 1041: When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, a notification message of successful pairing is sent to the master device.
[0116] In some embodiments, the Bluetooth adapter device sends a notification message of successful pairing to the main device, so as to inform the main device that a connection request can be initiated.
[0117] Step 1042, receiving a connection request sent by the master device.
[0118] In some embodiments, after receiving the notification message of successful pairing, the master device obtains the first connection parameter that the master device expects to perform Bluetooth communication, and sends a connection request carrying the first connection parameter to the Bluetooth adapter device.
[0119] Connection parameters are a set of parameters negotiated when establishing a Bluetooth connection, which are used to control the performance and behavior of the Bluetooth communication connection. Connection parameters include connection interval, connection timeout, and transmission window. The connection interval refers to the time interval between two connection events, the connection timeout refers to the maximum number of unresponsive connection events allowed before the connection is lost, and the transmission window refers to the time window size waiting for the container service (ACK) before sending. Accordingly, the first connection parameters include the first connection interval, the first transmission rate, and the first connection timeout.
[0120] Step 1043: determine the target connection parameters of the Bluetooth communication connection based on the first connection parameters, and send a connection response carrying the target connection parameters to the master device.
[0121] In some embodiments, after receiving the first connection parameter sent by the main device, the Bluetooth adapter device can directly determine the first connection parameter as the target connection parameter, or randomly determine the target connection interval from the minimum connection interval and the first connection interval, randomly determine the target transmission rate from the minimum transmission rate and the first transmission rate, and randomly determine the target connection timeout from the minimum connection timeout and the first connection timeout.
[0122] Step 1044, receiving the first communication public key sent by the master device, generating a second communication public key, and sending the second communication public key to the master device.
[0123] Step 1044 is used to complete the public key exchange process between the master device and the Bluetooth adapter device. Taking the Bluetooth adapter device generating the second communication public key as an example, the Bluetooth adapter device first generates a random number as the second communication private key, and then uses the second communication private key and the base point of the elliptic curve to determine the second communication public key. The process of the master device generating the first communication private key and the first communication public key is similar.
[0124] Step 1045: Generate a second communication private key according to the second communication public key, the target connection parameter and the pairing password.
[0125] In some embodiments, a second communication private key for encrypting transmission data when the Bluetooth adapter device and the main device use the Bluetooth communication connection for data transmission is determined by a secret key negotiation algorithm (ECDH algorithm) according to the second communication public key, the pairing password and the target connection parameter. The communication key can be a long key (Long Term, Key-LTK) and the communication key can also be: Connection Signature Resolving Key (CSRK), Bluetooth device address resolution key (Identity Res olving Key, IRK), etc.
[0126] Similarly, the master device generates a first communication private key using the first communication public key, the target connection parameter and the pairing password, which is used to encrypt data sent to the Bluetooth adapter device.
[0127] Through the above steps 1041 to 1045, after determining that the main device and the Bluetooth adapter device are successfully paired, the main device initiates a connection request, and then the main device and the Bluetooth adapter device exchange communication public keys for decrypting the encrypted data sent by the other party using the other party's communication public key, and the main device and the Bluetooth adapter device each generate a communication private key for encrypting subsequent data to be sent, thereby ensuring the security of data transmission between the main device and the Bluetooth adapter device.
[0128] In the example of the present application, when a Bluetooth adapter device without input / output and display capabilities wants to perform Bluetooth pairing with a main device, the capability identification information of the Bluetooth adapter device is first obtained. When the capability identification information indicates that the Bluetooth adapter device has display capability, it indicates that the capability identification information of the Bluetooth adapter device has been modified by modifying the Bluetooth protocol stack information in the Bluetooth adapter device, so that the Bluetooth adapter device without input / output and display capabilities broadcasts the device identification or encrypted pairing password of the Bluetooth adapter device during the pairing process. After receiving the Bluetooth pairing request sent by the main device, the Bluetooth adapter device obtains the information to be verified carried in the Bluetooth pairing request. The Bluetooth pairing device verifies the main device based on the information to be broadcast and the information to be verified sent by the main device. When it is determined that the verification of the main device is successful, a Bluetooth communication connection is established between the Bluetooth adapter device and the main device. In this way, the main device is verified and authenticated during the pairing connection process of the Bluetooth device without input and display capabilities, which can prevent man-in-the-middle attacks and thus improve the security of the Bluetooth connection. And because the information to be verified sent by the main device is obtained by decoding the information to be broadcast sent by the Bluetooth adapter device, or by sending a pairing password acquisition request to the server through the information to be broadcast, there is no need for manual password input, which reduces human participation and can improve Bluetooth pairing efficiency.
[0129] Based on the above embodiments, the present application further provides a Bluetooth pairing method. Figure 6 is a flowchart of the Bluetooth pairing method provided in the embodiment of the present application. Figure 6 As shown, after step 104, the method includes the following steps:
[0130] S105, receiving first transmission data sent by the master device.
[0131] Here, the first transmission data is data transmitted from the main device to the Bluetooth adapter device after the Bluetooth adapter device establishes a communication connection with the main device, such as payment data, audio data, image data, etc.
[0132] S106: Decrypt the first transmission data using the first communication public key to obtain decrypted first transmission data.
[0133] S107, obtaining second transmission data, and encrypting the second transmission data using the second communication private key to obtain encrypted second transmission data.
[0134] Here, the second transmission data is data transmitted from the Bluetooth adapter device to the main device after the Bluetooth adapter device establishes a communication connection with the main device, such as payment data, audio data, image data, etc.
[0135] S108, sending the encrypted second transmission data to the main device via the Bluetooth communication connection.
[0136] Through the embodiments of the present application, during the Bluetooth pairing process, based on the information to be broadcast in the Bluetooth adapter device and the information to be verified in the master device, after determining that the master device has passed the verification, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device. In this way, human participation is reduced in the process of matching device identity authentication, the intelligence and timeliness of the Bluetooth pairing process are improved, and man-in-the-middle attack protection is provided for Bluetooth devices without input and display capabilities during the connection process, thereby improving the security of the Bluetooth connection.
[0137] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0138] In the existing Bluetooth pairing process, if a Bluetooth device has no input or display capabilities and cannot provide out-of-band transmission capabilities, it can only use the just work model for pairing and connection, and this model cannot provide protection against man-in-the-middle attacks, and thus cannot guarantee the security of data transmission during Bluetooth communication.
[0139] In an embodiment of the present application, based on the Bluetooth pairing scenario, by modifying the capability identification method, the capability identification information of the Bluetooth adapter device without input and display represents that the Bluetooth adapter device has display capability, so that the Bluetooth adapter device can verify the main device and generate a communication key in a manner similar to the Passkey Entry mode during the Bluetooth pairing process with the main device, thereby providing man-in-the-middle attack protection for Bluetooth devices without input and display capabilities during the connection process, thereby improving the security of the Bluetooth connection.
[0140] In practical applications, Bluetooth pairing is generally achieved by determining a suitable pairing model based on the IO capabilities of the master device and the paired device. Here, the Bluetooth pairing method provided by the embodiment of the present application is described by taking the Bluetooth adapter device as a Dongle device and the master device as a face recognition device as an example. The Dongle device is a device without input and display capabilities, and the face recognition device is a device with input and output capabilities. In the embodiment of the present application, the Bluetooth protocol stack of the Dongle device is modified so that the Dongle device provides an IO with a separate display capability during the pairing capability exchange process. Figure 7 As shown, the face recognition device 701 and the Dongle device 702 can achieve wireless security pairing and encrypted communication.
[0141] A specific example provided by the embodiment of the present application is described below. Figure 8 This is a schematic diagram of the system framework for Dongle production and use provided in the embodiment of the present application. Figure 8 Provide explanation.
[0142] like Figure 8 As shown, after the Dongle device is assembled using the production tool, the Dongle service background 801 (corresponding to the server in other embodiments) assigns a fixed pairing password (Passkey) to each Dongle device before the Dongle device leaves the factory. The Dongle service background 801 stores the corresponding relationship between the device identification of the Dongle device and the Passkey.
[0143] like Figure 8As shown, after the Dongle device 802 is connected to the merchant POS machine 803 through USB and powered on, it broadcasts its own device identification, which can be the product serial number (Serial Number) of the Dongle device. When the face recognition device 804 scans the SN information broadcast by the Dongle device, it sends a query request to the Dongle service background 801, which carries the SN information of the Dongle device. After receiving the query request, the Dongle service background 801 determines the Passkey of the Dongle device 802 based on the SN information, and sends the Passkey of the Dongle device 802 to the face recognition device 804. The face recognition device 804 initiates a pairing request to the Dongle device 802. After determining that the Dongle device 802 is successfully paired with the face-scanning device 804, the face-scanning device 804 initiates a connection request, and the face-scanning device 804 and the Dongle device 802 negotiate connection parameters and exchange public keys. The face-scanning device 804 generates a first communication private key (for example, LTK) corresponding to the face-scanning device 804 through the Passkey, connection parameters and public key obtained from the Dongle service background 801. Similarly, the Dongle device 802 generates a second communication private key corresponding to the Dongle device through the Passkey, connection parameters and public key. The first communication private key and the second communication private key are used for subsequent encrypted communications, thereby ensuring the security of data communication.
[0144] In some embodiments, the Dongle device can also broadcast a pairing passkey that was previously encrypted using a preset encryption algorithm. After the master device scans the encrypted passkey, it decrypts it using a known algorithm and then performs secure pairing.
[0145] In an embodiment of the present application, by modifying the Bluetooth protocol stack in the Bluetooth adapter device, the Bluetooth adapter device without input capability and display capability is allowed to provide identification information with display capability during the pairing capability exchange process; and in the pairing process, based on the information to be broadcast in the Bluetooth adapter device and the information to be verified in the master device, when it is determined that the master device has passed the verification, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device. In this way, man-in-the-middle attack protection is provided to the Bluetooth device without input capability and display capability during the connection process, thereby improving the security of the Bluetooth connection.
[0146] The following is a description of an exemplary structure of the Bluetooth pairing device 433 provided in the present application as a software module. In some embodiments, Figure 2 As shown, the Bluetooth pairing device 433 provided in the embodiment of the present application includes:
[0147] A first acquisition module, used to acquire capability identification information of the Bluetooth adapter device;
[0148] The broadcast module is further configured to obtain information to be broadcasted and broadcast the information to be broadcasted when the capability identification information is a capability identification corresponding to the display capability;
[0149] A first receiving module, configured to receive a Bluetooth pairing request sent by a master device, and obtain information to be verified carried in the Bluetooth pairing request;
[0150] The communication connection module is used to establish a Bluetooth communication connection between the Bluetooth adapter device and the main device when it is determined that the main device has passed the verification based on the information to be broadcast and the information to be verified.
[0151] In some embodiments, the first acquisition module is further used to:
[0152] Obtaining the device identification of the Bluetooth adapter device, and determining the device identification as the information to be broadcast; or,
[0153] The pairing password of the Bluetooth adapter device is obtained, the pairing password is encrypted to obtain the encrypted pairing password, and the encrypted pairing password is determined as the information to be broadcast, wherein the pairing password is assigned by the server when the Bluetooth adapter device leaves the factory.
[0154] In some embodiments, the apparatus further comprises:
[0155] A verification module, used for determining that the master device has been verified if the information to be broadcast is the device identification and if the information to be verified is the same as the pairing password, and the information to be verified is the password information corresponding to the device identification obtained by the master device from the server;
[0156] In some embodiments, the verification module is further used to:
[0157] When the information to be broadcast is the encrypted pairing password, determine whether the information to be verified is the same as the pairing password, wherein the information to be verified is obtained after the main device decrypts the information to be broadcast according to a preset decryption method; if the information to be verified is the same as the pairing password, determine that the main device has passed the verification.
[0158] In some embodiments, the apparatus further comprises:
[0159] A second receiving module is used to receive a modification operation on the Bluetooth protocol information of the Bluetooth adapter device;
[0160] The second acquisition module is used to acquire the modified Bluetooth protocol information based on the modification operation, wherein the capability identification information in the modified Bluetooth protocol information is a capability identification corresponding to the display capability.
[0161] In some embodiments, the communication connection module is further used to:
[0162] When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, sending a notification message of successful pairing to the master device;
[0163] receiving a connection request sent by a master device, wherein the connection request includes a first connection parameter;
[0164] Determine a target connection parameter of the Bluetooth communication connection based on the first connection parameter, and send a connection response carrying the target connection parameter to the master device;
[0165] Receive a first communication public key sent by the master device, generate a second communication public key, and send the second communication public key to the master device;
[0166] A second communication private key is generated according to the second communication public key, the target connection parameter and the pairing password.
[0167] In some embodiments, the apparatus further comprises:
[0168] A third receiving module, used for receiving first transmission data sent by the master device;
[0169] a data decryption module, configured to decrypt the first transmission data using the first communication key to obtain the decrypted first transmission data;
[0170] a data encryption module, used to obtain second transmission data, and encrypt the second transmission data using the second communication private key to obtain encrypted second transmission data;
[0171] The first sending module is used to send the encrypted second transmission data to the main device through the Bluetooth communication connection.
[0172] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer readable storage medium, and the processor executes the computer executable instruction, so that the electronic device performs the Bluetooth pairing method described in the embodiment of the present application.
[0173] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the Bluetooth pairing method provided in the embodiment of the present application, for example, Figure 3 , Figure 4 , Figure 6 The Bluetooth pairing method is shown.
[0174] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0175] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0176] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0177] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0178] To summarize, by modifying the Bluetooth protocol stack in the Bluetooth adapter device in the embodiment of the present application, the Bluetooth adapter device without input capability and display capability is allowed to provide identification information with display capability during the pairing capability exchange process; and during the pairing process, based on the information to be broadcast in the Bluetooth adapter device and the information to be verified in the master device, when it is determined that the master device has passed the verification, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device. In this way, human participation is reduced in the process of matching device identity authentication, the intelligence and timeliness of the Bluetooth pairing process are improved, and man-in-the-middle attack protection is provided to Bluetooth devices without input capability and display capability during the connection process, thereby improving the security of the Bluetooth connection.
[0179] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A Bluetooth pairing method, characterized in that: Applied to a Bluetooth adapter device without input / output capability and display capability, the method comprises: Obtaining capability identification information of the Bluetooth adapter device; When the capability identification information indicates that the Bluetooth adapter device has display capability, obtaining information to be broadcast, and broadcasting the information to be broadcast, wherein the information to be broadcast is a device identification of the Bluetooth adapter device or an encrypted pairing password; Receive a Bluetooth pairing request sent by the master device, and obtain the information to be verified carried in the Bluetooth pairing request; When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, a Bluetooth communication connection is established between the Bluetooth adapter device and the master device.
2. The method according to claim 1, characterized in that The obtaining of information to be broadcast includes: Obtaining the device identification of the Bluetooth adapter device, and determining the device identification as the information to be broadcast; or, The pairing password of the Bluetooth adapter device is obtained, the pairing password is encrypted to obtain the encrypted pairing password, and the encrypted pairing password is determined as the information to be broadcast, wherein the pairing password is assigned by the server when the Bluetooth adapter device leaves the factory.
3. The method according to claim 2, characterized in that The method further comprises: When the information to be broadcast is the device identification, determining whether the information to be verified is the same as the pairing password of the Bluetooth adapter device, the information to be verified being the password information corresponding to the device identification obtained by the master device from the server; If the information to be verified is the same as the pairing password, it is determined that the master device has passed verification.
4. The method according to claim 2, characterized in that The method further comprises: When the information to be broadcast is the encrypted pairing password, determining whether the information to be verified is the same as the pairing password, wherein the information to be verified is obtained after the master device decrypts the information to be broadcast according to a preset decryption method; If the information to be verified is the same as the pairing password, it is determined that the master device has passed verification.
5. The method according to claim 1, characterized in that The method further comprises: Receiving a modification operation on the Bluetooth protocol information of the Bluetooth adapter device; Based on the modification operation, modified Bluetooth protocol information is acquired, wherein the capability identification information in the modified Bluetooth protocol information indicates that the Bluetooth adapter device has display capability.
6. The method according to any one of claims 1 to 5, characterized in that When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, establishing a Bluetooth communication connection between the Bluetooth adapter device and the master device includes: When it is determined that the master device has passed the verification based on the information to be broadcast and the information to be verified, sending a notification message of successful pairing to the master device; receiving a connection request sent by a master device, wherein the connection request includes a first connection parameter; Determine a target connection parameter of the Bluetooth communication connection based on the first connection parameter, and send a connection response carrying the target connection parameter to the master device; Receive a first communication public key sent by the master device, generate a second communication public key, and send the second communication public key to the master device; A second communication private key is generated according to the second communication public key, the target connection parameter and the pairing password.
7. The method according to claim 6, characterized in that The method further comprises: Receiving first transmission data sent by the master device; Decrypting the first transmission data using the first communication public key to obtain decrypted first transmission data; Acquire second transmission data, and encrypt the second transmission data using the second communication private key to obtain encrypted second transmission data; The encrypted second transmission data is sent to the main device via the Bluetooth communication connection.
8. A Bluetooth pairing device, characterized in that: The device comprises: A first acquisition module, used to acquire capability identification information of the Bluetooth adapter device; A broadcast module, used for obtaining information to be broadcasted and broadcasting the information to be broadcasted when the capability identification information indicates that the Bluetooth adapter device has display capability, wherein the information to be broadcasted is the device identification of the Bluetooth adapter device or the encrypted pairing password; A first receiving module, configured to receive a Bluetooth pairing request sent by a master device, and obtain information to be verified carried in the Bluetooth pairing request; The communication connection module is used to establish a Bluetooth communication connection between the Bluetooth adapter device and the main device when it is determined that the main device has passed the verification based on the information to be broadcast and the information to be verified.
9. An electronic device, characterized in that: The device comprises: A memory for storing computer executable instructions; The processor is used to implement the Bluetooth pairing method provided in claims 1 to 7 when executing the computer executable instructions stored in the memory.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the Bluetooth pairing method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program or computer executable instructions, characterized in that: When the computer program or computer executable instruction is executed by a processor, the Bluetooth pairing method according to any one of claims 1 to 7 is implemented.