CN113409499A - Method and system for realizing dynamic password of coded lock - Google Patents

Method and system for realizing dynamic password of coded lock Download PDF

Info

Publication number
CN113409499A
CN113409499A CN202110876337.9A CN202110876337A CN113409499A CN 113409499 A CN113409499 A CN 113409499A CN 202110876337 A CN202110876337 A CN 202110876337A CN 113409499 A CN113409499 A CN 113409499A
Authority
CN
China
Prior art keywords
user
password
module
unlocking
coded lock
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.)
Withdrawn
Application number
CN202110876337.9A
Other languages
Chinese (zh)
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.)
Zhengzhou Xinda Jiean Information Technology Co Ltd
Original Assignee
Zhengzhou Xinda Jiean Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Xinda Jiean Information Technology Co Ltd filed Critical Zhengzhou Xinda Jiean Information Technology Co Ltd
Priority to CN202110876337.9A priority Critical patent/CN113409499A/en
Publication of CN113409499A publication Critical patent/CN113409499A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • G07C2009/0042Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal containing a code which is changed
    • G07C2009/00476Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal containing a code which is changed dynamically
    • G07C2009/005Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal containing a code which is changed dynamically whereby the code is a random code

Landscapes

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

Abstract

The invention provides a method and a system for realizing dynamic passwords of a coded lock, wherein the method comprises the following steps: the coded lock generates a random indication code and informs the user in some way; the user inputs the acquired random indication code and the user password, and the unlocking code II of the current time is calculated through a second algorithm module; inputting the calculated unlocking code II to the coded lock for verification; the verification process is as follows: the coded lock inputs the generated random indication code and the stored user password into a built-in first algorithm module to obtain an unlocking code I; checking the unlocking code I and the unlocking code II; and if the password lock is matched with the password lock, the locking/unlocking module is informed to open the password lock. The invention can further enhance the protection to the user password, even if an attacker obtains the character sequence input by the user each time, the attacker can not reversely calculate the real password of the user and can not unlock the password lock; in addition, the unlocking code for unlocking every time is different, and even the previous unlocking code is obtained, the unlocking code cannot be reused, so that the safety of the coded lock is effectively enhanced.

Description

Method and system for realizing dynamic password of coded lock
Technical Field
The invention relates to the technical field of coded locks, in particular to a method and a system for realizing dynamic passwords of a coded lock.
Background
The password is easy to leak due to the fact that the physical keys of the password lock are worn and aged, and if a user uses the same password for a long time, the number of the password used by the user can be presumed according to the wear degree of the keys, so that password safety is reduced or leaked.
The traditional solution is to adopt a dummy password, that is, when a user inputs a real password, any character is added before and after the real password as an interference code, so as to achieve the effect of uniform abrasion of keys, thereby realizing the protection of the user password. However, the real password of the method still continuously appears in the dummy passwords input by the user, and if the dummy passwords input by the user for many times can be obtained, the coexisting sequences of the dummy passwords can be found out, and the user password can be easily cracked.
The further method is to adopt dynamic dummy bit password, that is, a random indication code is given to the user to indicate the position of the dummy bit, and when the user inputs the password, random dummy bit characters are added according to the position of the dummy bit indicated by the indication code, so as to realize further enhancement of the protection function. Although the password protection is further enhanced, if the virtual password input by the user for many times can be obtained, and the high-frequency characters appearing in the virtual password can be found, the characters used by the password can be obtained, and the password security is reduced or leaked.
Therefore, no matter the traditional password lock adopts the dummy password or the dynamic dummy password, if an attacker can obtain the multiple inputs of the user, the user password can be cracked by using statistical and mathematical analysis methods.
Disclosure of Invention
In order to solve the above problems, it is necessary to provide a method and a system for implementing dynamic password of a combination lock.
The invention provides a method for realizing dynamic passwords of a password lock in a first aspect, which comprises the following steps:
step 1, after reading an unlocking trigger instruction, a coded lock generates a random indication code, stores the random indication code in the coded lock, and informs a user of the random indication code in a first preset mode;
step 2, after receiving the random indication code input by the user, the user side calculates a preset user password and the random indication code by using a preset second encryption algorithm to generate an unlocking code II of this time;
step 3, after receiving an unlocking code II input by a user, the coded lock calculates the random indication code generated in the step 1 and a preset user password by using a preset first encryption algorithm to generate the unlocking code I of the current time;
and 4, matching the unlocking code II with the unlocking code I by the coded lock, if the unlocking code II is matched with the unlocking code I, informing a locking/unlocking module to open the coded lock, and otherwise, triggering an error processing event.
The second aspect of the present invention provides a dynamic password implementation system for a password lock, where the system includes: the password lock comprises a random number generator, a first storage module, a second storage module, a first algorithm module, a determination module, a first output module and a locking/unlocking module, and the user side comprises a receiving module, a third storage module, a second algorithm module and a second output module;
the random number generator is used for generating a random indication code after reading an unlocking trigger instruction, the first storage module is used for storing the random indication code in the coded lock, and the first output module is used for informing a user of the random indication code in a first preset mode;
the second storage module is used for storing a preset user password, and the first algorithm module is used for calculating a random indication code stored in the first storage module and the user password stored in the second storage module by using a preset first encryption algorithm after receiving an unlocking code II input by a user to generate the unlocking code I at this time; the preset first encryption algorithm is the same as the preset second encryption algorithm;
the determining module is used for matching the unlocking code II with the unlocking code I, if the unlocking code II is matched with the unlocking code I, the locking/unlocking module is informed to open the coded lock, and if not, an error handling event is triggered;
the receiving module is used for determining whether a random indication code input by a user is received, the third storage module is used for storing a preset user password, the second algorithm module is used for calculating the user password and the random indication code stored in the third storage module by using a preset second encryption algorithm to generate an unlocking code II of this time, and the second output module is used for informing the user of the unlocking code II in a second preset mode.
The invention provides a dynamic password implementation method, which can enhance the protection of a user password, and even if an attacker obtains an unlocking code II input by a user every time, the attacker cannot reversely calculate the real user password of the user and even cannot unlock a password lock;
in addition, the unlocking scheme of one-time pad is adopted, the unlocking code of each unlocking is different, even the previous unlocking code is obtained, the unlocking code cannot be reused, and the safety of the coded lock is effectively enhanced.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 illustrates a dynamic password unlock diagram of a combination lock of the present invention;
FIG. 2 is a block diagram illustrating the structure of a one-to-many dynamic cryptographic implementation system of the present invention;
FIG. 3 is a block diagram schematically illustrating the construction of a combination lock of the present invention;
fig. 4 shows a schematic block diagram of a structure of a user terminal according to the present invention;
FIG. 5 illustrates an error handling flow diagram of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Example 1
As shown in fig. 1, the present invention provides a method for implementing a dynamic password of a combination lock, wherein each unlocking process is as follows:
step 1, after reading an unlocking trigger instruction, a coded lock generates a random indication code, stores the random indication code in the coded lock, and informs a user of the random indication code in a first preset mode;
the first preset mode includes, but is not limited to, screen display, short message and other modes, for example, a corresponding touch screen is arranged on the coded lock, the coded lock generates a random number as a random indication code through a random number generator, and the indication code is presented to a user through the touch screen;
step 2, after receiving the random indication code input by the user, the user side calculates a preset user password and the random indication code by using a preset second encryption algorithm to generate an unlocking code II of this time;
step 3, after receiving an unlocking code II input by a user, the coded lock calculates the random indication code generated in the step 1 and a preset user password by using a preset first encryption algorithm to generate the unlocking code I of the current time;
the preset first encryption algorithm is consistent with the preset second encryption algorithm, and the preset first encryption algorithm and the preset second encryption algorithm include but are not limited to algorithms such as HMAC, HASH and encryption; according to the different complexity of the algorithm, the algorithm can be realized by means of manual direct calculation, software modules, hardware modules and the like;
and 4, matching the unlocking code II with the unlocking code I by the coded lock, if the unlocking code II is matched with the unlocking code I, informing a locking/unlocking module to open the coded lock, and otherwise, triggering an error processing event.
It will be appreciated that the verification process for a combination lock is as follows:
a) the generated indication code and the stored user password are used as input data in the coded lock, and are input into a built-in first algorithm module to calculate an unlocking code I;
b) checking the unlocking code I and the unlocking code II; if the password is matched with the password, the locking/unlocking module is informed to open the password lock; if not, triggering an error processing flow to improve the safety.
It should be noted that, when unlocking every time, the unlocking code i generated by the coded lock cannot be output, so that the unlocking code i cannot be directly present in any external environment every time, and monitoring by an attacker can be effectively prevented.
As shown in FIG. 5, the error handling events include: and judging whether the number of mismatching times of the unlocking code II and the unlocking code I in a preset time period A exceeds a preset number, if so, enabling the coded lock to be in a locked state in a preset time period B, otherwise, enabling the coded lock to generate a new random indication code and re-execute the steps 1 to 4 for retry.
It should be noted that the random indication code is a key character string of the acquired unlocking code, on one hand, the key character string has timeliness and is invalid when reaching a preset time, and on the other hand, after the password lock verifies the unlocking code II and the unlocking code I, the random indication code is invalid no matter what the result is; therefore, after the coded lock outputs the random indication code, the unlocking code II is received in the preset time, and the unlocking code II is matched with the unlocking code I generated by the coded lock, so that the coded lock can be opened.
It can be understood that, when the coded lock meets a certain condition, the random number generator is triggered to generate a new random indication code each time the coded lock is unlocked;
specifically, before step 1, the method for implementing a dynamic password of a combination lock further performs the following steps:
the coded lock judges whether the trigger logic is met, if so, the unlocking trigger instruction is generated, and a random number generator of the coded lock is triggered to generate a random number serving as a random indication code;
the trigger logic is any one or more of a first trigger condition, a second trigger condition, a third trigger condition and a fourth trigger condition,
the trigger logic is any one or more of a first trigger condition, a second trigger condition and a third trigger condition,
the first trigger condition is as follows: sensing that a person approaches the coded lock through infrared rays, wherein the distance between the person and the coded lock reaches a preset distance;
the second trigger condition is as follows: detecting finger touch information through the touch screen, and converting the touch screen from a sleep mode to a lighting mode through the finger touch information;
the third trigger condition is as follows: the distance between the appointed user side and the coded lock is within a preset distance range, and the appointed user side and the coded lock are in a Bluetooth pairing success state; the Bluetooth module arranged in the coded lock is matched with the Bluetooth module of the appointed user side in advance.
It should be noted that the method for implementing dynamic password of the password lock can be used in any scenario where the password is used, including but not limited to the password lock.
Further, the trigger logic is any one or more of a first trigger condition, a second trigger condition, a third trigger condition, and a fourth trigger condition, where the fourth trigger condition is: detecting that an inserted key matches a mechanical lock cylinder in a combination lock;
for different security levels, the trigger conditions that the trigger logic needs to satisfy are also different; for example, for a first security level, any one of a first trigger condition, a second trigger condition, a third trigger condition, and a fourth trigger condition may be satisfied, for a second security level, two of the first trigger condition, the second trigger condition, the third trigger condition, and the fourth trigger condition need to be satisfied, for a third security level, three of the first trigger condition, the second trigger condition, the third trigger condition, and the fourth trigger condition need to be satisfied, and for a fourth security level, all four trigger conditions need to be satisfied.
The unlocking convenience requirements are different, and the triggering conditions required to be met by the triggering logic are also different, for example, in order to facilitate unlocking by a user who often forgets to carry a key or who is inconvenient to unlock by using the key, the triggering logic meets any one or more of a first triggering condition, a second triggering condition and a third triggering condition; it is also checked whether the inserted key matches a mechanical lock cylinder in a combination lock, for example a safety lock applied to a safe, in view of security.
It will be appreciated that prior to the combination lock generating the random indication code, the method further comprises: the user password is set and stored in the coded lock, and when the coded lock is unlocked, the user password is not input into the coded lock, but is input into the coded lock, namely, a dynamic unlocking code is input into the coded lock, so that the risk of user password leakage is reduced.
It should be noted that, the algorithms adopted by the first algorithm module for generating the unlocking code i of this time in the coded lock and the second algorithm module for generating the unlocking code ii of this time at the user side are the same, initially, the first algorithm module and the second algorithm module are respectively provided with a plurality of algorithms, and when the dynamic password of the specific coded lock is implemented, the algorithms operated by the two algorithm modules are the same through manual or other strategies for synchronous setting;
specifically, N first algorithm modules are preset in the coded lock, N second algorithm modules are preset in the user side, and the same encryption algorithm module calling strategy is preset in the coded lock and the user side, so that the encryption algorithm running in the first algorithm module used in the coded lock and the encryption algorithm running in the second algorithm module used in the user side are consistent when the coded lock is unlocked. The encryption algorithm module calling strategy can be synchronous polling scheduling or artificial synchronous setting.
Further, configuring a preset first encryption algorithm and a preset second encryption algorithm as a HASH algorithm; in a specific embodiment, a user side calculates a preset user password and the random indication code by using a HASH algorithm to obtain a HASH value II, and processes the HASH value II by using a preset unlocking strategy to obtain an unlocking code II; and (3) the client calculates the random indication code generated in the step (1) and a preset user password by using a HASH algorithm to obtain a HASH value I, and processes the HASH value I by using a preset unlocking strategy to obtain an unlocking code I.
Specifically, the preset unlocking strategy is to extract the N1 th, N2 th, N3 th, N4 th and N5 th digits of the hexadecimal hash value to form the unlocking code, or to convert the hexadecimal hash value into decimal, and then extract the N1 th, N2 th, N3 th, N4 th and N5 th digits to form the unlocking code.
For example, the user password pre-stored at the user side is "abc × 123", the random indication code received at the user side is "803341", the sha1 algorithm is used to calculate "803341 abc × 123", the hash value is "58 d1a5418d7df739685191f6540a88a91dc3ed0 e", the preset unlocking policy is to extract the 1 st, 3 rd, 6 th, 7 th and 10 th digits to form the unlocking code, the unlocking code ii is 51183, and if the unlocking code i generated by the password lock is also 51183, the verification is passed.
Specifically, the user side is a mobile terminal of the user, and the user password may be pre-stored in the mobile terminal, and the mobile terminal is preferably a mobile phone or a smart watch.
During specific implementation, when the coded lock receives a unlocking trigger instruction, for example, a user approaches the coded lock, the random number generator of the coded lock generates a random number as a random indication code, the random indication code is displayed to the user through a touch screen, then the user obtains the random indication code, inputs the random indication code to a second algorithm module of the user side (if the second algorithm module is a mobile phone and the mobile phone is in pairing with the coded lock in advance, the coded lock can be directly and synchronously provided for the mobile phone through bluetooth without manually inputting the random indication code), combines a user password, calculates through a corresponding algorithm to obtain an unlocking code II, and inputs the unlocking code II into the coded lock through the touch screen by the user.
After the coded lock obtains an unlocking code II, a random indication code generated by unlocking at this time is transmitted to a first algorithm module, the first algorithm module combines a user password and calculates through a corresponding algorithm to obtain an unlocking code I, then the coded lock compares whether the unlocking code II is consistent with the unlocking code I, and if so, the unlocking module is triggered to execute unlocking mechanical action.
Because the user password is safely stored for the user and the coded lock, only random indication codes are disclosed, and the generated random indication codes are different in each unlocking process, and unlocking codes obtained by calculation according to the random indication codes are also different; therefore, lawbreakers cannot release the unlocking code according to the left fingerprint trace on the touch screen, even if the previous unlocking code can be released, or lawbreakers install a camera near the door lock to obtain the unlocking code, but in the unlocking process, the unlocking code can be updated by the coded lock, so the previous unlocking code cannot be used, even if the historical unlocking code is leaked, the subsequent use safety cannot be influenced, the enough discrete randomness protection for the unlocking code is provided, and the rules of the unlocking code cannot be obtained through a large amount of historical data.
Example 2
Before the password lock generates the random indication code, besides the steps of setting the user password and respectively storing the user password in the password lock and the user side, the password lock also executes the following steps:
establishing a mapping relation between a user password and user identification, wherein different user identifications correspond to different user passwords;
and 3, after receiving the unlocking code II input by the user, the coded lock also acquires a user identifier corresponding to the unlocking code II, and searches a corresponding user password according to the mapping relation between the user identifier and the user password, so that the coded lock generates the unlocking code I according to the random indication code generated in the step 1 and the acquired user password.
The structure diagram of the multi-user-side control of the same coded lock is shown in fig. 2, and in practical application, one of the user sides can be set as a main user side to be responsible for authentication, authorization and admission control of other user sides of the same coded lock;
it should be noted that, the operation mode of the coded lock is divided into a single-password control mode and a multi-password control mode according to the number of the current valid user passwords: (1) in the single-password control mode, a plurality of user terminals are the same as the user passwords prestored in the coded lock, only one effective user password exists, and different user terminals need to negotiate in advance to obtain a uniform user password if the same coded lock is opened; (2) under the multi-password control mode, the user passwords pre-stored in the plurality of user sides are different, each user side independently sets the user password of the user and pre-stores the user password of the user in the same coded lock, the user passwords of different user sides are distinguished through user identifications, the user identifications are simultaneously input only when unlocking codes II are input, the plurality of user sides can jointly control and manage the same coded lock, and the user sides do not need to negotiate in advance to be consistent.
It can be understood that the single password control mode is suitable for the safety lock for the residential user, and the family members share the same user password to unlock; the multi-password control mode is suitable for safety locks used for shared equipment (such as a shared washing machine) and the users of the shared equipment which are not used do not interfere with each other, the user password of the other party is not needed to be known, the same equipment is used through the same safety lock, the user experience is prompted, and the safety lock is safe and reliable.
Further, the multi-command control mode is further divided into a multi-command control mode i, a multi-command control mode ii, and a multi-command control mode iii: in the multi-password control mode I, as long as one user side inputs an unlocking code II into the coded lock and the coded lock passes verification, the locking/unlocking module is informed to open the coded lock; in the second multi-port control mode II, only when unlocking codes II input by a preset number of user sides are received and the coded locks are all verified, the locking/unlocking module is informed to open the coded locks, and the method is suitable for access control systems or equipment with higher safety requirements; and in the multi-password control mode III, receiving unlocking codes II input by a certain number of user terminals, and informing the locking/unlocking module to open the coded lock if a plurality of (less than the number of the obtained unlocking codes II) unlocking codes II pass the verification.
Specifically, the user identifier may be fingerprint information, face feature information, or a voice instruction, which can distinguish different user identities and facilitate inputting information to the combination lock.
Example 3
On the basis of the foregoing embodiments, this embodiment provides a specific implementation manner of a dynamic password implementation system for a password lock, including:
the password lock comprises a random number generator, a first storage module, a second storage module, a first algorithm module, a determination module, a first output module and a locking/unlocking module, and the user side comprises a receiving module, a third storage module, a second algorithm module and a second output module;
the random number generator is used for generating a random indication code after reading an unlocking trigger instruction, the first storage module is used for storing the random indication code in the coded lock, and the first output module is used for informing a user of the random indication code in a first preset mode;
the second storage module is used for storing a preset user password, and the first algorithm module is used for calculating a random indication code stored in the first storage module and the user password stored in the second storage module by using a preset first encryption algorithm after receiving an unlocking code II input by a user to generate the unlocking code I at this time;
the determining module is used for matching the unlocking code II with the unlocking code I, if the unlocking code II is matched with the unlocking code I, the locking/unlocking module is informed to open the coded lock, and if not, an error handling event is triggered;
the receiving module is used for determining whether a random indication code input by a user is received, the third storage module is used for storing a preset user password, the second algorithm module is used for calculating the user password and the random indication code stored in the third storage module by using a preset second encryption algorithm to generate an unlocking code II of this time, and the second output module is used for notifying the user of the unlocking code II in a second preset mode;
and the preset first encryption algorithm is the same as the preset second encryption algorithm.
As shown in fig. 3, the combination lock further includes an unlocking triggering module connected to the random number generator, and a first detection module, a second detection module, and a third detection module connected to the unlocking triggering module;
the first detection module is configured to determine whether a first trigger condition is met, where the first trigger condition is: sensing that a person approaches the coded lock through infrared rays, wherein the distance between the person and the coded lock reaches a preset distance;
the second detection module is configured to determine whether a second trigger condition is satisfied, where the second trigger condition is: detecting finger touch information through the touch screen, and converting the touch screen from a sleep mode to a lighting mode through the finger touch information;
the third detection module is configured to determine whether a third trigger condition is satisfied, where the third trigger condition is: the distance between the appointed user side and the coded lock is within a preset distance range, and the appointed user side and the coded lock are in a Bluetooth pairing success state; the Bluetooth module arranged in the coded lock is matched with the Bluetooth module of the appointed user side in advance;
the unlocking trigger module is used for judging whether trigger logic is met, and if so, generating an unlocking trigger instruction to trigger a random number generator of the coded lock to generate a random number serving as a random indication code;
the trigger logic is any one or more of a first trigger condition, a second trigger condition and a third trigger condition.
If the dynamic password implementation system of the password lock adopts a scheme of unlocking the lock by both unlocking codes and keys, the password lock further comprises a fourth detection module connected to the unlocking triggering module, the fourth detection module is used for determining whether a fourth triggering condition is met, and the fourth triggering condition is as follows: detecting that an inserted key matches a mechanical lock cylinder in a combination lock; correspondingly, the trigger logic is any one or more of a first trigger condition, a second trigger condition, a third trigger condition and a fourth trigger condition.
As shown in fig. 3 and fig. 4, N first algorithm modules and first calling modules are preset in the combination lock, and N second algorithm modules and second calling modules are preset at the user side;
the first calling module is used for being connected with the N first algorithm modules respectively, the second calling module is used for being connected with the N second algorithm modules respectively, and the same encryption algorithm module calling strategies are configured in advance for the first calling module and the second calling module, so that the encryption algorithm running in the first algorithm module used in the coded lock is consistent with the encryption algorithm running in the second algorithm module used by the user side when the coded lock is unlocked.
Specifically, the algorithms run in the first algorithm module and the second algorithm module include, but are not limited to, encryption algorithms such as HMAC and HASH; depending on the complexity of the algorithm, the algorithm may be implemented by means including, but not limited to, direct manual computation, software module implementation, hardware module implementation, and the like.
The dynamic password implementation system for the password lock can enhance protection of the user password (user password), and even if an attacker obtains a character sequence (random indication code or unlocking code II) input by the user every time, the attacker cannot reversely calculate the real user password of the user and even cannot unlock the password lock. In addition, the unlocking code for unlocking every time is different, and even the previous unlocking code is obtained, the unlocking code cannot be reused, so that the safety of the coded lock is effectively enhanced.
Example 4
This example differs from example 3 in that: the coded lock is also provided with a working mode management module, a single-port order control module and a multi-port order control module which are connected with the working mode management module;
the single password control module is configured to execute a single password control mode, specifically, the single password control mode: the user passwords pre-stored in the user sides are the same as the user passwords pre-stored in the coded lock, only one valid user password exists, and different user sides need to negotiate in advance to obtain a unified user password if the same coded lock is opened;
the multi-password control module is configured to execute a multi-password control mode, specifically, the multi-password control mode is as follows: the user passwords pre-stored in the plurality of user sides are different, each user side independently sets the user password and pre-stores the user password in the same coded lock, the user passwords of different user sides are distinguished through the user identification, the user identification is simultaneously input only when the unlocking code II is input, the plurality of user sides can jointly control and manage the same coded lock, and the user sides do not need to negotiate in advance to be consistent.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for realizing dynamic password of a password lock is characterized by comprising the following steps:
step 1, after reading an unlocking trigger instruction, a coded lock generates a random indication code, stores the random indication code in the coded lock, and informs a user of the random indication code in a first preset mode;
step 2, after receiving the random indication code input by the user, the user side calculates a preset user password and the random indication code by using a preset second encryption algorithm to generate an unlocking code II of this time;
step 3, after receiving an unlocking code II input by a user, the coded lock calculates the random indication code generated in the step 1 and a preset user password by using a preset first encryption algorithm to generate the unlocking code I of the current time;
and 4, matching the unlocking code II with the unlocking code I by the coded lock, if the unlocking code II is matched with the unlocking code I, informing a locking/unlocking module to open the coded lock, and otherwise, triggering an error processing event.
2. The method for realizing the dynamic password of the password lock according to claim 1, wherein before step 1, further performing:
the coded lock judges whether the trigger logic is met, if so, the unlocking trigger instruction is generated, and a random number generator of the coded lock is triggered to generate a random number serving as a random indication code;
the trigger logic is any one or more of a first trigger condition, a second trigger condition and a third trigger condition,
the first trigger condition is as follows: sensing that a person approaches the coded lock through infrared rays, wherein the distance between the person and the coded lock reaches a preset distance;
the second trigger condition is as follows: detecting finger touch information through the touch screen, and converting the touch screen from a sleep mode to a lighting mode through the finger touch information;
the third trigger condition is as follows: the distance between the appointed user side and the coded lock is within a preset distance range, and the appointed user side and the coded lock are in a Bluetooth pairing success state.
3. The method for implementing dynamic password of password lock according to claim 1, further comprising, before the password lock generates the random indication code:
setting a user password, and respectively storing the user password in a coded lock and a user side;
the coded lock establishes a mapping relation between a user password and user identification, and different user identifications correspond to different user passwords;
and 3, after the coded lock receives the unlocking code II input by the user, acquiring a user identifier corresponding to the unlocking code II, and searching a corresponding user password according to the mapping relation between the user identifier and the user password.
4. The method of claim 3, wherein the operating modes of the combination lock are divided into a single-password control mode and a multi-password control mode according to the number of the current valid user passwords,
in single password control mode: the user passwords pre-stored in the user sides and the coded lock are the same, and only one effective user password exists;
under the multi-password control mode: the user passwords pre-stored in the plurality of user sides are different, each user side independently sets the user password of the user side and pre-stores the user password of the user side in the same coded lock, and the user passwords of different user sides are distinguished through user identifications.
5. The method for implementing dynamic passwords of a combination lock according to claim 1, wherein N first algorithm modules are preset in the combination lock, N second algorithm modules are preset in the user side, and the same encryption algorithm module calling strategy is preset in the combination lock and the user side, so that the encryption algorithm modules running in the first algorithm module used in the combination lock and the encryption algorithm modules running in the second algorithm module used in the user side are consistent when the combination lock is unlocked.
6. The method of claim 1, wherein the preset first encryption algorithm and the preset second encryption algorithm are both configured as a HASH algorithm.
7. The method of claim 1, wherein the error handling event comprises:
judging whether the number of mismatching times of the unlocking code II and the unlocking code I in a preset time period A exceeds a preset number of times,
and if the preset times are exceeded, enabling the coded lock to be in a locked state within the preset time period B, otherwise, enabling the coded lock to generate a new random indication code and re-execute the steps 1 to 4 for retry.
8. A dynamic password implementation system of a password lock is characterized by comprising: the password lock comprises a random number generator, a first storage module, a second storage module, a first algorithm module, a determination module, a first output module and a locking/unlocking module, and the user side comprises a receiving module, a third storage module, a second algorithm module and a second output module;
the random number generator is used for generating a random indication code after reading an unlocking trigger instruction, the first storage module is used for storing the random indication code in the coded lock, and the first output module is used for informing a user of the random indication code in a first preset mode;
the second storage module is used for storing a preset user password, and the first algorithm module is used for calculating a random indication code stored in the first storage module and the user password stored in the second storage module by using a preset first encryption algorithm after receiving an unlocking code II input by a user to generate the unlocking code I at this time;
the determining module is used for matching the unlocking code II with the unlocking code I, if the unlocking code II is matched with the unlocking code I, the locking/unlocking module is informed to open the coded lock, and if not, an error handling event is triggered;
the receiving module is used for determining whether a random indication code input by a user is received, the third storage module is used for storing a preset user password, the second algorithm module is used for calculating the user password and the random indication code stored in the third storage module by using a preset second encryption algorithm to generate an unlocking code II of this time, and the second output module is used for informing the user of the unlocking code II in a second preset mode.
9. The dynamic password implementation system of claim 8, wherein the password lock further comprises an unlocking triggering module connected to the random number generator, and a first detection module, a second detection module and a third detection module connected to the unlocking triggering module;
the first detection module is configured to determine whether a first trigger condition is met, where the first trigger condition is: sensing that a person approaches the coded lock through infrared rays, wherein the distance between the person and the coded lock reaches a preset distance;
the second detection module is configured to determine whether a second trigger condition is satisfied, where the second trigger condition is: detecting finger touch information through the touch screen, and converting the touch screen from a sleep mode to a lighting mode through the finger touch information;
the third detection module is configured to determine whether a third trigger condition is satisfied, where the third trigger condition is: the distance between the appointed user side and the coded lock is within a preset distance range, and the appointed user side and the coded lock are in a Bluetooth pairing success state; the Bluetooth module arranged in the coded lock is matched with the Bluetooth module of the appointed user side in advance;
the unlocking trigger module is used for judging whether trigger logic is met, and if so, generating an unlocking trigger instruction to trigger a random number generator of the coded lock to generate a random number serving as a random indication code;
the trigger logic is any one or more of a first trigger condition, a second trigger condition and a third trigger condition.
10. The dynamic password implementation system of claim 8, wherein N first algorithm modules and first calling modules are preset in the password lock, and N second algorithm modules and second calling modules are preset at the user side;
the first calling module is used for being connected with the N first algorithm modules respectively, the second calling module is used for being connected with the N second algorithm modules respectively, and the same encryption algorithm module calling strategies are configured in advance for the first calling module and the second calling module, so that the encryption algorithm running in the first algorithm module used in the coded lock is consistent with the encryption algorithm running in the second algorithm module used by the user side when the coded lock is unlocked.
CN202110876337.9A 2021-07-31 2021-07-31 Method and system for realizing dynamic password of coded lock Withdrawn CN113409499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110876337.9A CN113409499A (en) 2021-07-31 2021-07-31 Method and system for realizing dynamic password of coded lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110876337.9A CN113409499A (en) 2021-07-31 2021-07-31 Method and system for realizing dynamic password of coded lock

Publications (1)

Publication Number Publication Date
CN113409499A true CN113409499A (en) 2021-09-17

Family

ID=77688213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110876337.9A Withdrawn CN113409499A (en) 2021-07-31 2021-07-31 Method and system for realizing dynamic password of coded lock

Country Status (1)

Country Link
CN (1) CN113409499A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116484346A (en) * 2023-06-19 2023-07-25 四川金投科技股份有限公司 Intelligent money box management system based on multidimensional information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116484346A (en) * 2023-06-19 2023-07-25 四川金投科技股份有限公司 Intelligent money box management system based on multidimensional information
CN116484346B (en) * 2023-06-19 2023-08-22 四川金投科技股份有限公司 Intelligent money box management system based on multidimensional information

Similar Documents

Publication Publication Date Title
CN101719826B (en) Dynamic token having function of updating seed key and updating method for seed key thereof
CN104408363B (en) Security code system
US20110128121A1 (en) Remote access procedure for electronic locks
CN108712389A (en) A kind of intelligent lock system
CN110310406A (en) A kind of method for unlocking and intelligent door lock of intelligent door lock
WO2019160472A1 (en) Updating biometric template protection keys
CN103391195B (en) A kind of method of work of dynamic token
CN111125456B (en) Virtual bit password comparison method, system and intelligent lock
CN114758433A (en) Cloud-based dynamic password generation method and system and intelligent lock
EP2667319B1 (en) Computer implemented security system and method
CN113971849A (en) Dynamic coded lock with management system
CN113409499A (en) Method and system for realizing dynamic password of coded lock
KR101330113B1 (en) Authentication apparatus and method based on position value
CN106534479A (en) Cell phone password protection system based on implicit code identification and implicit conversion
CN112530053B (en) Control method and system of intelligent lock, lock equipment, server and storage medium
CN111599048A (en) Dynamic coded lock with multiple unlocking modes and management system
CN104103107A (en) Time-varying password and time-varying password lock
CN106355078A (en) Intelligent password protecting system based on multifunctional-key behavior recognition
CN110298941A (en) A kind of disposable temporary password generation method of intelligent door lock
CN110390746A (en) A kind of implementation method of fingerprint anti-theft gate inhibition
CN115223281A (en) Access control system and access control method
CN1965279A (en) Architectures for privacy protection of biometric templates
Edwards et al. FFDA: A novel four-factor distributed authentication mechanism
CN113963468A (en) Unlocking code generation method and device
KR101624394B1 (en) Device for authenticating password and operating method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20210917

WW01 Invention patent application withdrawn after publication