CN114025347B - Encryption method, device and equipment of Bluetooth equipment and storage medium - Google Patents

Encryption method, device and equipment of Bluetooth equipment and storage medium Download PDF

Info

Publication number
CN114025347B
CN114025347B CN202111293210.0A CN202111293210A CN114025347B CN 114025347 B CN114025347 B CN 114025347B CN 202111293210 A CN202111293210 A CN 202111293210A CN 114025347 B CN114025347 B CN 114025347B
Authority
CN
China
Prior art keywords
enabling
encryption algorithm
bit data
flag bit
storage medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111293210.0A
Other languages
Chinese (zh)
Other versions
CN114025347A (en
Inventor
唐国兴
汪海燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Ouqing Electronics Co ltd
Original Assignee
Suzhou Ouqing Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Ouqing Electronics Co ltd filed Critical Suzhou Ouqing Electronics Co ltd
Priority to CN202111293210.0A priority Critical patent/CN114025347B/en
Publication of CN114025347A publication Critical patent/CN114025347A/en
Application granted granted Critical
Publication of CN114025347B publication Critical patent/CN114025347B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • H04L63/205Network architectures or network communication protocols for network security for managing network security; network security policies in general involving negotiation or determination of the one or more network security mechanisms to be used, e.g. by negotiation between the client and the server or between peers or by selection according to the capabilities of the entities involved
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Abstract

The embodiment of the invention discloses an encryption method, device and equipment of Bluetooth equipment and a storage medium. The method comprises the following steps: acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device; if the flag bit data is the enabling data, enabling a first encryption algorithm matched with the enabling data; if the flag bit data is disable data, a second encryption algorithm having a lower encryption level than the first encryption algorithm is enabled. The method can dynamically adjust the encryption algorithm adopted by the Bluetooth equipment to adapt to different application scenes, thereby meeting the encryption requirements of different scenes and achieving the effect of adopting different levels of encryption algorithm according to the encryption requirements.

Description

Encryption method, device and equipment of Bluetooth equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of electronics, in particular to an encryption method, device, equipment and storage medium of Bluetooth equipment.
Background
The low-power consumption Bluetooth device can be used after being paired with the host device, and the inventor finds that in practical research: if the Bluetooth equipment does not adopt an encryption algorithm or the adopted encryption algorithm has low grade, the pairing process is easy to detect in use, so that the Bluetooth data or the functions of the equipment are analyzed, and the benefits of users are damaged; however, if the bluetooth device adopts a high-level encryption algorithm, it may be impossible to analyze bluetooth data or functions of the device, so that a contradictory condition that whether the bluetooth device has a problem and adjusts in time cannot be found.
Aiming at the contradiction situation, the inventor improves the existing encryption algorithm, and provides the encryption method of the Bluetooth device, so that the encryption algorithm adopted by the Bluetooth device is dynamically adjusted, different application scenes are adapted, and encryption requirements under different scenes are met.
Disclosure of Invention
The embodiment of the invention provides an encryption method, an encryption device, encryption equipment and a storage medium of Bluetooth equipment, which can dynamically adjust an encryption algorithm adopted by the Bluetooth equipment, adapt to different application scenes and meet encryption requirements in different scenes.
In a first aspect, an embodiment of the present invention provides an encryption method for a bluetooth device, where the method includes:
acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device;
if the flag bit data is enabling data, enabling a first encryption algorithm matched with the enabling data;
and if the flag bit data is forbidden data, enabling a second encryption algorithm with a lower encryption level than the first encryption algorithm.
Optionally, before obtaining the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device, the method further includes:
and setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment according to the use scene of the Bluetooth equipment.
Optionally, according to a usage scenario of the bluetooth device, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the bluetooth device includes:
if the usage scene of the Bluetooth device is a device debugging scene, setting the marking bit data corresponding to the marking bit enabled by the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth device as forbidden data;
and if the usage scene of the Bluetooth device is a device factory application scene, setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device as enabling data.
Optionally, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the bluetooth device includes:
and enabling a flag bit data setting function through a preset mode, and setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device.
Optionally, the method for setting flag bit data by using a preset mode and setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the bluetooth device includes:
enabling a flag bit data setting function through a preset mode, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device into flag bit data matched with a preset key through the preset key.
Optionally, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the bluetooth device includes:
enabling a flag bit data setting function through a serial port command, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device as flag bit data matched with the serial port command.
Optionally, after setting the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device according to the usage scenario of the bluetooth device, the method further includes:
and restarting the Bluetooth equipment according to the setting signal of the marking bit data so as to perform initialization setting on the Bluetooth equipment.
In a second aspect, an embodiment of the present invention further provides an encryption apparatus for a bluetooth device, where the apparatus includes:
the marking bit data acquisition module is used for acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth equipment;
an encryption algorithm enabling module, configured to enable a first encryption algorithm matched with the enabling data if the flag bit data is the enabling data;
and the encryption algorithm disabling module is used for enabling a second encryption algorithm with the encryption level lower than that of the first encryption algorithm if the marked bit data are disabled data.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of encrypting a bluetooth device according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements an encryption method of a bluetooth device according to any embodiment of the present invention.
According to the technical scheme, the marking bit data corresponding to the marking bit is enabled by acquiring the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth equipment; if the flag bit data is the enabling data, enabling a first encryption algorithm matched with the enabling data; if the marking bit data is forbidden data, a second encryption algorithm with encryption grade lower than that of the first encryption algorithm is started, so that the encryption control problem of the Bluetooth equipment is solved, the encryption algorithm adopted by the Bluetooth equipment can be dynamically adjusted, different application scenes are adapted, encryption requirements of different scenes are met, and the effect of adopting different grades of encryption algorithms according to the encryption requirements is achieved.
Drawings
Fig. 1 is a flowchart of an encryption method of a bluetooth device according to a first embodiment of the present invention;
fig. 2a is a flowchart of an encryption method of a bluetooth device according to a second embodiment of the present invention;
fig. 2b is a flowchart of an encryption method of another bluetooth device according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an encryption device of a bluetooth device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of an encryption method of a bluetooth device according to a first embodiment of the present invention, where the method may be performed by an encryption apparatus of the bluetooth device, and the apparatus may be implemented by software and/or hardware, and the apparatus may be integrated in an electronic device, such as the bluetooth device, as shown in fig. 1, where the method specifically includes:
step 110, obtaining the marking bit data corresponding to the marking bit enabled by the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth device.
The nonvolatile storage medium can be a memory used by the Bluetooth device for storing data, and can ensure that the data is not lost when the device is turned off or the device is turned off suddenly or accidentally. The non-volatile storage medium employed by embodiments of the present invention may be a memory having a readable and writable memory. For example, a flash (flash memory), an EEPROM (electrically erasable programmable read only memory), an EAROM (electrically rewritable read only memory) or the like may be used, which is not particularly limited in the embodiment of the present invention.
In the embodiment of the invention, the encryption algorithm enabling flag bit may be a data bit preset in a nonvolatile storage medium and used for identifying that the bluetooth device can adopt the encryption algorithm. For example, 0 and 1 may be employed to indicate disabling and enabling, respectively, of a certain designated encryption algorithm.
In particular, the encryption algorithm enable flag bit may indicate whether the Secure Connection algorithm (a pairing encryption algorithm for bluetooth devices) is enabled. For example, when the encryption algorithm enable flag bit is enable data (e.g., 1), the Secure Connection algorithm may be enabled; when the encryption algorithm enable flag bit is disable data (e.g., 0), the Secure Connection algorithm may be disabled.
Step 120, if the flag bit data is the enable data, enabling a first encryption algorithm matching the enable data.
Wherein the first encryption algorithm may be a higher encryption level algorithm. Specifically, the first encryption algorithm may be a Secure Connection algorithm.
Step 130, if the flag bit data is the disable data, enabling a second encryption algorithm having a lower encryption level than the first encryption algorithm.
Wherein the second encryption algorithm may be a lower encryption level algorithm. Specifically, the second encryption algorithm may be LE Legacy Pairing (a conventional encryption algorithm).
It should be noted that, at present, bluetooth devices generally have encryption algorithms with four encryption levels: the first encryption level is No Security (not encrypted); the second encryption rank is Unauthenticated pairing with encryption (unverified encryption pairing) such as LE Legacy Pairing algorithm; the third encryption rank is Authenticated pairing with encryption (authentication pairing with encryption); the fourth encryption class is Authenticated LE Secure Connection pairing with encryption (bluetooth device secure encryption pairing connection with authentication) such as Secure Connection algorithm.
Most bluetooth devices, such as bluetooth remote controllers, currently adopt the LE Legacy Pairing algorithm to encrypt, but have low security performance and are easy to be recognized and attacked. In order to improve the security performance of the bluetooth device, part of the bluetooth devices adopt Secure Connection algorithm, and a higher-level encryption algorithm is used for protecting the pairing process. However, the Secure Connection algorithm can cause failure in data detection of the Bluetooth equipment so as to analyze whether the Bluetooth equipment has faults, which is not beneficial to development and debugging before the delivery of the Bluetooth equipment or fault debugging after the delivery of the Bluetooth equipment, and causes barriers to maintenance of products.
According to the technical scheme, the encryption algorithm enabling mark bit is stored in the nonvolatile storage medium of the Bluetooth device in advance, the specific encryption algorithm which can be adopted by the Bluetooth device is set according to the mark bit data corresponding to the encryption algorithm enabling mark bit, and the encryption algorithm adopted by the blue device can be dynamically adjusted, so that the adopted encryption algorithm can adapt to different scene requirements, and the effect of adopting different levels of encryption algorithm according to the encryption requirements is achieved.
Specifically, after leaving the factory, the Bluetooth device can adopt Secure Connection algorithm, so that the Bluetooth device has higher safety performance when a user uses the Bluetooth device, and meanwhile, the Bluetooth device is not easy to be detected and analyzed by the detection device, so that malicious attack is prevented; the LE Legacy Pairing algorithm can be adopted in a development and debugging stage before delivery or a factory return fault debugging stage after delivery, and the detection equipment can be adopted in the debugging stage to detect and analyze data so as to realize development and debugging or fault debugging of the Bluetooth equipment, thereby ensuring multi-adaptability debugging, fault repairing and the like of the Bluetooth equipment.
Example two
Fig. 2a is a flowchart of an encryption method of a bluetooth device according to a second embodiment of the present invention. The present embodiment is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with each alternative solution in one or more embodiments described above. As shown in fig. 2a, the method comprises:
step 210, according to the usage scenario of the bluetooth device, setting the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device.
When the usage scenarios of the bluetooth device are different, different flag bit data can be set by enabling the flag bit in the encryption algorithm stored in the nonvolatile storage medium of the bluetooth device. The encryption algorithm specifically adopted by the Bluetooth device can be determined according to the tag bit data.
Specifically, in an optional implementation manner of the embodiment of the present invention, according to a usage scenario of a bluetooth device, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the bluetooth device includes: if the usage scene of the Bluetooth device is a device debugging scene, setting the marking bit data corresponding to the marking bit enabled by the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth device as forbidden data; if the usage scene of the Bluetooth device is a device factory application scene, setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device as enabling data.
If the Bluetooth device acquires the identification information corresponding to the current use scene as the device debugging scene, the forbidden data can be written into the encryption algorithm enabling mark bit stored in the nonvolatile storage medium, so that the encryption algorithm with high encryption level is forbidden, and the Bluetooth device is debugged. If the Bluetooth device acquires the identification information corresponding to the specific application scenario after the current use scenario is delivered, enabling data can be written into an encryption algorithm enabling flag bit stored in the nonvolatile storage medium, so that an encryption algorithm with a high encryption level is enabled, protection of the Bluetooth device is achieved, and malicious detection is prevented.
In an optional implementation manner of the embodiment of the present invention, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of a bluetooth device includes: and enabling the marking bit data setting function through a preset mode, and setting the marking bit data corresponding to the marking bit enabled by an encryption algorithm stored in a nonvolatile storage medium of the Bluetooth equipment.
The preset pattern may be a preset indication mode of modification of the driving flag bit data. For example, when the bluetooth device is a bluetooth remote controller, the flag bit data setting function may be started by some combination key as a preset mode. For example, in one specific application, the flag bit data set function may be activated after a certain key (e.g., the "H3" key) is pressed for a specified period of time (e.g., 3 seconds).
In another specific application, the flag bit data setting function may be enabled and the flag bit data set synchronously when the preset mode is started. For example, the bluetooth device may enable the flag bit data setting function after acquiring that the first preset key is pressed for a period of time (e.g., 3 seconds after acquiring that the "H3" key is pressed), and set the flag bit data as the enable data synchronously. For another example, the bluetooth device may enable the flag bit data setting function after acquiring that the second preset key is pressed for a period of time (e.g., after acquiring that the "H4" key is pressed for 3 seconds), and set the flag bit data to disable data synchronously.
In an optional implementation manner of the embodiment of the present invention, the setting function of the flag bit data is enabled through a preset mode, and the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device is set, including: enabling a flag bit data setting function through a preset mode, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device to be flag bit data matched with a preset key through the preset key.
Wherein the preset mode may enable only the flag bit data setting function. The setting of the flag bit data can be performed by a preset key. For example, after the flag bit data setting function is enabled, the bluetooth device may acquire a key input by a developer, such as a certain number combination key, match the acquired key with a preset key, and implement modification of the flag bit data according to a matching result.
For example, a developer may input a number key "1-2-3-4", the bluetooth device determines that "1-2-3-4" matches a preset key corresponding to the enable data, and may set flag bit data as the enable data. Alternatively, the developer may input the number key "5-6-7-9", the bluetooth device determines that "5-6-7-9" matches a preset key corresponding to the disable data, and may set the tag bit data to the disable data.
In an optional implementation manner of the embodiment of the present invention, setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of a bluetooth device includes: enabling the flag bit data setting function through the serial port command, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device as flag bit data matched with the serial port command.
The Bluetooth devices which do not support the keys can also realize the agreement of check codes through serial port commands, enable the setting function of the marking bit data and set the marking bit data.
Step 220, restarting the bluetooth device according to the setting signal of the flag bit data, so as to perform initialization setting on the bluetooth device.
After the marking bit data is updated, the Bluetooth device can be directly powered on again to restart according to the setting signal of the marking bit data, and the initialization stage is entered, so that the marking bit data stored by the nonvolatile storage medium can be conveniently read again, the Bluetooth device encryption algorithm is used and set, manual operation can be reduced, and the effect of saving manpower is achieved.
Step 230, obtaining the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device.
Step 240, if the flag bit data is the enable data, enabling a first encryption algorithm matching the enable data.
Step 250, if the flag bit data is disable data, enabling a second encryption algorithm having a lower encryption level than the first encryption algorithm.
According to the technical scheme of the embodiment, the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth equipment is set to enable the marking bit data corresponding to the marking bit according to the use scene of the Bluetooth equipment; restarting the Bluetooth equipment according to the setting signal of the marking bit data so as to perform initialization setting on the Bluetooth equipment; acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device; if the flag bit data is the enabling data, enabling a first encryption algorithm matched with the enabling data; if the marking bit data is forbidden data, enabling a second encryption algorithm with encryption grade lower than that of the first encryption algorithm, solving the problem of dynamic setting of the encryption algorithm of the Bluetooth equipment, and realizing dynamic adjustment of the encryption algorithm adopted by the blue equipment, so that the adopted encryption algorithm can adapt to different scene requirements, and the effect of adopting different grades of encryption algorithms according to the encryption requirements is achieved.
Fig. 2b is a flowchart of an encryption method of another bluetooth device according to a second embodiment of the present invention. As shown in fig. 2b, a specific use procedure of the encryption method of the bluetooth device provided in the embodiment of the present invention may be: the developer can start a preset mode on the Bluetooth remote controller in a combined key mode, and when the Bluetooth device determines that the preset mode is started, the Bluetooth device can enter a marking bit data setting function. The developer may enter a password and the bluetooth device may set the encryption algorithm enabled flag bit to flag bit data matching the password according to the password. For example, if the password matches a preset key that allows the Secure Connection algorithm, the bluetooth device may set the encryption algorithm enable flag bit stored by the non-volatile storage medium to enable data; if the password matches the preset key of the banned Secure Connection algorithm, the bluetooth device may set the encryption algorithm enable flag bit stored by the non-volatile storage medium to disable data; if the key does not match the predetermined key, the Bluetooth device may determine that the setting was incorrect and may not modify the tag bit data. After the flag bit data is set, the bluetooth device may be powered on and restarted, entering an initialization phase. The bluetooth device may read the tag bit data of the encryption algorithm enabled tag bit from the non-volatile storage medium to determine whether the Secure Connection algorithm is enabled. Initializing to allow Secure Connection algorithm encryption if Secure Connection algorithm is allowed; if the Secure Connection algorithm is disabled, it is initialized to conventional encryption algorithm encryption. After finishing other initialization settings, the Bluetooth device can enter a Bluetooth pairing process, and the Bluetooth device can correspondingly pair according to the adopted encryption algorithm to start the Bluetooth function.
The encryption method of the Bluetooth device provided by the embodiment strengthens the protection of the Bluetooth device, can prevent malicious attack by a third party, and protects the information security of a user when using the device; the method only strengthens pairing protection, has no influence on data interaction of the Bluetooth equipment, does not cause extra burden, and does not influence the actual use process; by flexibly enabling or disabling the Secure Connection algorithm, the inconvenience of debugging when the product security protection level is high can be avoided.
Example III
Fig. 3 is a schematic structural diagram of an encryption device of a bluetooth device according to a third embodiment of the present invention. With reference to fig. 3, the apparatus comprises: a tag bit data acquisition module 310, an encryption algorithm enabling module 320 and an encryption algorithm disabling module 330. Wherein:
a tag bit data obtaining module 310, configured to obtain tag bit data corresponding to an encryption algorithm enabling tag bit stored in a nonvolatile storage medium of the bluetooth device;
an encryption algorithm enabling module 320, configured to enable the first encryption algorithm matched with the enabling data if the flag bit data is the enabling data;
the encryption algorithm disabling module 330 is configured to enable a second encryption algorithm with an encryption level lower than that of the first encryption algorithm if the flag bit data is disable data.
Optionally, the device further includes:
the marking bit data setting module is used for setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device according to the use scene of the Bluetooth device before the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device is obtained.
Optionally, the flag bit data setting module includes:
the forbidden data setting unit is used for setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment as forbidden data if the use scene of the Bluetooth equipment is equipment debugging scene;
and the enabling data setting unit is used for setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment as enabling data if the using scene of the Bluetooth equipment is the equipment factory application scene.
Optionally, the flag bit data setting module includes:
the first flag bit data setting unit is used for enabling a flag bit data setting function through a preset mode and setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device.
Optionally, the first flag bit data setting unit is specifically configured to:
enabling a flag bit data setting function through a preset mode, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device to be flag bit data matched with a preset key through the preset key.
Optionally, the flag bit data setting module includes:
and the second marking bit data setting unit is used for enabling the marking bit data setting function through the serial port command and setting the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device as marking bit data matched with the serial port command.
Optionally, the device further includes:
and the Bluetooth equipment restarting module is used for restarting the Bluetooth equipment according to the setting signal of the marking bit data after the marking bit data corresponding to the marking bit is enabled by the encryption algorithm stored by the nonvolatile storage medium of the Bluetooth equipment according to the use scene of the Bluetooth equipment so as to perform initialization setting on the Bluetooth equipment.
The encryption device of the Bluetooth equipment provided by the embodiment of the invention can execute the encryption method of the Bluetooth equipment provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, as shown in fig. 4, where the device includes:
one or more processors 410, one processor 410 being illustrated in fig. 4;
a memory 420;
the apparatus may further include: an input device 430 and an output device 440.
The processor 410, memory 420, input means 430 and output means 440 in the apparatus may be connected by a bus or otherwise, in fig. 4 by way of example.
The memory 420 is used as a non-transitory computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to an encryption method of a bluetooth device in an embodiment of the present invention (e.g., the tag bit data obtaining module 310, the encryption algorithm enabling module 320, and the encryption algorithm disabling module 330 shown in fig. 3). The processor 410 executes various functional applications and data processing of the computer device by running software programs, instructions and modules stored in the memory 420, i.e. an encryption method of the bluetooth device implementing the above-mentioned method embodiment, namely:
acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device;
if the flag bit data is enabling data, enabling a first encryption algorithm matched with the enabling data;
and if the flag bit data is forbidden data, enabling a second encryption algorithm with a lower encryption level than the first encryption algorithm.
Memory 420 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 420 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the computer device. The output 440 may include a display device such as a display screen.
Example five
A fifth embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements an encryption method for a bluetooth device as provided in the embodiments of the present invention:
acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device;
if the flag bit data is enabling data, enabling a first encryption algorithm matched with the enabling data;
and if the flag bit data is forbidden data, enabling a second encryption algorithm with a lower encryption level than the first encryption algorithm.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (8)

1. A method for encrypting a bluetooth device, the method comprising:
according to the use scene of the Bluetooth equipment, setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment;
the setting the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device according to the usage scenario of the bluetooth device includes:
if the usage scene of the Bluetooth device is a device debugging scene, setting the marking bit data corresponding to the marking bit enabled by the encryption algorithm stored in the nonvolatile storage medium of the Bluetooth device as forbidden data;
if the usage scene of the Bluetooth device is a device factory application scene, setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth device as enabling data;
acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth device;
if the flag bit data is enabling data, enabling a first encryption algorithm matched with the enabling data;
and if the flag bit data is forbidden data, enabling a second encryption algorithm with a lower encryption level than the first encryption algorithm.
2. The method of claim 1, wherein setting the flag bit data corresponding to the encryption algorithm enable flag bit stored by the nonvolatile storage medium of the bluetooth device comprises:
and enabling a flag bit data setting function through a preset mode, and setting flag bit data corresponding to an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device.
3. The method according to claim 2, wherein enabling the flag bit data setting function by a preset mode and setting the flag bit data corresponding to the encryption algorithm enabling flag bit stored in the nonvolatile storage medium of the bluetooth device, comprises:
enabling a flag bit data setting function through a preset mode, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device into flag bit data matched with a preset key through the preset key.
4. The method of claim 1, wherein setting the flag bit data corresponding to the encryption algorithm enable flag bit stored by the nonvolatile storage medium of the bluetooth device comprises:
enabling a flag bit data setting function through a serial port command, and setting an encryption algorithm enabling flag bit stored in a nonvolatile storage medium of the Bluetooth device as flag bit data matched with the serial port command.
5. The method according to any one of claims 2 to 4, further comprising, after setting flag bit data corresponding to an encryption algorithm enable flag bit stored in a nonvolatile storage medium of the bluetooth device according to a usage scenario of the bluetooth device:
and restarting the Bluetooth equipment according to the setting signal of the marking bit data so as to perform initialization setting on the Bluetooth equipment.
6. An encryption device for a bluetooth device, comprising:
the marking bit data setting module is used for setting marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment according to the use scene of the Bluetooth equipment;
the flag bit data setting module includes:
the forbidden data setting unit is used for setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment as forbidden data if the use scene of the Bluetooth equipment is equipment debugging scene;
the enabling data setting unit is used for setting the marking bit data corresponding to the encryption algorithm enabling marking bit stored in the nonvolatile storage medium of the Bluetooth equipment as enabling data if the using scene of the Bluetooth equipment is the equipment factory application scene;
the marking bit data acquisition module is used for acquiring marking bit data corresponding to an encryption algorithm enabling marking bit stored in a nonvolatile storage medium of the Bluetooth equipment;
an encryption algorithm enabling module, configured to enable a first encryption algorithm matched with the enabling data if the flag bit data is the enabling data;
and the encryption algorithm disabling module is used for enabling a second encryption algorithm with the encryption level lower than that of the first encryption algorithm if the marked bit data are disabled data.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202111293210.0A 2021-11-03 2021-11-03 Encryption method, device and equipment of Bluetooth equipment and storage medium Active CN114025347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111293210.0A CN114025347B (en) 2021-11-03 2021-11-03 Encryption method, device and equipment of Bluetooth equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111293210.0A CN114025347B (en) 2021-11-03 2021-11-03 Encryption method, device and equipment of Bluetooth equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114025347A CN114025347A (en) 2022-02-08
CN114025347B true CN114025347B (en) 2023-12-01

Family

ID=80060340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111293210.0A Active CN114025347B (en) 2021-11-03 2021-11-03 Encryption method, device and equipment of Bluetooth equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114025347B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201188222Y (en) * 2007-12-14 2009-01-28 上海海尔集成电路有限公司 Apparatus for encrypting instruction of microcontroller
CN101859325A (en) * 2010-06-07 2010-10-13 华为技术有限公司 Method and device for searching and processing data table items
CN102104478A (en) * 2009-12-16 2011-06-22 中兴通讯股份有限公司 Method and device for improving safety of EPON system
CN102411694A (en) * 2010-09-22 2012-04-11 株式会社东芝 Cryptographic apparatus and memory system
WO2013101894A2 (en) * 2011-12-29 2013-07-04 Imation Corp. Secure user authentication for bluetooth enabled computer storage devices
CN103258153A (en) * 2013-04-19 2013-08-21 深圳创维数字技术股份有限公司 Method for achieving safeguard in digital television terminal and digital television terminal
US9025770B1 (en) * 2007-06-28 2015-05-05 Trend Micro Incorporated Dynamic encryption arrangement with a wireless device and methods therefor
CN105550591A (en) * 2015-12-10 2016-05-04 厦门美图移动科技有限公司 Security protection device and method for user data in mobile terminal
CN107292183A (en) * 2017-06-29 2017-10-24 国信优易数据有限公司 A kind of data processing method and equipment
CN108028748A (en) * 2016-02-27 2018-05-11 华为技术有限公司 For handling the method, equipment and system of VXLAN messages
CN109067747A (en) * 2018-08-13 2018-12-21 安徽中科美络信息技术有限公司 A kind of vehicle safety control method and server
WO2019041272A1 (en) * 2017-08-31 2019-03-07 华为技术有限公司 Method and device for encrypting and decrypting computer memory data
KR20190033757A (en) * 2017-09-22 2019-04-01 (주)노르마 Analysis method and system of Security Vulnerability of wireless network
CN109889372A (en) * 2019-01-21 2019-06-14 杭州迪普科技股份有限公司 Obtain method, apparatus, equipment and the storage medium of configuration information
CN111600867A (en) * 2020-05-12 2020-08-28 腾讯科技(深圳)有限公司 Data encryption method and related equipment
CN111740963A (en) * 2020-05-29 2020-10-02 深圳市优博讯科技股份有限公司 Data communication method and device
CN111835726A (en) * 2020-06-12 2020-10-27 珠海莲鸿科技有限公司 Dynamic encryption communication method for multiple communication lines, storage medium and communication equipment
CN112800475A (en) * 2021-03-24 2021-05-14 国网上海市电力公司 Data encryption method and device, electronic equipment and medium
CN113240836A (en) * 2021-05-18 2021-08-10 新疆爱华盈通信息技术有限公司 Bluetooth lock connection method adopting two-dimensional code and related configuration system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8934625B2 (en) * 2009-03-25 2015-01-13 Pacid Technologies, Llc Method and system for securing communication
JP2013153327A (en) * 2012-01-25 2013-08-08 Toshiba Corp Storage device, host device, and information processing method
SG2013076898A (en) * 2013-10-16 2015-05-28 Certis Cisco Security Pte Ltd Method and system for controlling access to wireless apparatuses
US11388000B2 (en) * 2019-06-19 2022-07-12 Innotek, Inc. Systems and methods to facilitate data security in a portable storage device
TWI733375B (en) * 2020-03-17 2021-07-11 群聯電子股份有限公司 Data transfer method and memory storage device

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9025770B1 (en) * 2007-06-28 2015-05-05 Trend Micro Incorporated Dynamic encryption arrangement with a wireless device and methods therefor
CN201188222Y (en) * 2007-12-14 2009-01-28 上海海尔集成电路有限公司 Apparatus for encrypting instruction of microcontroller
CN102104478A (en) * 2009-12-16 2011-06-22 中兴通讯股份有限公司 Method and device for improving safety of EPON system
CN101859325A (en) * 2010-06-07 2010-10-13 华为技术有限公司 Method and device for searching and processing data table items
CN102411694A (en) * 2010-09-22 2012-04-11 株式会社东芝 Cryptographic apparatus and memory system
WO2013101894A2 (en) * 2011-12-29 2013-07-04 Imation Corp. Secure user authentication for bluetooth enabled computer storage devices
CN103258153A (en) * 2013-04-19 2013-08-21 深圳创维数字技术股份有限公司 Method for achieving safeguard in digital television terminal and digital television terminal
CN105550591A (en) * 2015-12-10 2016-05-04 厦门美图移动科技有限公司 Security protection device and method for user data in mobile terminal
CN108028748A (en) * 2016-02-27 2018-05-11 华为技术有限公司 For handling the method, equipment and system of VXLAN messages
CN107292183A (en) * 2017-06-29 2017-10-24 国信优易数据有限公司 A kind of data processing method and equipment
CN109791589A (en) * 2017-08-31 2019-05-21 华为技术有限公司 A kind of method and device of calculator memory data enciphering/deciphering
WO2019041272A1 (en) * 2017-08-31 2019-03-07 华为技术有限公司 Method and device for encrypting and decrypting computer memory data
KR20190033757A (en) * 2017-09-22 2019-04-01 (주)노르마 Analysis method and system of Security Vulnerability of wireless network
CN109067747A (en) * 2018-08-13 2018-12-21 安徽中科美络信息技术有限公司 A kind of vehicle safety control method and server
CN109889372A (en) * 2019-01-21 2019-06-14 杭州迪普科技股份有限公司 Obtain method, apparatus, equipment and the storage medium of configuration information
CN111600867A (en) * 2020-05-12 2020-08-28 腾讯科技(深圳)有限公司 Data encryption method and related equipment
CN111740963A (en) * 2020-05-29 2020-10-02 深圳市优博讯科技股份有限公司 Data communication method and device
CN111835726A (en) * 2020-06-12 2020-10-27 珠海莲鸿科技有限公司 Dynamic encryption communication method for multiple communication lines, storage medium and communication equipment
CN112800475A (en) * 2021-03-24 2021-05-14 国网上海市电力公司 Data encryption method and device, electronic equipment and medium
CN113240836A (en) * 2021-05-18 2021-08-10 新疆爱华盈通信息技术有限公司 Bluetooth lock connection method adopting two-dimensional code and related configuration system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一个基于组策略的安全无线远程监控协议;林勇, 吕述望;计算机工程与应用(第29期);全文 *
一种基于云端加密的FPGA自适应动态配置方法;陈利锋;朱路平;;计算机科学(第07期);全文 *

Also Published As

Publication number Publication date
CN114025347A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US10659237B2 (en) System and method for verifying integrity of an electronic device
US11042384B2 (en) Managing the customizing of appliances
US8464047B2 (en) Method and apparatus for authorizing host to access portable storage device
JP4998019B2 (en) Status display controller
EP2693789B1 (en) Mobile terminal encryption method, hardware encryption device and mobile terminal
KR101756692B1 (en) Terminal Device for Dynamic Secure Module and Driving Method Thereof
CN102955921A (en) Electronic device and safe starting method
CN111162911B (en) PLC firmware upgrading system and method
RU2015101734A (en) PROTECTED ACCESS METHOD AND APPLIED PROTECTED ACCESS DEVICE
CN107273150B (en) Preloading firmware downloading and writing method and device
US20140359312A1 (en) Power on with near field communication
US20120278598A1 (en) Disabling communication ports
CN110770728A (en) Unmanned aerial vehicle control method, unmanned aerial vehicle and terminal for controlling unmanned aerial vehicle
JP2009253783A (en) Mobile terminal, data protection method and program for data protection
WO2020073916A1 (en) Encryption method and apparatus for storage device, and storage medium
CN111557003A (en) Data security management system and method using storage device of security terminal
CN114025347B (en) Encryption method, device and equipment of Bluetooth equipment and storage medium
CN112585608A (en) Embedded equipment, legality identification method, controller and encryption chip
KR102248132B1 (en) Method, apparatus and program of log-in using biometric information
KR20200033560A (en) Electronic device for providing service using secure element and operating method thereof
US10219156B2 (en) Apparatus and method for protecting data in flash memory based on unauthorized activity on smart device
CN111125710B (en) Information processing method and device, electronic equipment and storage medium
CN115357274A (en) Remote IO equipment firmware upgrading method and system
KR100651611B1 (en) Safe control method when detecting the access to storage media
US10496300B2 (en) Method and apparatus for server management

Legal Events

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