CN103914901B - A kind of method for unlocking and unlocking system - Google Patents

A kind of method for unlocking and unlocking system Download PDF

Info

Publication number
CN103914901B
CN103914901B CN201410120753.6A CN201410120753A CN103914901B CN 103914901 B CN103914901 B CN 103914901B CN 201410120753 A CN201410120753 A CN 201410120753A CN 103914901 B CN103914901 B CN 103914901B
Authority
CN
China
Prior art keywords
information
mobile terminal
quick response
response code
entrance guard
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.)
Expired - Fee Related
Application number
CN201410120753.6A
Other languages
Chinese (zh)
Other versions
CN103914901A (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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201410120753.6A priority Critical patent/CN103914901B/en
Publication of CN103914901A publication Critical patent/CN103914901A/en
Application granted granted Critical
Publication of CN103914901B publication Critical patent/CN103914901B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Lock And Its Accessories (AREA)

Abstract

The invention discloses a kind of method for unlocking and unlocking system, methods described includes:Mobile scanning terminal simultaneously parses the first Quick Response Code that entrance guard device is shown, obtains the first information corresponding to first Quick Response Code;The mobile terminal is encrypted using the first information described in private cipher key pair, obtain the second information, and in the form of the second Quick Response Code by second presentation of information on the screen of the mobile terminal, for the entrance guard device scan and parse so determine whether produce unlocking action.By the above-mentioned means, the present invention can be effectively improved the security of gate control system, provide users with the convenient.

Description

A kind of method for unlocking and unlocking system
Technical field
The present invention relates to moving communicating field and gate inhibition field, more particularly to a kind of method for unlocking and unlocking system.
Background technology
Along with the development of science and technology, door lock has been no longer limited to the form for needing key to open in the past, more and more Occasion selection use door-control lock, as each hotel door, cell door etc..Carrying keys can not only be avoided using door-control lock The trouble brought, and unlocking process is also more convenient.
Existing relatively common gate control system mainly has nfc card, fingerprint recognition, may be also in some important occasions Eye mask identification can be used.But nfc card always needs to carry with, similar to key, once lose or leave behind, it will very Trouble, and nfc card and fingerprint recognition are all easier to be replicated, and security performance is not high, although eye mask identification can solve easily The problem of being replicated and carry trouble, but its cost is too high, and it is greatly limited its use range.
The content of the invention
The present invention solves the technical problem of a kind of method for unlocking and unlocking system is provided, existing gate inhibition can solve the problem that Device is inconvenient to carry and the problem of being easily replicated, effectively raises the security of gate control system, is brought convenience for user.
In order to solve the above technical problems, one aspect of the present invention is:A kind of method for unlocking is provided, it is described to open Locking method includes:Entrance guard device is automated randomized to be produced the first Quick Response Code and is shown on the display screen of the entrance guard device, is moved Dynamic terminal scanning simultaneously parses first Quick Response Code of the entrance guard device screen display, obtains corresponding to first Quick Response Code The first information;The mobile terminal obtains private cipher key first with password, recycles the first information described in the private cipher key pair Be encrypted, obtain the second information, and in the form of the second Quick Response Code by second presentation of information in the mobile terminal On screen, so that the entrance guard device scans and parses and then determines whether to produce unlocking action.
Wherein, the mobile terminal obtains private cipher key first with password, recycles first described in the private cipher key pair Information is encrypted, and obtains the second information, and in the form of the second Quick Response Code that second presentation of information is whole in the movement Step on the screen at end includes:The mobile terminal obtains private cipher key first with password, recycles the private cipher key pair Described information is encrypted, and obtains the second information, and by the identification code of the mobile terminal and second information combination, and with The form of second Quick Response Code is by the second presentation of information after combination on the screen of the mobile terminal.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of method for unlocking is provided, it is described Method for unlocking includes:Entrance guard device is automated randomized to be produced and corresponds to the first Quick Response Code of the first information in screen display, to cause Mobile scanning terminal simultaneously parses first Quick Response Code and then obtains the first information;The entrance guard device scans and parses institute The second Quick Response Code that mobile terminal screen is shown is stated, obtains the second information, second information is the mobile terminal using first Private cipher key is obtained using password, recycles the first information described in the private cipher key pair to be encrypted and obtain;The gate inhibition Second Quick Response Code is decrypted using Public Key for device, obtains the 3rd information, wherein, the Public Key is by described Mobile terminal is generated, corresponding with the private cipher key;The entrance guard device is by the 3rd information and the first information Matched, to determine whether to produce unlocking action.
Wherein, if the 3rd information matches with the first information, the entrance guard device produces unlocking action;Such as 3rd information described in fruit mismatches with the first information, then the entrance guard device does not produce unlocking action.
Wherein, the first Quick Response Code corresponding to the first information that the entrance guard device is shown is by after the mobile scanning terminal Again it is automated randomized to produce and show the Quick Response Code corresponding to a new first information.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of mobile terminal is provided, it is described Mobile terminal:Including camera, parsing module, encrypting module and display module, the camera is used to scan entrance guard device Automated randomized the first Quick Response Code for producing and showing;The parsing module obtains described first for parsing first Quick Response Code The first information corresponding to Quick Response Code;The encrypting module is used to obtain private cipher key first with password, recycles described privately owned close The first information is encrypted to obtain the second information for key;The display module is used for second information with Quick Response Code Form is shown on the screen of the mobile terminal, so that the entrance guard device scans and parses and then determines whether to produce unlocking Action.
Wherein, the encrypting module be additionally operable to the identification code of second information and the mobile terminal being combined and As the second information.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of entrance guard device is provided, it is described Entrance guard device includes:Display module, camera, parsing module, deciphering module and judge module, the display module are used for certainly Dynamic the first Quick Response Code for randomly generating and showing the corresponding first information, to cause mobile scanning terminal and parse first two dimension Code and then obtain the first information;The camera is used to scan the second Quick Response Code shown on the mobile terminal screen; The parsing module obtains the second information corresponding to second Quick Response Code, second letter for parsing second Quick Response Code Breath is that the mobile terminal obtains private cipher key first with password, recycles the first information described in the private cipher key pair to be added Obtained from close;The deciphering module is used to second information be decrypted using Public Key, obtains the 3rd information, its In, the Public Key is generated by the mobile terminal, corresponding with the private cipher key;The judge module is used for institute State the 3rd information to be matched with the first information, to determine whether to produce unlocking action.
Wherein, the entrance guard device also includes execution module, the execution module be used for the 3rd information with it is described The first information performs unlocking action when matching, and when the 3rd information and the first information mismatch, retains the gate inhibition The locking states of device.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of unlocking system is provided, it is described Unlocking system includes mobile terminal and entrance guard device, and the entrance guard device is used for automated randomized generation and shows the corresponding first information The first Quick Response Code;The mobile terminal is used to scanning and parsing the first Quick Response Code that the entrance guard device is shown, obtains described The first information corresponding to first Quick Response Code;The mobile terminal is additionally operable to obtain private cipher key first with password, described in recycling Private cipher key pair described information is encrypted, and obtains the second information, and show second information in the form of the second Quick Response Code Show on the screen of the mobile terminal;The entrance guard device is additionally operable to scan and parses the mobile terminal screen is shown Two Quick Response Codes, the second information is obtained, and second information is decrypted using Public Key, obtain the 3rd information, wherein, The Public Key is generated by the mobile terminal, corresponding with the private cipher key;The entrance guard device is additionally operable to institute State the 3rd information to be matched with the first information, to determine whether to produce unlocking action.
The beneficial effects of the invention are as follows:The situation of prior art is different from, the present invention is to scan Quick Response Code as intermediate medium The data interaction between terminal and entrance guard device is moved, body is carried out to user in a manner of asymmetric-key encryption and decryption Part identification, can make user to carry out unlocking operation without additionally carry other devices, and private cipher key is only stored in shifting In dynamic terminal, have a safety feature, can effectively prevent the potential threat being replicated, be brought convenience for user.
Brief description of the drawings
Fig. 1 is the flow chart of method for unlocking first embodiment of the present invention;
Fig. 2 is the flow chart of method for unlocking second embodiment of the present invention;
Fig. 3 is the flow chart of the embodiment of method for unlocking the 3rd of the present invention;
Fig. 4 is the flow chart that mobile terminal of the present invention registers an embodiment to entrance guard device;
Fig. 5 is the flow chart of the embodiment of method for unlocking the 4th of the present invention;
Fig. 6 is the flow chart of the embodiment of method for unlocking the 5th of the present invention;
Fig. 7 is the flow chart that entrance guard device of the present invention to user register an embodiment;
Fig. 8 is the structural representation of the embodiment of mobile terminal one of the present invention;
Fig. 9 is the structural representation of the embodiment of entrance guard device one of the present invention;
Figure 10 is the structural representation of an another embodiment of entrance guard device of the present invention;
Figure 11 is the structural representation of the embodiment of unlocking system one of the present invention.
Embodiment
Refering to Fig. 1, Fig. 1 is the flow chart of method for unlocking first embodiment of the present invention.Comprise the following steps:
Step S101:Mobile scanning terminal and the first Quick Response Code for parsing entrance guard device screen display, obtain described first The first information corresponding to Quick Response Code.
User, it is necessary to when opening door, the screen of the camera alignment entrance guard device of mobile terminal, takes the photograph close to entrance guard device The first Quick Response Code shown as head scanning gate inhibition's device screen.Preferably, mobile terminal is scanned using front camera, To facilitate the Quick Response Code of next step screen display second to be scanned for entrance guard device.
In another embodiment, mobile terminal front camera is scanned before the first Quick Response Code, to user's body Part is identified, if passing through and identifying user can be determined with moving by the identification of recognition of face, fingerprint recognition or other modes The identification code that dynamic terminal is set matches, then the step of camera scans the first Quick Response Code is continued executing with, if user is in movement The identification code that terminal is set mismatches, then locks mobile terminal, and this mobile terminal can not carry out unlocking action again, and then further Ensure the security that mobile terminal is unlocked.
After getting the first Quick Response Code, mobile terminal parses to first Quick Response Code, obtains the first Quick Response Code pair The first information answered.The intermediary message that the first information is verified between mobile terminal and gate control system, preferably Numeral, can also be letter or the symbol of other forms in other embodiments.If the mobile terminal is android systems System, the scanning and parsing of expansion interface progress Quick Response Code in Android system can be used.Such as, Android system can be used In be responsible for two-dimensional code scanning and the expanding library zxing storehouses of parsing are scanned and parsed.Mobile terminal calls The Quick Response Code bitmap BitMap that QRCodeReader function pairs are obtained by camera is parsed, afterwards result again analytically In obtain the first information corresponding to first Quick Response Code.Analysis mode herein is only intended to illustrate, and not limits, other The method parsed to first Quick Response Code belongs to the scope of present embodiment protection.Likewise, android herein System is also only intended to citing and not limited, and the scheme that method in present embodiment is used in other systems falls within the present invention The scope of protection.
Step S102:The mobile terminal is encrypted using private cipher key pair described information, obtains the second information, and with The form of second Quick Response Code by second presentation of information on the screen of the mobile terminal, for the entrance guard device scan With parse so that determine whether produce unlocking action.
First key described in private cipher key pair is employed in present embodiment to be encrypted, that is, is employed asymmetry and added It is close.The asymmetric encryption, which refers to encrypt and decrypted, uses two different keys, and the two keys occur in pairs, externally Disclosed part, turns into Public Key, is commonly called as Public Key, and another part is confidential, turns into private cipher key, custom Claim private cipher key.The content of Public Key encryption can only can be just decrypted with private cipher key, and with private key encryption Content can only could also be decrypted by corresponding Public Key.In use, it is publicly-owned externally to announce its for general of mobile terminal Key, and retain its corresponding private cipher key, so, mobile terminal can only be passed through using the first information after private key encryption Corresponding Public Key could be decrypted, and can effectively prevent information leakage or phenomenon that the first information is replicated.Common Asymmetry encryption has RSA and DSA two ways, and the two may be used to encrypt and signs, and security performance is similar, and DSA more stresses and signed, while arithmetic speed is also more rapid, is more suitable for present embodiment, thus present embodiment selection DSA To be encrypted.It is pointed out that being used herein as RSA or other cipher modes fall within come the scheme for being encrypted and signing Protection scope of the present invention.
It is pointed out that in order to ensure that the private cipher key of generation is not got compromised, it is preferred that the process for generating key will be Mobile terminal end is performed.
The first information is encrypted after obtaining the second information mobile terminal, with QRCodeWriter functions wanting described the Two information are converted into corresponding Quick Response Code matrix (BitMatrix), then again by the Quick Response Code matrix (BitMatrix) Picture element matrix is changed into, picture element matrix, which is finally converted into bitmap (BitMap), again is shown on the screen of the mobile terminal, tool Body program is as follows:Function is stated first,
KeyGen=KeyPairGenerator.getInstance (" DSA ");
KeyGen be may then pass through to obtain Public Key and private cipher key:
Keys=keyGen.generateKeyPair ();
PrivateKey=(DSAPrivateKey) keys.getPrivate ();
PublickKey=(DSAPublicKey) keys.getPublic ();
The privateKey represents private cipher key, and publicKey represents Public Key.
It is pointed out that the method for generating Quick Response Code herein is simply illustrated, and not limit.
As shown in Fig. 2 Fig. 2 is the second embodiment flow chart of method for unlocking of the present invention.
The difference of the embodiment in embodiment and Fig. 1 in Fig. 2 is that present embodiment execution of step S201 is moved Dynamic terminal scanning simultaneously parses the first Quick Response Code that entrance guard device is shown, obtain the first information corresponding to first Quick Response Code and Mobile terminal is encrypted using the first information described in private cipher key pair described in step S202, after obtaining the second information, in addition to Step S203:Will combination by the identification code of the mobile terminal and second information combination, and in the form of the second Quick Response Code The second presentation of information afterwards is on the screen of the mobile terminal.The identification code, which includes user name or other, can represent movement The information of terminal identity, it is as shown below.
User name The second information after encryption
Prior art is different from, the present invention carries out data interaction to scan Quick Response Code as intermediate medium, with unsymmetrical key Identification is carried out, user can be made to carry out unlocking operation without additionally carrying other devices, and private cipher key is only protected Deposit in the terminal, have a safety feature, can effectively prevent the potential threat being replicated, be brought convenience for user.
In another embodiment, as shown in Figure 3.Fig. 3 is the flow chart of the embodiment of method for unlocking the 3rd of the present invention.Move Dynamic terminal obtains the first information corresponding to first Quick Response Code in the first Quick Response Code for scanning and parsing entrance guard device and show Also include before step mobile terminal to the entrance guard device registered the step of, such as the step S301 in Fig. 3.
Door is once locked, then can only could be opened by the user of authentication, then mobile whole in order to make There is unlocking authority at end, then mobile terminal needs to be registered to entrance guard device before unlocking.In order to ensure safety, it is preferred that only Can be when door lock be opened, mobile terminal could be registered to entrance guard device, as shown in figure 4, Fig. 4 is mobile terminal of the present invention An embodiment flow chart is registered to entrance guard device.Fig. 4 is the detailed description to Fig. 3 steps S301.Comprise the following steps:
Step S401:After user inputs identification code, corresponding publicly-owned close of a pair of mobile terminal and entrance guard device generation Key and private cipher key.
Wherein, identification code, which includes user name or other, can represent the information of mobile terminal identity, it is preferable with it is digital come Represent, can also be letter or other characters in other embodiments.
User name Public key
Generally, user name is distributed by entrance guard device keeper, facilitates management of the keeper to user right, but It can be set by user oneself.After generating Public Key and private cipher key, mobile terminal retains its private cipher key.
If the Public Key of generation is oversize, and when the resolution of the data camera of entrance guard device is inadequate, will can use The combined information of name in an account book and Public Key is divided into forms Quick Response Code twice, then allows entrance guard device to be scanned.
In another embodiment, it is connected with entrance guard device by PC, first identification code is sent on PC, then is led to Cross PC and send the combined information of user name and Public Key to entrance guard device and registered.
Step S402:Store the password that user inputs encryption private cipher key.
After obtaining private cipher key, in order to further ensure that safety, user also needs the close of one encryption private cipher key of input Code, corresponding mobile terminal store above-mentioned password and the private cipher key of encryption.It is corresponding, when user unlocks using key to scanning To Quick Response Code be encrypted when, it is necessary to input this password.Certainly, mobile terminal can remember this password, and then avoid user The trouble that input password is brought every time, but can have certain potential safety hazard.
Step S403:Identification code is included on screen for entrance guard device using production Quick Response Code after Public Key encryption Scanning.
Treat that entrance guard device is scanned, mobile terminal completes the registration process to entrance guard device.Using such a registration side Method, even if the keeper to entrance guard device with management right can not get the key of user encryption and replicate to pretend to be use Family, it is effectively protected the information security of user.
Certainly, the cancellation of code can also be identified in mobile terminal to entrance guard device.When door is opened, mobile terminal will Identification code generates Quick Response Code under conditions of being both not added with Public Key or being not added with private cipher key and is shown in the screen of mobile terminal On, the cancellation to identification code can be completed after entrance guard device scans Quick Response Code corresponding to its identification code.
Prior art is different from, mobile terminal of the present invention is first registered to entrance guard device, relative with entrance guard device generation The Public Key and private cipher key answered, and Public Key is disclosed to entrance guard device, and preserve to protect the close of private cipher key Code, can prevent identification code to be replicated;When needing to nullify identification code, only identification code need to be generated into Quick Response Code is for entrance guard device It can complete to nullify, it is not only easy to operate simple, but also the safety of identification code can be effectively protected.
As shown in figure 5, Fig. 5 is the flow chart of the embodiment of method for unlocking the 4th of the present invention.Present embodiment includes as follows Step:
Step S501:The screen display of entrance guard device corresponds to the first Quick Response Code of the first information, to cause mobile terminal to sweep Retouch and parse first Quick Response Code and then obtain the first information.
After on door lock, entrance guard device can generate the first information at random, and the first information is generated into the first Quick Response Code and shown Show on entrance guard device, to cause mobile scanning terminal and parse first Quick Response Code and then obtain the first information.Described The intermediary message that one information is verified between mobile terminal and gate control system, preferably numeral, in other embodiment In can also be letter or other forms symbols.It is pointed out that the first information generated at random on entrance guard device, in quilt After mobile scanning terminal identification, no matter scan and whether succeed, all regenerate the new first information again, can effectively prevent user The Quick Response Code of the encryption formed after scanning is recorded and cracked by third party.
Step S502:The entrance guard device scans and parsed the second Quick Response Code that the mobile terminal screen is shown, obtains Second information, second information are that the mobile terminal is encrypted and obtained using the first information described in private cipher key pair.
Entrance guard device is scanned using camera and shows that above-mentioned second Quick Response Code obtains the second information, institute on mobile terminal screen It is corresponding with the second information to state the second Quick Response Code, wherein the second information is close to first information progress including identification code and mobile terminal Information after key encryption, the identification code include user name, and user name is preferably numeral, in other embodiments can also For letter or other characters.
Step S503:Second Quick Response Code is decrypted using Public Key for the entrance guard device, obtains the 3rd letter Breath.
Entrance guard device has been parsed after the second Quick Response Code obtains the second information, after identification code and the encryption that can obtain mobile terminal Information, entrance guard device found by the user name in identification code be stored in it is corresponding with user name publicly-owned close in entrance guard device Key, the second information after encryption is decrypted with this Public Key, obtains the 3rd information.
Step S504:The entrance guard device is matched the 3rd information with the first information, to determine whether Produce unlocking action.
Preferably, entrance guard device judges whether the 3rd information and entrance guard device most start the first information that generates at random Unanimously, with determine whether produce unlocking action.In other embodiments, the 3rd information can also have other with the first information With mode, do not limit herein.
Be different from prior art, in present embodiment entrance guard device scan and parse shown on mobile terminal screen second Quick Response Code, and using Public Key the second Quick Response Code is decrypted to obtain the 3rd information, and then matched with the first information. Identification is carried out to mobile terminal using above-mentioned asymmetrical mode, user can not only be made without additionally carrying other devices Unlocking operation can be carried out, and private cipher key is only stored in mobile terminal, is had a safety feature, and can effectively prevent what is be replicated Potential threat, brought convenience for user.
As shown in fig. 6, Fig. 6 is the 5th embodiment flow chart of method for unlocking of the present invention, Fig. 6 is to step in Fig. 5 S504 further explanation.If the 3rd information matches with the first information, step S602 is performed.It is if described 3rd information does not match that with the first information, then performs step S603.
Step S602:Entrance guard device produces unlocking action.
Step S603:Entrance guard device keeps Locked state, does not produce unlocking action.
It is pointed out that when entrance guard device after unlocking action is produced, records user name and the unlocking of this unlocking Between etc. information, can conveniently the needs such as work attendance inquiry.
Prior art is different from, opens door when the 3rd information matches with the first information in present embodiment, not phase Keep Locked state during matching, can effectively prevent other from not having the user of authority to open door, have a safety feature, can be effective The potential threat being replicated is prevented, is brought convenience for user.
In another embodiment, entrance guard device can carry out registration and unregistration after door is opened to mobile terminal. As shown in Figure 7.Fig. 7 is the flow chart that entrance guard device of the present invention to mobile terminal register an embodiment.Entrance guard device pair The process that mobile terminal is registered comprises the following steps:
Step S701:Entrance guard device scanning mobile terminal screen show encrypted using Public Key after Quick Response Code.
Because the mobile information in the registration of terminal is included in the Quick Response Code using Public Key encryption, so gate inhibition Device needs to scan the Quick Response Code that mobile terminal screen is shown.
If identification code and Public Key are oversize, the identification code and Public Key are generated two by mobile terminal at twice Corresponding when tieing up code, entrance guard device needs to scan obtains complete Quick Response Code twice.
Step S702:The Quick Response Code is decrypted using Public Key for entrance guard device, obtains the identification of mobile terminal Code.
Because when generating Public Key and private cipher key, mobile terminal retains its private cipher key, only public to entrance guard device Its private cipher key is opened, thus is encrypted when encryption is registered using Public Key, corresponding, entrance guard device utilizes publicly-owned Its Quick Response Code of secret key decryption.
Step S703:Entrance guard device preserves the identification code of mobile terminal.
The identification code, which includes user name or other, can represent the information of mobile terminal identity, if because mobile terminal Need to be matched with gate inhibition to open door, the Public Key and user name of user must be stored in gate inhibition's dress of door in advance In putting.
Certainly, entrance guard device can also be unregistered to identification code.When door is opened, mobile terminal is by identification code both Public Key is not added with also to be not added with generating Quick Response Code under conditions of private cipher key and show on the screen of the mobile terminal, entrance guard device Cancellation to identification code can be completed by scanning Quick Response Code corresponding to its identification code.
Prior art is different from, it is relative with mobile terminal generation when entrance guard device of the present invention is registered to mobile terminal The Public Key and private cipher key answered, after the Quick Response Code comprising identification code and Public Key is scanned, retain identification code and publicly-owned Key, identification code can be prevented to be replicated;When needing to nullify identification code, scanning recognition code generation Quick Response Code is only needed to be filled for gate inhibition Putting can complete to nullify, not only easy to operate simple, but also can be effectively protected the safety of identification code.
As described in Figure 8, Fig. 8 is the structural representation of the embodiment of mobile terminal one of the present invention.The movement of present embodiment Terminal includes camera 801, parsing module 802, encrypting module 803 and display module 804.
Camera 801 is used to scan the first Quick Response Code that entrance guard device is shown.
For user close to entrance guard device, it is necessary to when opening door, mobile terminal makes the screen of the alignment entrance guard device of camera 801 Curtain, the first Quick Response Code that mobile terminal is shown using the scanning gate inhibition's device screen of camera 801.Preferably, mobile terminal uses Front camera is scanned, to facilitate next step display information to be scanned for entrance guard device.
Parsing module 802 obtains the first information corresponding to first Quick Response Code for parsing first Quick Response Code.
After camera 801 gets the first Quick Response Code, parsing module 802 parses to first Quick Response Code, obtains The first information corresponding to first Quick Response Code.Intermediary's letter that the first information is verified between mobile terminal and gate control system Breath, preferably numeral, can also be letter or the symbol of other forms in other embodiments.If the mobile terminal For Android system, the interface extended in Android system can be used to carry out the scanning and parsing of Quick Response Code.Wherein, The expanding library for being responsible for two-dimensional code scanning and parsing in Android system is zxing.When parsing module 802 enters to the first Quick Response Code During row parsing, first Quick Response Code is parsed using QRCodeReader functions, QRCodeReader function pairs are led to Cross the Quick Response Code bitmap BitMap that camera obtains to be parsed, obtain first Quick Response Code in result again analytically afterwards The corresponding first information.Analysis mode herein is only intended to illustrate, and not limits, and other are carried out to first Quick Response Code The method of parsing belongs to the scope of present embodiment protection.Likewise, Android system herein is also only intended to citing simultaneously Unrestricted, the method that present embodiment is used in other systems falls within the scope of Ben Fa meter protections.
Encrypting module 803 is used to be encrypted to obtain the second information using the first information described in private cipher key pair.
First key described in private cipher key pair is employed in present embodiment to be encrypted, and has both been employed asymmetry and has been added It is close.The asymmetric encryption, which refers to encrypt and decrypted, uses two different keys, and the two keys occur in pairs, externally Disclosed part, turns into Public Key, is commonly called as Public Key, and another part is confidential, turns into private cipher key, custom Claim private cipher key.The content of Public Key encryption can only can be just decrypted with private cipher key, and with private key encryption Content can only could also be decrypted by corresponding Public Key.In use, it is publicly-owned typically externally to announce its for mobile terminal Key, and retain its corresponding private cipher key, so, mobile terminal can only be passed through using the first information after private key encryption Corresponding Public Key could be decrypted, and can effectively prevent information leakage or phenomenon that the first information is replicated.Common Asymmetry encryption has RSA and DSA two ways, and the two may be used to encrypt and signs, and security performance is similar, and DSA more stresses and signed, while arithmetic speed is also more rapid, is more suitable for present embodiment, thus present embodiment selection DSA To be encrypted.It is pointed out that RSA is used herein as to be encrypted and signature falls within protection scope of the present invention.
It is pointed out that in order to ensure that the private cipher key of generation is not got compromised, it is preferred that the process for generating key will be Mobile terminal is performed.
Display module 804 is used to including second information into the screen in the mobile terminal in the form of Quick Response Code On, so that the entrance guard device scans and parses and then determines whether to produce unlocking action.
The first information is encrypted after obtaining the second information encrypting module 803, and institute is wanted with QRCodeWriter functions handle State the second information and be converted into corresponding Quick Response Code matrix (BitMatrix), then again by the Quick Response Code matrix (BitMatrix) picture element matrix is changed into, picture element matrix is finally converted into bitmap (BitMap) again is shown in by display module On the screen of the mobile terminal, specific procedure is as follows:Function is stated first,
KeyGen=KeyPairGenerator.getInstance (" DSA ");
KeyGen be may then pass through to obtain Public Key and private cipher key:
Keys=keyGen.generateKeyPair ();
PrivateKey=(DSAPrivateKey) keys.getPrivate ();
PublickKey=(DSAPublicKey) keys.getPublic ();
The privateKey represents private cipher key, and publicKey represents Public Key.
It is pointed out that the method for generating Quick Response Code herein is simply illustrated, and not limit.
In present embodiment encrypting module be additionally operable to the identification code of the mobile terminal and second information combination and As the second information, in the form of the second Quick Response Code by display module 804 by second presentation of information in the movement On the screen of terminal.The form for the second information that identification code and second information combination form is as follows.
User name The second information after encryption
Prior art is different from, the present invention carries out data interaction to scan Quick Response Code as intermediate medium, with unsymmetrical key Identification is carried out, user can be made to carry out unlocking operation without additionally carrying other devices, and private cipher key is only protected Deposit in the terminal, have a safety feature, can effectively prevent the potential threat being replicated, be brought convenience for user.
In another embodiment, mobile terminal also includes Registering modules (not shown).Registering modules be used for Entrance guard device is registered.Because door is once locked, then can only could be opened by the user of authentication, then in order to Mobile terminal can be made to have unlocking authority, then mobile terminal needs to carry out to entrance guard device by Registering modules before unlocking Registration.The process specifically registered is described in detail by Fig. 4 and the word corresponding with Fig. 4, will not be repeated here.
Certainly, the cancellation of code can also be identified in mobile terminal to entrance guard device.When door is opened, display module 804 generate under conditions of being both not added with Public Key or being not added with private cipher key identification code Quick Response Code and including in mobile terminal On screen, the cancellation to identification code can be completed after entrance guard device scans Quick Response Code corresponding to its identification code.
Prior art is different from, mobile terminal of the present invention is first registered to entrance guard device, relative with entrance guard device generation The Public Key and private cipher key answered, and Public Key is disclosed to entrance guard device, and preserve to protect the close of private cipher key Code, can prevent identification code to be replicated;When needing to nullify identification code, only identification code need to be generated into Quick Response Code is for entrance guard device It can complete to nullify, it is not only easy to operate simple, but also the safety of identification code can be effectively protected.
As shown in figure 9, Fig. 9 is the embodiment structural representation of entrance guard device one of the present invention.Gate inhibition's dress of present embodiment Put including display module 901, camera 902, parsing module 903, deciphering module 904 and judge module 905.
Display module 901 is used for the first Quick Response Code for showing the corresponding first information, to cause mobile scanning terminal and parse First Quick Response Code and then obtain the first information.
After on door lock, display device generates the first information at random, and the first information is generated into the first Quick Response Code and shown On entrance guard device, to cause mobile scanning terminal and parse first Quick Response Code and then obtain the first information.Described first The intermediary message that information is verified between mobile terminal and gate control system, preferably numeral, in other embodiments Can also be letter or the symbol of other forms.It is pointed out that the first information generated at random on entrance guard device, is being moved After dynamic terminal scanning identification, no matter scan and whether succeed, all regenerate the new first information again, effectively can prevent user from sweeping The Quick Response Code of the encryption formed after retouching is recorded and cracked by third party.
Camera 902 is used to scan the second Quick Response Code shown on the mobile terminal screen.
Parsing module 903 obtains the second information corresponding to second Quick Response Code, institute for parsing second Quick Response Code It is that the mobile terminal is encrypted and obtained using the first information described in private cipher key pair to state the second information.
Shown second information includes identification code and mobile terminal and the information after key encryption, the knowledge is carried out to the first information Other code includes user name, and user name is preferably numeral, can also be letter or other characters in other embodiments.
Deciphering module 904 is used to second information be decrypted using Public Key, obtains the 3rd information.
Parsing module 903 has been parsed after the second Quick Response Code obtains the second information, can obtain mobile terminal identification code and plus Information after close, entrance guard device find the public affairs corresponding with user name being stored in entrance guard device by the user name in identification code There is key, the second information after encryption is decrypted with this Public Key, obtains the 3rd information.
Judge module 905 is used to be matched the 3rd information with the first information, to determine whether that generation is opened Lock acts.
Preferably, judge module determines whether the 3rd information and entrance guard device most start the first information that generates at random It is identical, to determine whether to produce unlocking action.In other embodiments, the 3rd information can also have other with the first information With mode, do not limit herein.
The entrance guard device of present embodiment also includes execution module 906, as shown in Figure 10.Figure 10 is entrance guard device of the present invention Another embodiment structural representation.The execution module when the 3rd information matches with the first information, open by execution Lock acts;Mismatched in the 3rd information and the first information, do not perform unlocking action.
Prior art is different from, entrance guard device is moved using camera and parsing module scans and parsing in present embodiment The second Quick Response Code shown on terminal screen, and the second Quick Response Code is decrypted to obtain using Public Key by deciphering module 3rd information, and then matched with the first information.Identification is carried out to mobile terminal using above-mentioned asymmetrical mode, no User can be only set to carry out unlocking operation without additionally carrying other devices, and private cipher key is only stored in mobile terminal In, have a safety feature, can effectively prevent the potential threat being replicated, be brought convenience for user.
In another embodiment, corresponding with mobile terminal, entrance guard device (does not show also including Registering modules in figure Go out), entrance guard device can be registered after door is opened to mobile terminal.Specific registration process refers to Fig. 7 and Fig. 7 is relative The word answered, here is omitted.
Certainly, entrance guard device can also be unregistered to identification code.When door is opened, mobile terminal is by identification code both Public Key is not added with also to be not added with generating Quick Response Code under conditions of private cipher key and show on the screen of the mobile terminal, entrance guard device Cancellation to identification code can be completed by scanning Quick Response Code corresponding to its identification code by camera.
Prior art is different from, it is relative with mobile terminal generation when entrance guard device of the present invention is registered to mobile terminal The Public Key and private cipher key answered, after the Quick Response Code comprising identification code and Public Key is scanned, retain identification code and publicly-owned Key, identification code can be prevented to be replicated;When needing to nullify identification code, scanning recognition code generation Quick Response Code is only needed to be filled for gate inhibition Putting can complete to nullify, not only easy to operate simple, but also can be effectively protected the safety of identification code.
As shown in figure 11, Figure 11 is the embodiment structural representation of unlocking system one of the present invention.The unlocking of present embodiment System includes mobile terminal 1101 and entrance guard device 1102,
The entrance guard device 1102 is used for the first Quick Response Code for showing the corresponding first information.After on door lock, gate inhibition's dress The first information can be generated at random by putting, and the first information the first Quick Response Code of generation is included on entrance guard device, mobile whole to cause Scan and parse first Quick Response Code and then obtain the first information in end.The first information be mobile terminal and gate control system it Between the intermediary message verified, preferably numeral, can also be letter or the symbols of other forms in other embodiments Number.It is pointed out that no matter the first information generated at random on entrance guard device, after being identified by mobile scanning terminal, scan Whether succeed, all regenerate the new first information again, can effectively prevent the Quick Response Code quilt of encryption formed after scanning input Third party records and cracked.
The mobile terminal 1101 is used to scanning and parsing the first Quick Response Code that the entrance guard device is shown, obtains described the The first information corresponding to one Quick Response Code.The first Quick Response Code that mobile terminal is shown using camera scanning gate inhibition's device screen.It is excellent Choosing, mobile terminal is scanned using front camera, to facilitate next step display information to be scanned for entrance guard device.Obtain To after the first Quick Response Code, mobile terminal use parses to first Quick Response Code, obtains first corresponding to the first Quick Response Code Information.
The mobile terminal 1101 is additionally operable to be encrypted using private cipher key pair described information, obtains the second information, and In the form of the second Quick Response Code by second presentation of information on the screen of the mobile terminal.In order to ensure the privately owned of generation Key is not got compromised, it is preferred that generating the process of key will be performed at mobile terminal end.
The entrance guard device 1102 is additionally operable to scan and parsed the second Quick Response Code that the mobile terminal screen is shown, obtains Second information, and second Quick Response Code is decrypted using Public Key, obtain the 3rd information.Entrance guard device has parsed After two Quick Response Codes obtain the second information, can obtain mobile terminal identification code and encryption after information, entrance guard device passes through identification Code in user name find the Public Key corresponding with user name being stored in entrance guard device, with this Public Key to encryption after The second information be decrypted, obtain the 3rd information.
The entrance guard device 1102 is additionally operable to the 3rd information and matched with the first information, to determine whether to produce Raw unlocking action.
If the 3rd information matches with the first information, the entrance guard device produces unlocking action;If institute State the 3rd information to mismatch with the first information, then the entrance guard device does not produce unlocking action.
The situation of prior art is different from, the present invention carries out data interaction to scan Quick Response Code as intermediate medium, with non-right Claim key to carry out identification, user can be made to carry out unlocking operation without additionally carrying other devices, and it is privately owned close Key is only stored in mobile terminal, is had a safety feature, and can effectively be prevented the potential threat being replicated, be brought convenience for user.
Embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this The equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations Technical field, it is included within the scope of the present invention.

Claims (10)

  1. A kind of 1. method for unlocking, it is characterised in that including:
    Entrance guard device is automated randomized to be produced the first Quick Response Code and is shown on the display screen of the entrance guard device, and mobile terminal is swept Retouch and parse first Quick Response Code of the entrance guard device screen display, obtain the first letter corresponding to first Quick Response Code Breath;
    The mobile terminal obtains private cipher key first with password, recycles the first information described in the private cipher key pair to be added It is close, obtain the second information, and in the form of the second Quick Response Code by second presentation of information on the screen of the mobile terminal, So that the entrance guard device scans and parses and then determines whether to produce unlocking action.
  2. 2. according to the method for claim 1, it is characterised in that the mobile terminal obtains private cipher key first with password, Recycle the first information described in the private cipher key pair to be encrypted, obtain the second information, and will in the form of the second Quick Response Code Step of second presentation of information on the screen of the mobile terminal includes:
    The mobile terminal obtains private cipher key first with password, recycles the private cipher key pair described information to be encrypted, The second information is obtained, and by the identification code of the mobile terminal and second information combination, and in the form of the second Quick Response Code By the second presentation of information after combination on the screen of the mobile terminal.
  3. A kind of 3. method for unlocking, it is characterised in that including:
    Entrance guard device is automated randomized to be produced and corresponds to the first Quick Response Code of the first information in screen display, to cause mobile terminal to sweep Retouch and parse first Quick Response Code and then obtain the first information;
    The entrance guard device scans and parsed the second Quick Response Code that the mobile terminal screen is shown, obtains the second information, described Second information is that the mobile terminal obtains private cipher key first with password, recycles described utilize first described in private cipher key pair Information is encrypted and obtained;
    Second Quick Response Code is decrypted using Public Key for the entrance guard device, obtains the 3rd information, wherein, the public affairs There is key to be generated by the mobile terminal, it is corresponding with the private cipher key;
    The entrance guard device is matched the 3rd information with the first information, to determine whether to produce unlocking action.
  4. 4. according to the method for claim 3, it is characterised in that if the 3rd information matches with the first information, Then the entrance guard device produces unlocking action;If the 3rd information mismatches with the first information, gate inhibition's dress Put and do not produce unlocking action.
  5. 5. according to the method for claim 3, it is characterised in that the corresponding to the first information that the entrance guard device is shown One Quick Response Code is produced by again automated randomized after the mobile scanning terminal and is shown the Quick Response Code corresponding to a new first information.
  6. A kind of 6. mobile terminal, it is characterised in that including camera, parsing module, encrypting module and display module,
    The camera is used to scan automated randomized the first Quick Response Code for producing and showing of entrance guard device;
    The parsing module obtains the first information corresponding to first Quick Response Code for parsing first Quick Response Code;
    The encrypting module is used to obtain private cipher key first with password, recycles the first information described in the private cipher key pair to enter Row encryption obtains the second information;
    The display module is used to including second information into the screen in the mobile terminal in the form of Quick Response Code, with Scan and parse for the entrance guard device and then determine whether to produce unlocking action.
  7. 7. mobile terminal according to claim 6, it is characterised in that the encrypting module is additionally operable to second information It is combined with the identification code of the mobile terminal and is used as the second information.
  8. A kind of 8. entrance guard device, it is characterised in that including:Display module, camera, parsing module, deciphering module and judgement Module,
    The display module is used for automated randomized the first Quick Response Code for producing and showing the corresponding first information, to cause mobile terminal Scan and parse first Quick Response Code and then obtain the first information;
    The camera is used to scan the second Quick Response Code shown on the mobile terminal screen;
    The parsing module, which is used to parsing second Quick Response Code, obtains the second information corresponding to second Quick Response Code, and described the Two information are that the mobile terminal obtains private cipher key first with password, recycle the first information described in the private cipher key pair to enter Obtained from row encryption;
    The deciphering module is used to second information be decrypted using Public Key, obtains the 3rd information, wherein, it is described Public Key is generated by the mobile terminal, corresponding with the private cipher key;
    The judge module is used to be matched the 3rd information with the first information, is moved with determining whether to produce to unlock Make.
  9. 9. entrance guard device according to claim 8, it is characterised in that the entrance guard device also includes execution module, described Execution module is used to perform unlocking action when the 3rd information matches with the first information, in the 3rd information and institute When stating first information mismatch, retain the locking states of the entrance guard device.
  10. A kind of 10. unlocking system, it is characterised in that the unlocking system includes mobile terminal and entrance guard device,
    The entrance guard device is used for automated randomized the first Quick Response Code for producing and showing the corresponding first information;
    The mobile terminal is used to scanning and parsing the first Quick Response Code that the entrance guard device is shown, obtains first Quick Response Code The corresponding first information;
    The mobile terminal is additionally operable to obtain private cipher key first with password, recycles the private cipher key pair described information to carry out Encryption, obtains the second information, and in the form of the second Quick Response Code by second presentation of information the mobile terminal screen On;
    The entrance guard device is additionally operable to scan and parsed the second Quick Response Code that the mobile terminal screen is shown, obtains the second letter Breath, and second information is decrypted using Public Key, the 3rd information is obtained, wherein, the Public Key is by described Mobile terminal is generated, corresponding with the private cipher key;
    The entrance guard device is additionally operable to be matched the 3rd information with the first information, to determine whether to produce unlocking Action.
CN201410120753.6A 2014-03-27 2014-03-27 A kind of method for unlocking and unlocking system Expired - Fee Related CN103914901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410120753.6A CN103914901B (en) 2014-03-27 2014-03-27 A kind of method for unlocking and unlocking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410120753.6A CN103914901B (en) 2014-03-27 2014-03-27 A kind of method for unlocking and unlocking system

Publications (2)

Publication Number Publication Date
CN103914901A CN103914901A (en) 2014-07-09
CN103914901B true CN103914901B (en) 2017-12-29

Family

ID=51040552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410120753.6A Expired - Fee Related CN103914901B (en) 2014-03-27 2014-03-27 A kind of method for unlocking and unlocking system

Country Status (1)

Country Link
CN (1) CN103914901B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184589B (en) * 2014-08-26 2018-09-07 重庆邮电大学 A kind of identity identifying method, terminal device and system
CN104318647A (en) * 2014-10-13 2015-01-28 长安大学 Access control system based on intelligent terminal and control method of access control system
CN104952128A (en) * 2015-05-20 2015-09-30 范浪波 Intelligent handheld terminal based electronic unlocking system and unlocking method thereof
CN104933793B (en) * 2015-06-11 2017-08-18 宁波飞拓电器有限公司 A kind of two-dimensional code electronic key implementation method based on digital signature
CN105337733B (en) * 2015-11-25 2018-04-13 杭州晟元数据安全技术股份有限公司 It is a kind of that the Quick Response Code locking method being combined is veritified based on synchronous asynchronous key
CN106056704A (en) * 2016-04-22 2016-10-26 浙江工业大学 An intelligent lock system
CN105871874A (en) * 2016-04-27 2016-08-17 武汉市国扬科技有限公司 Mobile Internet virtual key authorizing system and hardware door lock control method thereof
CN107644463A (en) * 2016-07-22 2018-01-30 厦门神州鹰软件科技有限公司 A kind of two-dimensional code scanning Work attendance method
CN106304051A (en) * 2016-08-26 2017-01-04 杭州天策启瑞实业有限公司 A kind of electronic lock verification method based on mobile terminal and device thereof
CN111464556B (en) * 2016-10-25 2022-12-30 武汉大数据产业发展有限公司 Portable user terminal
CN107067557A (en) * 2016-11-16 2017-08-18 国网山东省电力公司日照供电公司 A kind of two-dimentional key of intelligent charging spot is from lock administration system
CN106652129B (en) * 2016-11-29 2020-01-10 宁波飞拓电器有限公司 Access control system design method based on mobile phone APP
CN107564143A (en) * 2017-08-18 2018-01-09 黎辉 A kind of encrypting and decrypting method for unlocking of dynamic two-dimension code door lock
CN108173822B (en) * 2017-12-18 2021-03-19 深圳Tcl新技术有限公司 Intelligent door lock control method, intelligent door lock and computer readable storage medium
CN110580757B (en) * 2019-08-01 2021-12-17 深圳左邻永佳科技有限公司 Access control equipment opening method and device based on graphic code and storage medium
WO2021023164A1 (en) 2019-08-02 2021-02-11 云丁网络技术(北京)有限公司 Intelligent lock control method and system
CN112446982A (en) * 2019-08-10 2021-03-05 云丁网络技术(北京)有限公司 Method, device, computer readable medium and equipment for controlling intelligent lock
CN112017376A (en) * 2020-08-26 2020-12-01 厦门金龙旅行车有限公司 Storage system of passenger car luggage compartment
CN115376224A (en) * 2022-08-22 2022-11-22 中京天裕科技(杭州)有限公司 Dynamic password unpacking method applied to field equipment box

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005120579A (en) * 2003-10-14 2005-05-12 Mitsubishi Electric Corp Entrance/exit managing system
CN101014075B (en) * 2007-03-02 2011-03-16 中兴通讯股份有限公司 Anti-theft system and method realized by mobile terminal
CN103186931A (en) * 2011-12-30 2013-07-03 牟颖 Community entrance guard control method based on two-dimensional bar code
CN103544746A (en) * 2012-07-08 2014-01-29 上海博路信息技术有限公司 Electronic access control system of dynamic bar code
CN103426221B (en) * 2013-09-09 2015-10-28 桂林理工大学 With the light-operated guard method of two-way authentication

Also Published As

Publication number Publication date
CN103914901A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN103914901B (en) A kind of method for unlocking and unlocking system
US11824991B2 (en) Securing transactions with a blockchain network
CN1939028B (en) Accessing protected data on network storage from multiple devices
US9235697B2 (en) One-time passcodes with asymmetric keys
CN102664885B (en) Identity authentication method based on biological feature encryption and homomorphic algorithm
CN101350724B (en) Encrypting method base on biology characteristic information
CN108055235A (en) A kind of control method of smart lock, relevant device and system
CN104322003B (en) Cryptographic authentication and identification method using real-time encryption
CN101674575B (en) Method for protecting security of mobile communication terminal data and device thereof
WO2017016447A1 (en) Two-dimensional code mask encryption and decryption method and system
CN105337733B (en) It is a kind of that the Quick Response Code locking method being combined is veritified based on synchronous asynchronous key
CN109543434B (en) Block chain information encryption method, decryption method, storage method and device
CN104468126B (en) A kind of safe communication system and method
CN106452750B (en) A kind of quantum encryption communication method for mobile device
CN106953732B (en) Key management system and method for chip card
CN103560892A (en) Secret key generation method and secret key generation device
Chavan et al. Signature based authentication using contrast enhanced hierarchical visual cryptography
US20130097427A1 (en) Soft-Token Authentication System
US20210281399A1 (en) Methods and systems of securely transferring data
CN111768523B (en) CTID-based NFC intelligent door lock unlocking method, system, equipment and medium
CN102811124B (en) Based on the system Authentication method of two card trigram technology
CN108667801A (en) A kind of Internet of Things access identity safety certifying method and system
CN102270182B (en) Encrypted mobile storage equipment based on synchronous user and host machine authentication
CN102056156A (en) Method and system for securely downloading computer data to mobile terminal
CN105592080A (en) Interactive identity authentication method between terminals

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171229

CF01 Termination of patent right due to non-payment of annual fee