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 firstThe 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 deviceThe 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 bodyPart is identified, if passing through and identifying user can be determined with moving by the identification of recognition of face, fingerprint recognition or other modesThe 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 movementThe identification code that terminal is set mismatches, then locks mobile terminal, and this mobile terminal can not carry out unlocking action again, and then furtherEnsure 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 pairThe first information answered.The intermediary message that the first information is verified between mobile terminal and gate control system, preferablyNumeral, can also be letter or the symbol of other forms in other embodiments.If the mobile terminal is android systemsSystem, the scanning and parsing of expansion interface progress Quick Response Code in Android system can be used.Such as, Android system can be usedIn be responsible for two-dimensional code scanning and the expanding library zxing storehouses of parsing are scanned and parsed.Mobile terminal callsThe Quick Response Code bitmap BitMap that QRCodeReader function pairs are obtained by camera is parsed, afterwards result again analyticallyIn obtain the first information corresponding to first Quick Response Code.Analysis mode herein is only intended to illustrate, and not limits, otherThe method parsed to first Quick Response Code belongs to the scope of present embodiment protection.Likewise, android hereinSystem 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 inventionThe scope of protection.
Step S102:The mobile terminal is encrypted using private cipher key pair described information, obtains the second information, and withThe form of second Quick Response Code by second presentation of information on the screen of the mobile terminal, for the entrance guard device scanWith 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 addedIt is close.The asymmetric encryption, which refers to encrypt and decrypted, uses two different keys, and the two keys occur in pairs, externallyDisclosed part, turns into Public Key, is commonly called as Public Key, and another part is confidential, turns into private cipher key, customClaim private cipher key.The content of Public Key encryption can only can be just decrypted with private cipher key, and with private key encryptionContent can only could also be decrypted by corresponding Public Key.In use, it is publicly-owned externally to announce its for general of mobile terminalKey, and retain its corresponding private cipher key, so, mobile terminal can only be passed through using the first information after private key encryptionCorresponding Public Key could be decrypted, and can effectively prevent information leakage or phenomenon that the first information is replicated.CommonAsymmetry encryption has RSA and DSA two ways, and the two may be used to encrypt and signs, and security performance is similar, andDSA more stresses and signed, while arithmetic speed is also more rapid, is more suitable for present embodiment, thus present embodiment selection DSATo 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 signingProtection 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 beMobile terminal end is performed.
The first information is encrypted after obtaining the second information mobile terminal, with QRCodeWriter functions wanting described theTwo 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, toolBody 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 movedDynamic 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 andMobile terminal is encrypted using the first information described in private cipher key pair described in step S202, after obtaining the second information, in addition toStep S203:Will combination by the identification code of the mobile terminal and second information combination, and in the form of the second Quick Response CodeThe second presentation of information afterwards is on the screen of the mobile terminal.The identification code, which includes user name or other, can represent movementThe 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 keyIdentification is carried out, user can be made to carry out unlocking operation without additionally carrying other devices, and private cipher key is only protectedDeposit 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.MoveDynamic 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 showAlso 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 makeThere 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 onlyCan 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 inventionAn 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 generationKey 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 comeRepresent, can also be letter or other characters in other embodiments.
Generally, user name is distributed by entrance guard device keeper, facilitates management of the keeper to user right, butIt 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 useThe 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 toCross 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 inputCode, corresponding mobile terminal store above-mentioned password and the private cipher key of encryption.It is corresponding, when user unlocks using key to scanningTo Quick Response Code be encrypted when, it is necessary to input this password.Certainly, mobile terminal can remember this password, and then avoid userThe 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 encryptionScanning.
Treat that entrance guard device is scanned, mobile terminal completes the registration process to entrance guard device.Using such a registration sideMethod, 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 useFamily, 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 willIdentification 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 terminalOn, 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 generationThe 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 keyCode, 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 deviceIt 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 followsStep:
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 sweepRetouch 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 shownShow on entrance guard device, to cause mobile scanning terminal and parse first Quick Response Code and then obtain the first information.DescribedThe intermediary message that one information is verified between mobile terminal and gate control system, preferably numeral, in other embodimentIn can also be letter or other forms symbols.It is pointed out that the first information generated at random on entrance guard device, in quiltAfter mobile scanning terminal identification, no matter scan and whether succeed, all regenerate the new first information again, can effectively prevent userThe 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, obtainsSecond 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 screenIt 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 terminalInformation after key encryption, the identification code include user name, and user name is preferably numeral, in other embodiments can alsoFor letter or other characters.
Step S503:Second Quick Response Code is decrypted using Public Key for the entrance guard device, obtains the 3rd letterBreath.
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 terminalInformation, 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 deviceKey, 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 whetherProduce unlocking action.
Preferably, entrance guard device judges whether the 3rd information and entrance guard device most start the first information that generates at randomUnanimously, with determine whether produce unlocking action.In other embodiments, the 3rd information can also have other with the first informationWith mode, do not limit herein.
Be different from prior art, in present embodiment entrance guard device scan and parse shown on mobile terminal screen secondQuick 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 devicesUnlocking 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 replicatedPotential 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. 5S504 further explanation.If the 3rd information matches with the first information, step S602 is performed.It is if described3rd 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 unlockingBetween 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 phaseKeep Locked state during matching, can effectively prevent other from not having the user of authority to open door, have a safety feature, can be effectiveThe 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 pairThe 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 inhibitionDevice 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 twiceCorresponding 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 terminalCode.
Because when generating Public Key and private cipher key, mobile terminal retains its private cipher key, only public to entrance guard deviceIts private cipher key is opened, thus is encrypted when encryption is registered using Public Key, corresponding, entrance guard device utilizes publicly-ownedIts 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 terminalNeed 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 advanceIn putting.
Certainly, entrance guard device can also be unregistered to identification code.When door is opened, mobile terminal is by identification code bothPublic 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 deviceCancellation 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 terminalThe 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-ownedKey, 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 inhibitionPutting 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 embodimentTerminal 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 801Curtain, the first Quick Response Code that mobile terminal is shown using the scanning gate inhibition's device screen of camera 801.Preferably, mobile terminal usesFront 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, obtainsThe first information corresponding to first Quick Response Code.Intermediary's letter that the first information is verified between mobile terminal and gate control systemBreath, preferably numeral, can also be letter or the symbol of other forms in other embodiments.If the mobile terminalFor 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 CodeDuring row parsing, first Quick Response Code is parsed using QRCodeReader functions, QRCodeReader function pairs are led toCross the Quick Response Code bitmap BitMap that camera obtains to be parsed, obtain first Quick Response Code in result again analytically afterwardsThe corresponding first information.Analysis mode herein is only intended to illustrate, and not limits, and other are carried out to first Quick Response CodeThe method of parsing belongs to the scope of present embodiment protection.Likewise, Android system herein is also only intended to citing simultaneouslyUnrestricted, 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 addedIt is close.The asymmetric encryption, which refers to encrypt and decrypted, uses two different keys, and the two keys occur in pairs, externallyDisclosed part, turns into Public Key, is commonly called as Public Key, and another part is confidential, turns into private cipher key, customClaim private cipher key.The content of Public Key encryption can only can be just decrypted with private cipher key, and with private key encryptionContent can only could also be decrypted by corresponding Public Key.In use, it is publicly-owned typically externally to announce its for mobile terminalKey, and retain its corresponding private cipher key, so, mobile terminal can only be passed through using the first information after private key encryptionCorresponding Public Key could be decrypted, and can effectively prevent information leakage or phenomenon that the first information is replicated.CommonAsymmetry encryption has RSA and DSA two ways, and the two may be used to encrypt and signs, and security performance is similar, andDSA more stresses and signed, while arithmetic speed is also more rapid, is more suitable for present embodiment, thus present embodiment selection DSATo 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 beMobile 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 CodeOn, 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 handleState 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 moduleOn 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 andAs the second information, in the form of the second Quick Response Code by display module 804 by second presentation of information in the movementOn 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 keyIdentification is carried out, user can be made to carry out unlocking operation without additionally carrying other devices, and private cipher key is only protectedDeposit 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 forEntrance guard device is registered.Because door is once locked, then can only could be opened by the user of authentication, then in order toMobile terminal can be made to have unlocking authority, then mobile terminal needs to carry out to entrance guard device by Registering modules before unlockingRegistration.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 module804 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 terminalOn 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 generationThe 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 keyCode, 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 deviceIt 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 embodimentPut 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 parseFirst 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 shownOn entrance guard device, to cause mobile scanning terminal and parse first Quick Response Code and then obtain the first information.Described firstThe intermediary message that information is verified between mobile terminal and gate control system, preferably numeral, in other embodimentsCan 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 movedAfter dynamic terminal scanning identification, no matter scan and whether succeed, all regenerate the new first information again, effectively can prevent user from sweepingThe 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 CodeIt 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 informationOther 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 plusInformation 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 codeThere 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 openedLock acts.
Preferably, judge module determines whether the 3rd information and entrance guard device most start the first information that generates at randomIt is identical, to determine whether to produce unlocking action.In other embodiments, the 3rd information can also have other with the first informationWith 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 inventionAnother embodiment structural representation.The execution module when the 3rd information matches with the first information, open by executionLock 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 embodimentThe second Quick Response Code shown on terminal screen, and the second Quick Response Code is decrypted to obtain using Public Key by deciphering module3rd information, and then matched with the first information.Identification is carried out to mobile terminal using above-mentioned asymmetrical mode, noUser can be only set to carry out unlocking operation without additionally carrying other devices, and private cipher key is only stored in mobile terminalIn, 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 figureGo 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 relativeThe 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 bothPublic 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 deviceCancellation 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 terminalThe 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-ownedKey, 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 inhibitionPutting 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 embodimentSystem 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 dressThe 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 causeScan and parse first Quick Response Code and then obtain the first information in end.The first information be mobile terminal and gate control system itBetween the intermediary message verified, preferably numeral, can also be letter or the symbols of other forms in other embodimentsNumber.It is pointed out that no matter the first information generated at random on entrance guard device, after being identified by mobile scanning terminal, scanWhether succeed, all regenerate the new first information again, can effectively prevent the Quick Response Code quilt of encryption formed after scanning inputThird 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 theThe 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 excellentChoosing, mobile terminal is scanned using front camera, to facilitate next step display information to be scanned for entrance guard device.ObtainTo after the first Quick Response Code, mobile terminal use parses to first Quick Response Code, obtains first corresponding to the first Quick Response CodeInformation.
The mobile terminal 1101 is additionally operable to be encrypted using private cipher key pair described information, obtains the second information, andIn 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 generationKey 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, obtainsSecond information, and second Quick Response Code is decrypted using Public Key, obtain the 3rd information.Entrance guard device has parsedAfter two Quick Response Codes obtain the second information, can obtain mobile terminal identification code and encryption after information, entrance guard device passes through identificationCode in user name find the Public Key corresponding with user name being stored in entrance guard device, with this Public Key to encryption afterThe 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 produceRaw unlocking action.
If the 3rd information matches with the first information, the entrance guard device produces unlocking action;If instituteState 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-rightClaim key to carry out identification, user can be made to carry out unlocking operation without additionally carrying other devices, and it is privately owned closeKey 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 thisThe 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 correlationsTechnical field, it is included within the scope of the present invention.