The content of the invention
It is an object of the invention to provide the control program of a kind of smart lock and its Intelligent key, to solve institute in background technologyPairing between insecurity and Intelligent key and smart lock that the intelligent lock system of the prior art introduced occurs is not squareJust, the problems such as the carrying inconvenience of Intelligent key.
In order to solve the above-mentioned technical problem, the present invention provides following technical scheme.
The invention provides a kind of smart lock, is made up of signal transmitting and receiving unit, MCU, algorithm memory cell, its feature existsIn, including.
The smart lock be built-in with least one ID number and ID number corresponding to private key, be built-in with least one AES.
Random data is generated, and the random data is sent to Intelligent key.
Receive the first checking password that the Intelligent key is sent, the first checking password be the Intelligent key according toComputing generation is encrypted in the AES that private key corresponding to the ID number of itself is pointed to the random data using algorithm address.
According in the smart lock with the corresponding private key of ID number identical ID number of the Intelligent key and the random numberThe described first checking password is verified according to using the AES that algorithm address is pointed to.
If the first checking password authentification is by the way that smart lock is opened.
Preferably, it is described that described first checking password is verified, including:The AES that the algorithm address is pointed toAnd judge whether to cryptographic calculation or decryption computing.If described when computing is encrypted, according in the smart lock with it is describedThe AES that private key corresponding to the ID number identical ID number of Intelligent key and the random data are pointed to using algorithm address entersRow cryptographic calculation generation the second checking password, the second checking password is compared with the described first checking password, if identical,Smart lock is opened.If described when computing is decrypted, according to the ID number identical ID in the smart lock with the Intelligent keyComputing generation the 3rd is decrypted in the AES that private key corresponding to number and the first checking password are pointed to using algorithm addressPassword is verified, the 3rd checking password is compared with the random data, if identical, smart lock is opened.
Preferably, also include before the smart lock generation random data:ID number according to the smart lock is read, which generates, to be carriedThe wake-up signal of ID number, described wake-up signal is broadcasted, perform the step of smart lock generates random data.Or described in receivingIntelligent key carries the checking enabling signal of ID number compared with all ID numbers in described smart lock, if having identical, holdsThe step of row smart lock generates random data.
Preferably, it is described to be built-in with least one AES, burning or later stage user change during by dispatching from the factory.
Preferably, described algorithm address, by user setup data or system default data.
A kind of Intelligent key is also proposed according to the second aspect of the invention, is stored by signal transmitting and receiving unit, MCU, algorithmUnit, keyboard unit composition, it is characterised in that including:
The Intelligent key be built-in with least one ID number and ID number corresponding to private key, be built-in with least one AES.
Receive the random data that smart lock is sent.
The AES that the private key according to corresponding to the ID number of reading is pointed to the random data using algorithm address is carried outCryptographic calculation generation the first checking password.
The first checking password is sent to the smart lock, so that the smart lock utilizes the ID with the Intelligent keyNumber private key corresponding to identical ID number and the random data are verified using the AES that algorithm address is pointed to described firstPassword is verified, if being verified, smart lock is opened.
Preferably, in addition to:Receive in wake-up signal and the Intelligent key for the carrying ID number that the smart lock is sentAll ID numbers be compared, if having it is identical, carry out it is described reception smart lock send random data the step of.Or read instituteThe checking enabling signal stated the ID number of Intelligent key and generate carrying ID number is sent to described smart lock, carries out the reception intelligenceThe step of random data sent can be locked.
Preferably, it is described to be built-in with least one AES, burning or later stage user change during by dispatching from the factory.
Preferably, described algorithm address, by user setup data or system default data.
Preferably, described Intelligent key can read private key corresponding to ID number and ID number and be sent by signal transmitting and receiving unit,And if described Intelligent key receive ID number and ID number corresponding to private key be stored in data storage.
It can be drawn, the control program of smart lock and its Intelligent key provided by the invention, led to by the above-mentioned course of workCross ID number and carry out identification as Intelligent key and smart lock, the encryption pointed to by private key, random data, algorithm address is calculatedMethod carries out safe opening checking, due to private key in verification process not PE transmit and the AES that uses by withFamily selection, change, product is cracked so as to which mechanism progress batch can not be cracked according to AES foundation, improves intelligent lock systemSecurity.Intelligent key is transmittable or private key corresponding to can learning ID number and ID number, solves between Intelligent key and smart lockPairing inconvenience problem, Intelligent key be built-in with least one ID number and ID number corresponding to private key, solve Intelligent key and takeWith inconvenient problem.
Embodiment
The control program of a kind of smart lock and its Intelligent key provided in an embodiment of the present invention, to solve institute in background technologyPairing inconvenience between insecurity and Intelligent key and smart lock that the intelligent lock system of introduction occurs, Intelligent key are takenWith it is inconvenient the problems such as.
In order that those skilled in the art more fully understand the technical scheme in the embodiment of the present invention, and make of the invention realApply the above-mentioned purpose of example, feature and advantage can be more obvious understandable, below in conjunction with the accompanying drawings to the technology in the embodiment of the present inventionScheme is described in further detail.
Fig. 1 is a kind of structure chart of smart lock of the exemplary implementation of the present invention.The invention provides a kind of smart lock, by supplyingElectric unit, signal transmitting and receiving unit, MCU, algorithm memory cell, algorithm address storaging unit, key storing unit, keyboard unit,Control output unit composition.Signal transmitting and receiving unit provides signal data and receives or send, and can be usb interface module, infrared raySignal transmitting and receiving module, RF high-frequency signals transceiver module, low frequency signal transceiver module, Bluetooth signal transceiver module, WIFI signal are receivedSend out one or more combinations of module etc..
The invention provides a kind of control method of smart lock, as shown in Fig. 2 including.
S201 smart locks be built-in with least one ID number and ID number corresponding to private key, be built-in with least one AES.
Private key corresponding to the ID number and ID number of smart lock can be two packets or merge into a packet, work as mergingFor a packet when, be divided into ID number part and private component, identification of the ID number as Intelligent key and smart lock, withPlaintext transmission is in PE, and key that private key is verified as safe opening does not transmit in verification process, so as to produce IDPrivate key corresponding to private key corresponding to number, ID number and ID number is stored in key storing unit, ID number and corresponding private key can by withFamily obtains by keyboard unit editor data, acquisition random data or the methods of receiving data and stored.Smart lock can also be readPrivate key corresponding to the ID number and ID number specified is sent by signal transmitting and receiving unit, and Intelligent key, smart lock store after receiving, and facilitate intelligenceThe pairing between Intelligent key can be locked.Algorithm memory cell stores at least a kind of AES, during by dispatching from the factory burning or afterPhase user receives AES file data bag by the usb interface module of signal transmitting and receiving unit, WIFI signal transceiver module etc.It is modified.
S202 generates random data, and sends the random data to Intelligent key.
The random data is one of key of security of system, and the regular change of random data, then system, which exists, pacifiesFull leak.Computing generation pseudo random number can be encrypted using noise jamming source data, noise jamming source data can beADC etc. from signal transmitting and receiving unit, MCU.For example, the generation of random data by the data of linear change in preset timeIt is interior(Such as 0.1 millisecond)Change once, the data of linear change is intercepted before random data is generated and read noise jamming source numberAccording to be encrypted computing generation random data and to Intelligent key send.
S203 receives the first checking password that the Intelligent key is sent.
First checking password is that Intelligent key private key according to corresponding to the ID number of itself uses with the random dataComputing generation is encrypted in the AES that algorithm address is pointed to.
The AES that smart lock, the algorithm address of Intelligent key are pointed to can be one or more cryptographic calculation combinations,The method to set up of algorithm address can be identical with the method to set up of the ID number and corresponding private key, also restorable system acquiescence numberAccording to, by ID number direction calculation memory unit address reading algorithm address, the AES used by the sensing of algorithm address.If criticizingIn the product of amount, it is known that smart lock has multiple encryption algorithms, but does not know algorithm address when each ID number carries out open-authenticationIt the pointed AES used, increased so as to establish the difficulty of authentication code database, visit the private for smelling user's Intelligent keyThe mechanism that cracks of key is difficult to carry out, if the AES of product is changed by user, AES is non-intellectual, then can not establish and testDemonstrate,prove code database, it is described to crack mechanism and implement, so as to improve the security performance of smart lock.Because AES is unknownProperty, the AES being cracked can still use, on the security of system without influence.
S204 according to private key corresponding with the ID number identical ID number of the Intelligent key in the smart lock and it is described withMachine data are verified using the AES that algorithm address is pointed to the described first checking password, if the first checking passwordIt is verified, smart lock is opened.
The algorithm address verified to the described first checking password, by the ID number direction calculation memory unit address readAlgorithm address is read, the AES used is pointed to by algorithm address.Smart lock, Intelligent key are by private key, random data, encryptionAlgorithm establishes authentication code database, Intelligent key and smart lock whether can good authentication, it is private key corresponding to ID number, ID number, randomData, algorithm address, algorithm memory mechanism are required identical, are:Intelligent key and smart lock energy good authentication, identical IDNumber, private key, random data corresponding to ID number also need to the sensing of identical algorithm address AES it is also identical.
Because the species of AES is too many, smart lock applies more kinds of AESs as far as possible, so as to which smart lock is to theOne checking password authentification uses two kinds of verification methods, as shown in Figure 3.
The AES of algorithm address sensing described in S301 simultaneously judges whether to cryptographic calculation or decryption computing.
Every kind of AES storage mark, during the direction calculation access unit address of algorithm address, while point identification is depositedStorage address judges whether to cryptographic calculation or decryption computing to read mark, if using monistic cryptographic calculation or decryptionComputing, then without storing mark.
If S302 is described when computing is encrypted, according to the ID number identical ID in the smart lock with the Intelligent keyThe checking of computing generation second is encrypted in the AES that private key corresponding to number and the random data are pointed to using algorithm addressPassword, the second checking password is compared with the described first checking password, if identical, smart lock is opened;If the progressWhen decrypting computing, according to private key corresponding with the ID number identical ID number of the Intelligent key and described first in the smart lockThe checking password of computing generation the 3rd is decrypted in the AES that checking password is pointed to using algorithm address, and the 3rd checking is closeCode is compared with the random data, if identical, smart lock is opened.
PKE keyless access systems embody convenience and practicality, and the smart lock of keyless entry is often compatible intelligentThe button control of key, below in conjunction with accompanying drawing, the smart lock embodiment of the PKE keyless entries of the example present invention, smart lockSignal transmitting and receiving unit using RF high-frequency signals transceiver module, low frequency signal transmitter module, as shown in Figure 4.
S401 carries the wake-up signal of ID number according to the ID number generation for reading the smart lock, broadcasts described wake-up letterNumber, the step of smart lock generates random data is performed, or receive the checking enabling signal that the Intelligent key carries ID numberCompared with all ID numbers in described smart lock, if there is the step of identical, to perform the smart lock generation random data.
Read smart lock ID number method have it is a variety of, conventional be automatic sequence circulation read and specified property read, notSame applications are different, typically carry the wake-up of ID number using automatic sequence circulation reading ID number generation in public automatic gate inhibitionSignal, described wake-up signal is broadcasted by low frequency signal transmitter module, perform the step of smart lock generates random data.Household gate inhibition or automobile door control are typically using specifying property to read, and to save power consumption, specify property to read has input numbering to point to respectivelyID number storage address reads and pre-set fixed ID number storage address and reads, and reads the wake-up letter that ID number generation carries ID numberNumber, described wake-up signal is broadcasted by low frequency signal transmitter module, performs the step of smart lock generates random data.Without keySpoon enter smart lock often compatible Intelligent key button control, intelligent interlocking wait receive high-frequency signal when, receiveTo the checking enabling signal from Intelligent key carrying ID number compared with all ID numbers in described smart lock, if there is phaseTogether, the step of performing the smart lock generation random data.
S402 generates random data, and sends the random data to Intelligent key.
Random data is generated, sends the random data from RF high-frequency signals transceiver module to Intelligent key, delay is defaultAfter time, the first checking password of Intelligent key transmission is not being received, is returning to S401 steps.
S403 receives the first checking password that the Intelligent key is sent.
The first checking password is Intelligent key private key and random data according to corresponding to the ID number of itselfComputing generation is encrypted in the AES pointed to using algorithm address.
The ID number or receive the ID that checking enabling signal carries that S404 carries according to the smart lock broadcast wakeup signalsNumber, private key corresponding to the ID number and the random data are close to the described first checking using the AES that algorithm address is pointed toCode is verified, if the first checking password authentification is by the way that smart lock is opened.
The first checking password authentification is by the way that smart lock can also send the unlatching day for carrying linkage signal after openingWill.In public automatic access control applications described above, automatic gate inhibition receives the unlatching daily record for carrying linkage signal, and checking is takenUnlatching daily record with linkage signal is by the way that controlled motor automatically opens up gate inhibition.
Fig. 5 is a kind of structure chart of Intelligent key of the exemplary implementation of the present invention.The invention provides a kind of Intelligent key,By power supply unit, signal transmitting and receiving unit, MCU, algorithm memory cell, algorithm address storaging unit, keyboard unit, key storage listMember composition.Signal transmitting and receiving unit provides signal data and receives or send, and can be usb interface module, infrared signal transmitting-receiving mouldBlock, RF high-frequency signals transceiver module, low frequency signal transceiver module, Bluetooth signal transceiver module, WIFI signal transceiver module etc.One or more combination.
The invention provides a kind of control method of Intelligent key, as shown in fig. 6, including.
S601 Intelligent key be built-in with least one ID number and ID number corresponding to private key, be built-in with least one encryption and calculateMethod.
Private key corresponding to the ID number and ID number of Intelligent key can be two packets or merge into a packet, work as conjunctionAnd when being a packet, it is divided into ID number part and private component, identification of the ID number as Intelligent key and smart lock,With plaintext transmission in PE, key that private key is verified as safe opening does not transmit in verification process, so as to producePrivate key corresponding to private key corresponding to ID number, ID number and ID number is stored in key storing unit, and ID number and corresponding private key can be byUser obtains by keyboard unit editor data, acquisition random data or the methods of receiving data.Intelligent key can also be readPrivate key corresponding to the ID number and ID number specified is sent by signal transmitting and receiving unit, and Intelligent key, smart lock store after receiving, and solve intelligenceThe pairing between Intelligent key can be locked.Algorithm memory cell stores at least a kind of AES, during by dispatching from the factory burning or afterPhase user passes through the change such as the usb interface module of signal transmitting and receiving unit, WIFI signal transceiver module.
S602 receives the random data that smart lock is sent.
S603 private keys according to corresponding to the ID number of reading use the AES of algorithm address sensing with the random dataComputing generation the first checking password is encrypted.
The algorithm address of the checking password of generation first, by the ID number direction calculation memory unit address read with reading algorithmLocation, the AES used is pointed to by algorithm address.The AES that algorithm address is pointed to can be one or more encryption fortuneCombination is calculated, the method to set up of algorithm address can be identical with the method to set up of the ID number and corresponding private key, also can restorerSystem default data.
Intelligent key and smart lock whether can good authentication, private key corresponding to ID number, ID number, random data, use plusClose algorithm is required identical, and therefore, Intelligent key and the AES pointed by smart lock identical algorithm address are also identical, fromAnd, it is necessary to upgrade identical AES file to smart lock and Intelligent key simultaneously during user's change AES.
S604 sends the first checking password to the smart lock, so that the smart lock utilizes and the Intelligent keyID number identical ID number corresponding to the AES that is pointed to using algorithm address of private key and the random data to described firstChecking password is verified, if being verified, smart lock is opened.
PKE keyless access systems embody convenience and practicality, the Intelligent key compatibility button of keyless entryControl, below in conjunction with accompanying drawing, the Intelligent key embodiment of the PKE keyless entries of the example present invention, the signal of Intelligent key is receivedBill member uses RF high-frequency signals transceiver module, low frequency signal receiving module, as shown in Figure 7.
S701 receives the wake-up signal for the carrying ID number that the smart lock is sent and all ID numbers in the Intelligent keyIt is compared, if having identical, carries out next step, or according to the ID number for reading the Intelligent key and generates and carry ID numberChecking enabling signal is sent to described smart lock, carries out next step.
The low frequency signal receiving module of Intelligent key wakes up MCU after receiving the wake-up signal for carrying ID number, transmits ID numberTo MCU, whether with the ID number that receives have identical, if identical, carry out in next step if comparing all ID numbers of key storing unitSuddenly, if differing, Intelligent key returns to dormancy.
The button of the keyboard unit of Intelligent key points to the address of key storing unit, reads ID number and the life of the addressDescribed smart lock is sent to by RF high-frequency signal transceiver modules into the checking enabling signal for carrying ID number, carries out next step.
S702 receives the random data that smart lock is sent.
After Intelligent key delay preset time, when not receiving random data, S701 steps are returned to.
S703 private keys according to corresponding to the ID number of reading use the AES of algorithm address sensing with the random dataComputing generation the first checking password is encrypted.
S704 sends the first checking password to the smart lock.
Intelligent key sends the first checking password to return S701 steps after smart lock by RF high-frequency signals transceiver module.
Technical scheme described above solves the control security of smart lock, the example below, solves smart lockWith the marriage problem of Intelligent key.
Smart lock, Intelligent key establish authentication code database by private key, random data, AES, according to smart lock, intelligenceEnergy key is built-in with least one AES, so as to which smart lock, Intelligent key at least have an authentication code database.IntelligenceKey and smart lock whether can good authentication, private key, random data, algorithm address, algorithm storage machine corresponding to ID number, ID numberSystem is required identical, is:Intelligent key and smart lock energy good authentication, private key, random number corresponding to identical ID number, ID numberIt is also identical according to the AES for also needing to the sensing of identical algorithm address, therefore, it is necessary to simultaneously right when user changes AESSmart lock and Intelligent key upgrading identical algorithm memory mechanism file, so that smart lock, Intelligent key are in identical algorithmPointed in location and use identical AES.Smart lock, Intelligent key use identical algorithm memory mechanism file, smart lock withThe pairing of Intelligent key only needs to match private key corresponding to ID number and ID number, by system default algorithm address.
Smart lock generally requires to manage in the application of reality, the example below, solves the problem of management of smart lock.
Corresponding to first ID number of smart lock typing and ID number during private key, key can be authorized as management, be verifiedOpen after being authorized, the keyboard unit of smart lock can just use, and various settings can just be changed.
The key of smart lock needs to share, and the key shared is also required to manage, and smart lock, Intelligent key read ID number and IDPrivate key corresponding to number can select to send the learning signal for carrying limitation mark, signal format when being sent by signal transmitting and receiving unitSuch as:8 study algorithm address date bags of private key data bag+8 of ID number packet+32 of identification data packet+24, wherein 8Learn the predeterminable instruction of identification data packet, such as:0x14 represents Intelligent key, smart lock can not again read off the ID after receiving storageNumber and ID number corresponding to private key send.
The algorithm address of private key corresponding to the ID number and ID number of smart lock is specified, different algorithms is set in different time sectionsAddress value, smart lock manager distribute private key corresponding to the ID number and ID number of algorithms of different address and use or face to finite time periodWhen the user that uses, to realize that time segment limitation uses.The signal format of distribution is such as:+ 24 ID of 8 study identification data packetsThe algorithm address date bag of private key data bag+8 of number bag+32, wherein study mark of 8 study identification data packets for limitationKnow, so that user can not share again, 8 algorithm address date bag 0xFF can represent system default data.
Fig. 8 is a kind of hardware frame figure of intelligent lock system of the exemplary implementation of the present invention, as shown in figure 8, the smart lockSystem is made up of Intelligent key and smart lock two parts.
Intelligent key can be portable remote controller or installation and operation in electronic products such as computer, mobile phone, wearable devicesIn one or more on application software, wherein take formula remote control including at least RF high-frequency signals transceiver module, low frequency believeNumber receiving module, data storage cell, triaxial antennas, keyboard unit, control unit, usb interface module, battery.
Smart lock includes power module, keyboard unit, low frequency signal transmitter module, RF high frequencies transceiver module, WIFI signalTransceiver module, Bluetooth signal transceiver module, data storage cell, control unit, usb interface module, drive module, mechanical door lockPerforms device.In actual product, the module that signal transmitting and receiving unit uses depending on the Intelligent key used, as illustrated,If only using portable remote controller, WIFI signal transceiver module, Bluetooth signal transceiver module need not use in actual production,In this example, the compatible Intelligent key of smart lock is then used using portable remote controller, computer, mobile phone, wearable device etc.WIFI signal transceiver module, Bluetooth signal transceiver module.
The Intelligent key control smart lock of the present invention, divides active control and passive control.Active control is read by Intelligent keyTake ID number generation to carry the checking enabling signal of ID number and actively access smart lock, active control point, which is specified, reads ID number and orderRead ID number generation checking enabling signal;Passive control(PKE keyless access systems)ID number generation is read by smart lock to carryThe wake-up signal broadcast of ID number, Intelligent key wake up after receiving and are controlled, and passively control to divide to specify and read ID number and sequentially followRing reads the wake-up signal that ID number generation carries ID number.
When private key corresponding to Intelligent key is built-in with multiple ID numbers and ID number controls multiple smart locks, active control is to being madeWith inconvenience is brought, passively control(PKE keyless access systems)Intelligent key be chronically at reception state, smart lock is sentThe wake-up signal shield in the air of ID number is carried, so as to generation system security breaches, cracking equipment will verify that distance is empty by networkPlan is furthered, and smart lock is opened in checking.
For these reasons, the present invention also provides another control technology scheme, to solve above-mentioned security and use notThe problem of facilitating.The built-in control identifier of smart lock, the control identifier for being set by keyboard unit or being received Intelligent key store,The control identifier that Intelligent key is received when smart lock is compared, if by the way that smart lock order, which reads or specified, reads IDNumber generation carry ID number wake-up signal send, generation random data send, receive Intelligent key send first checking password,Private key and random data are close to the described first checking using the AES that algorithm address is pointed to according to corresponding to the ID number of readingCode is verified, if by the way that smart lock is opened.The built-in control identifier of Intelligent key, is set by keyboard unit or is received intelligenceThe mode such as control identifier storage, Intelligent key is by shaking, sensing, keyboard of lock sends control identifier and wakes up intelligenceEnergy key, the wake-up signal for the carrying ID number that smart lock is sent is received compared with all ID numbers of itself, if identical, receiveThe random data that smart lock is sent, private key is pointed to the random data using algorithm address according to corresponding to the ID number of readingAES is encrypted the checking password of computing generation first and sent, and any letter is not received into dormancy after Intelligent key delayNumber.
It is described above, when Intelligent key is identical with the control identifier of smart lock, can solve PKE keyless access systemsSecurity breaches and inconvenient problem with use, Intelligent key is built-in with least one ID number, solves Intelligent key and carry notThe problems such as facilitating.
Described above, spirit of the invention is:It is a kind of intelligent based on being proposed on the basis of " challenge response " control principleThe control program of lock and its Intelligent key, mainly propose that bulk article is encrypted using identical on the basis of described control principleAlgorithm is how to produce security breaches, and provides the solution of described security breaches, also further solve smart lock withThe pairing inconvenience problem of Intelligent key, carry it is inconvenient, in-convenience in use the problems such as.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit andWithin principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.