Industrial control equipment bluetooth security communication method, device and equipment based on security chip
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2026-06-03
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]然而,蓝牙技术规范的安全设计受到场景和成本的制约
[0038]第十方面,本申请提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的基于安全芯片的工控设备蓝牙安全通信方法,或如上述第二方面所述的基于安全芯片的终端设备蓝牙安全通信方法。
Smart Images

Figure CN122534429A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Bluetooth technology, and in particular relates to a Bluetooth secure communication method, apparatus and device for industrial control equipment based on a security chip. Background Technology
[0002] In current power systems, Bluetooth technology is widely used for wireless verification, meter reading, and maintenance of industrial control equipment such as power distribution equipment and metering devices. Existing Bluetooth chip products can provide comprehensive security protection for related operations. Taking power distribution equipment maintenance as an example, existing Bluetooth technology can authenticate the legitimacy of handheld terminals and protect data confidentiality during communication between the two parties.
[0003] However, the security design of the Bluetooth technical specification is constrained by scenarios and costs. In order to support interconnection of unfamiliar devices, each device needs to transmit most of the information during the broadcast, pairing, and connection phases in plaintext over public channels. This allows malicious attackers to obtain various data from industrial control equipment through methods such as eavesdropping, interception, and message forgery, seriously affecting the security of the Bluetooth communication process. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a Bluetooth secure communication method, apparatus, and device for industrial control equipment based on a security chip, to improve the security of the Bluetooth communication process.
[0005] In a first aspect, this application provides a Bluetooth secure communication method for industrial control equipment based on a security chip, wherein the industrial control equipment includes a security chip storing a root key; the method includes: A first random number is generated using the security chip, and a first key is generated based on the first random number and the root key. The Bluetooth broadcast message is encrypted using the first key to obtain the Bluetooth broadcast ciphertext, and the first random number and the Bluetooth broadcast ciphertext are sent to the broadcast channel. The process involves: acquiring a Bluetooth scan query ciphertext sent by a terminal device based on the Bluetooth broadcast ciphertext, wherein the terminal device stores the root key; decrypting the Bluetooth scan query ciphertext using the first key to obtain a Bluetooth scan query message; generating a Bluetooth scan response message in response to the Bluetooth scan query message and encrypting it using the first key to obtain a Bluetooth scan response ciphertext; and sending the Bluetooth scan response ciphertext to the broadcast channel. The pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext is obtained, and the pairing key is decrypted according to the first key; Based on the pairing key, Bluetooth pairing is performed with the terminal device to establish a Bluetooth communication connection.
[0006] The Bluetooth secure communication method for industrial control equipment based on a security chip provided in this application generates a high-strength first random number based on the security chip, and generates a first key based on the first random number and the root key, which can improve the security strength of the first key. After encrypting the message according to the first key, the ciphertext is sent to the broadcast channel, thus protecting the Bluetooth device information from the scanning and discovery stage. This can reduce the possibility of potential attackers without the root key obtaining various data by eavesdropping. By decrypting the obtained message according to the first key, the method can determine whether the message comes from a legitimate terminal device that has the root key and can correctly calculate the first key and decrypt the message, and perform corresponding response and pairing. Therefore, the security of the Bluetooth communication process can be improved.
[0007] According to one embodiment of this application, the Bluetooth broadcast message includes a second random number generated by the security chip; the step of obtaining the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext, and decrypting the Bluetooth scan query ciphertext according to the first key to obtain the Bluetooth scan query message includes: Obtain the Bluetooth scan query ciphertext and the third random number sent by the terminal device based on the Bluetooth broadcast ciphertext; If the third random number matches the second random number, the Bluetooth scan query ciphertext is decrypted using the first key to obtain the Bluetooth scan query message.
[0008] In this embodiment, by first checking whether the third random number from the terminal device matches the second random number sent by itself and encrypted with the first key, and then decrypting the Bluetooth scan query ciphertext if they match, unnecessary calculations can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0009] According to one embodiment of this application, sending the first random number and the Bluetooth broadcast ciphertext to the broadcast channel includes: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates a first random address for the industrial control device. The address field of the Bluetooth broadcast data packet is filled according to the first address random number and the first random address of the industrial control device; The Bluetooth broadcast data packet, after being filled with the address field, is sent to the broadcast channel.
[0010] In this embodiment, by generating a first random address based on a first address random number, a root key, and a fixed broadcast address, and filling the address field of the Bluetooth broadcast data packet with the first address random number and the first random address, it is possible to prevent attackers from tracking devices and associating different interactive behaviors based on the fixed address in the Bluetooth broadcast data packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors, and thus improving the security of the Bluetooth communication process.
[0011] According to one embodiment of this application, based on the formula: RA = Hash(Nonce_RA || Key_Root || Address_ID) Generate the first random address of the industrial control equipment; Wherein, RA represents the first random address of the industrial control equipment, Hash() is a cryptographic hash algorithm, Key_Root is the root key, and Address_ID represents the fixed broadcast address.
[0012] According to one embodiment of this application, obtaining the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext includes: Obtain the Bluetooth scan data packet sent by the terminal device based on the Bluetooth broadcast ciphertext; Extract the second address random number, the first random address of the terminal device, and the address encryption packet from the address field of the Bluetooth scan data packet; The address encryption packet is decrypted using the first key to obtain the fixed address of the terminal device; The first verification address is calculated based on the second address random number, the fixed address of the terminal device, and the root key; If the first random address and the first verification address of the terminal device match, the Bluetooth scan query ciphertext is extracted from the data payload of the Bluetooth scan data packet, and the fixed address of the terminal device is recorded in the current Bluetooth session.
[0013] In this embodiment, by first checking whether the first random address and the first check address in the address field match, and then processing the load and recording the fixed address of the terminal device if they match, unnecessary computation can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0014] According to one embodiment of this application, the method further includes: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. The security chip generates a third address random number, and the industrial control device generates a random address based on the third address random number, the address key, and the fixed address of the industrial control device. A Bluetooth communication message packet is generated, and the address field of the Bluetooth communication message packet is filled according to the third address random number and the random address of the industrial control device. The Bluetooth communication message packet with the address field filled is then sent to the communication channel to communicate with the terminal device via Bluetooth.
[0015] In this embodiment, after establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key and random numbers from both parties. Then, a random address is generated based on the address key and filled into the address field of the Bluetooth communication message packet. This can prevent attackers from tracking the device and associating different interactive behaviors based on the fixed address in the Bluetooth communication message packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors and thus improving the security of the Bluetooth communication process.
[0016] According to one embodiment of this application, the method further includes: Calculate the address update interval based on the address key; After the specified address update interval, the random address of the industrial control device is updated.
[0017] In this embodiment, by calculating the address update interval based on the address key, the address change interval of the industrial control equipment can be randomized and synchronized with the paired terminal equipment, thereby improving the security of the random address and reducing the energy consumption of the address resolution process.
[0018] According to one embodiment of this application, based on the formula: AUI = Hash(Key_AR) mod 900 Calculate the address update interval duration; Where AUI represents the address update interval, Hash() is the cryptographic hash algorithm, and Key_AR is the address key.
[0019] According to one embodiment of this application, the method further includes: Calculate the frequency hopping interval duration and the target channel frequency based on the address key; After the specified frequency hopping interval, the system switches to the communication channel corresponding to the target channel frequency.
[0020] In this embodiment, by calculating the frequency hopping interval duration and the target channel frequency based on the address key, the randomness of frequency hopping can be enhanced, thereby reducing the possibility of being tracked by attackers.
[0021] Secondly, this application provides a Bluetooth secure communication method for a terminal device based on a security chip, wherein the terminal device includes a security chip storing a root key; the method includes: The system monitors the broadcast channel to obtain the Bluetooth broadcast ciphertext and a first random number sent by the industrial control device; the industrial control device stores the root key; a first key is calculated based on the root key and the first random number, and the Bluetooth broadcast ciphertext is decrypted based on the first key to obtain the Bluetooth broadcast message; Based on the Bluetooth broadcast message, a Bluetooth scan query message is generated, and the Bluetooth scan query message is encrypted using the first key to obtain Bluetooth scan query ciphertext; the Bluetooth scan query ciphertext is then sent to the broadcast channel. After obtaining the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, a fourth random number is generated through the security chip, and a pairing key is generated based on the root key, the first random number and the fourth random number; The pairing key is encrypted according to the first key to obtain a pairing key encryption packet, and the pairing key encryption packet is sent to the broadcast channel; Based on the pairing key, Bluetooth pairing is performed with the industrial control equipment to establish a Bluetooth communication connection.
[0022] The Bluetooth secure communication method for terminal devices based on a security chip provided in this application encrypts Bluetooth scan query messages according to a first key and sends the obtained Bluetooth scan query ciphertext to a broadcast channel. This reduces the possibility of potential attackers without a root key obtaining various data through eavesdropping. After obtaining the Bluetooth scan response ciphertext, a pairing key is generated according to the root key, a first random number from the industrial control device, and a fourth random number generated by the security chip. Bluetooth pairing with the industrial control device is then performed according to the pairing key, which improves the security of the Bluetooth pairing process and thus enhances the security of the Bluetooth communication process.
[0023] According to one embodiment of this application, sending the Bluetooth scan query ciphertext to the broadcast channel further includes: The third random number is obtained by decrypting the Bluetooth broadcast ciphertext using the first key. The third random number and the Bluetooth scan query ciphertext are sent to the broadcast channel.
[0024] In this embodiment, by sending the decrypted third random number in plaintext to the broadcast channel, the industrial control device can directly obtain the third random number in plaintext, and after verification, decrypt the Bluetooth scan query ciphertext, thereby reducing unnecessary calculations by the industrial control device.
[0025] According to one embodiment of this application, the method of monitoring the broadcast channel to obtain the Bluetooth broadcast ciphertext sent by the industrial control device and the first random number includes: Listen to the broadcast channel to obtain the Bluetooth broadcast data packets sent by the industrial control equipment; Extract the first address random number and the first random address of the industrial control device from the address field of the Bluetooth broadcast data packet; Calculate the second verification address based on the first address random number, the root key, and the broadcast fixed address; If the second verification address matches the first random address of the industrial control device, the Bluetooth broadcast ciphertext and the first random number are extracted from the data payload portion of the Bluetooth broadcast data packet.
[0026] In this embodiment, by first checking whether the second verification address and the broadcast fixed address match, and then processing the load if they match, unnecessary computation can be reduced, thus mitigating potential DOS (Denial of Service) attacks.
[0027] Thirdly, this application provides a Bluetooth secure communication device for industrial control equipment based on a security chip, wherein the industrial control equipment includes a security chip, and the security chip stores a root key; the device includes: The first generation module is used to generate a first random number through the security chip, and generate a first key based on the first random number and the root key; The first sending module is configured to encrypt a Bluetooth broadcast message according to the first key to obtain Bluetooth broadcast ciphertext, and send the first random number and the Bluetooth broadcast ciphertext to the broadcast channel; The first acquisition module is configured to acquire a Bluetooth scan query ciphertext sent by a terminal device based on the Bluetooth broadcast ciphertext, wherein the terminal device stores the root key; decrypt the Bluetooth scan query ciphertext according to the first key to obtain a Bluetooth scan query message; generate a Bluetooth scan response message in response to the Bluetooth scan query message, and encrypt it according to the first key to obtain a Bluetooth scan response ciphertext; and send the Bluetooth scan response ciphertext to the broadcast channel. The first decryption module is used to obtain the pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext, and to decrypt it according to the first key to obtain the pairing key; The first pairing module is used to pair with the terminal device via Bluetooth according to the pairing key in order to establish a Bluetooth communication connection.
[0028] According to the Bluetooth secure communication device for industrial control equipment based on a security chip of this application, a high-strength first random number is generated based on the security chip, and a first key is generated based on the first random number and the root key, which can improve the security strength of the first key. After encrypting the message according to the first key, the ciphertext is sent to the broadcast channel, thus protecting the Bluetooth device information from the scanning and discovery stage. This can reduce the possibility of potential attackers without the root key obtaining various data by eavesdropping. By decrypting the obtained message according to the first key, it is possible to determine whether the message comes from a legitimate terminal device that has the root key and can correctly calculate the first key and decrypt the message, and to perform corresponding responses and pairing. Thus, the security of the Bluetooth communication process can be improved.
[0029] According to one embodiment of this application, the first sending module is further configured to: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates a first random address for the industrial control device. The address field of the Bluetooth broadcast data packet is filled according to the first address random number and the first random address of the industrial control device; The Bluetooth broadcast data packet, after being filled with the address field, is sent to the broadcast channel.
[0030] According to one embodiment of this application, the Bluetooth secure communication device for industrial control equipment based on a security chip further includes a filling module, used for: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. The security chip generates a third address random number, and the industrial control device generates a random address based on the third address random number, the address key, and the fixed address of the industrial control device. A Bluetooth communication message packet is generated, and the address field of the Bluetooth communication message packet is filled according to the third address random number and the random address of the industrial control device. The Bluetooth communication message packet with the address field filled is then sent to the communication channel to communicate with the terminal device via Bluetooth.
[0031] Fourthly, this application provides a Bluetooth secure communication device for a terminal device based on a security chip, wherein the terminal device includes a security chip storing a root key; the device includes: The second acquisition module is used to listen to the broadcast channel, obtain the Bluetooth broadcast ciphertext sent by the industrial control device and a first random number; the industrial control device stores the root key; calculates the first key based on the root key and the first random number, and decrypts the Bluetooth broadcast ciphertext based on the first key to obtain the Bluetooth broadcast message; The second sending module is configured to generate a Bluetooth scan query message based on the Bluetooth broadcast message, encrypt the Bluetooth scan query message based on the first key to obtain Bluetooth scan query ciphertext, and send the Bluetooth scan query ciphertext to the broadcast channel; The second generation module is used to obtain the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, generate a fourth random number through the security chip, and generate a pairing key based on the root key, the first random number and the fourth random number; The second encryption module is used to encrypt the pairing key according to the first key to obtain a pairing key encryption packet, and send the pairing key encryption packet to the broadcast channel; The second pairing module is used to pair with the industrial control equipment via Bluetooth according to the pairing key, so as to establish a Bluetooth communication connection.
[0032] According to the Bluetooth secure communication device for terminal devices based on a security chip of this application, by encrypting the Bluetooth scan query message according to the first key and sending the obtained Bluetooth scan query ciphertext to the broadcast channel, the possibility of potential attackers without the root key obtaining various data through eavesdropping can be reduced. After obtaining the Bluetooth scan response ciphertext, a pairing key is generated according to the root key, the first random number from the industrial control device and the fourth random number generated by the security chip, and then Bluetooth pairing is performed with the industrial control device according to the pairing key, which can improve the security of the Bluetooth pairing process, thereby improving the security of the Bluetooth communication process.
[0033] Fifthly, this application provides an industrial control device, including a security chip and a controller; the security chip stores a root key; the controller is used to execute the Bluetooth secure communication method for industrial control devices based on the security chip as described in the first aspect above.
[0034] In a sixth aspect, this application provides a terminal device, including a security chip and a controller; the security chip stores a root key; the controller is used to execute the Bluetooth secure communication method for a terminal device based on the security chip as described in the second aspect above.
[0035] In a seventh aspect, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the Bluetooth secure communication method for industrial control equipment based on a security chip as described in the first aspect above, or the Bluetooth secure communication method for terminal equipment based on a security chip as described in the second aspect above.
[0036] Eighthly, this application provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the Bluetooth secure communication method for industrial control equipment based on a security chip as described in the first aspect above, or the Bluetooth secure communication method for terminal equipment based on a security chip as described in the second aspect above.
[0037] Ninthly, this application provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the Bluetooth secure communication method for industrial control equipment based on a security chip as described in the first aspect above, or the Bluetooth secure communication method for terminal equipment based on a security chip as described in the second aspect above.
[0038] In a tenth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the Bluetooth secure communication method for industrial control equipment based on a security chip as described in the first aspect above, or the Bluetooth secure communication method for terminal equipment based on a security chip as described in the second aspect above.
[0039] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: According to the Bluetooth secure communication method for industrial control equipment based on a security chip of this application, a high-strength first random number is generated based on the security chip, and a first key is generated based on the first random number and the root key, which can improve the security strength of the first key. After encrypting the message according to the first key, the ciphertext is sent to the broadcast channel, thus protecting the Bluetooth device information from the scanning and discovery stage. This can reduce the possibility of potential attackers without the root key obtaining various data by eavesdropping. By decrypting the obtained message according to the first key, it is possible to determine whether the message comes from a legitimate terminal device that has the root key and can correctly calculate the first key and decrypt the message, and to perform corresponding responses and pairing. Thus, the security of the Bluetooth communication process can be improved.
[0040] In some embodiments, by first checking whether a third random number from the terminal device matches a second random number sent by itself and encrypted with a first key, and then decrypting the Bluetooth scan query ciphertext if they match, unnecessary computation can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0041] In some embodiments, by generating a first random address based on a first address random number, a root key, and a fixed broadcast address, and filling the address field of the Bluetooth broadcast data packet with the first address random number and the first random address, it is possible to prevent attackers from tracking devices and associating different interactive behaviors based on the fixed address in the Bluetooth broadcast data packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors, and thus improving the security of the Bluetooth communication process.
[0042] In some embodiments, by first checking whether the first random address and the first check address in the address field match, and then processing the load and recording the fixed address of the terminal device if they match, unnecessary computation can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0043] In some embodiments, after establishing Bluetooth pairing with a terminal device, an address key is generated based on the pairing key and random numbers from both parties. Then, a random address is generated based on the address key and filled into the address field of the Bluetooth communication message packet. This can prevent attackers from tracking devices and associating different interactive behaviors based on fixed addresses in the Bluetooth communication message packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors and thus improving the security of the Bluetooth communication process.
[0044] In some embodiments, by calculating the address update interval based on the address key, the address change interval of the industrial control equipment can be randomized and synchronized with the paired terminal equipment, thereby improving the security of the random address and reducing the energy consumption of the address resolution process.
[0045] In some embodiments, by calculating the frequency hopping interval duration and the target channel frequency based on the address key, the randomness of frequency hopping can be enhanced, thereby reducing the possibility of being tracked by attackers.
[0046] The Bluetooth secure communication method for terminal devices based on a security chip provided in this application encrypts Bluetooth scan query messages according to a first key and sends the obtained Bluetooth scan query ciphertext to a broadcast channel. This reduces the possibility of potential attackers without a root key obtaining various data through eavesdropping. After obtaining the Bluetooth scan response ciphertext, a pairing key is generated according to the root key, a first random number from the industrial control device, and a fourth random number generated by the security chip. Bluetooth pairing with the industrial control device is then performed according to the pairing key, which improves the security of the Bluetooth pairing process and thus enhances the security of the Bluetooth communication process.
[0047] In some embodiments, by sending the decrypted third random number in plaintext to the broadcast channel, the industrial control device can directly obtain the third random number in plaintext, and after verification, decrypt the Bluetooth scan query ciphertext, thereby reducing unnecessary calculations by the industrial control device.
[0048] In some embodiments, by first checking whether the second check address and the broadcast fixed address match, and then processing the load if they match, unnecessary computation can be reduced and potential DOS (Denial of Service) attacks can be mitigated.
[0049] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating the Bluetooth secure communication method for industrial control equipment based on a security chip, provided in an embodiment of this application. Figure 2 This is a flowchart illustrating the Bluetooth secure communication method for terminal devices based on a security chip, as provided in an embodiment of this application. Figure 3 This is a schematic diagram of the Bluetooth communication process provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating the interaction process between industrial control equipment and terminal equipment provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of a Bluetooth secure communication device for industrial control equipment based on a security chip, provided in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of a Bluetooth secure communication device for a terminal device based on a security chip, provided in an embodiment of this application. Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0053] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0054] The following description, in conjunction with the accompanying drawings, details the Bluetooth secure communication method, apparatus, and device for industrial control equipment based on a security chip provided in this application, through specific embodiments and application scenarios.
[0055] The Bluetooth secure communication method for industrial control equipment based on a security chip provided in this application embodiment can be executed by an electronic device or a functional module or entity within an electronic device capable of implementing the Bluetooth secure communication method based on a security chip. The electronic devices mentioned in this application embodiment include, but are not limited to, servers, industrial control computers, edge computing gateways, embedded processors, programmable logic controllers, IoT gateways, personal computers, workstations, cloud computing nodes, distributed computing systems, mobile terminals, intelligent inspection equipment, and field monitoring hosts. The following description uses an electronic device as an example to illustrate the Bluetooth secure communication method for industrial control equipment based on a security chip provided in this application embodiment.
[0056] like Figure 1 As shown, the Bluetooth secure communication method for industrial control equipment based on a security chip includes steps 110, 120, 130, 140, and 150.
[0057] Step 110: Generate a first random number using the security chip, and generate a first key based on the first random number and the root key.
[0058] Industrial control equipment refers to devices used to monitor, control, and execute industrial production processes, such as smart meters, sensors, distribution boxes, and transformers in power systems. In this embodiment, the industrial control equipment acts as a Bluetooth slave in Bluetooth communication, periodically broadcasting its own Bluetooth service information and waiting for Bluetooth connection requests initiated by terminal devices acting as Bluetooth masters. Of course, the industrial control equipment can also act as a Bluetooth master, initiating Bluetooth connection requests to other devices; the terminal device can also act as a Bluetooth slave, broadcasting its own Bluetooth service information and waiting for Bluetooth connection requests from other devices. This embodiment does not limit this approach.
[0059] Bluetooth broadcast messages contain sensitive information such as the type, function, device name, and protocol version of industrial control equipment, which could be used by malicious attackers to crack encryption algorithms or forge messages. Therefore, in this embodiment, the Bluetooth broadcast messages sent by industrial control equipment are encrypted to protect device information from the scanning and discovery stage.
[0060] In this embodiment, the industrial control equipment includes a security chip that stores a root key, Key_Root. A security chip refers to hardware that provides key management and cryptographic operations, possessing functions such as symmetric encryption / decryption, asymmetric encryption / decryption, digital signatures, and true random number generation. It is also assumed that the terminal device seeking to establish a Bluetooth connection stores a shared root key, Key_Root. For example, the terminal device includes a security chip manufactured or initialized by the same organization, and the shared root key is pre-configured within the security chip.
[0061] First, a first random number, Nonce_Slave_1, is generated using a secure chip. The secure chip can generate high-strength random numbers through mechanisms such as physical entropy sources, real-time online entropy monitoring, and cryptographic post-processing, making it difficult for attackers to crack and forge the key through brute-force attacks or by speculating on random numbers based on statistical patterns.
[0062] After obtaining the first random number Nonce_Slave_1, the first key EncKey_PreConn is generated based on Nonce_Slave_1 and the root key Key_Root. The first key EncKey_PreConn can be generated using KDF (Key Derivation Function) algorithms such as HKDF (HMAC-based KDF) and BIP32 (Bitcoin Improvement Proposal 32). Using different keys derived from the root key in different tasks can reduce the risk of root key leakage. Even if one EncKey_PreConn is leaked, messages encrypted with other derived keys remain confidential.
[0063] Step 120: Encrypt the Bluetooth broadcast message according to the first key to obtain the Bluetooth broadcast ciphertext, and send the first random number and the Bluetooth broadcast ciphertext to the broadcast channel.
[0064] After obtaining the first key EncKey_PreConn, algorithms such as AES (Advanced Encryption Standard) and SM3 can be used to encrypt the Bluetooth broadcast message Msg based on the first key. ADV_IND The Bluetooth broadcast ciphertext EncMsg was obtained. ADV_IND Bluetooth broadcast messages refer to messages used by devices to declare Bluetooth services, such as the ADV_IND (Advertising Indication) message defined in the Bluetooth specification; of course, they can also be other types of broadcast messages or custom types of broadcast messages, which are not limited in this application embodiment.
[0065] Obtain the Bluetooth broadcast ciphertext EncMsg ADV_IND = {Msg ADV_IND} EncKey_PreConn Then, the first random number Nonce_Slave_1 and the Bluetooth broadcast ciphertext EncMsg are... ADV_IND Send to the broadcast channel. The first random number and the Bluetooth broadcast ciphertext can be concatenated sequentially, in the form of EncBlob_Br = Nonce_Slave_1 || EncMsg ADV_IND Then, EncBlob_Br is used as the data payload, encapsulated into a Bluetooth broadcast message packet, and sent to the broadcast channel, so that the terminal device can obtain the first random number and the Bluetooth broadcast ciphertext at the same time.
[0066] Step 130: Obtain the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext. The terminal device stores the root key. Decrypt the Bluetooth scan query ciphertext according to the first key to obtain the Bluetooth scan query message. Generate a Bluetooth scan response message in response to the Bluetooth scan query message and encrypt it according to the first key to obtain the Bluetooth scan response ciphertext. Send the Bluetooth scan response ciphertext to the broadcast channel.
[0067] According to the Bluetooth specification, after receiving a Bluetooth broadcast message from a Bluetooth slave device, the Bluetooth master device will reply with a Bluetooth scan query message to further request slave device information. In this embodiment, the Bluetooth broadcast message sent by the industrial control device to the broadcast channel is encrypted with a first key. Therefore, only terminal devices with the corresponding root key can calculate the first key based on the first random number and the root key, decrypt the Bluetooth broadcast ciphertext based on the first key, and generate the corresponding Bluetooth scan query message.
[0068] Similarly, to prevent Bluetooth scan query messages from leaking device information, the terminal device will encrypt the Bluetooth scan query message using the first key before sending it to the broadcast channel. The industrial control equipment receives the encrypted Bluetooth scan query ciphertext EncMsg. SCAN_REQ Therefore, it is necessary to first decrypt EncMsg using the first key. SCAN_REQ Received Bluetooth scan response message Msg SCAN_REQ If a valid Msg cannot be decrypted using the first key. SCAN_REQ If the message is not received, it indicates that the message may have come from another unauthorized device, and no further response will be performed.
[0069] Get Msg SCAN_REQ Then, generate the response Msg. SCAN_REQ Bluetooth scan response message Msg SCAN_RSP This is to prepare for subsequent pairings. Similarly, the Msg is encrypted using the first key. SCAN_RSP The Bluetooth scan response ciphertext EncMsg was obtained. SCAN_RSP Then send the Bluetooth scan response ciphertext EncMsg SCAN_RSP Send to the broadcast channel.
[0070] Step 140: Obtain the pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext, and decrypt it according to the first key to obtain the pairing key.
[0071] According to the Bluetooth communication specification, after both parties determine the pairing method requiring authentication, they will first agree on a temporary key (TK) as the core key for subsequent authentication and session key negotiation. The Bluetooth communication specification defines NUM (Numeric Comparison), PIN (Personal Identification Number), and OOB (Out of Band) modes. NUM and PIN modes require user confirmation or manual input of a PIN code, which is then used to generate the TK. However, human judgment is inherently ambiguous, and short PIN codes are easily cracked by brute force. Therefore, in this embodiment, the industrial control equipment and the terminal device are required to use OOB mode to generate a pairing key Key_Pair as the TK from the security chip, thereby avoiding human intervention in Bluetooth device authentication and improving the security of the Bluetooth communication process.
[0072] In this embodiment of the application, after receiving the Bluetooth scan response ciphertext, if the terminal device needs to establish a Bluetooth connection with the industrial control device, it will first generate a pairing key Key_Pair through the security chip, encrypt it according to the first key, and send the obtained pairing key encryption packet EncBlob_Pr to the industrial control device; then, after the industrial control device obtains EncBlob_Pr, it can decrypt it according to the first key to obtain the pairing key Key_Pair.
[0073] Step 150: Pair with the terminal device via Bluetooth using the pairing key to establish a Bluetooth communication connection.
[0074] After the industrial control equipment and the terminal equipment determine the pairing key Key_Pair, they can perform Bluetooth pairing according to the Bluetooth protocol specifications to establish a Bluetooth communication connection. In this embodiment, all messages sent by both parties during the broadcast, pairing, and connection phases are encrypted using the first key EncKey_PreConn. Of course, the first key can also be updated during the pairing process, or other keys for encrypting messages can be negotiated and generated; this embodiment does not limit this.
[0075] The Bluetooth secure communication method for industrial control equipment based on a security chip provided in this application improves the security strength of the first key by generating a high-strength first random number based on the security chip and generating a first key based on the first random number and the root key. By encrypting the message with the first key and sending the ciphertext to the broadcast channel, the protection of Bluetooth device information begins from the scanning and discovery stage, reducing the possibility of potential attackers without the root key obtaining various data through eavesdropping. By decrypting the obtained message with the first key, the method can determine whether the message comes from a legitimate terminal device that has the root key, can correctly calculate the first key, and decrypt the message, and perform corresponding responses and pairing. Thus, the security of the Bluetooth communication process is improved.
[0076] In some embodiments, the Bluetooth broadcast message includes a second random number generated by a security chip; obtaining the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext, and decrypting the Bluetooth scan query ciphertext according to the first key to obtain the Bluetooth scan query message, including: Obtain the Bluetooth scan query ciphertext and the third random number sent by the terminal device based on the Bluetooth broadcast ciphertext; If the third random number matches the second random number, the Bluetooth scan query ciphertext is decrypted using the first key to obtain the Bluetooth scan query message.
[0077] The process of decrypting ciphertext using the key is complex and requires significant time and computational resources. Attackers may launch a Denial-of-Service (DoS) attack, sending a large amount of invalid ciphertext to the industrial control equipment to consume its computing resources and prevent it from handling normal tasks. Therefore, in this embodiment, the Bluetooth broadcast message also includes a second random number, Nonce_Slave_2, generated by the security chip; as a component of the Bluetooth broadcast message, Nonce_Slave_2 is also encrypted by the first key.
[0078] After the terminal device decrypts the Bluetooth broadcast message containing Nonce_Slave_2, it can send a third random number, Nonce_Slave_3, in plaintext form along with the encrypted Bluetooth scan query message. The industrial control device can then directly read Nonce_Slave_3 in plaintext form and compare it with Nonce_Slave_2.
[0079] If Nonce_Slave_3 matches Nonce_Slave_2, for example, Nonce_Slave_3 = Nonce_Slave_2, it indicates that the Bluetooth scan query ciphertext comes from a device that can correctly calculate the first key and decrypt the Bluetooth broadcast ciphertext. Then, continue to decrypt the Bluetooth scan query ciphertext according to the first key.
[0080] In this embodiment, by first checking whether the third random number from the terminal device matches the second random number sent by itself and encrypted with the first key, and then decrypting the Bluetooth scan query ciphertext if they match, unnecessary calculations can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0081] In some embodiments, sending a first random number and Bluetooth broadcast ciphertext to a broadcast channel includes: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates the first random address of the industrial control device. Fill the address field of the Bluetooth broadcast data packet with the first address random number and the first random address of the industrial control device; Send the Bluetooth broadcast data packet, after filling the address field, to the broadcast channel.
[0082] According to the Bluetooth communication specification, the address field of Bluetooth data packets stores information such as identity address and access address to identify the device from which the message originates. Continuously using a fixed device address carries the risk of exposing the device's location and network topology. Therefore, in this embodiment, a resolvable address (RA) is used as the device address throughout the entire protocol process.
[0083] First, a Bluetooth broadcast data packet is generated by using the first random number in plaintext and the Bluetooth broadcast ciphertext obtained by encrypting it according to the first key as the data payload.
[0084] Then, a first address random number Nonce_RA_1 is generated through the security chip, and a first random address RA_S1 for the industrial control device is generated based on the first address random number, the root key, and the broadcast fixed address. For example, in some embodiments, according to the formula: RA = Hash(Nonce_RA || Key_Root || Address_ID) Generate the first random address for the industrial control equipment; Where RA represents the first random address RA_S1 of the industrial control equipment; Hash() is the cryptographic hash algorithm, which can be SM3, AES, etc.; Key_Root is the root key; Address_ID represents the fixed broadcast address, for example, the public fixed address 0x8E89BED6 used in the Bluetooth specification can be used to indicate that the message is a broadcast message.
[0085] After obtaining the first random address RA_S1 of the industrial control device, the address field of the Bluetooth broadcast data packet is filled according to the first address random number Nonce_RA_1 and the first random address RA_S1 of the industrial control device. Nonce_RA_1 and RA can be concatenated sequentially and stored at the beginning of the address field, and the remaining positions can be filled with random numbers until a preset length is reached; alternatively, the address field can be encrypted using other encryption algorithms, which is not limited in this embodiment. The Bluetooth broadcast data packet with the filled address field is then sent to the broadcast channel.
[0086] In this embodiment, by generating a first random address based on a first address random number, a root key, and a fixed broadcast address, and filling the address field of the Bluetooth broadcast data packet with the first address random number and the first random address, it is possible to prevent attackers from tracking devices and associating different interactive behaviors based on the fixed address in the Bluetooth broadcast data packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors, and thus improving the security of the Bluetooth communication process.
[0087] In some embodiments, obtaining the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext includes: Obtain Bluetooth scan data packets sent by the terminal device based on Bluetooth broadcast encrypted messages; Extract the second address random number, the terminal device's first random address, and the address encryption packet from the address field of the Bluetooth scan data packet; The address encryption packet is decrypted using the first key to obtain the fixed address of the terminal device; Calculate the first verification address based on the second address random number, the fixed address of the terminal device, and the root key; If the first random address and the first verification address of the terminal device match, the Bluetooth scan query ciphertext is extracted from the data payload of the Bluetooth scan data packet, and the fixed address of the terminal device is recorded in the current Bluetooth session.
[0088] In this embodiment, the terminal device generates a second address random number Nonce_RA_2, generates a first random address RA_M1 for the terminal device, encrypts its own fixed address into an address encryption packet EncBlob_RA according to the first key, and then fills the address field of the Bluetooth scan data packet according to Nonce_RA_2, RA_M1 and EncBlob_RA.
[0089] Therefore, after the industrial control equipment obtains the Bluetooth scan data packet sent by the terminal device based on Bluetooth broadcast encrypted text, it needs to extract the second address random number Nonce_RA_2, the terminal device's first random address RA_M1, and the address encryption packet EncBlob_RA from the address field of the Bluetooth scan data packet.
[0090] Before processing the data payload, the address encryption packet EncBlob_RA is decrypted using the first key to obtain the fixed address Address_ID_M of the terminal device. After obtaining Address_ID_M, the first verification address Address_ID_M' is calculated using the second address random number Nonce_RA_2, the calculated Address_ID_M, and the root key Key_Root.
[0091] The address randomization algorithm is deterministic. Therefore, if Address_ID_M matches Address_ID_M', it indicates that the Bluetooth scan packet comes from a legitimate terminal device with the same root key, capable of correctly calculating the key, resolving the address, and encrypting / decrypting. In this case, the Bluetooth scan query ciphertext is extracted from the data payload of the Bluetooth scan packet, and the fixed address of the terminal device is recorded in the current Bluetooth session.
[0092] If valid data cannot be extracted from the address field, the address encryption packet cannot be effectively decrypted, the calculated first verification address is invalid, or it does not match the calculated fixed address of the terminal device, it indicates that the data packet may come from an illegal or unreliable device. In this case, the data load will not be processed to reduce unnecessary calculations.
[0093] In this embodiment, by first checking whether the first random address and the first check address in the address field match, and then processing the load and recording the fixed address of the terminal device if they match, unnecessary computation can be reduced and potential DOS (Denial of Service) attacks can be countered.
[0094] In some embodiments, the method further includes: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. A third address random number is generated by the security chip, and a random address of the industrial control device is generated based on the third address random number, the address key, and the fixed address of the industrial control device. Generate a Bluetooth communication message packet, fill the address field of the Bluetooth communication message packet with the random number of the third address and the random address of the industrial control device, and send the Bluetooth communication message packet with the filled address field to the communication channel to communicate with the terminal device via Bluetooth.
[0095] If the address field is continuously filled with the same RA (Range Address), an attacker can still identify and track the devices involved in the communication. Therefore, in this embodiment, after the terminal device and the industrial control device establish Bluetooth pairing, a new key will be generated and a new random address will be generated.
[0096] The address key Key_RA can be generated using the IRK (Identity Resolving Key) generation rules specified in the Bluetooth specification, which is obtained by negotiating the core secret TK and a one-time random number exchanged between the two parties. In this embodiment, TK is the pairing key Key_Pair. A first pairing random number Nonce_Pr_1 can be generated by the security chip of the industrial control device, encrypted, and sent to the terminal device; the terminal device also generates a second pairing random number Nonce_Pr_2 through the security chip, encrypted, and sent to the industrial control device. The industrial control device can then generate the address key Key_RA based on the pairing key Key_Pair, Nonce_Pr_1, and Nonce_Pr_2.
[0097] After generating the address key Key_RA, a third address random number is generated through the security chip. Based on this third address random number, the address key, and the industrial control device's fixed address, a random address for the industrial control device is generated. When generating Bluetooth communication message packets, the address field of the Bluetooth communication message packet is filled with the third address random number and the industrial control device's random address. The Bluetooth communication message packet with the filled address field is then sent to the communication channel to communicate with the terminal device via Bluetooth.
[0098] The process of generating the random address of industrial control equipment and filling the address field of Bluetooth communication message packets can refer to the above process of generating the first random address of industrial control equipment and filling the address field of Bluetooth broadcast message packets. To avoid repetition, it will not be repeated here.
[0099] In this embodiment, after establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key and random numbers from both parties. Then, a random address is generated based on the address key and filled into the address field of the Bluetooth communication message packet. This can prevent attackers from tracking the device and associating different interactive behaviors based on the fixed address in the Bluetooth communication message packet, thereby reducing the possibility of attackers exploring the interaction topology based on different behaviors and thus improving the security of the Bluetooth communication process.
[0100] In some embodiments, the method further includes: Calculate the address update interval based on the address key; After the address update interval, update the random address of the industrial control equipment.
[0101] To enhance the security of random addresses, both parties in a Bluetooth communication exchange will periodically update their random addresses. In this embodiment, the address update interval will be randomized based on the address key Key_AR, rather than using the fixed address update interval specified in the Bluetooth specification.
[0102] After determining the address key Key_AR, the address update interval can be calculated according to a preset algorithm. For example, in some embodiments, it is calculated according to the formula: AUI = Hash(Key_AR) mod 900 Calculate the address update interval; Here, AUI (Address Update Interval) represents the address update interval, Hash() is the cryptographic hash algorithm, and Key_AR is the address key. The parameter 900 follows the default address update time (15 minutes) in the existing Bluetooth specification, and the calculated address update time is in seconds.
[0103] Of course, in addition to time, the unit of address update interval can also be the number of times; in addition to the same address update interval, a sequence containing multiple different address update intervals can also be generated based on the address key, with different intervals between two adjacent updates. This application does not limit this.
[0104] After each address update interval, the random address of the industrial control device is updated. The random address generation process described above can be repeated, exchanging random numbers and generating a new random address; alternatively, the address key can be updated simultaneously. The address keys of the industrial control device and the terminal device are synchronized. If both parties use the same preset algorithm to calculate the address update interval, their address updates can be synchronized. Before the address update, both parties can directly check whether the random address in the address field of the message packet is a previously verified address; the parsing and verification process is only repeated after the address update. Therefore, a shorter address update interval results in better security, and vice versa. A threshold for the address update interval can be preset to balance security and energy consumption.
[0105] In this embodiment, by calculating the address update interval based on the address key, the address change interval of the industrial control equipment can be randomized and synchronized with the paired terminal equipment, thereby improving the security of the random address and reducing the energy consumption of the address resolution process.
[0106] In some embodiments, the method further includes: Calculate the frequency hopping interval duration and target channel frequency based on the address key; After the frequency hopping interval, the system switches to the communication channel corresponding to the target channel frequency.
[0107] In the Bluetooth specification, to avoid occupying a single channel for an extended period, prevent conflicts between multiple devices, and improve the security of the communication process, Bluetooth communication devices periodically switch the frequency of the communication channel, a process known as frequency hopping.
[0108] In this embodiment, the frequency hopping interval is randomized according to the address key, and both parties are synchronized. The frequency hopping interval duration can be calculated based on the address key, referring to the method for calculating the address update interval duration; frequency hopping algorithms such as CSA#2 (Channel Selection Algorithm) can be used, with the address key Key_AR added as a random factor to calculate the target channel frequency.
[0109] After each frequency hopping interval, the system switches to the communication channel corresponding to the target channel frequency, and sends and receives messages on that communication channel.
[0110] In this embodiment, by calculating the frequency hopping interval duration and the target channel frequency based on the address key, the randomness of frequency hopping can be enhanced, thereby reducing the possibility of being tracked by attackers.
[0111] In some embodiments, such as Figure 2 As shown in the figure, this application embodiment also provides a Bluetooth secure communication method for terminal devices based on a security chip, including steps 210, 220, 230, 240 and 250.
[0112] Step 210: Listen to the broadcast channel to obtain the Bluetooth broadcast ciphertext and the first random number sent by the industrial control device; the industrial control device stores the root key; calculate the first key based on the root key and the first random number, and decrypt the Bluetooth broadcast ciphertext based on the first key to obtain the Bluetooth broadcast message.
[0113] Terminal devices refer to devices used for Bluetooth connections with industrial control equipment, such as handheld mobile terminals used by maintenance personnel, intelligent inspection equipment, and on-site monitoring hosts. In this embodiment, the terminal device acts as the Bluetooth master device in Bluetooth communication, actively searching for nearby Bluetooth devices and initiating Bluetooth pairing requests. Of course, the industrial control equipment can also act as the Bluetooth master device, initiating Bluetooth connection requests to other devices; the terminal device can also act as the Bluetooth slave device, broadcasting its own Bluetooth service information and waiting for Bluetooth connection requests from other devices. This embodiment does not limit this.
[0114] The terminal device includes a security chip that stores a root key. Therefore, after the terminal device listens to the Bluetooth broadcast ciphertext and the first random number sent by the industrial control equipment from the broadcast channel, it can use the same key derivation function to calculate the first key based on the root key and the first random number, and then decrypt the Bluetooth broadcast ciphertext using the first key to obtain the Bluetooth broadcast message Msg. ADV_IND .
[0115] Step 220: Generate a Bluetooth scan query message based on the Bluetooth broadcast message, and encrypt the Bluetooth scan query message according to the first key to obtain the Bluetooth scan query ciphertext; send the Bluetooth scan query ciphertext to the broadcast channel.
[0116] In this embodiment, after the terminal device decrypts the Bluetooth broadcast message, it generates a Bluetooth scan query message Msg for further requesting information from the slave device. SCAN_REQ The Bluetooth scan query message is encrypted using the first key to obtain the Bluetooth scan query ciphertext EncMsg. SCAN_REQ After encryption is complete, use Bluetooth to scan and query the encrypted message EncMsg. SCAN_REQ Send to the broadcast channel.
[0117] Step 230: After obtaining the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, generate a fourth random number through the security chip, and generate a pairing key based on the root key, the first random number and the fourth random number.
[0118] In this embodiment of the application, after obtaining the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, if Bluetooth pairing with the industrial control device is required, a new pairing key Key_Pair will be generated first, which will serve as the core key for subsequent identity authentication and session key negotiation.
[0119] First, a fourth random number, Nonce_Master, is generated through the security chip. Then, a pairing key, Key_Pair, is generated based on the root key Key_Root, the first random number Nonce_Slave_1, and the fourth random number Nonce_Master through the key derivation function.
[0120] Step 240: Encrypt the pairing key according to the first key to obtain the pairing key encryption packet, and send the pairing key encryption packet to the broadcast channel.
[0121] After generating the pairing key Key_Pair, the pairing key Key_Pair is encrypted using the first key EncKey_PreConn to obtain the pairing key encryption packet EncBlob_Pr, and then sent to the broadcast channel. Alternatively, in some embodiments, the fourth random number Nonce_Master and the pairing key encryption packet can be sent together to the broadcast channel, allowing the terminal device to verify the decrypted Key_Pair based on the Nonce_Master.
[0122] Step 250: Pair with industrial control equipment via Bluetooth according to the pairing key to establish a Bluetooth communication connection.
[0123] After the industrial control equipment and the terminal equipment determine the pairing key Key_Pair, they can perform Bluetooth pairing according to the Bluetooth protocol specifications to establish a Bluetooth communication connection. In this embodiment, all messages sent by both parties during the broadcast, pairing, and connection phases are encrypted using the first key EncKey_PreConn. Of course, the first key can also be updated during the pairing process, or other keys for encrypting messages can be negotiated and generated; this embodiment does not limit this.
[0124] The Bluetooth secure communication method for terminal devices based on a security chip provided in this application embodiment encrypts Bluetooth scan query messages according to a first key and sends the obtained Bluetooth scan query ciphertext to a broadcast channel. This reduces the possibility of potential attackers without a root key obtaining various data through eavesdropping. After obtaining the Bluetooth scan response ciphertext, a pairing key is generated based on the root key, a first random number from the industrial control device, and a fourth random number generated by the security chip. Then, Bluetooth pairing is performed with the industrial control device based on the pairing key, which improves the security of the Bluetooth pairing process and thus enhances the security of the Bluetooth communication process.
[0125] In some embodiments, sending the Bluetooth scan query ciphertext to the broadcast channel further includes: The third random number is obtained by decrypting the Bluetooth broadcast ciphertext using the first key; Send the third random number and the Bluetooth scan query ciphertext to the broadcast channel.
[0126] In this embodiment, the industrial control device uses the second random number Nonce_Slave_2 as part of the Bluetooth broadcast message, encrypts it using the first key, and sends it to the broadcast channel. Before decrypting the Bluetooth scan query ciphertext, the industrial control device verifies the third random number sent by the terminal device. Therefore, the terminal device needs to decrypt the Bluetooth broadcast ciphertext using the first key, extract the third random number Nonce_Slave_3 from the decryption result, and send the decrypted third random number Nonce_Slave_3 in plaintext along with the Bluetooth scan query ciphertext to the broadcast channel.
[0127] The third random number and the Bluetooth scan query ciphertext can be concatenated in order, in the form of EncBlob_ScanReq =Nonce_Slave_3 || EncMsg SCAN_REQ Then, EncBlob_ScanReq is used as the data payload, encapsulated into a Bluetooth scan query message packet, and sent to the broadcast channel, so that the industrial control equipment can obtain the third random number and the Bluetooth scan query ciphertext at the same time.
[0128] In this embodiment, by sending the decrypted third random number in plaintext to the broadcast channel, the industrial control device can directly obtain the third random number in plaintext, and after verification, decrypt the Bluetooth scan query ciphertext, thereby reducing unnecessary calculations by the industrial control device.
[0129] In some embodiments, monitoring the broadcast channel to obtain the Bluetooth broadcast ciphertext sent by the industrial control device and a first random number includes: Listen to the broadcast channel to obtain Bluetooth broadcast data packets sent by industrial control equipment; Extract the first address random number and the first random address of the industrial control device from the address field of the Bluetooth broadcast data packet; Calculate the second verification address based on the first address random number, the root key, and the broadcast fixed address; If the second verification address matches the first random address of the industrial control device, the Bluetooth broadcast ciphertext and the first random number are extracted from the data payload of the Bluetooth broadcast data packet.
[0130] In this embodiment, the industrial control device randomizes the address field in the Bluetooth broadcast data packet. Therefore, after the terminal device listens to the broadcast channel and receives the Bluetooth broadcast data packet sent by the industrial control device, it needs to extract the first address random number Nonce_RA_1 and the first random address RA_S1 of the industrial control device from the address field of the Bluetooth broadcast data packet. Data at a certain position in the address field of the Bluetooth broadcast data packet can be read according to preset rules, or the address field can be decrypted according to a preset algorithm to obtain Nonce_RA_1 and RA_S1.
[0131] Because cryptographic hash algorithms are highly complex, it is difficult to obtain the original address by reverse calculation from a random address; however, cryptographic hash algorithms are deterministic, meaning that the same result can be obtained using the same parameters. Therefore, we can first calculate the second verification address RA_S2 using the first address random number Nonce_RA_1, the root key Key_Root, and the broadcast fixed address (e.g., the public fixed address 0x8E89BED6) through a cryptographic hash algorithm, and then check whether the second verification address RA_S2 matches the extracted first random address RA_S1 of the industrial control device. For example, we can check whether RA_S2 and RA_S1 are equal. If they are equal, then a match is determined.
[0132] If the second verification address matches the first random address of the industrial control device, the Bluetooth broadcast ciphertext and the first random number are extracted from the data payload of the Bluetooth broadcast data packet.
[0133] In this embodiment, by first checking whether the second verification address and the broadcast fixed address match, and then processing the load if they match, unnecessary computation can be reduced, thus mitigating potential DOS (Denial of Service) attacks.
[0134] Of course, terminal devices can also randomize the address field of the message packets they send, and calculate parameters such as address key, address update interval, frequency hopping interval, and target channel frequency. The process can refer to the relevant process of the industrial control equipment mentioned above, and will not be repeated here to avoid repetition.
[0135] The following scenario illustrates the Bluetooth secure communication method for terminal devices based on security chips and the Bluetooth secure communication method for industrial control equipment based on security chips provided in this application. For example... Figure 3 As shown, the Bluetooth communication process includes a broadcast phase, a pairing and connection phase, and a transmission phase.
[0136] During the broadcast phase, both parties complete service discovery, exchange service characteristics, and custom data, preparing for the subsequent pairing and connection phase. For example... Figure 4 As shown, the industrial control equipment, acting as a Bluetooth slave device, first generates a Bluetooth broadcast message to declare its Bluetooth service to the outside world; it generates a first random number through a security chip, then generates a first key based on the root key and the first random number, and encrypts the Bluetooth broadcast message based on the first key to obtain the Bluetooth broadcast ciphertext; and sends the first random number and the Bluetooth broadcast ciphertext to the broadcast channel.
[0137] The terminal device, acting as a Bluetooth master device, actively scans the broadcast channel to obtain the first random number and Bluetooth broadcast ciphertext sent by the industrial control equipment; it calculates the first key based on the root key and the first random number, and decrypts the Bluetooth broadcast ciphertext using the first key to obtain the Bluetooth broadcast message; it responds to the Bluetooth broadcast message by generating a Bluetooth scan query message to inquire about necessary information from the peer, and encrypts it using the first key to obtain the Bluetooth scan query ciphertext; and it sends the Bluetooth scan query ciphertext to the broadcast channel.
[0138] The industrial control equipment continuously monitors the broadcast channel, obtains the Bluetooth scan query ciphertext sent by the terminal device, and decrypts it according to the first key to obtain the Bluetooth scan query message; generates a Bluetooth scan response message that responds to the Bluetooth scan query message and contains the information required for pairing, and encrypts it according to the first key to obtain the Bluetooth scan response ciphertext; and sends the Bluetooth scan response ciphertext to the broadcast channel.
[0139] After the terminal device obtains the Bluetooth scan query ciphertext, it decrypts it according to the first key to obtain the Bluetooth scan response message and obtains the necessary information for pairing. It generates a fourth random number through the security chip and generates a pairing key according to the root key, the first random number and the fourth random number, which serves as the core secret for subsequent pairing stages. It encrypts the pairing key according to the first key to obtain the pairing key encryption packet and sends the first key to the broadcast channel.
[0140] After the industrial control equipment obtains the pairing key encryption packet, it decrypts it according to the first key to obtain the pairing key.
[0141] After both the industrial control equipment and the terminal equipment receive the pairing key, they enter the pairing and connection phase. They obtain the shared secret using the OOB method, i.e., Bluetooth pairing is performed based on the previously synchronized pairing key. Based on the pairing key, both parties authenticate each other and generate other keys for subsequent transmission phases.
[0142] After pairing and connection are completed, the transmission phase begins. The message is encrypted using the negotiated key, and random frequency hopping and device address updates are performed.
[0143] The Bluetooth secure communication method for industrial control equipment based on a security chip provided in this application can be executed by a Bluetooth secure communication device for industrial control equipment based on a security chip. This application uses the execution of the Bluetooth secure communication method for industrial control equipment based on a security chip by a Bluetooth secure communication device for industrial control equipment based on a security chip as an example to illustrate the Bluetooth secure communication device for industrial control equipment based on a security chip provided in this application.
[0144] This application also provides a Bluetooth secure communication device for industrial control equipment based on a security chip.
[0145] like Figure 5 As shown, the Bluetooth secure communication device for industrial control equipment based on a security chip includes: The first generation module 510 is used to generate a first random number through the security chip, and generate a first key based on the first random number and the root key; The first sending module 520 is used to encrypt the Bluetooth broadcast message according to the first key to obtain the Bluetooth broadcast ciphertext, and send the first random number and the Bluetooth broadcast ciphertext to the broadcast channel; The first acquisition module 530 is used to acquire the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext, wherein the terminal device stores the root key; decrypt the Bluetooth scan query ciphertext according to the first key to obtain the Bluetooth scan query message; generate a Bluetooth scan response message in response to the Bluetooth scan query message, and encrypt it according to the first key to obtain the Bluetooth scan response ciphertext; and send the Bluetooth scan response ciphertext to the broadcast channel. The first decryption module 540 is used to obtain the pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext, and to decrypt it according to the first key to obtain the pairing key; The first pairing module 550 is used to pair with the terminal device via Bluetooth according to the pairing key in order to establish a Bluetooth communication connection.
[0146] According to the Bluetooth secure communication device for industrial control equipment based on a security chip of this application, a high-strength first random number is generated based on the security chip, and a first key is generated based on the first random number and the root key, which can improve the security strength of the first key. After encrypting the message according to the first key, the ciphertext is sent to the broadcast channel, thus protecting the Bluetooth device information from the scanning and discovery stage. This can reduce the possibility of potential attackers without the root key obtaining various data by eavesdropping. By decrypting the obtained message according to the first key, it is possible to determine whether the message comes from a legitimate terminal device that has the root key and can correctly calculate the first key and decrypt the message, and to perform corresponding responses and pairing. Thus, the security of the Bluetooth communication process can be improved.
[0147] In some embodiments, the first generation module 510 is further configured to: Obtain the Bluetooth scan query ciphertext and the third random number sent by the terminal device based on the Bluetooth broadcast ciphertext; If the third random number matches the second random number, the Bluetooth scan query ciphertext is decrypted using the first key to obtain the Bluetooth scan query message.
[0148] In some embodiments, the Bluetooth secure communication device for industrial control equipment based on a security chip further includes a filling module for: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates the first random address of the industrial control device. Fill the address field of the Bluetooth broadcast data packet with the first address random number and the first random address of the industrial control device; Send the Bluetooth broadcast data packet, after filling the address field, to the broadcast channel.
[0149] In some embodiments, the first acquisition module 530 is further configured to: Obtain Bluetooth scan data packets sent by the terminal device based on Bluetooth broadcast encrypted messages; Extract the second address random number, the terminal device's first random address, and the address encryption packet from the address field of the Bluetooth scan data packet; The address encryption packet is decrypted using the first key to obtain the fixed address of the terminal device; Calculate the first verification address based on the second address random number, the fixed address of the terminal device, and the root key; If the first random address and the first verification address of the terminal device match, the Bluetooth scan query ciphertext is extracted from the data payload of the Bluetooth scan data packet, and the fixed address of the terminal device is recorded in the current Bluetooth session.
[0150] In some embodiments, the filling module is further configured to: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. A third address random number is generated by the security chip, and a random address of the industrial control device is generated based on the third address random number, the address key, and the fixed address of the industrial control device. Generate a Bluetooth communication message packet, fill the address field of the Bluetooth communication message packet with the random number of the third address and the random address of the industrial control device, and send the Bluetooth communication message packet with the filled address field to the communication channel to communicate with the terminal device via Bluetooth.
[0151] In some embodiments, the filling module is further configured to: Calculate the address update interval based on the address key; After the address update interval, update the random address of the industrial control equipment.
[0152] In some embodiments, the filling module is further configured to: Calculate the frequency hopping interval duration and target channel frequency based on the address key; After the frequency hopping interval, the system switches to the communication channel corresponding to the target channel frequency.
[0153] The Bluetooth secure communication method for terminal devices based on a security chip provided in this application can be executed by a Bluetooth secure communication device for terminal devices based on a security chip. This application uses the execution of the Bluetooth secure communication method for terminal devices based on a security chip by a Bluetooth secure communication device based on a security chip as an example to illustrate the Bluetooth secure communication device for terminal devices based on a security chip provided in this application.
[0154] This application also provides a Bluetooth secure communication device for terminal devices based on a security chip.
[0155] like Figure 6 As shown, the Bluetooth secure communication device for terminal equipment based on a security chip includes: The second acquisition module 610 is used to listen to the broadcast channel and obtain the Bluetooth broadcast ciphertext and the first random number sent by the industrial control device; the industrial control device stores the root key; calculates the first key based on the root key and the first random number, and decrypts the Bluetooth broadcast ciphertext based on the first key to obtain the Bluetooth broadcast message; The second sending module 620 is used to generate a Bluetooth scan query message based on the Bluetooth broadcast message, encrypt the Bluetooth scan query message according to the first key to obtain the Bluetooth scan query ciphertext, and send the Bluetooth scan query ciphertext to the broadcast channel; The second generation module 630 is used to obtain the Bluetooth scan response ciphertext sent by the industrial control equipment based on the Bluetooth scan query ciphertext, generate a fourth random number through the security chip, and generate a pairing key based on the root key, the first random number and the fourth random number; The second encryption module 640 is used to encrypt the pairing key according to the first key to obtain the pairing key encryption packet, and send the pairing key encryption packet to the broadcast channel; The second pairing module 650 is used to pair with industrial control equipment via Bluetooth according to the pairing key in order to establish a Bluetooth communication connection.
[0156] According to the Bluetooth secure communication device for terminal devices based on a security chip of this application, by encrypting the Bluetooth scan query message according to the first key and sending the obtained Bluetooth scan query ciphertext to the broadcast channel, the possibility of potential attackers without the root key obtaining various data through eavesdropping can be reduced. After obtaining the Bluetooth scan response ciphertext, a pairing key is generated according to the root key, the first random number from the industrial control device and the fourth random number generated by the security chip, and then Bluetooth pairing is performed with the industrial control device according to the pairing key, which can improve the security of the Bluetooth pairing process, thereby improving the security of the Bluetooth communication process.
[0157] In some embodiments, the second transmitting module 620 is further configured to: The third random number is obtained by decrypting the Bluetooth broadcast ciphertext using the first key; Send the third random number and the Bluetooth scan query ciphertext to the broadcast channel.
[0158] In some embodiments, the second acquisition module 610 is further configured to: Listen to the broadcast channel to obtain Bluetooth broadcast data packets sent by industrial control equipment; Extract the first address random number and the first random address of the industrial control device from the address field of the Bluetooth broadcast data packet; Calculate the second verification address based on the first address random number, the root key, and the broadcast fixed address; If the second verification address matches the first random address of the industrial control device, the Bluetooth broadcast ciphertext and the first random number are extracted from the data payload of the Bluetooth broadcast data packet.
[0159] The Bluetooth secure communication device for industrial control equipment and the Bluetooth secure communication device for terminal equipment based on the security chip in this application embodiment can be electronic devices or components within electronic devices, such as integrated circuits or chips. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific type of device.
[0160] The Bluetooth secure communication device for industrial control equipment and the Bluetooth secure communication device for terminal equipment based on the security chip in this application embodiment can be devices with an operating system. This operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0161] In some embodiments, such as Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, it implements the various processes of the above-described embodiments of the Bluetooth secure communication method for industrial control equipment based on a security chip or the Bluetooth secure communication method for terminal equipment based on a security chip, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0162] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0163] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described embodiments of the Bluetooth secure communication method for industrial control equipment based on a security chip or the Bluetooth secure communication method for terminal equipment based on a security chip, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0164] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0165] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described Bluetooth secure communication method for industrial control equipment based on a security chip or a Bluetooth secure communication method for terminal equipment based on a security chip.
[0166] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0167] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described embodiments of the Bluetooth secure communication method for industrial control equipment based on a security chip or the Bluetooth secure communication method for terminal equipment based on a security chip, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0168] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0169] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0171] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0172] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0173] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A Bluetooth secure communication method for industrial control equipment based on a security chip, characterized in that, The industrial control equipment includes a security chip, which stores a root key; the method includes: A first random number is generated using the security chip, and a first key is generated based on the first random number and the root key. The Bluetooth broadcast message is encrypted using the first key to obtain the Bluetooth broadcast ciphertext, and the first random number and the Bluetooth broadcast ciphertext are sent to the broadcast channel. The process involves: acquiring a Bluetooth scan query ciphertext sent by a terminal device based on the Bluetooth broadcast ciphertext, wherein the terminal device stores the root key; decrypting the Bluetooth scan query ciphertext using the first key to obtain a Bluetooth scan query message; generating a Bluetooth scan response message in response to the Bluetooth scan query message and encrypting it using the first key to obtain a Bluetooth scan response ciphertext; and sending the Bluetooth scan response ciphertext to the broadcast channel. The pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext is obtained, and the pairing key is decrypted according to the first key; Based on the pairing key, Bluetooth pairing is performed with the terminal device to establish a Bluetooth communication connection.
2. The method according to claim 1, characterized in that, The Bluetooth broadcast message includes a second random number generated by the security chip; the acquisition terminal device sends a Bluetooth scan query ciphertext based on the Bluetooth broadcast ciphertext, and decrypts the Bluetooth scan query ciphertext according to the first key to obtain a Bluetooth scan query message, including: Obtain the Bluetooth scan query ciphertext and the third random number sent by the terminal device based on the Bluetooth broadcast ciphertext; If the third random number matches the second random number, the Bluetooth scan query ciphertext is decrypted using the first key to obtain the Bluetooth scan query message.
3. The method according to claim 1, characterized in that, Sending the first random number and the Bluetooth broadcast ciphertext to the broadcast channel includes: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates a first random address for the industrial control device. The address field of the Bluetooth broadcast data packet is filled according to the first address random number and the first random address of the industrial control device; The Bluetooth broadcast data packet, after being filled with the address field, is sent to the broadcast channel.
4. The method according to claim 3, characterized in that, According to the formula: RA = Hash(Nonce_RA || Key_Root || Address_ID) Generate the first random address of the industrial control equipment; Wherein, RA represents the first random address of the industrial control equipment, Hash() is a cryptographic hash algorithm, Key_Root is the root key, and Address_ID represents the fixed broadcast address.
5. The method according to claim 1, characterized in that, The acquisition of the Bluetooth scan query ciphertext sent by the terminal device based on the Bluetooth broadcast ciphertext includes: Obtain the Bluetooth scan data packet sent by the terminal device based on the Bluetooth broadcast ciphertext; Extract the second address random number, the first random address of the terminal device, and the address encryption packet from the address field of the Bluetooth scan data packet; The address encryption packet is decrypted using the first key to obtain the fixed address of the terminal device; The first verification address is calculated based on the second address random number, the fixed address of the terminal device, and the root key; If the first random address and the first verification address of the terminal device match, the Bluetooth scan query ciphertext is extracted from the data payload of the Bluetooth scan data packet, and the fixed address of the terminal device is recorded in the current Bluetooth session.
6. The method according to claim 1, characterized in that, The method further includes: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. The security chip generates a third address random number, and the industrial control device generates a random address based on the third address random number, the address key, and the fixed address of the industrial control device. A Bluetooth communication message packet is generated, and the address field of the Bluetooth communication message packet is filled according to the third address random number and the random address of the industrial control device. The Bluetooth communication message packet with the address field filled is then sent to the communication channel to communicate with the terminal device via Bluetooth.
7. The method according to claim 6, characterized in that, The method further includes: Calculate the address update interval based on the address key; After the specified address update interval, the random address of the industrial control device is updated.
8. The method according to claim 7, characterized in that, According to the formula: AUI = Hash(Key_AR) mod 900 Calculate the address update interval duration; Where AUI represents the address update interval, Hash() is the cryptographic hash algorithm, and Key_AR is the address key.
9. The method according to claim 6, characterized in that, The method further includes: Calculate the frequency hopping interval duration and the target channel frequency based on the address key; After the specified frequency hopping interval, the system switches to the communication channel corresponding to the target channel frequency.
10. A Bluetooth secure communication method for terminal devices based on a security chip, characterized in that, The terminal device includes a security chip, which stores a root key; the method includes: The system monitors the broadcast channel to obtain the Bluetooth broadcast ciphertext and a first random number sent by the industrial control device; the industrial control device stores the root key; a first key is calculated based on the root key and the first random number, and the Bluetooth broadcast ciphertext is decrypted based on the first key to obtain the Bluetooth broadcast message; Based on the Bluetooth broadcast message, a Bluetooth scan query message is generated, and the Bluetooth scan query message is encrypted using the first key to obtain Bluetooth scan query ciphertext; the Bluetooth scan query ciphertext is then sent to the broadcast channel. After obtaining the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, a fourth random number is generated through the security chip, and a pairing key is generated based on the root key, the first random number and the fourth random number; The pairing key is encrypted according to the first key to obtain a pairing key encryption packet, and the pairing key encryption packet is sent to the broadcast channel; Based on the pairing key, Bluetooth pairing is performed with the industrial control equipment to establish a Bluetooth communication connection.
11. The method according to claim 10, characterized in that, The step of sending the Bluetooth scan query ciphertext to the broadcast channel further includes: The third random number is obtained by decrypting the Bluetooth broadcast ciphertext using the first key. The third random number and the Bluetooth scan query ciphertext are sent to the broadcast channel.
12. The method according to claim 10, characterized in that, The monitoring broadcast channel obtains the Bluetooth broadcast ciphertext sent by the industrial control equipment and a first random number, including: Listen to the broadcast channel to obtain the Bluetooth broadcast data packets sent by the industrial control equipment; Extract the first address random number and the first random address of the industrial control device from the address field of the Bluetooth broadcast data packet; Calculate the second verification address based on the first address random number, the root key, and the broadcast fixed address; If the second verification address matches the first random address of the industrial control device, the Bluetooth broadcast ciphertext and the first random number are extracted from the data payload portion of the Bluetooth broadcast data packet.
13. A Bluetooth secure communication device for industrial control equipment based on a security chip, characterized in that, The industrial control equipment includes a security chip, which stores a root key; the device includes: The first generation module is used to generate a first random number through the security chip, and generate a first key based on the first random number and the root key; The first sending module is configured to encrypt a Bluetooth broadcast message according to the first key to obtain Bluetooth broadcast ciphertext, and send the first random number and the Bluetooth broadcast ciphertext to the broadcast channel; The first acquisition module is configured to acquire a Bluetooth scan query ciphertext sent by a terminal device based on the Bluetooth broadcast ciphertext, wherein the terminal device stores the root key; decrypt the Bluetooth scan query ciphertext according to the first key to obtain a Bluetooth scan query message; generate a Bluetooth scan response message in response to the Bluetooth scan query message, and encrypt it according to the first key to obtain a Bluetooth scan response ciphertext; and send the Bluetooth scan response ciphertext to the broadcast channel. The first decryption module is used to obtain the pairing key encryption packet sent by the terminal device after receiving the Bluetooth scan response ciphertext, and to decrypt it according to the first key to obtain the pairing key; The first pairing module is used to pair with the terminal device via Bluetooth according to the pairing key in order to establish a Bluetooth communication connection.
14. The apparatus according to claim 13, characterized in that, The first sending module is further configured to: The first random number and the Bluetooth broadcast ciphertext are used as the data payload to generate a Bluetooth broadcast data packet; The security chip generates a first address random number, and based on the first address random number, the root key, and the broadcast fixed address, generates a first random address for the industrial control device. The address field of the Bluetooth broadcast data packet is filled according to the first address random number and the first random address of the industrial control device; The Bluetooth broadcast data packet, after being filled with the address field, is sent to the broadcast channel.
15. The apparatus according to claim 13, characterized in that, The device further includes a filling module for: After establishing Bluetooth pairing with the terminal device, an address key is generated based on the pairing key, the first pairing random number generated by the security chip, and the second pairing random number sent by the terminal device. The security chip generates a third address random number, and the industrial control device generates a random address based on the third address random number, the address key, and the fixed address of the industrial control device. A Bluetooth communication message packet is generated, and the address field of the Bluetooth communication message packet is filled according to the third address random number and the random address of the industrial control device. The Bluetooth communication message packet with the address field filled is then sent to the communication channel to communicate with the terminal device via Bluetooth.
16. A Bluetooth secure communication device for terminal equipment based on a security chip, characterized in that, The terminal device includes a security chip, which stores a root key; the apparatus includes: The second acquisition module is used to listen to the broadcast channel, obtain the Bluetooth broadcast ciphertext sent by the industrial control device and a first random number; the industrial control device stores the root key; calculates the first key based on the root key and the first random number, and decrypts the Bluetooth broadcast ciphertext based on the first key to obtain the Bluetooth broadcast message; The second sending module is configured to generate a Bluetooth scan query message based on the Bluetooth broadcast message, encrypt the Bluetooth scan query message based on the first key to obtain Bluetooth scan query ciphertext, and send the Bluetooth scan query ciphertext to the broadcast channel; The second generation module is used to obtain the Bluetooth scan response ciphertext sent by the industrial control device based on the Bluetooth scan query ciphertext, generate a fourth random number through the security chip, and generate a pairing key based on the root key, the first random number and the fourth random number; The second encryption module is used to encrypt the pairing key according to the first key to obtain a pairing key encryption packet, and send the pairing key encryption packet to the broadcast channel; The second pairing module is used to pair with the industrial control equipment via Bluetooth according to the pairing key, so as to establish a Bluetooth communication connection.
17. An industrial control device, characterized in that, It includes a security chip and a controller; the security chip stores a root key; the controller is used to perform the method as described in any one of claims 1-9.
18. A terminal device, characterized in that, It includes a security chip and a controller; the security chip stores a root key; the controller is used to perform the method as described in any one of claims 10-12.
19. A Bluetooth secure communication system, comprising industrial control equipment and terminal equipment, characterized in that, The industrial control equipment and the terminal equipment include a security chip and a controller, wherein the security chip stores a root key; the controller of the industrial control equipment is used to execute the Bluetooth secure communication method for industrial control equipment based on the security chip as described in any one of claims 1-9; the controller of the terminal equipment is used to execute the Bluetooth secure communication method for terminal equipment based on the security chip as described in any one of claims 10-12.
20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the Bluetooth secure communication method for industrial control equipment based on a security chip as described in any one of claims 1-9, or the Bluetooth secure communication method for terminal equipment based on a security chip as described in any one of claims 10-12.