Data encryption methods, decryption methods, devices, narrowband terminals, and storage media

CN116846598BActive Publication Date: 2026-08-11HYTERA COMM CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请提供了一种数据加密方法、解密方法、装置、窄带终端及存储介质,以至少解决相关技术中采用加密芯片对终端设备主芯片的程序进行加密保护,存在秘钥及加密数据易被盗取且增加硬件开发成本的问题

Benefits of technology

[0020] Compared with related technologies, this embodiment provides a data encryption method, decryption method, device, narrowband terminal, and storage medium. It receives an encryption request sent by a main control module, wherein the encryption request carries first program data to be encrypted. This first program data, together with second program data stored in the main control module, forms program data for the main control module to perform corresponding functions. Based on the first program data, encrypted ciphertext is generated. Preset Bluetooth program data is obtained, and based on the encrypted ciphertext and the Bluetooth program data, a Bluetooth program is generated and stored in the Bluetooth memory. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, resulting in the easy theft of keys and encrypted data and increased hardware development costs. By utilizing existing Bluetooth for encryption, the security and reliability of the terminal product are greatly improved, and the development costs of terminal encryption protection are reduced, saving hardware development costs and PCB space for encryption chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116846598B_ABST
    Figure CN116846598B_ABST
Patent Text Reader

Abstract

This application relates to a data encryption method, decryption method, apparatus, narrowband terminal, and storage medium. The encryption method includes: receiving an encryption request sent by a main control module, wherein the encryption request carries first program data to be encrypted, the first program data being used together with second program data stored in the main control module to form program data for the main control module to perform corresponding functions; generating encrypted ciphertext based on the first program data; acquiring preset Bluetooth program data, and generating a Bluetooth program stored in a Bluetooth memory according to the encrypted ciphertext and the Bluetooth program data. This application solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of a terminal device, resulting in the easy theft of keys and encrypted data and increased hardware development costs. It achieves the beneficial effect of using existing Bluetooth encryption to improve the security and reliability of the terminal, and reduce the terminal encryption protection and hardware development costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a data encryption method, decryption method, device, narrowband terminal and storage medium. Background Technology

[0002] In related technologies, terminal devices (e.g., narrowband terminals) store programs and data in external Flash memory due to the limited storage capacity of the main chip. Flash memory has advantages such as low operating voltage, fast erase and write speed, low power consumption, long life, low price, flexible control methods, small size, and large capacity, and has become the main carrier of data and programs in embedded systems. However, the program code stored in Flash is easy to read and can be illegally copied, resulting in poor security and reliability. When the Flash program is copied, combined with PCB reverse engineering technology, the corresponding terminal device can be easily copied.

[0003] In related technologies, to avoid software copying, existing terminal devices use encryption chips for encryption protection. A portion of the main chip's program and data is ported to the encryption chip for execution. This encryption chip performs functions missing from the main chip while ensuring the absolute security of the ported program, thus guaranteeing the overall security of the terminal device. However, this approach, using an encryption chip to encrypt the main chip's program and storing encrypted data within it, allows a third party to steal encrypted data by identifying the encryption chip and stealing the main chip's key. Furthermore, it necessitates the use of an external encryption chip, increasing hardware development costs.

[0004] There is no better technical solution yet for the problem that using encryption chips to encrypt and protect the program of the main chip of terminal devices has the disadvantages of easy theft of keys and encrypted data and increased hardware development costs. Summary of the Invention

[0005] This application provides a data encryption method, decryption method, apparatus, narrowband terminal, and storage medium to at least solve the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of a terminal device, resulting in the easy theft of keys and encrypted data and increased hardware development costs.

[0006] In a first aspect, this application provides a data encryption method, comprising: receiving an encryption request sent by a main control module, wherein the encryption request carries first program data to be encrypted, the first program data being used together with second program data stored in the main control module to form program data for the main control module to perform corresponding functions; generating encrypted ciphertext based on the first program data; acquiring preset Bluetooth program data, and generating a Bluetooth program stored in a Bluetooth memory according to the encrypted ciphertext and the Bluetooth program data.

[0007] Secondly, this application provides a data encryption device, comprising:

[0008] The receiving module is used to receive an encryption request sent by the main control module, wherein the encryption request carries first program data to be encrypted, and the first program data is used together with the second program data stored in the main control module to form program data for the main control module to implement the corresponding function.

[0009] An encryption module is used to generate encrypted ciphertext based on the first program data;

[0010] The processing module is used to acquire preset Bluetooth program data and generate a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and the Bluetooth program data.

[0011] Thirdly, this application provides a data encryption method, comprising: after the Bluetooth module is turned on, obtaining a Bluetooth program sent by the Bluetooth module at a preset physical port, wherein the Bluetooth program carries encrypted ciphertext and the Bluetooth program is stored in the Bluetooth memory corresponding to the Bluetooth module; obtaining the encrypted ciphertext from the Bluetooth program and decrypting the encrypted ciphertext to obtain first program data, wherein the first program data is used to form program data to implement a corresponding function together with stored second program data; reading the second program data and running the terminal based on the program data composed of the first program data and the second program data.

[0012] Fourthly, this application provides a data decryption apparatus, comprising:

[0013] The acquisition module is used to acquire the Bluetooth program sent by the Bluetooth module at a preset physical port after the Bluetooth module is turned on. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module.

[0014] The decryption module is used to obtain the encrypted ciphertext from the Bluetooth program and decrypt the encrypted ciphertext to obtain first program data, wherein the first program data is used to form program data to implement the corresponding function together with the stored second program data.

[0015] The processing module is used to read the second program data and run the terminal based on the program data composed of the first program data and the second program data.

[0016] Fifthly, a narrowband terminal is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0017] Memory, used to store computer programs;

[0018] When a processor executes a program stored in memory, it implements the steps of the data encryption method according to any embodiment of the first aspect, and / or the steps of the data decryption method according to any embodiment of the third aspect.

[0019] In a sixth aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the data encryption method according to any embodiment of the first aspect, and / or the steps of the data decryption method according to any embodiment of the third aspect.

[0020] Compared with related technologies, this embodiment provides a data encryption method, decryption method, device, narrowband terminal, and storage medium. It receives an encryption request sent by a main control module, wherein the encryption request carries first program data to be encrypted. This first program data, together with second program data stored in the main control module, forms program data for the main control module to perform corresponding functions. Based on the first program data, encrypted ciphertext is generated. Preset Bluetooth program data is obtained, and based on the encrypted ciphertext and the Bluetooth program data, a Bluetooth program is generated and stored in the Bluetooth memory. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, resulting in the easy theft of keys and encrypted data and increased hardware development costs. By utilizing existing Bluetooth for encryption, the security and reliability of the terminal product are greatly improved, and the development costs of terminal encryption protection are reduced, saving hardware development costs and PCB space for encryption chips.

[0021] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a data encryption method provided in an embodiment of this application;

[0025] Figure 2A flowchart illustrating a data decryption method provided in an embodiment of this application;

[0026] Figure 3 This is a schematic block diagram of the terminal device provided in a preferred embodiment of this application;

[0027] Figure 4 A structural block diagram of a data encryption device provided in an embodiment of this application;

[0028] Figure 5 A structural block diagram of a data decryption device provided in an embodiment of this application;

[0029] Figure 6 This is a schematic diagram of the structure of a narrowband terminal according to an embodiment of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0031] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0032] Figure 1 This is a flowchart illustrating a data encryption method provided in an embodiment of this application. Figure 1 As shown in the figure, this application provides a data encryption method, which includes the following steps:

[0033] Step S101: Receive an encryption request sent by the main control module. The encryption request carries first program data to be encrypted. The first program data is used to form program data for the main control module to implement the corresponding function together with the second program data stored in the main control module.

[0034] In this embodiment, before the terminal device starts or runs, the main control module (corresponding to the main chip) sends the first program data (corresponding to some key code or data; if this key code or data is missing, the terminal device's functions will be lost and the program function cannot be implemented) to the Bluetooth module (corresponding to the Bluetooth chip), and stores it after encryption by the Bluetooth module, so as to hide the first program data in a certain segment of the Bluetooth program of the Bluetooth module.

[0035] In this embodiment, the entity performing the data encryption is the Bluetooth module of the terminal device. After encrypting the first program data, the Bluetooth module stores it together with its corresponding Bluetooth program data in the Bluetooth storage, thereby hiding the first program data in a certain segment of the Bluetooth program of the Bluetooth module.

[0036] In this embodiment, when the terminal device is first started, it sends an encryption request to the Bluetooth module and synchronously transmits the first program data to be encrypted, so that the Bluetooth module can obtain the first program data and perform corresponding encryption and hiding.

[0037] Step S102: Generate encrypted ciphertext based on the first program data.

[0038] In this embodiment, after the Bluetooth module obtains the first program data through the encryption request sent by the main control module, it encrypts the first program data according to the preset encryption rules, that is, using the set encryption key, thereby generating encrypted ciphertext.

[0039] Step S103: Obtain preset Bluetooth program data, and generate a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and Bluetooth program data.

[0040] In this embodiment, after the Bluetooth module generates encrypted ciphertext, it will combine the encrypted ciphertext with its own Bluetooth program data to generate a Bluetooth program. After storing the Bluetooth program in the Bluetooth memory, the encrypted ciphertext can be hidden in a certain segment of a Bluetooth program.

[0041] In this embodiment, by adding the key code or data corresponding to the main control module into the Bluetooth program data corresponding to the Bluetooth module itself, the cracker or thief cannot access the Bluetooth program stored in the Bluetooth module, nor can they know which parts of the Bluetooth program belong to the main control module. Thus, the key code or data cannot be stolen or cracked, thereby protecting the data of the main control module.

[0042] Through the above steps S101 to S103, an encryption request sent by the main control module is received. The encryption request carries first program data to be encrypted. The first program data is used to form program data for the main control module to implement the corresponding function with the second program data stored in the main control module. Based on the first program data, encrypted ciphertext is generated. Preset Bluetooth program data is obtained, and Bluetooth program stored in Bluetooth memory is generated according to the encrypted ciphertext and Bluetooth program data. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, which has the problem that the key and encrypted data are easily stolen and the hardware development cost is increased. The solution is to use the existing Bluetooth for encryption, which greatly improves the security and reliability of the terminal product, reduces the development cost of terminal encryption protection, and saves the hardware development cost and PCB space of the encryption chip.

[0043] It should be noted that the Bluetooth encryption module encrypts some key code or data that the terminal device starts or runs, and stores it along with the Bluetooth program in the Bluetooth memory, which is hidden within a segment of the Bluetooth program. The Bluetooth memory contains its own Bluetooth program data and the encrypted text corresponding to the key code or data of the main control module stored therein. Even if a third party obtains the program in the Bluetooth memory, they will not know which segment belongs to the key code or data corresponding to the main control module, i.e., the first program data, except for the developers of this program function. At the same time, because the main control module does not have an encryption chip, third parties cannot know that the Bluetooth chip has encrypted key code or data of the main control module when cracking it. The Bluetooth module has its own Bluetooth program data, and the encrypted key code or data only belongs to a segment of the Bluetooth program corresponding to the Bluetooth module. Adding some key code or data required by the main control module to the Bluetooth program data of the Bluetooth module itself will make cracking or theft more difficult and the data security higher. Furthermore, using the existing Bluetooth module of the terminal device to replace the encryption chip saves the hardware development cost of the terminal device and reduces the PCB space occupied.

[0044] In some embodiments, the encryption request also carries an encryption key, and based on the first program data, generates encrypted ciphertext, including the following steps:

[0045] Step 21: In the encryption request, detect the encryption key.

[0046] Step 22: Use the encryption key to encrypt the first program data to generate ciphertext.

[0047] By detecting the encryption key in the encryption request through the above steps, and using the encryption key to encrypt the first program data to generate ciphertext, the key can be obtained and the first program data can be encrypted. This ensures that the key code or data corresponding to the main control module can be protected while also being encrypted and decrypted.

[0048] In some embodiments, generating a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and Bluetooth program data includes the following steps:

[0049] Step 31: Select the target Bluetooth program from the Bluetooth program data according to the preset rules.

[0050] In this embodiment, the preset rule can be to randomly select a target Bluetooth program from the Bluetooth program data, or to select a target Bluetooth program with a preset mark. It should be noted that the preset mark is only recognized by the developer corresponding to the program function of the main control module. The cracker or thief cannot know the meaning represented by the preset mark. Thus, when the cracker or thief obtains the Bluetooth program stored in the Bluetooth memory, they cannot determine which part of the Bluetooth program data corresponds to the first program data and the encrypted ciphertext. This achieves the hiding of the encrypted ciphertext in a certain segment of the Bluetooth program, so that while the main control module can realize the program function, the data of the main control module is also encrypted and protected.

[0051] Step 32: Write the encrypted ciphertext to the target Bluetooth program, wherein the Bluetooth program includes the target Bluetooth program to which the encrypted ciphertext is written and Bluetooth program data that has not been written.

[0052] By following the preset rules in the above steps, a target Bluetooth program is selected from the Bluetooth program data; the encrypted ciphertext is written to the target Bluetooth program, wherein the Bluetooth program includes the target Bluetooth program to which the encrypted ciphertext is written and Bluetooth program data that has not been written, thereby further hiding the encrypted ciphertext and improving the security of the encrypted data.

[0053] Figure 2 This is a flowchart illustrating a data decryption method provided in an embodiment of this application. Figure 2 As shown in the figure, this application provides a data decryption method, which includes the following steps:

[0054] Step S201: After the Bluetooth module is turned on, the Bluetooth program sent by the Bluetooth module is obtained at the preset physical port. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module.

[0055] In this embodiment, the main control module of the terminal device, such as the main chip, is the main control module of the terminal device. After the terminal device completes its first startup and the main control module sends the first program data to the Bluetooth module for data encryption, it communicates with the Bluetooth module and obtains the corresponding encrypted ciphertext in the Bluetooth program through the corresponding physical port. In this embodiment, the corresponding physical port is the communication interface between the main control module and the Bluetooth module.

[0056] In this embodiment, during the subsequent startup or operation of the terminal device, the Bluetooth module is triggered to start and run. The Bluetooth module will be turned on and will remain on without being turned off, so that the main control module can read the encrypted ciphertext.

[0057] In other instances, the main control chip of the terminal device will detect whether the Bluetooth module is turned on during startup or operation. If it is not turned on, it will trigger the Bluetooth module to turn on and run. After the Bluetooth module is turned on, it will keep the Bluetooth module always on and not turn it off, and read the encrypted ciphertext from the Bluetooth module.

[0058] Step S202: Obtain encrypted ciphertext from the Bluetooth program and decrypt the encrypted ciphertext to obtain first program data, wherein the first program data is used to form program data to implement the corresponding function together with the stored second program data.

[0059] In this embodiment, after the main control module reads the encrypted ciphertext stored in the Bluetooth memory corresponding to the Bluetooth module, it decrypts it according to the decryption key corresponding to the encryption key, thereby obtaining the first program data, which corresponds to key code or data, and is also the program data that the terminal device is ported to.

[0060] Step S203: Read the second program data and run the terminal based on the program data composed of the first program data and the second program data.

[0061] In this embodiment, after reading and decrypting the first program data, the main control module obtains the second program data stored in the memory corresponding to the main control module, and then runs the first program data and the second program data to start or run normally.

[0062] Through the above steps S201 to S203, after the Bluetooth module is turned on, the Bluetooth program sent by the Bluetooth module is obtained at a preset physical port. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module. The encrypted ciphertext is obtained from the Bluetooth program and decrypted to obtain first program data. The first program data is used to form program data to implement the corresponding function with the stored second program data. The second program data is read and the terminal runs based on the program data composed of the first program data and the second program data. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, which has the problems of easy theft of keys and encrypted data and increased hardware development costs. By using existing Bluetooth for encryption, the security and reliability of terminal products are greatly improved, the development cost of terminal encryption protection is reduced, and the hardware development cost and PCB space of encryption chips are saved.

[0063] It should be noted that in this embodiment, the main chip is turned on when the terminal device is turned on, and the Bluetooth module is turned on and remains on. When the terminal device starts up or runs, the main control module must first read the second program data stored in the memory corresponding to the main control module. The main control module then uses the communication interface with the Bluetooth module to read the Bluetooth program. The Bluetooth program contains the encrypted key code or data it needs, which is the encrypted ciphertext corresponding to the first program data. The main control module decrypts the encrypted key code or data contained in the Bluetooth program. The main control module runs the decrypted key code or data (corresponding to the first program data) and the program or data read from the memory corresponding to the main control module (corresponding to the second program data), and only then can the terminal device start up or run normally.

[0064] In some embodiments, obtaining encrypted ciphertext from a Bluetooth program includes the following steps:

[0065] Step 41: Select a target Bluetooth program from the Bluetooth programs according to preset rules. The target Bluetooth program contains encrypted ciphertext.

[0066] Step 42: Read the encrypted ciphertext from the target Bluetooth program.

[0067] By following the preset rules in the above steps, a target Bluetooth program is selected from the Bluetooth programs, wherein the target Bluetooth program contains encrypted ciphertext; the encrypted ciphertext is read from the target Bluetooth program, thus realizing the reading of the encrypted ciphertext.

[0068] In some embodiments, decrypting the encrypted ciphertext to obtain first program data includes the following steps: decrypting the encrypted ciphertext using a preset decryption key to obtain first program data.

[0069] Figure 3 This is a schematic block diagram of the terminal device provided in the preferred embodiment of this application. The following is based on... Figure 3 The data encryption and decryption in the embodiments of this application are further explained as follows:

[0070] First, the Bluetooth encryption module encrypts some key code or data that the terminal device starts or runs, generating encrypted ciphertext, which is stored in the Bluetooth memory along with the Bluetooth program itself. The encrypted ciphertext is hidden in a certain segment of the Bluetooth program.

[0071] Secondly, the Bluetooth storage device has its own Bluetooth program and the encrypted ciphertext it stores. Even if a cracker or thief obtains the Bluetooth program in the Bluetooth storage device, they will not know which part belongs to the encrypted ciphertext that corresponds to the key code or data of the main control chip.

[0072] Furthermore, when the terminal device is turned on or running, Bluetooth is also turned on and remains on. When the terminal device starts up or runs, the main control chip needs to read the program or data (corresponding to the first program data) from the main control chip's memory.

[0073] Then, the main control chip uses the communication interface with Bluetooth to read the encrypted key code or data required by the main control chip contained in the Bluetooth program.

[0074] Then, the encryption module of the main control chip decrypts the encryption key code or data contained in the Bluetooth program to obtain the first program data.

[0075] Finally, the main control chip runs the decrypted key code or data, along with the program or data read from the main control chip's memory, and the terminal device starts or runs normally.

[0076] This embodiment also provides a data encryption device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0077] Figure 4 This is a structural block diagram of a data encryption device provided in an embodiment of this application, such as... Figure 4 As shown in the figure, this application embodiment provides a data encryption device, which includes:

[0078] The receiving module 41 is used to receive an encryption request sent by the main control module. The encryption request carries first program data to be encrypted. The first program data is used together with the second program data stored in the main control module to form program data for the main control module to implement the corresponding function.

[0079] The encryption module 42 is coupled to the receiving module and is used to generate encrypted ciphertext based on the first program data.

[0080] The processing module 43, coupled to the encryption module 42, is used to acquire preset Bluetooth program data and generate a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and the Bluetooth program data.

[0081] The data encryption device of this application embodiment receives an encryption request sent by the main control module. The encryption request carries first program data to be encrypted. The first program data is used to form program data for the main control module to perform corresponding functions together with second program data stored in the main control module. Based on the first program data, encrypted ciphertext is generated. Preset Bluetooth program data is obtained, and a Bluetooth program is generated and stored in the Bluetooth memory according to the encrypted ciphertext and the Bluetooth program data. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, which has the problems of easy theft of keys and encrypted data and increased hardware development costs. It realizes encryption using existing Bluetooth, which greatly improves the security and reliability of terminal products, reduces the development cost of terminal encryption protection, and saves the hardware development cost and PCB space of encryption chips.

[0082] In some embodiments, the encryption request also carries an encryption key, and the encryption module 42 further includes:

[0083] The detection unit is used to detect the encryption key in the encryption request;

[0084] The encryption unit, coupled to the detection unit, is used to encrypt the first program data using an encryption key to generate ciphertext.

[0085] In some embodiments, the processing module 43 further includes:

[0086] The selection unit is used to select the target Bluetooth program from the Bluetooth program data according to preset rules;

[0087] The writing unit, coupled to the selection unit, is used to write encrypted ciphertext into a target Bluetooth program, wherein the Bluetooth program includes the target Bluetooth program into which the encrypted ciphertext is written and Bluetooth program data that has not been written.

[0088] This embodiment also provides a data decryption device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0089] Figure 5 This is a structural block diagram of a data decryption device provided in an embodiment of this application, such as... Figure 5 As shown in the figure, this application provides a data decryption device, which includes:

[0090] The acquisition module 51 is used to acquire the Bluetooth program sent by the Bluetooth module at a preset physical port after the Bluetooth module is turned on. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module.

[0091] The decryption module 52 is coupled to the acquisition module 51 and is used to acquire the encrypted ciphertext from the Bluetooth program and decrypt the encrypted ciphertext to obtain first program data, wherein the first program data is used to form program data to implement the corresponding function together with the stored second program data.

[0092] The processing module 53, coupled to the decryption module 52, is used to read the second program data and run the terminal based on the program data composed of the first program data and the second program data.

[0093] The data decryption device of this application embodiment obtains the Bluetooth program sent by the Bluetooth module through a preset physical port after the Bluetooth module is turned on. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module. The encrypted ciphertext is obtained from the Bluetooth program and decrypted to obtain first program data. The first program data is used to form program data to implement the corresponding function with the stored second program data. The second program data is read and the terminal is run based on the program data composed of the first program data and the second program data. This solves the problem in related technologies where encryption chips are used to encrypt and protect the program of the main chip of the terminal device, which has the problems of easy theft of keys and encrypted data and increased hardware development costs. The device realizes encryption using existing Bluetooth, which greatly improves the security and reliability of terminal products, reduces the development cost of terminal encryption protection, and saves the hardware development cost and PCB space of encryption chips.

[0094] In some embodiments, the decryption module 52 is further configured to select a target Bluetooth program from the Bluetooth programs according to preset rules, wherein the target Bluetooth program contains encrypted ciphertext; and read the encrypted ciphertext from the target Bluetooth program.

[0095] In some embodiments, the decryption module 52 is further configured to decrypt the encrypted ciphertext using a preset decryption key to obtain the first program data.

[0096] Figure 6 This is a schematic diagram of the structure of a narrowband terminal according to an embodiment of this application, as shown below. Figure 6 As shown in the figure, this application embodiment provides a narrowband terminal, including a processor 61, a communication interface 62, a memory 63, and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.

[0097] Memory 63 is used to store computer programs;

[0098] When processor 61 executes the program stored in memory 63, it implements... Figure 1 or Figure 2 The methods and steps in the text.

[0099] Processing implementation in this narrowband terminal Figure 1 or Figure 2 The method steps described above, and the resulting technical effects, are similar to those achieved in the embodiments described above. Figure 1 Data encryption methods or Figure 2 The technical effects of the data decryption methods are the same, so they will not be elaborated here.

[0100] The communication bus mentioned in the narrowband terminal above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0101] The communication interface is used for communication between the aforementioned narrowband terminal and other devices.

[0102] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0103] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0104] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the data encryption method provided in any of the foregoing method embodiments, and / or the steps of the data decryption method provided in any of the foregoing method embodiments.

[0105] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the data encryption methods described in the above embodiments, and / or to perform the steps of any of the data decryption methods described in the above embodiments.

[0106] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive elements that are 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 said element.

[0107] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data encryption method, characterized in that, The method is applied to the Bluetooth module of a terminal device, and the method includes: The system receives an encryption request sent by the main control module of the terminal device, wherein the encryption request carries first program data to be encrypted, and the first program data is used to form program data for the main control module to perform corresponding functions together with the second program data stored in the main control module. Based on the data from the first program, generate encrypted ciphertext; Obtain preset Bluetooth program data, and generate a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and the Bluetooth program data.

2. The method according to claim 1, characterized in that, The encryption request also carries an encryption key, and based on the first program data, generates encrypted ciphertext, including: In the encryption request, the encryption key is detected; The first program data is encrypted using the encryption key to generate the ciphertext.

3. The method according to claim 1, characterized in that, Based on the encrypted ciphertext and the Bluetooth program data, a Bluetooth program is generated and stored in the Bluetooth memory, including: Select the target Bluetooth program from the Bluetooth program data according to the preset rules; The encrypted ciphertext is written to the target Bluetooth program, wherein the Bluetooth program includes the target Bluetooth program to which the encrypted ciphertext is written and Bluetooth program data to which no writing operation has been performed.

4. A data encryption device implemented by the Bluetooth module of a terminal device, characterized in that, include: A receiving module is used to receive an encryption request sent by the main control module of the terminal device, wherein the encryption request carries first program data to be encrypted, and the first program data is used together with the second program data stored in the main control module to form program data for the main control module to implement the corresponding function. An encryption module is used to generate encrypted ciphertext based on the first program data; The processing module is used to acquire preset Bluetooth program data and generate a Bluetooth program stored in the Bluetooth memory based on the encrypted ciphertext and the Bluetooth program data.

5. A data decryption method, characterized in that, The method is applied to the main control module of a terminal device, and the method includes: After the Bluetooth module of the terminal device is turned on, the Bluetooth program sent by the Bluetooth module is obtained through a preset physical port. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module. The encrypted ciphertext is obtained from the Bluetooth program and decrypted to obtain first program data, wherein the first program data is used to form program data to implement the corresponding function together with the stored second program data. Read the second program data and run the terminal based on the program data composed of the first program data and the second program data.

6. The method according to claim 5, characterized in that, Obtaining the encrypted ciphertext from the Bluetooth program includes: According to preset rules, a target Bluetooth program is selected from the Bluetooth programs, wherein the target Bluetooth program contains the encrypted ciphertext; Read the encrypted ciphertext from the target Bluetooth program.

7. The method according to claim 5, characterized in that, Decrypting the encrypted ciphertext to obtain first program data includes: decrypting the encrypted ciphertext using a preset decryption key to obtain the first program data.

8. A data decryption device implemented by the main control module of a terminal device, characterized in that, include: The acquisition module is used to acquire the Bluetooth program sent by the Bluetooth module through a preset physical port after the Bluetooth module of the terminal device is turned on. The Bluetooth program carries encrypted ciphertext and is stored in the Bluetooth memory corresponding to the Bluetooth module. The decryption module is used to obtain the encrypted ciphertext from the Bluetooth program and decrypt the encrypted ciphertext to obtain first program data, wherein the first program data is used to form program data to implement the corresponding function together with the stored second program data. The processing module is used to read the second program data and run the terminal based on the program data composed of the first program data and the second program data.

9. A narrowband terminal, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When executing a program stored in memory, the processor implements the steps of the data encryption method according to any one of claims 1 to 3, and / or implements the steps of the data decryption method according to any one of claims 5 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the data encryption method according to any one of claims 1 to 3, and / or implements the steps of the data decryption method according to any one of claims 5 to 7.

Citation Information

Patent Citations

  • Bluetooth communication encryption method, device and intelligent security device

    CN109168162A

  • Data transmission, network distribution and management method, equipment, system and storage medium

    CN113329399A