CN111145400A - Safe and simple low-power-consumption Bluetooth lock and control method thereof - Google Patents

Safe and simple low-power-consumption Bluetooth lock and control method thereof Download PDF

Info

Publication number
CN111145400A
CN111145400A CN202010116256.4A CN202010116256A CN111145400A CN 111145400 A CN111145400 A CN 111145400A CN 202010116256 A CN202010116256 A CN 202010116256A CN 111145400 A CN111145400 A CN 111145400A
Authority
CN
China
Prior art keywords
random number
ciphertext
pseudo random
pseudo
safe
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.)
Granted
Application number
CN202010116256.4A
Other languages
Chinese (zh)
Other versions
CN111145400B (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.)
Foshan Hanwen Yucheng Intelligent Technology Co Ltd
Original Assignee
Foshan Hanwen Yucheng Intelligent Technology 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 Foshan Hanwen Yucheng Intelligent Technology Co Ltd filed Critical Foshan Hanwen Yucheng Intelligent Technology Co Ltd
Priority to CN202010116256.4A priority Critical patent/CN111145400B/en
Publication of CN111145400A publication Critical patent/CN111145400A/en
Application granted granted Critical
Publication of CN111145400B publication Critical patent/CN111145400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • H04W12/037Protecting confidentiality, e.g. by encryption of the control plane, e.g. signalling traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The invention provides a safe and simple low-power-consumption Bluetooth lock and a control method thereof. The method comprises the following steps: receiving an unlocking request; generating a first pseudo random number; encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext; sending the equipment ID and the first ciphertext to the mobile terminal; receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal; carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number; and comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different. The Bluetooth lock comprises a first receiving module, a generating module, an encrypting module, a first sending module, a second receiving module, a decrypting module and an executing module. The Bluetooth lock and the method can prevent encrypted data from being cracked by a third party by using an exhaustion or replay attack mode.

Description

Safe and simple low-power-consumption Bluetooth lock and control method thereof
Technical Field
The invention relates to the technical field of locks, in particular to a safe and simple low-power-consumption Bluetooth lock and a control method thereof.
Background
Bluetooth low energy (hereinafter abbreviated as BLE) is a wireless technology specially solving short-distance data transmission, has fine energy consumption control concurrently simultaneously, can only use a button cell alright realize long-time power supply and maintain. The low-power-consumption Bluetooth can also be connected with mobile terminals such as mobile phones and tablet computers, and smart phones (such as apple cell phones and android mobile phones) and tablet computers on the market basically have Bluetooth functions. BLE provides us with a basic data link through which we can transmit various data.
The intelligent lock is a novel product applied to the lockset by taking the Internet of things technology as a carrier. There are various ways to implement smart locks, and one of them is by bluetooth technology as a carrier. The security requirements of smart locks are relatively high. The BLE only provides a link for transmitting data for us, and as for the link, the data transmitted can be monitored by anyone, and the sniffer monitoring tool of the BLE is also available everywhere in the market. In order to ensure the security of data transmission, a technique is needed to transmit encrypted data in an open data link without worrying about interception or falsification by a third party. Meanwhile, the transmission of data must have randomness, and even if the data is intercepted by a third party, the intelligent lock cannot be easily cracked by brute force cracking methods such as exhaustion and the like.
Disclosure of Invention
In view of the defects of the prior art, the invention aims to provide a safe and simple low-power-consumption Bluetooth lock and a control method thereof.
In order to achieve the purpose, the invention adopts the following technical scheme:
a safe and simple low-power-consumption Bluetooth lock control method comprises the following steps:
receiving an unlocking request sent by a mobile terminal;
generating a first pseudo random number;
encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext;
sending the equipment ID and the first ciphertext to the mobile terminal;
receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
and comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different.
In the safe and simple low-power-consumption Bluetooth lock control method, a method for generating a first pseudo-random number comprises the following steps:
a new first pseudo random number is generated by adding the current clock to the last first pseudo random number.
In the safe and simple low-power-consumption Bluetooth lock control method, when the first pseudo-random number is generated for the first time, the pre-stored random number is used as the last first pseudo-random number.
In the safe and simple low-power-consumption bluetooth lock control method, the method for generating the second ciphertext comprises the following steps:
inquiring a corresponding secret key according to the equipment ID;
decrypting the first ciphertext by using the inquired key and the preset symmetric encryption algorithm to obtain a first original text;
performing first conversion processing on the first original text to obtain a conversion code;
and encrypting the conversion code by using the preset symmetric encryption algorithm to obtain a second ciphertext.
In the safe and simple low-power-consumption Bluetooth lock control method, the step of decrypting and converting the second ciphertext to obtain a second pseudo-random number comprises the following steps:
decrypting the second ciphertext by using the pre-stored secret key by using the preset symmetric encryption algorithm to obtain a second original text;
and carrying out second conversion processing on the second original text to obtain a second pseudo-random number.
In the safe and simple low-power-consumption Bluetooth lock control method, the first conversion treatment is bit-wise negation of each bit of the data, and the second conversion treatment is bit-wise negation of each bit of the data;
or the first conversion processing is inverting a specific bit of data, and the second conversion processing is inverting the specific bit;
or the first conversion processing is to insert a data segment with a specific length at a specific position of the data, and the second conversion processing is to delete the data segment from the data.
In the safe and simple low-power-consumption Bluetooth lock control method, the preset symmetric encryption algorithm is a blowfish encryption algorithm.
In the safe and simple low-power-consumption Bluetooth lock control method, the pre-stored secret key is a secret key which is programmed in the equipment before leaving a factory.
A secure and easy bluetooth low energy lock, comprising:
the first receiving module is used for receiving an unlocking request sent by the mobile terminal;
a generating module for generating a first pseudo random number;
the encryption module is used for encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext;
the first sending module is used for sending the equipment ID and the first ciphertext to the mobile terminal;
the second receiving module is used for receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
the decryption module is used for carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
and the execution module is used for comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number is the same as the second pseudo random number, and refusing to unlock if the first pseudo random number is different from the second pseudo random number.
In the safe simple and easy bluetooth low energy lock, the decryption module includes:
the decryption unit is used for decrypting the second ciphertext by using the pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a second original text;
and the conversion unit is used for carrying out second conversion processing on the second original text to obtain a second pseudo-random number.
Has the advantages that:
according to the safe and simple low-power-consumption Bluetooth lock and the control method thereof, the first pseudo-random number and the first ciphertext used when the unlocking request is received each time are not repeated, so that the unlocking cannot be carried out through an exhaustive method, and the encrypted data transmitted by the Bluetooth lock in an open data link cannot be easily cracked through replay attack even if the encrypted data is intercepted by a third party, so that the safety is good.
Drawings
Fig. 1 is a flowchart of a safe and simple low-power-consumption bluetooth lock control method provided by the present invention.
Fig. 2 is an exemplary schematic diagram of a safe and simple bluetooth low energy lock control method provided by the present invention.
Fig. 3 is a schematic structural diagram of the safe and simple bluetooth low energy lock provided by the present invention.
Fig. 4 is a schematic structural diagram of a decryption module in the secure and simple bluetooth low energy lock provided by the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features.
Referring to fig. 1, the present invention provides a safe and simple bluetooth low energy lock control method, which includes the following steps:
receiving an unlocking request sent by a mobile terminal;
generating a first pseudo random number;
encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext;
sending the equipment ID and the first ciphertext to the mobile terminal;
receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
and comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different.
The following describes the steps in detail:
1) receiving an unlocking request sent by a mobile terminal
The mobile terminal may be, but is not limited to, a mobile phone with a bluetooth communication function, a tablet computer, and the like.
Generally, a corresponding unlocking program may be installed in the mobile terminal to establish communication with the bluetooth lock and make an unlocking request. Preferably, the low-power Bluetooth communication is adopted, so that the energy consumption can be reduced.
Preferably, the bluetooth lock performs the subsequent steps after receiving a valid unlocking request.
For bluetooth locks used for unshared facilities (including but not limited to residential door locks, office door locks, etc.), only certain personnel can unlock the locks in general, and therefore authentication is required;
in some embodiments, the unlocking request includes verification information (including but not limited to a password, a fingerprint, a face image, etc.), the verification information is preset by a user, the bluetooth lock verifies the validity of the verification information after receiving the unlocking request (i.e. matches with the verification information prestored in the bluetooth lock), and only after the verification of the verification information is passed, the unlocking request is valid, the subsequent steps are executed, so that the security can be further improved;
in other embodiments, the unlocking request does not include the verification information but includes the device ID of the bluetooth lock bound by the mobile terminal, the identity of the unlocking person can be verified in the mobile terminal, the mobile terminal can be used to send the unlocking request to the bluetooth lock after the verification is passed, the bluetooth lock compares the device ID of the bluetooth lock with the received device ID, and the subsequent steps are executed only if the unlocking request is valid when the device ID of the bluetooth lock is the same as the device ID of the mobile terminal. But is not limited thereto.
For the bluetooth locks used for shared facilities (including but not limited to shared bicycle, shared automobile, etc.), since sharing is required, the bluetooth locks are all valid unlocking requests as long as the corresponding unlocking program is installed in the mobile terminal and the unlocking request sent by the unlocking program is sent.
2) Generating a first pseudo random number r
In some embodiments, the method of generating the first pseudo random number is:
the current clock is added to the last first pseudo random number to generate a new first pseudo random number r.
The method for generating the first pseudo random number r is simple to implement, occupies small resources and is beneficial to reducing equipment cost.
Preferably, when the first pseudo random number is generated for the first time, a pre-stored random number is used as the last first pseudo random number. The pre-stored random number is generally written in the Bluetooth lock when the Bluetooth lock leaves a factory, an upper computer for writing is used for producing an initial first pseudo-random number, the randomness of the initial first pseudo-random number is determined by the upper computer, and a clock value is used as a seed of a new first pseudo-random number to ensure that a previous random number and a next generated random number have no fixed continuity; the use of only time as a seed, in addition to the initial random number, ensures that different devices can generate different first pseudo random numbers even at the same time.
3) Encrypting the first pseudo-random number r by using a pre-stored secret key p by adopting a preset symmetric encryption algorithm to obtain a first ciphertext m
The preset symmetric encryption algorithm can be DES, AES, 3DES, blowfish and other encryption algorithms; preferably, the preset symmetric encryption algorithm is a blowfish encryption algorithm, the encryption and decryption time consumption of the blowfish encryption algorithm is short, the implementation is easy in a singlechip with limited resources through software, and the encryption algorithm is well balanced between the security level and the implementation simplicity.
In some embodiments, the preset symmetric encryption algorithm uses a blockfish encryption algorithm with a 64-bit block size and supporting variable-length keys (32 bits to 448 bits), and the encryption processing can be completed through 16 rounds of encryption.
In some embodiments, the pre-stored secret key p is a secret key that is written in the device before leaving the factory, the secret key is unique and invisible, and the pre-stored secret key is not sent to the outside, so that a third party cannot obtain the pre-stored secret key through a mobile terminal that monitors or invades a user, and the security is high. However, the pre-stored key is not limited to this, and may be set by the user after the authorization verification through the mobile terminal, for example.
In some embodiments, the pre-stored key p is 64bits in length, but is not limited thereto.
4) Sending the device ID and the first ciphertext m to the mobile terminal
Each bluetooth lock has a device ID, which is a unique identifier of the bluetooth lock.
5) Receiving a second ciphertext n different from the first ciphertext m sent back by the mobile terminal
The method for generating the second ciphertext comprises the following steps:
a. inquiring a corresponding secret key p according to the equipment ID;
b. decrypting the first ciphertext m by using the inquired key and a preset symmetric encryption algorithm to obtain a first original text p';
c. carrying out first conversion processing on the first original text p' to obtain a conversion code q;
d. and encrypting the conversion code q by using a preset symmetric encryption algorithm to obtain a second ciphertext n.
The second ciphertext n may be generated by the mobile terminal, or may be generated by the server, and is preferably generated by the server; if the device ID is generated by the server, the mobile terminal receives the device ID and the first ciphertext m and forwards the device ID and the first ciphertext m to the server, and forwards the device ID and the first ciphertext m to the bluetooth lock after the server returns the second ciphertext n, as shown in fig. 2.
In step a, when the device ID is received, the device ID is matched and the corresponding key p is inquired (the key p is the same as the key p pre-stored in the corresponding bluetooth lock);
if the secret key p is burnt in the Bluetooth lock before leaving the factory, the secret key p is invariable; if the secret key p is set after the user passes the authority verification, the database of the device ID and the secret key p needs to be updated after each setting.
Further, the first conversion process in step c may be, but is not limited to, bitwise inverting each bit of the data, inverting a specific bit (e.g., first bit, last bit, etc.) of the data, or inserting a data segment of a specific length in a specific location (e.g., first bit, second bit, third bit … … last bit, etc.) of the data, etc. After the first conversion processing, the second ciphertext n can be ensured to be different from the first ciphertext m, so that unlocking can be realized by sending the original ciphertext back to the first ciphertext m.
6) The second ciphertext n is decrypted and converted to obtain a second pseudo-random number x
The step of carrying out decryption conversion processing on the second ciphertext n to obtain a second pseudo-random number x comprises the following steps:
a, a preset symmetric encryption algorithm is adopted, and a pre-stored secret key p is used for carrying out decryption processing on a second ciphertext n to obtain a second plaintext n';
b. and carrying out second conversion processing on the second original text n' to obtain a second pseudo-random number x.
If the first conversion processing in the step 5) is bitwise negation of each bit of the data, the second conversion processing is bitwise negation of each bit of the data;
if the first conversion processing in the step 5) is inverting the specific bit of the data, the second conversion processing is inverting the same specific bit;
if the first conversion processing in step 5) is to insert a data segment of a specific length at a specific position of the data, the second conversion processing is to delete the data segment from the data.
7) Comparing the first pseudo random number r with the second pseudo random number x, unlocking if the first pseudo random number r and the second pseudo random number x are the same, and refusing to unlock if the first pseudo random number r and the second pseudo random number x are different
The method can also send the unlocking result to the mobile terminal after unlocking or refusing to unlock, and for the Bluetooth lock applied to the shared facility, charging is started only after the Bluetooth lock is successfully unlocked, so that the returned unlocking result can be used for program judgment to start charging or not, and wrong charging caused by the fault of the Bluetooth lock is avoided.
The following is an example of the safe and simple bluetooth low energy lock control method:
referring to fig. 2, it is assumed that the pre-stored key p is written in the device at the time of factory, and its value is 73619858;
after receiving an unlocking request, generating a first pseudo random number r of 8625;
obtaining a first ciphertext m through the blob hash encryption processing;
sending the equipment ID and the first ciphertext m to the mobile terminal through Bluetooth;
the mobile terminal transmits the equipment ID and the first ciphertext m to the server, the server inquires a secret key p corresponding to the equipment ID, decrypts the first ciphertext m through the blowfish to obtain a value of a first original text p 'of 8625, performs bitwise negation on the first original text p' to obtain a negation number q of 4294958669, encrypts the negation number q through the blowfish to obtain a second ciphertext n, then sends the second ciphertext n back to the mobile terminal, and finally sends the second ciphertext n back to the Bluetooth lock;
decrypting the received second ciphertext n through the blowfish to obtain a value of a second ciphertext n' of 4294958669; then, bitwise negating the second original text n' to obtain a second pseudo-random number x with the value of 8625;
comparing the first pseudo random number r with the second pseudo random number x, if the first pseudo random number r and the second pseudo random number x are the same, unlocking, otherwise, not unlocking;
and sending an unlocking result to the mobile terminal.
Therefore, the safe and simple low-power-consumption Bluetooth lock control method receives the unlocking request sent by the mobile terminal; generating a first pseudo random number; encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext; sending the equipment ID and the first ciphertext to the mobile terminal; receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal; carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number; comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different; thereby realize unblanking, have following advantage:
1. the two-way transmission process of the Bluetooth can be intercepted by a third party, an interceptor acquires an encrypted pseudo-random number, and if the interceptor does not have a locked secret key p, the data cannot be decrypted;
2. the second ciphertext is sent back as a random number which is converted and encrypted, so that an interceptor cannot obtain the pseudo-random number transmitted at the time even if the interceptor obtains the random number;
3. after each unlocking request, the Bluetooth lock generates a pseudo-random number once, so that an interceptor cannot crack the original text (namely the pseudo-random number) transmitted at this time through an exhaustion method, namely, the interceptor cannot decrypt the random number by continuously changing a key, because the pseudo-random number is abandoned after each attempt and another new random number is generated;
4. because the random numbers transmitted every time are different, even if the interceptor retains the previous request data of successful unlocking, the lock can not be unlocked again, and the returned second ciphertext is different from the sent first ciphertext (because of conversion processing), thereby avoiding the Bluetooth lock from being broken through replay attack;
5. the method has the advantages of realizing encryption and decryption by using the blob fish encryption algorithm, having small resource consumption, easy realization, low cost, high operation speed and small unlocking delay.
Referring to fig. 3, the present invention further provides a safe and simple bluetooth low energy lock, which includes a first receiving module 1, a generating module 2, an encrypting module 3, a first sending module 4, a second receiving module 5, a decrypting module 6, and an executing module 7;
the first receiving module 1 is used for receiving an unlocking request sent by the mobile terminal;
the generating module 2 is used for generating a first pseudo random number;
the encryption module 3 is configured to encrypt the first pseudo-random number by using a pre-stored key to obtain a first ciphertext by using a preset symmetric encryption algorithm;
the first sending module 4 is configured to send the device ID and the first ciphertext to the mobile terminal;
the second receiving module 5 is configured to receive a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
the decryption module 6 is configured to perform decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
the execution module 7 is used for comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number is the same as the second pseudo random number, and refusing to unlock if the first pseudo random number is different from the second pseudo random number.
The first receiving module 1, the first transmitting module 4 and the second receiving module 5 preferably communicate with the mobile terminal through bluetooth low energy, which can reduce power consumption.
Further, as shown in fig. 4, the decryption module 6 includes a decryption unit 6.1 and a conversion unit 6.2;
the decryption unit 6.1 is configured to decrypt the second ciphertext by using a pre-stored key by using a preset symmetric encryption algorithm to obtain a second plaintext;
wherein the conversion unit 6.2 is configured to perform a second conversion process on the second original text to obtain a second pseudo-random number.
In some embodiments, the secure and easy bluetooth low energy lock further comprises a second sending module, and the second sending module is configured to send an unlocking result to the mobile terminal.
Therefore, the safe and simple low-power-consumption Bluetooth lock receives the unlocking request sent by the mobile terminal; generating a first pseudo random number; encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext; sending the equipment ID and the first ciphertext to the mobile terminal; receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal; carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number; comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different; thereby realize unblanking, have following advantage:
1. the two-way transmission process of the Bluetooth can be intercepted by a third party, an interceptor acquires an encrypted pseudo-random number, and if the interceptor does not have a locked secret key p, the data cannot be decrypted;
2. the second ciphertext is sent back as a random number which is converted and encrypted, so that an interceptor cannot obtain the pseudo-random number transmitted at the time even if the interceptor obtains the random number;
3. after each unlocking request, the Bluetooth lock generates a pseudo-random number once, so that an interceptor cannot crack the original text (namely the pseudo-random number) transmitted at this time through an exhaustion method, namely, the interceptor cannot decrypt the random number by continuously changing a key, because the pseudo-random number is abandoned after each attempt and another new random number is generated;
4. because the random numbers transmitted every time are different, even if the interceptor retains the previous request data of successful unlocking, the lock can not be unlocked again, and the returned second ciphertext is different from the sent first ciphertext (because of conversion processing), thereby avoiding the Bluetooth lock from being broken through replay attack;
5. the method has the advantages of realizing encryption and decryption by using the blob fish encryption algorithm, having small resource consumption, easy realization, low cost, high operation speed and small unlocking delay.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, which are substantially the same as the present invention.

Claims (10)

1. A safe and simple low-power-consumption Bluetooth lock control method is characterized by comprising the following steps:
receiving an unlocking request sent by a mobile terminal;
generating a first pseudo random number;
encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext;
sending the equipment ID and the first ciphertext to the mobile terminal;
receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
and comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number and the second pseudo random number are the same, and refusing to unlock if the first pseudo random number and the second pseudo random number are different.
2. The safe and simple Bluetooth low energy lock control method according to claim 1, wherein the method of generating the first pseudo random number is:
a new first pseudo random number is generated by adding the current clock to the last first pseudo random number.
3. The safe and easy bluetooth low energy lock control method according to claim 2, wherein when the first pseudo random number is generated for the first time, a pre-stored random number is used as the last pseudo random number.
4. The safe and simple Bluetooth low energy lock control method according to claim 1, wherein the second ciphertext is generated by a method comprising:
inquiring a corresponding secret key according to the equipment ID;
decrypting the first ciphertext by using the inquired key and the preset symmetric encryption algorithm to obtain a first original text;
performing first conversion processing on the first original text to obtain a conversion code;
and encrypting the conversion code by using the preset symmetric encryption algorithm to obtain a second ciphertext.
5. The safe and simple Bluetooth low energy lock control method according to claim 4, wherein the step of performing decryption conversion processing on the second ciphertext to obtain a second pseudo random number comprises the steps of:
decrypting the second ciphertext by using the pre-stored secret key by using the preset symmetric encryption algorithm to obtain a second original text;
and carrying out second conversion processing on the second original text to obtain a second pseudo-random number.
6. The safe and easy Bluetooth low energy lock control method according to claim 5, wherein the first conversion process is bitwise negation of each bit of the data, and the second conversion process is bitwise negation of each bit of the data;
or the first conversion processing is inverting a specific bit of data, and the second conversion processing is inverting the specific bit;
or the first conversion processing is to insert a data segment with a specific length at a specific position of the data, and the second conversion processing is to delete the data segment from the data.
7. The safe and simple Bluetooth low energy lock control method according to any one of claims 1 to 6, wherein the preset symmetric encryption algorithm is a blowfish encryption algorithm.
8. The safe and easy Bluetooth Low energy lock control method according to any one of claims 1 to 6, wherein the pre-stored secret key is a secret key that is programmed into the device before factory shipment.
9. The utility model provides a safe simple and easy bluetooth low energy lock which characterized in that includes:
the first receiving module is used for receiving an unlocking request sent by the mobile terminal;
a generating module for generating a first pseudo random number;
the encryption module is used for encrypting the first pseudo-random number by using a pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a first ciphertext;
the first sending module is used for sending the equipment ID and the first ciphertext to the mobile terminal;
the second receiving module is used for receiving a second ciphertext which is different from the first ciphertext and is sent back by the mobile terminal;
the decryption module is used for carrying out decryption conversion processing on the second ciphertext to obtain a second pseudo-random number;
and the execution module is used for comparing the first pseudo random number with the second pseudo random number, unlocking if the first pseudo random number is the same as the second pseudo random number, and refusing to unlock if the first pseudo random number is different from the second pseudo random number.
10. The secure bluetooth low energy lock of claim 9, wherein the decryption module comprises:
the decryption unit is used for decrypting the second ciphertext by using the pre-stored secret key by adopting a preset symmetric encryption algorithm to obtain a second original text;
and the conversion unit is used for carrying out second conversion processing on the second original text to obtain a second pseudo-random number.
CN202010116256.4A 2020-02-25 2020-02-25 Safe and simple low-power-consumption Bluetooth lock and control method thereof Active CN111145400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010116256.4A CN111145400B (en) 2020-02-25 2020-02-25 Safe and simple low-power-consumption Bluetooth lock and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010116256.4A CN111145400B (en) 2020-02-25 2020-02-25 Safe and simple low-power-consumption Bluetooth lock and control method thereof

Publications (2)

Publication Number Publication Date
CN111145400A true CN111145400A (en) 2020-05-12
CN111145400B CN111145400B (en) 2021-01-19

Family

ID=70527953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010116256.4A Active CN111145400B (en) 2020-02-25 2020-02-25 Safe and simple low-power-consumption Bluetooth lock and control method thereof

Country Status (1)

Country Link
CN (1) CN111145400B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113840270A (en) * 2021-08-16 2021-12-24 百度在线网络技术(北京)有限公司 Method, device, equipment and storage medium for establishing Bluetooth connection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1182621A2 (en) * 2000-08-24 2002-02-27 Philips Corporate Intellectual Property GmbH Access system with foreign access key learning capability
WO2005057447A1 (en) * 2003-12-09 2005-06-23 Matsushita Electric Industrial Co., Ltd. Authentication system, authentication device, and recording medium
CN105869246A (en) * 2016-04-13 2016-08-17 上海斐讯数据通信技术有限公司 Intelligent unlocking system and method thereof
CN107146307A (en) * 2017-05-03 2017-09-08 河南传通电子科技有限公司 A kind of method of securely unlocking of intelligent lock system
CN108492413A (en) * 2018-03-15 2018-09-04 广东西雅斯智能科技有限公司 Dynamic cipher generating method, password generator and coded lock
CN109255864A (en) * 2018-08-02 2019-01-22 深圳市朗仁科技有限公司 Shared bicycle bluetooth method for unlocking and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1182621A2 (en) * 2000-08-24 2002-02-27 Philips Corporate Intellectual Property GmbH Access system with foreign access key learning capability
WO2005057447A1 (en) * 2003-12-09 2005-06-23 Matsushita Electric Industrial Co., Ltd. Authentication system, authentication device, and recording medium
CN105869246A (en) * 2016-04-13 2016-08-17 上海斐讯数据通信技术有限公司 Intelligent unlocking system and method thereof
CN107146307A (en) * 2017-05-03 2017-09-08 河南传通电子科技有限公司 A kind of method of securely unlocking of intelligent lock system
CN108492413A (en) * 2018-03-15 2018-09-04 广东西雅斯智能科技有限公司 Dynamic cipher generating method, password generator and coded lock
CN109255864A (en) * 2018-08-02 2019-01-22 深圳市朗仁科技有限公司 Shared bicycle bluetooth method for unlocking and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113840270A (en) * 2021-08-16 2021-12-24 百度在线网络技术(北京)有限公司 Method, device, equipment and storage medium for establishing Bluetooth connection

Also Published As

Publication number Publication date
CN111145400B (en) 2021-01-19

Similar Documents

Publication Publication Date Title
CN109495274B (en) Decentralized intelligent lock electronic key distribution method and system
CN113067699B (en) Data sharing method and device based on quantum key and computer equipment
CN101072096A (en) Data safety transmission method for wireless sensor network
CN108650028B (en) Multiple identity authentication system and method based on quantum communication network and true random number
CN102217277A (en) Method and system for token-based authentication
CN109618334B (en) Control method and related equipment
CN109391468A (en) A kind of authentication method and system
CN111159684B (en) Safety protection system and method based on browser
CN106549939B (en) Data processing method and device for intelligent access control system
CN109714760B (en) Authority access control method suitable for intelligent equipment in direct connection communication environment
CN113472793A (en) Personal data protection system based on hardware password equipment
WO2005088892A1 (en) A method of virtual challenge response authentication
CN101964805B (en) Method, equipment and system for safely sending and receiving data
CN105281902A (en) Web system safety login method based on mobile terminal
Patel et al. On the security of remote key less entry for vehicles
US20120124378A1 (en) Method for personal identity authentication utilizing a personal cryptographic device
CN101539977A (en) Method for protecting computer software
CN104125239A (en) Network authentication method and system based on data link encryption transmission
CN1612522B (en) Challenge-based authentication without requiring knowledge of secret authentication data
CN111080856A (en) Bluetooth entrance guard unlocking method
CN111145400B (en) Safe and simple low-power-consumption Bluetooth lock and control method thereof
CN112311553B (en) Equipment authentication method based on challenge response
CN101539978B (en) Software protection method based on space
CN105827403B (en) Security method, security gate and server
CN106972928B (en) Bastion machine private key management method, device and system

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
CB02 Change of applicant information

Address after: 528200 3rd floor, building 1, Industrial Development Zone, Xiadong Yongkou, Guicheng Street, Nanhai District, Foshan City, Guangdong Province

Applicant after: Foshan Hanwen Yusheng Intelligent Technology Co., Ltd

Address before: 528000 floor 3, building 1, Industrial Development Zone, xiadongyongkou, Guicheng Street, Nanhai District, Foshan City, Guangdong Province

Applicant before: Foshan Hanwen Yucheng Intelligent Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant