Low power bluetooth module application layer lightweight chaotic encryption method

CN122970494APending Publication Date: 2026-10-23GUANGDONG PAK CORP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611119544.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]目前,轻量型蓝牙模块的通信安全主要依赖其原生链路层AES加密机制,该加密机制虽能提供基础的窃听防护,但存在明显的局限性:一方面,单一AES加密体系的密钥易被针对性分析,面对暴力破解、中间人攻击等复杂攻击手段时,防护能力不足,难以满足智能设备数据传输的高安全需求;另一方面,轻量型蓝牙模块的硬件资源有限,MCU主频、RAM及Flash容量较低,无法支持复杂的底层协议栈改造,若采用传统的应用层加密算法(如RSA、复杂AES变体),会导致加密耗时增加、功耗上升,影响蓝牙通信的实时性和模块续航

Benefits of technology

1.本加密方法基于简单忆阻混沌系统,融合向量化分组插入置乱、链式扩散机制完成数据加密。该方法运算量小、硬件资源开销低,可适配资源受限的轻量化蓝牙模块;同时通过位置置乱与数值扩散打破数据关联,结合忆阻混沌系统良好的随机特性,有效提升数据抗攻击能力,兼顾低功耗运行与高安全防护需求;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122970494A_ABST
    Figure CN122970494A_ABST
Patent Text Reader

Abstract

The application discloses a low-power-consumption Bluetooth module application layer light chaos encryption method, and comprises the following steps: establishing a memristor chaos system, and obtaining chaos system parameters of a Bluetooth sending end and a Bluetooth receiving end; substituting the chaos system parameters into the memristor chaos system to generate five chaos sequences; designing a sequence selector based on a device MAC address to randomly select two chaos sequences from the five chaos sequences as final key streams; obtaining chaos encryption data; obtaining secondary encryption data through secondary encryption of the Bluetooth sending end original link layer AES; calling the same chaos sequence as the Bluetooth sending end to generate a chaos key stream synchronized with the Bluetooth sending end, performing XOR operation on the chaos encryption data and the synchronized chaos key stream, completing decryption and restoring original data. The application realizes double protection of link layer AES encryption and application layer chaos encryption by deploying chaos encryption in the application layer, and the security is significantly enhanced, so that the application can effectively resist risks such as man-in-the-middle attacks and data tampering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Bluetooth communication encryption, and specifically to a lightweight chaotic encryption method for the application layer of a low-power Bluetooth module. Background Technology

[0002] With the rapid development of smart homes and the consumer electronics industry, Bluetooth modules, as core components for short-range communication, are receiving increasing attention for their communication security. Lightweight Bluetooth modules, with their advantages of low cost and low power consumption, are widely used in consumer electronics fields such as smart lighting, sensors, and small control devices.

[0003] Currently, the communication security of lightweight Bluetooth modules mainly relies on their native link-layer AES encryption mechanism. While this encryption mechanism can provide basic protection against eavesdropping, it has significant limitations: On the one hand, the keys of a single AES encryption system are easily analyzed in a targeted manner, and its protection capability is insufficient against complex attack methods such as brute-force attacks and man-in-the-middle attacks, making it difficult to meet the high security requirements of data transmission in smart devices; on the other hand, lightweight Bluetooth modules have limited hardware resources, with low MCU clock speed, RAM, and Flash capacity, which cannot support complex modifications to the underlying protocol stack. If traditional application-layer encryption algorithms (such as RSA and complex AES variants) are used, it will lead to increased encryption time and power consumption, affecting the real-time performance of Bluetooth communication and the module's battery life.

[0004] Chaotic encryption technology, with its strong pseudo-randomness, high sensitivity to initial values, and lightweight algorithms, is widely used in the field of communication encryption. Its core advantage lies in the fact that chaotic sequences can lead to completely different sequences under slight differences in initial values ​​or parameters, significantly improving the key's resistance to cracking. At the same time, lightweight chaotic algorithms have small code size, fast operation speed, and do not require excessive hardware resources, making them suitable for deployment in the application layer of lightweight Bluetooth modules.

[0005] In existing technologies, the application of chaotic encryption in Bluetooth modules is mostly aimed at general-purpose Bluetooth chips, and often requires modification of the underlying protocol stack. This makes it difficult to directly adapt to the hardware characteristics and SDK architecture of lightweight Bluetooth modules, resulting in poor adaptability, high development difficulty, and an inability to balance security and real-time performance. Therefore, there is an urgent need for an application-layer chaotic encryption implementation method that does not require modification of the native protocol of lightweight Bluetooth modules, adapts to their hardware resources, and can be quickly deployed to address the shortcomings of existing encryption schemes. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a lightweight chaotic encryption method for the application layer of a low-power Bluetooth module that can improve communication security, real-time performance, and adaptability.

[0007] This invention is achieved through the following technical solution: A lightweight chaotic encryption method for the application layer of a low-power Bluetooth module includes the following steps: Step (1): Establish a memristor chaotic system, obtain the chaotic system parameters of the Bluetooth transmitter and Bluetooth receiver, and pre-synchronize and solidify the chaotic system parameters in the MCUs of the Bluetooth transmitter and Bluetooth receiver respectively. Step (2): Substitute the chaotic system parameters fixed in the Bluetooth transmitter into the memristor chaotic system to generate five chaotic sequences, and map the chaotic sequences into a chaotic byte stream of 0~255; Step (3): Design a chaotic sequence selector to randomly select two chaotic byte streams from the five chaotic byte streams generated in step (2) as the final chaotic key stream; Step (4): At the application layer of the Bluetooth transmitter, the original data to be transmitted is first scrambled, and then the original byte stream is XORed with the chaotic key stream to obtain chaotic encrypted data. Step (5): Encapsulate the chaotic encrypted data into a Bluetooth ATT / GATT data packet, and then encrypt it twice using the native link layer AES of the Bluetooth transmitter to obtain the second encrypted data, which is then transmitted to the Bluetooth receiver. Step (6): The Bluetooth receiver receives the secondary encrypted data, first strips the original AES encryption by using the link layer decryption algorithm, parses the application layer ATT / GATT data packet, and extracts the chaotic encrypted data in the packet. Then, by calling the same chaotic sequence as the Bluetooth transmitter, it generates a chaotic key stream synchronized with the Bluetooth transmitter, performs an XOR operation on the chaotic encrypted data and the synchronized chaotic key stream, completes the decryption and restores the original data.

[0008] The memristor chaotic system in step (1) is:

[0009] in: x , y and z It is the system's state variable. a and b For system parameters, Let be the magnetic flux variable, a positive real number. These are the internal parameters of the memristor; The system parameters of the Bluetooth transmitter and receiver are a=1.5, b=0.6, β=1.5. The initial value of the Bluetooth transmitter system is (x0,0,0,0), where the initial condition x0 is generated based on the unique MAC address of each Bluetooth transmitter to ensure that each Bluetooth transmitter has a unique initial key. The system parameters and initial conditions are hard-programmed into the MCU Flash of the Bluetooth transmitter and receiver to ensure that the parameters of the transmitter and receiver are consistent and to achieve pre-synchronization.

[0010] Step (2) includes the following steps: First, calculate the length of the original data byte stream to be transmitted, assuming the length is L. Then, input the fixed chaotic system parameters into the memristor chaotic system to generate five chaotic sequences S of length L / 2. i ={S 1, S2,...,S5}; Then map these five chaotic sequences into a chaotic byte stream of 0 to 255.

[0011] The chaotic sequence is generated in the following way: The system parameters fixed in the Bluetooth transmitter are substituted into the memristor chaotic system for iterative calculation. To eliminate the influence of transient effects, the results of the first 10,000 iterations are discarded, and five chaotic byte streams S of length L / 2 are generated according to the following formula. i ,

[0012] in: This indicates taking the absolute value. Indicates rounding down. This represents the XOR operation.

[0013] The mapping method for the chaotic sequence is as follows:

[0014] in: This indicates the modulo operation.

[0015] In step (3), the MAC address of the Bluetooth transmitter is obtained, and a chaotic sequence selector is designed based on the MAC address of the Bluetooth transmitter. Two chaotic byte streams are randomly selected from five chaotic byte streams to form a chaotic byte stream of length L as the final chaotic key stream. The design method of the chaotic sequence selector is as follows:

[0016] in: N 1. N 2 represents the index value of the chaotic sequence. K This represents a chaotic key stream of length L consisting of two chaotic byte streams.

[0017] Step (4) includes the following steps: First, the obtained chaotic byte stream is used to vectorize and scramble the original data to be transmitted, resulting in preliminary encrypted data. At this point, the original data can be well hidden. Next, the first byte of the scrambled encrypted data is XORed with the first byte of the chaotic keystream. The generation of the subsequent 2 to L ciphertext bytes will be affected by the previous ciphertext byte, ultimately resulting in chaotic encrypted data. The specific implementation method is as follows:

[0018] in: M Data Represents a ciphertext byte stream, Y Data This represents the raw byte stream.

[0019] Step (5) includes the following steps: The Bluetooth transmitter first encapsulates the encrypted data into a Bluetooth ATT / GATT data packet at the Bluetooth module application layer; The Bluetooth transmitter then performs native AES secondary encryption protection at the Bluetooth module link layer before finally sending the encrypted data to the Bluetooth receiver.

[0020] Step (6) includes the following steps: First, the native AES encryption is stripped away using a link-layer decryption algorithm to parse the application-layer ATT / GATT data packets and extract the chaotic encrypted data within the packets. Then, the chaotic system parameters embedded in the Bluetooth receiver MCU are called and the MAC address of the Bluetooth transmitter is obtained. The chaotic key stream is generated using the same chaotic sequence selector as the Bluetooth transmitter. The unstable data from the first 10,000 iterations are discarded to obtain the same chaotic key stream as the Bluetooth transmitter. The extracted chaotic encrypted data is XORed with the chaotic keystream to obtain scrambled encrypted data. Then, based on the index mapping relationship corresponding to the synchronous chaotic sequence, a vectorized group insertion inverse scrambling operation is performed to restore the original arrangement order of the data, completely removing the dual protection of application-layer chaotic encryption and position scrambling, and restoring the original data originally transmitted by the device.

[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. This encryption method is based on a simple memristor chaotic system, integrating vectorized group insertion scrambling and chain diffusion mechanisms to complete data encryption. This method has low computational complexity and low hardware resource overhead, and can be adapted to lightweight Bluetooth modules with limited resources; at the same time, by breaking data correlation through position scrambling and numerical diffusion, combined with the good randomness of the memristor chaotic system, it effectively improves the data's resistance to attacks, taking into account both low power consumption and high security protection requirements; 2. No need to modify the native protocol stack of the Bluetooth module (such as AW313A), only deploy chaotic encryption code at the application layer, resulting in low development cost, rapid deployment, full compatibility with the module's native functions and SDK architecture, and adaptation to the hardware resources of lightweight Bluetooth modules. This solves the problems of poor adaptability and high development difficulty of existing chaotic encryption solutions. 3. Achieve dual protection of link layer AES encryption and application layer chaotic encryption for Bluetooth modules. The initial value sensitivity and pseudo-randomness of chaotic sequences greatly improve the key's resistance to brute-force attacks and eavesdropping. Compared with single AES encryption, the security is significantly enhanced, and it can effectively resist risks such as man-in-the-middle attacks and data tampering. 4. Design a selector that combines the MAC address within the Bluetooth module to randomly select two sets from five chaotic sequences to form a chaotic byte stream, significantly improving anti-hacking capabilities; 5. The parameters of the chaotic system can be customized in conjunction with the MAC address of the Bluetooth module. Each Bluetooth device has a unique key, which further enhances encryption security. At the same time, the parameters can be encrypted and transmitted through hardware programming or pairing to avoid parameter leakage. 6. It adapts to the needs of smart home, consumer electronics and other scenarios, and can be directly ported to the transparent transmission project of lightweight Bluetooth modules. It is highly practical and scalable, without the need to increase the additional hardware cost, and is easy to mass-produce. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of the lightweight chaotic encryption method for the application layer of the low-power Bluetooth module of the present invention.

[0024] Figure 2 This is a graph showing the initial key sensitivity of the lightweight chaotic encryption method for the application layer of the low-power Bluetooth module of the present invention.

[0025] Figure 3 This is a flowchart illustrating the vectorized group insertion scrambling process of the lightweight chaotic encryption method for the application layer of the low-power Bluetooth module of this invention.

[0026] In the picture: Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] like Figure 1 The present invention discloses a lightweight chaotic encryption method for the application layer of a low-power Bluetooth module, comprising the following steps: Step (1): Establish a memristor chaotic system, obtain the chaotic system parameters of the Bluetooth transmitter and Bluetooth receiver, and pre-synchronize and solidify the chaotic system parameters in the MCUs of the Bluetooth transmitter and Bluetooth receiver respectively; Step (2): Substitute the chaotic system parameters fixed in the Bluetooth transmitter into the memristor chaotic system to generate five chaotic sequences, and map the chaotic sequences into a chaotic byte stream of 0~255; Step (3): Design a chaotic sequence selector to randomly select two chaotic byte streams from the five chaotic byte streams generated in step (2) as the final chaotic key stream; Step (4): At the application layer of the Bluetooth transmitter, the original data to be transmitted is first scrambled, and then the original byte stream and the chaotic key stream are XORed to obtain the chaotic encrypted data. Step (5): Encapsulate the chaotic encrypted data into a Bluetooth ATT / GATT data packet, and then encrypt it twice using the native link layer AES of the Bluetooth transmitter to obtain the double-encrypted data, which is then transmitted to the Bluetooth receiver. Step (6): The Bluetooth receiver receives the secondary encrypted data. First, the link layer decryption algorithm strips the original AES encryption, parses the application layer ATT / GATT data packet, and extracts the chaotic encrypted data in the packet. Then, by calling the same chaotic sequence as the Bluetooth transmitter, a chaotic key stream synchronized with the Bluetooth transmitter is generated. The chaotic encrypted data and the synchronized chaotic key stream are XORed to complete the decryption and restore the original data.

[0029] like Figure 2 As shown, this invention first constructs a memristor chaotic system with a simple structure and rich dynamic characteristics. This memristor chaotic system combines super multi-steady states with strong initial sensitivity, even when the initial conditions are only 10. -14Under minute perturbations, two completely independent chaotic sequences can be obtained. Furthermore, the memristor chaotic system equations consist of six terms, with only one nonlinear term. This significantly reduces the computational complexity of the system while maintaining excellent chaotic dynamics characteristics, facilitating iterative computation in low-power MCUs. To generate high-complexity chaotic sequences, optimal system parameters are determined and pre-synchronized within the MCUs of both the Bluetooth module's transceiver. To ensure unique device keys and enhance encryption security, the Bluetooth device's MAC address is used as the tracing basis to generate the initial values ​​of the system state variables. Subsequently, the chaotic system is started under the parameters and initial conditions, iteratively obtaining five sets of chaotic sequences, each of length L / 2. Combining the byte stream transmission characteristics of the Bluetooth application layer, numerical mapping is performed to convert the floating-point chaotic sequences into chaotic byte streams of 0-255. A selection controller is designed to randomly select two sets from the five chaotic byte streams as the final encryption key stream. In the application layer, the data to be transmitted is scrambled, and the scrambled encrypted data is XORed with the chaotic key streams to obtain the final encrypted data. The data is then encapsulated into Bluetooth ATT / GATT data packets and transmitted to the receiving end using AES encryption at the Bluetooth module's native link layer. The receiving end obtains a chaotic sequence synchronized with the sending end by calling the same chaotic sequence generation parameters as the sending end. The decryption process is the reverse of the sending end's encryption process.

[0030] The memristor chaotic system in step (1) is:

[0031] in: x , y and z It is the system's state variable. a and b For system parameters, Let be the magnetic flux variable, a positive real number. These are the internal parameters of the memristor; The system parameters for the Bluetooth transmitter and receiver are a=1.5, b=0.6, and β=1.5. The initial value of the Bluetooth transmitter system is (x0,0,0,0), where the initial condition x0 is generated based on the unique MAC address of each Bluetooth transmitter, ensuring that each Bluetooth transmitter has a unique initial key, further enhancing its anti-hacking capability. Assuming the module's MAC address is 00:11:22:33:44:55, then... x 0=0.3f + (0x44×0.001f) + (0x55×0.0001f)=0.3f+0.068f+0.0085f=0.3765f.

[0032] The system parameters and initial conditions are programmed into the MCU Flash of the Bluetooth transmitter and receiver via hardware to ensure that the parameters of the transmitter and receiver are consistent and to achieve pre-synchronization.

[0033] Step (2) includes the following steps: First, calculate the length of the original data byte stream to be transmitted, assuming the length is L. Then, input the fixed chaotic system parameters into the memristor chaotic system to generate five chaotic sequences S of length L / 2. i ={S 1, S2,...,S5}; Each chaotic sequence has good randomness and initial sensitivity, providing a secure and reliable foundation for subsequent encryption operations.

[0034] Then map these five chaotic sequences into a chaotic byte stream of 0 to 255.

[0035] The chaotic sequence is generated in the following way: The system parameters fixed in the Bluetooth transmitter are substituted into the memristor chaotic system for iterative calculation. To eliminate the influence of transient effects, the results of the first 10,000 iterations are discarded, and five chaotic byte streams S of length L / 2 are generated according to the following formula. i In this example, the following strategy was adopted to generate five completely independent chaotic sequences: the first four sequences were obtained by extracting L / 2 iteration data points from the results of 10,000 iterations of the four state variables of the system; the fifth sequence was obtained by taking the absolute value of the first two chaotic sequences, then taking the integer value, and finally performing an XOR operation. The specific operation method is shown in the following formula:

[0036] in: This indicates taking the absolute value. Indicates rounding down. This represents the XOR operation.

[0037] To transform five chaotic sequences into a standard byte stream and ensure the output values ​​are within the range of 0-255 bytes, firstly, all negative values ​​are eliminated using absolute value operations to ensure the data is non-negative; then, the floor function is used to convert the floating-point values ​​into integers; finally, a modulo operation of 256 is performed on the values ​​to map the result to the target byte range. The mapping method for the chaotic sequences is as follows:

[0038] in: This indicates the modulo operation.

[0039] In step (3), to further improve the randomness of the chaotic sequence and enhance the security of encryption, the MAC address of the Bluetooth transmitter is obtained. Based on the MAC address of the Bluetooth transmitter, a chaotic sequence selector is designed to randomly select two chaotic byte streams from five chaotic byte streams to form a chaotic byte stream of length L as the final chaotic key stream. The design method of the chaotic sequence selector is as follows:

[0040] in: N 1. N 2 represents the index value of the chaotic sequence. K This represents a chaotic key stream of length L consisting of two chaotic byte streams.

[0041] Step (4) includes the following steps: like Figure 3 As shown, the obtained chaotic byte stream is first used to vectorize and scramble the original data to be transmitted, resulting in preliminary encrypted data. At this point, the original data can be well hidden. The original data is divided into two groups, D1 and D2. Using a chaotic sequence generated by a memristor chaotic system, combined with vector operations, the temporary position of each element to be inserted in the dynamic sequence is pre-calculated. Then, based on the positional offset caused by the insertion, the absolute coordinates of each element in the final sequence are calculated. Subsequently, the data position set is divided, and the two groups of data are batch-filled into the result sequence according to the pre-calculated positions. The specific operation method is as follows: 1. Data Grouping Definition The original data is split into two subsequences, D1 and D2.

[0042] 2: Vector pre-calculation of position information Define index sequence W= {0,1,..., n -1}, calculate all position parameters uniformly through vector operations: 1. Calculate the length vector of the dynamic vector: T = m + W element-wise representation t k = m + k ( k =0,1,..., n -1); 2. Calculate the temporary insertion position vector: ,in For the Hadamard product, element-wise representation is: ,and ; 3. Calculate the final absolute position vector: element-wise representation ; 3: Divide the position set Define the set of all indices of a sequence: ; The sequence to be inserted is obtained from the absolute position vector. D 2d Location set:

[0043] Take the complement of the set to obtain the main sequence. D The set of positions of 1: ; 4: Batch filling to generate scrambled sequences Set the scrambled output sequence as follows: Complete data filling according to the location set relationship:

[0044] After the filling is complete, Y Data This is the final result of the disorder.

[0045] Next, the first byte of the scrambled encrypted data is XORed with the first byte of the chaotic keystream. The generation of the subsequent 2 to L ciphertext bytes will be affected by the previous ciphertext byte, so that the current ciphertext byte is simultaneously associated with the preceding ciphertext, the current chaotic keystream byte, and the plaintext byte, realizing the global diffusion of plaintext information and the chain dependency of ciphertext, and finally obtaining chaotic encrypted data. The specific implementation method is as follows:

[0046] in: M Data Represents a ciphertext byte stream, Y Data This represents the raw byte stream.

[0047] This encrypted chain-dependent method achieves global diffusion of the original information, effectively destroying the statistical characteristics and patterns in the original information, and significantly improving the ability to resist frequency analysis attacks, known-plaintext attacks and differential attacks. On the other hand, the byte-level streaming processing of this scheme does not require grouping and padding, and the core operation is only XOR operation, which ensures high security while also having the advantages of low implementation cost and high processing efficiency.

[0048] Step (5) includes the following steps: The Bluetooth transmitter first encapsulates the encrypted data into Bluetooth ATT / GATT data packets at the Bluetooth module's application layer. Specifically, the Bluetooth transmitter encapsulates the data, after application-layer chaotic encryption, into standard Bluetooth communication data packets conforming to the ATT / GATT general attribute specifications, relying on preset Bluetooth service channels and feature channels to standardize the data format. The standardized data packets, after protocol encapsulation, are automatically sent to the Bluetooth module's internal link layer.

[0049] The Bluetooth transmitter then performs native AES secondary encryption protection at the Bluetooth module link layer before finally sending the encrypted data to the Bluetooth receiver. That is, the Bluetooth transmitter module's internal link layer calls the module's native AES encryption mechanism to perform secondary encryption protection on the entire data packet. Finally, the Bluetooth module sends the double-encrypted data packet to the remote receiving device's Bluetooth receiver via a wireless radio frequency signal according to the Bluetooth connection timing rules.

[0050] Step (6) includes the following steps: First, the native AES encryption is stripped away using a link-layer decryption algorithm to parse the application-layer ATT / GATT data packets and extract the chaotic encrypted data within the packets. In other words, the Bluetooth receiver listens in real-time and receives encrypted Bluetooth data packets transmitted within the wireless frequency band. After data reception, the receiver's built-in native decryption program is invoked to decrypt the link-layer AES encrypted data, removing the link-layer encryption protection. Subsequently, the Bluetooth protocol stack automatically performs ATT / GATT protocol data packet decapsulation, extracting the internal application-layer chaotic encrypted data, and uploading this chaotic encrypted data to the MCU application layer for decryption processing.

[0051] Then, the chaotic system parameters embedded in the Bluetooth receiver MCU are called and the MAC address of the Bluetooth transmitter is obtained. The same chaotic sequence selector as the Bluetooth transmitter is used to generate a chaotic key stream. The unstable data of the first 10,000 iterations are discarded to obtain the same chaotic key stream as the Bluetooth transmitter. That is, the Bluetooth receiver MCU calls the chaotic system operating parameters and the MAC address of the transmitter device that are completely consistent with the transmitter and are pre-synchronized and embedded. It strictly follows the same chaotic iteration operation logic, resets the initial state of the chaotic system, and generates a pseudo-random chaotic key stream that is completely synchronized with the encryption process of the transmitter.

[0052] The extracted chaotic encrypted data is XORed with the chaotic keystream to obtain scrambled encrypted data. Then, based on the index mapping relationship corresponding to the synchronous chaotic sequence, a vectorized block insertion inverse scrambling operation is performed to restore the original data arrangement order, completely removing the dual protection of application-layer chaotic encryption and position scrambling, and restoring the original data originally transmitted by the device. The extracted chaotic encrypted data is XORed byte by byte with the locally generated synchronous chaotic keystream. Relying on the symmetric and reversible property of XOR operation, scrambled encrypted data is obtained. Then, based on the index mapping relationship corresponding to the synchronous chaotic sequence, a vectorized block insertion inverse scrambling operation is performed to restore the original data arrangement order, completely removing the dual protection of application-layer chaotic encryption and position scrambling, and restoring the original business data originally transmitted by the sending device. Finally, the restored original data is pushed to the business processing layer of the receiving device to complete subsequent business operations such as instruction execution, data storage, and status feedback.

[0053] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A lightweight chaotic encryption method for the application layer of a low-power Bluetooth module, characterized in that: Includes the following steps, Step (1): Establish a memristor chaotic system, obtain the chaotic system parameters of the Bluetooth transmitter and Bluetooth receiver, and pre-synchronize and solidify the chaotic system parameters in the MCUs of the Bluetooth transmitter and Bluetooth receiver respectively. Step (2): Substitute the chaotic system parameters fixed in the Bluetooth transmitter into the memristor chaotic system to generate five chaotic sequences, and map the chaotic sequences into a chaotic byte stream of 0~255; Step (3): Design a chaotic sequence selector to randomly select two chaotic byte streams from the five chaotic byte streams generated in step (2) as the final chaotic key stream; Step (4): At the application layer of the Bluetooth transmitter, the original data to be transmitted is first scrambled, and then the original byte stream is XORed with the chaotic key stream to obtain chaotic encrypted data. Step (5): Encapsulate the chaotic encrypted data into a Bluetooth ATT / GATT data packet, and then encrypt it twice using the native link layer AES of the Bluetooth transmitter to obtain the second encrypted data, which is then transmitted to the Bluetooth receiver. Step (6): The Bluetooth receiver receives the secondary encrypted data, first strips the original AES encryption by using the link layer decryption algorithm, parses the application layer ATT / GATT data packet, and extracts the chaotic encrypted data in the packet. Then, by calling the same chaotic sequence as the Bluetooth transmitter, it generates a chaotic key stream synchronized with the Bluetooth transmitter, performs an XOR operation on the chaotic encrypted data and the synchronized chaotic key stream, completes the decryption and restores the original data.

2. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 1, characterized in that: The memristor chaotic system in step (1) is: in: x , y and z It is the system's state variable. a and b For system parameters, Let be the magnetic flux variable, a positive real number. These are the internal parameters of the memristor; The system parameters of the Bluetooth transmitter and receiver are a=1.5, b=0.6, β=1.

5. The initial value of the Bluetooth transmitter system is (x0,0,0,0), where the initial condition x0 is generated based on the unique MAC address of each Bluetooth transmitter to ensure that each Bluetooth transmitter has a unique initial key. The system parameters and initial conditions are hard-programmed into the MCU Flash of the Bluetooth transmitter and receiver to ensure that the parameters of the transmitter and receiver are consistent and to achieve pre-synchronization.

3. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 1, characterized in that: Step (2) includes the following steps: First, calculate the length of the original data byte stream to be transmitted, assuming the length is L. Then, input the fixed chaotic system parameters into the memristor chaotic system to generate five chaotic sequences S of length L / 2. i ={S 1, S2,...,S5}; Then map these five chaotic sequences into a chaotic byte stream of 0 to 255.

4. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 3, characterized in that: The chaotic sequence is generated in the following way: The system parameters fixed in the Bluetooth transmitter are substituted into the memristor chaotic system for iterative calculation. To eliminate the influence of transient effects, the results of the first 10,000 iterations are discarded, and five chaotic byte streams S of length L / 2 are generated according to the following formula. i , in: This indicates taking the absolute value. Indicates rounding down. This represents the XOR operation.

5. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 3, characterized in that: The mapping method for the chaotic sequence is as follows: in: This indicates the modulo operation.

6. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 3, characterized in that: In step (3), the MAC address of the Bluetooth transmitter is obtained, and a chaotic sequence selector is designed based on the MAC address of the Bluetooth transmitter. Two chaotic byte streams are randomly selected from five chaotic byte streams to form a chaotic byte stream of length L as the final chaotic key stream. The design method of the chaotic sequence selector is as follows: in: N 1. N 2 represents the index value of the chaotic sequence. K This represents a chaotic key stream of length L consisting of two chaotic byte streams.

7. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 3, characterized in that: Step (4) includes the following steps: First, the obtained chaotic byte stream is used to vectorize and scramble the original data to be transmitted, resulting in preliminary encrypted data. At this point, the original data can be well hidden. Next, the first byte of the scrambled encrypted data is XORed with the first byte of the chaotic keystream. The generation of the subsequent 2 to L ciphertext bytes will be affected by the previous ciphertext byte, ultimately resulting in chaotic encrypted data. The specific implementation method is as follows: in: M Data Represents a ciphertext byte stream, Y Data This represents the raw byte stream.

8. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 1, characterized in that: Step (5) includes the following steps: The Bluetooth transmitter first encapsulates the encrypted data into a Bluetooth ATT / GATT data packet at the Bluetooth module application layer; The Bluetooth transmitter then performs native AES secondary encryption protection at the Bluetooth module link layer before finally sending the encrypted data to the Bluetooth receiver.

9. The lightweight chaotic encryption method for the application layer of a low-power Bluetooth module according to claim 1, characterized in that: Step (6) includes the following steps: First, the native AES encryption is stripped away using a link-layer decryption algorithm to parse the application-layer ATT / GATT data packets and extract the chaotic encrypted data within the packets. Then, the chaotic system parameters embedded in the Bluetooth receiver MCU are called and the MAC address of the Bluetooth transmitter is obtained. The chaotic key stream is generated using the same chaotic sequence selector as the Bluetooth transmitter. The unstable data from the first 10,000 iterations are discarded to obtain the same chaotic key stream as the Bluetooth transmitter. The extracted chaotic encrypted data is XORed with the chaotic keystream to obtain scrambled encrypted data. Then, based on the index mapping relationship corresponding to the synchronous chaotic sequence, a vectorized group insertion inverse scrambling operation is performed to restore the original arrangement order of the data, completely removing the dual protection of application-layer chaotic encryption and position scrambling, and restoring the original data originally transmitted by the device.