CN115100762B - Safe unlocking method for generating 12-bit true random dynamic password - Google Patents
Safe unlocking method for generating 12-bit true random dynamic password Download PDFInfo
- Publication number
- CN115100762B CN115100762B CN202210611252.2A CN202210611252A CN115100762B CN 115100762 B CN115100762 B CN 115100762B CN 202210611252 A CN202210611252 A CN 202210611252A CN 115100762 B CN115100762 B CN 115100762B
- Authority
- CN
- China
- Prior art keywords
- lock
- key
- true random
- dynamic
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000013475 authorization Methods 0.000 claims abstract description 19
- 230000001360 synchronised effect Effects 0.000 claims abstract description 7
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME 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/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00571—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME 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/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00817—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0863—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0894—Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Power Engineering (AREA)
- Lock And Its Accessories (AREA)
Abstract
The invention belongs to the technical field of unlocking methods of coded locks, and discloses a safe unlocking method for generating a 12-bit true random dynamic password, which comprises the following steps: the key serial number and the initial key are imported into the dynamic coded lock, and the authorization code, the lock number and the user number are imported when the dynamic coded lock is installed and deployed; when the dynamic coded lock is locked, a true random number is generated by adopting a true random generator, a current encryption key is dispersed by adopting certain operation, the serial number of the current key is clear, the true random number, the lock number and the lock state information are encrypted by using the current encryption key, and are synchronized to a background system through a two-dimensional code; when the dynamic coded lock is unlocked, discrete operation is carried out on the true random number, the authorization code, the lock number and the user number generated during locking, a certain operation is adopted to disperse the current encryption key, the encryption key is used to encrypt the result of the discrete operation, and the first 12 bits of the result are taken as the unlocking code. The invention can generate true random dynamic password and ensure safety.
Description
Technical Field
The invention belongs to the technical field of unlocking methods of coded locks, and particularly relates to a safe unlocking method for generating a 12-bit true random dynamic password.
Background
With the continuous popularization of intelligent locks, various safety coded locks are widely applied to various safety occasions, wherein the most common dynamic coded locks are available, and the current method for generating the dynamic password by the dynamic coded locks on the market is simpler and is easy to be deduced through exhaustive attack or through a certain operation rule, so that the dynamic password has no real randomness and is extremely unsafe.
Disclosure of Invention
The embodiment of the invention aims to provide a safe unlocking method for generating a 12-bit true random dynamic password, which can generate the true random dynamic password and ensure the safety.
The embodiment of the invention is realized as follows:
a safe unlocking method for generating a 12-bit true random dynamic password comprises the following steps:
setting a true random generator in the dynamic coded lock, applying a key sequence number and an initial key for the dynamic coded lock in a background system, and importing the key sequence number and the initial key before the dynamic coded lock leaves a factory;
when the dynamic coded lock is installed and deployed, the lock number and the user number are filled into a background system, an authorization code is generated by the background system, and the authorization code, the lock number and the user number are stored in the dynamic coded lock and the background system;
when the dynamic coded lock is locked, the true random generator generates a true random number, a current encryption key is scattered by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, and the arrangement sequence of 'the current encryption key serial number plaintext+the current encryption key encryption true random number ciphertext+the lock number+the lock state information plaintext' is synchronized to a background system through a two-dimensional code; wherein the current key sequence number is the unique identification ID of the current encryption key;
when the dynamic coded lock is unlocked, carrying out discrete operation on a true random number, an authorization code, a lock number and a user number generated during locking, dispersing a current encryption key by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, encrypting a discrete operation result by using the current encryption key, and taking the first 12 bits of the result as an unlocking code; the background system and the dynamic coded lock can calculate the unlocking code through the algorithm.
According to the embodiment of the invention, the random factor generated by the true random number is added to the unlocking dynamic password generation to carry out discrete operation, so that the true randomness of the dynamic password is realized; the encryption hash operation result is obtained by adopting a mode of generating an SM4 key by unlocking once, and the dynamic password is prevented from being attacked by exhaustion and deduced by rules by taking the first 12 bits as an unlocking code; after locking, sensitive data such as SM4 key serial number plaintext, random factor and the like are encrypted in a two-dimensional code mode and then synchronized to the background. After the unlocking method is adopted, the unlocking is safer, the dynamic password is truly random and cannot be deduced through a certain operation rule, and the safety and the reliability are ensured.
Detailed Description
The present invention will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The following describes in detail the implementation of the present invention in connection with specific embodiments:
a safe unlocking method for generating a 12-bit true random dynamic password comprises the following steps:
setting a true random generator in the dynamic coded lock, applying a key sequence number and an initial key for the dynamic coded lock in a background system, and importing the key sequence number and the initial key before the dynamic coded lock leaves a factory;
when the dynamic coded lock is installed and deployed, the lock number and the user number are filled into a background system, an authorization code is generated by the background system, and the authorization code, the lock number and the user number are stored in the dynamic coded lock and the background system;
when the dynamic coded lock is locked, the true random generator generates a true random number, a current encryption key is scattered by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, and the arrangement sequence of 'the current encryption key serial number plaintext+the current encryption key encryption true random number ciphertext+the lock number+the lock state information plaintext' is synchronized to a background system through a two-dimensional code; wherein the current key sequence number is the unique identification ID of the current encryption key;
when the dynamic coded lock is unlocked, carrying out discrete operation on a true random number, an authorization code, a lock number and a user number generated during locking, dispersing a current encryption key by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, encrypting a discrete operation result by using the current encryption key, and taking the first 12 bits of the result as an unlocking code; the background system and the dynamic coded lock can calculate the unlocking code through the algorithm.
The key serial number and the initial key are applied by the background, the key serial number and the initial key are in unique corresponding relation, the key serial number and the initial key are imported into the dynamic coded lock before delivery, the lock number and the user number are filled in the background during installation and deployment, the lock number and the user number are generated according to rules of different industries, regions and the like, and the background generates authorization codes. The lock number, the user number and the authorization code are stored in the background for the generation of the subsequent dynamic password.
The dynamic coded lock is a true random number used for the last locking when unlocking, and the locking and uploading background system encrypts and uploads the true random number to prevent the true random number from being divulged.
The dynamic coded lock can record a lock number, a user number and an authorization code when being installed and deployed, the 3 are binding relations, one lock corresponds to the unique lock number, the user number and the authorization code can be known through the lock number, and the background system is required to record in advance as well. Therefore, only the lock number is needed to be uploaded through the two-dimension code mode. The lock number, the user number and the authorization code are needed to be used for carrying out discrete operation together, and the same current encryption key, the lock number, the user number, the authorization code and the random number are arranged at the background, so that the same unlocking password can be calculated.
Specifically, the unlocking setting method provided by the invention comprises the following steps:
1: the key serial number and the initial key are imported into the safe room before the dynamic coded lock leaves the factory.
2: the authorization code is imported during deployment, the lock number is used for user numbering.
3: when the lock is locked, a true random number is generated by adopting a true random generator, a current encryption key is dispersed by adopting certain operation, the serial number of the current key is clear, the true random number, the lock number and the lock state information are encrypted by using the current encryption key and are synchronized to the background through the two-dimension code, so that the lock sensitive information is ensured not to be leaked.
4: when unlocking, discrete operation is carried out on the true random number, the authorization code, the lock number and the user number which are generated during locking. The current encryption key is scattered by adopting certain operation, the result of the discrete operation is encrypted by using the encryption key, and the first 12 bits of the result are taken as the unlocking code. The key input is carried out through the digital keyboard of the dynamic coded lock, and after the input is completed, the unlocking can be completed after the comparison is successful.
5: after unlocking, the third step of operation is performed during locking, otherwise, the lock cannot be unlocked later, and the lock must be restored to factory setting and reinitialized to be used continuously.
To sum up, in the embodiment of the invention, the unlocked 12-bit dynamic password is truly random, the unlocked truly random number is encrypted and protected to be synchronized to the background by adopting a one-time pad method, so that the truly random number is prevented from being leaked, the unlocked 12-bit dynamic password is subjected to discrete operation by adopting the truly random number, and the unlocked 12-bit dynamic password is encrypted and generated by adopting the one-time pad method.
The foregoing description of the preferred embodiment of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
Claims (1)
1. The safe unlocking method for generating the 12-bit true random dynamic password is characterized by comprising the following steps of:
setting a true random generator in the dynamic coded lock, applying a key sequence number and an initial key for the dynamic coded lock in a background system, and importing the key sequence number and the initial key before the dynamic coded lock leaves a factory;
when the dynamic coded lock is installed and deployed, the lock number and the user number are filled into a background system, an authorization code is generated by the background system, and the authorization code, the lock number and the user number are stored in the dynamic coded lock and the background system;
when the dynamic coded lock is locked, the true random generator generates a true random number, a current encryption key is scattered by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, and the arrangement sequence of 'the current encryption key serial number plaintext+the current encryption key encryption true random number ciphertext+the lock number+the lock state information plaintext' is synchronized to a background system through a two-dimensional code; wherein the current key sequence number is the unique identification ID of the current encryption key;
when the dynamic coded lock is unlocked, carrying out discrete operation on a true random number, an authorization code, a lock number and a user number generated during locking, dispersing a current encryption key by adopting an SM4 key symmetric encryption algorithm through one-time encryption operation, encrypting a discrete operation result by using the current encryption key, and taking the first 12 bits of the result as an unlocking code; the background system and the dynamic coded lock can calculate the unlocking code through the algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210611252.2A CN115100762B (en) | 2022-05-31 | 2022-05-31 | Safe unlocking method for generating 12-bit true random dynamic password |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210611252.2A CN115100762B (en) | 2022-05-31 | 2022-05-31 | Safe unlocking method for generating 12-bit true random dynamic password |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115100762A CN115100762A (en) | 2022-09-23 |
CN115100762B true CN115100762B (en) | 2023-12-26 |
Family
ID=83289009
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210611252.2A Active CN115100762B (en) | 2022-05-31 | 2022-05-31 | Safe unlocking method for generating 12-bit true random dynamic password |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115100762B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116527258B (en) * | 2023-06-30 | 2023-09-22 | 深圳市旭子科技有限公司 | Unlocking method, device, equipment and storage medium of coded lock |
CN116543486B (en) * | 2023-07-05 | 2023-09-26 | 深圳市旭子科技有限公司 | Offline control method of coded lock and coded lock system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6415386B1 (en) * | 1995-07-21 | 2002-07-02 | Yi Shi | Cryptogram lock system with automatically variable true random code tonglingge |
WO2015058596A1 (en) * | 2013-10-22 | 2015-04-30 | 天地融科技股份有限公司 | Dynamic password generation method and system, and transaction request processing method and system |
KR20150131753A (en) * | 2014-05-16 | 2015-11-25 | 이효섭 | Method for providing a service unlocking a door |
CN105827576A (en) * | 2015-01-05 | 2016-08-03 | 珠海汇金科技股份有限公司 | Unlocking method and system based on dynamic cipher lock |
CN105893884A (en) * | 2016-04-21 | 2016-08-24 | 深圳市旭子科技有限公司 | Touch encryption keyboard and data input method |
CN107103676A (en) * | 2017-06-06 | 2017-08-29 | 张永穆 | A kind of shared equipment dynamic puzzle-lock system |
CN108320355A (en) * | 2017-12-29 | 2018-07-24 | 中国船舶重工集团公司第七八研究所 | A kind of the emergency cryptosystem open system and its open method of intelligent door lock |
-
2022
- 2022-05-31 CN CN202210611252.2A patent/CN115100762B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6415386B1 (en) * | 1995-07-21 | 2002-07-02 | Yi Shi | Cryptogram lock system with automatically variable true random code tonglingge |
WO2015058596A1 (en) * | 2013-10-22 | 2015-04-30 | 天地融科技股份有限公司 | Dynamic password generation method and system, and transaction request processing method and system |
KR20150131753A (en) * | 2014-05-16 | 2015-11-25 | 이효섭 | Method for providing a service unlocking a door |
CN105827576A (en) * | 2015-01-05 | 2016-08-03 | 珠海汇金科技股份有限公司 | Unlocking method and system based on dynamic cipher lock |
CN105893884A (en) * | 2016-04-21 | 2016-08-24 | 深圳市旭子科技有限公司 | Touch encryption keyboard and data input method |
CN107103676A (en) * | 2017-06-06 | 2017-08-29 | 张永穆 | A kind of shared equipment dynamic puzzle-lock system |
CN108320355A (en) * | 2017-12-29 | 2018-07-24 | 中国船舶重工集团公司第七八研究所 | A kind of the emergency cryptosystem open system and its open method of intelligent door lock |
Also Published As
Publication number | Publication date |
---|---|
CN115100762A (en) | 2022-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115100762B (en) | Safe unlocking method for generating 12-bit true random dynamic password | |
US6160891A (en) | Methods and apparatus for recovering keys | |
US5144667A (en) | Method of secure remote access | |
TWI463349B (en) | Method and system for secure data access among two devices | |
CN101309278B (en) | Method and system for storing encrypt data on customer | |
CN106534092A (en) | Message-based and key-dependent privacy data encryption method | |
CN1747382B (en) | Random encryption and identity authentication | |
US20020049904A1 (en) | Access system with possibility of learing unknown access keys | |
WO2005045550A2 (en) | Password recovery system and method | |
CN105635089B (en) | Authentication method, unlocking method and unlocking system of dynamic coded lock | |
CN114978525A (en) | Data security authentication method and system based on BIM | |
CA2251193A1 (en) | Method and apparatus for encoding and recovering keys | |
CN106358184A (en) | Point-to-point identity authentication method | |
CN114205090B (en) | Safe file sharing method and system based on cryptographic algorithm | |
CN117318941B (en) | Method, system, terminal and storage medium for distributing preset secret key based on in-car network | |
CN113297619A (en) | Mysql sensitive data protection system based on extensible precision double-chaos hash and RSA | |
US11601291B2 (en) | Authentication method and device for matrix pattern authentication | |
JPH04247737A (en) | Enciphering device | |
CN112668024B (en) | Method for preventing tampering of data at gas meter end | |
CN111523127B (en) | Authority authentication method and system for password equipment | |
KR20000039411A (en) | Authorization method using coding mechanism and disposable password | |
CN113326326A (en) | Method for sending data encryption protection based on block chain | |
CN112381976A (en) | One-time password verification method for electronic lock | |
CN111611602A (en) | Safe and controllable mass production method based on state secret chip | |
CN111859427A (en) | Multi-stage encrypted data storage method and system for preventing database collision and readable medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |