CN112260821A - Method, system and equipment for generating temporary password of off-line electronic lock - Google Patents

Method, system and equipment for generating temporary password of off-line electronic lock Download PDF

Info

Publication number
CN112260821A
CN112260821A CN202010969262.4A CN202010969262A CN112260821A CN 112260821 A CN112260821 A CN 112260821A CN 202010969262 A CN202010969262 A CN 202010969262A CN 112260821 A CN112260821 A CN 112260821A
Authority
CN
China
Prior art keywords
temporary password
password
digits
temporary
random number
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.)
Pending
Application number
CN202010969262.4A
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.)
Hefei Huanxin Microelectronics Technology Co ltd
Original Assignee
Hefei Huanxin Microelectronics 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 Hefei Huanxin Microelectronics Technology Co ltd filed Critical Hefei Huanxin Microelectronics Technology Co ltd
Priority to CN202010969262.4A priority Critical patent/CN112260821A/en
Publication of CN112260821A publication Critical patent/CN112260821A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The invention discloses a temporary password generation method for an offline electronic lock, which comprises the following steps: generating a first part of a temporary password by the valid time information and the pseudo random number; generating a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step; and combining the first part and the second part into the temporary password.

Description

Method, system and equipment for generating temporary password of off-line electronic lock
Technical Field
The invention relates to the field of encryption, in particular to a method, a system and equipment for generating a temporary password of an offline electronic lock.
Background
The electronic lock is an electronic product which controls a circuit or a chip by inputting a password so as to control the closing of a mechanical switch and complete unlocking and locking tasks.
In the prior art, the temporary password of the electronic lock is generated by a dynamic password method with fixed time effectiveness, the method takes the current time as a seed, the password is updated every fixed time period, the password is effective only in the fixed time period, and the effective time point and the effective duration of the temporary password cannot be flexibly set.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method, a system and equipment for generating a temporary password of an offline electronic lock.
In order to solve the technical problems, the invention adopts the following technical scheme:
a temporary password generation method for an offline electronic lock comprises the following steps:
the method comprises the following steps: generating a first part of a temporary password by the valid time information and the pseudo random number;
step two: generating a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step;
step three: and combining the first part and the second part into the temporary password.
Specifically, the pseudo random numbers are generated in step one and step two using the same initial seed and generation function, and the pseudo random number in step one is the same as the pseudo random number in step two each time the temporary password is generated.
Specifically, the first part P of the temporary password is generated by the effective time information T and the pseudo random number R in the step one1The method comprises the following steps: p1=T*R。
Specifically, the valid time information is the valid time of the temporary password, the valid time information is six digits, the first two digits of the six digits are the valid days of the temporary password, the third digit and the fourth digit are the current date, the fifth digit is the last digit of the current year, and the sixth digit is the last digit of the current month.
Specifically, the second part P of the temporary password is generated by the fixed password S and the pseudo random number R in the step two2The method comprises the following steps: p2(ii) S + R × H; where H is the room address.
Specifically, the fixed password is a four-digit number; the room address is four digits, wherein the first two digits are the number of floors and the second two digits are the room number.
In particular, the first part P1Has 6-8 bits, a second part P2The number of bits is 4-6; when the first part and the second part are combined into the temporary password in the third step, if the digit number of the second part is less than 6 digits, zero is filled at the beginning of the second part, so that the second part becomes 6 digits; the first 6 digits of the first part are sequentially arranged at the odd digits of the temporary password and the second partThe parts are sequentially placed at even-numbered digits of the temporary password, and then the digits exceeding 6 digits in the first part are placed at the end of the temporary password.
An offline electronic lock temporary pass code generation system, comprising:
a valid time module generating a first part of the temporary password by the valid time information and the pseudo random number;
a fixed information module which generates a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step;
and the password merging module merges the first part and the second part into the temporary password.
A computer device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said processor implementing said generating method when executing said computer program.
Compared with the prior art, the invention has the beneficial technical effects that:
the temporary password is divided into two parts, wherein the first part carries the valid time information of the password; the second part carries fixed password information and is used for verifying the validity of the temporary password; when the electronic lock needs to be unlocked, after the temporary password is input for the first time, the electronic lock analyzes the temporary password into two parts, whether the temporary password is legal or not is verified through the second part, if the temporary password is legal, the effective time information contained in the first part is analyzed again, and the effective time of the temporary password is set; the temporary password can meet the safety requirement during unlocking, and the temporary password can be analyzed to obtain the effective time of the temporary password.
Drawings
Fig. 1 is a flowchart illustrating a temporary password generation method according to the present invention.
Detailed Description
A preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
In the prior art, the temporary password of the electronic lock is generated by a dynamic password method with fixed time effectiveness, the method takes the current time as a seed, and the password is updated every fixed time period, namely the effective time of the password is fixed and cannot be set as required.
As shown in fig. 1, the present invention provides a method for generating a temporary password of an offline electronic lock, including the following steps:
s1: a first part of the temporary password is generated by the validity time information and the pseudo-random number.
Specifically, the pseudo random numbers are generated in step one and step two using the same initial seed and generation function, and the pseudo random number in step one is the same as the pseudo random number in step two each time the temporary password is generated.
Specifically, the first part P of the temporary password is generated by the effective time information T and the pseudo random number R in the step one1The method comprises the following steps: p1=T*R。
Specifically, the valid time information is the valid time of the temporary password, the valid time information is six digits, the first two digits of the six digits are the valid days of the temporary password, and the value range is 01 to 31; the third and fourth dates are the current dates and the value range is 01-31; the fifth digit is the last digit of the current year and has a value range of 0-9; the sixth digit is the last digit of the current month, and the value range is 0-9; assume that the current date is 2023, 5, 12 days, the effective days are 7 days, and the six digits of the effective time information are 071235.
The value range of the pseudo random number is 1-99, the same seeds and generating functions are used in an electronic lock unlocking program and a password generating program of a hotel background, and the number sequence of the pseudo random number can be kept unchanged each time; after the electronic lock is successfully unlocked, the pseudo random number is updated so that the electronic lock can analyze the next group of temporary passwords; in the password generation program, after the guest checks in, the pseudo-random number is updated for generating the next group of temporary passwords; in this way, the pseudo-random number in the password generation program and the pseudo-random number in the electronic lock are updated to be consistent, so that the electronic lock can correctly analyze the temporary password generated in the password generation program.
From the value ranges of the numbers used to generate the first portion, it can be calculated that the value range of the first portion is 999999 and 31006701.
S2: a second part of the temporary code is generated by the fixed code and the same pseudo random number as in step one.
Specifically, the second part P of the temporary password is generated by the fixed password S and the pseudo random number R in the step two2The method comprises the following steps: p2(ii) S + R × H; where H is the room address.
Specifically, the fixed password is a four-digit number, and the value range is 0000-; the room address is four digits, and the value range is 0101-.
The value range of the second part can be calculated to be 0101-504900 according to the value range of each number used for generating the second part.
S3: and combining the first part and the second part into the temporary password.
In particular, the first part P1Has 6-8 bits, a second part P2The number of bits is 4-6; when the first part and the second part are combined into the temporary password in the third step, if the digit number of the second part is less than 6 digits, zero is filled at the beginning of the second part, so that the second part becomes 6 digits; the first 6 digits of the first part are sequentially placed at the odd digits of the temporary password and the second part is sequentially placed at the even digits of the temporary password, and then the digits exceeding 6 digits in the first part are placed at the end of the temporary password.
For the convenience of merging, when the second part is a four-bit number or a five-bit number, 0 is supplemented at the beginning of the second part to form a six-bit number, so that the value range of the second part is 000101 and 504900; the first part and the second part are then combined, the first 6 bits of the first part being placed in odd numbers and the second part being placed in even numbers to form a 12-bit number, and then the first part larger than 6 bits is supplemented after the 12-bit number, and the final temporary secret code number is between 12 and 14 bits.
The temporary password is divided into two parts, wherein the first part carries the valid time information of the password; the second part carries fixed password information and is used for verifying the validity of the temporary password; when the electronic lock needs to be unlocked, after the temporary password is input for the first time, the electronic lock analyzes the temporary password into two parts, whether the temporary password is legal or not is verified through the second part, if the temporary password is legal, the effective time information contained in the first part is analyzed again, and the effective time of the temporary password is set; the temporary password can meet the safety requirement during unlocking, and the temporary password can be analyzed to obtain the effective time of the temporary password.
When the temporary password is used for unlocking, the electronic lock unlocking program firstly extracts even-numbered bits which are not more than 12 bits in the temporary password to form a second part, then calculates a fixed password by using the room number and the current pseudo-random number of the electronic lock unlocking program, compares the fixed password with the local fixed password of the electronic lock, and succeeds in comparison, and the temporary password is legal; the fixed password is an administrator password, and the administrator password is kept unchanged when the administrator password is not changed manually; and then, extracting odd bits with the temporary password not more than 12 bits and numbers with the bits more than 12 bits to form a first part, calculating effective time information of the temporary password according to a pseudo random number in the current electronic lock, storing the temporary password and the effective time period into a local flash of the electronic lock, comparing whether the temporary password is correct or not when unlocking is performed each time, comparing the current time with the effective time period of the temporary password if the temporary password is correct, unlocking if the current time is within the effective time period, and refusing to unlock if the temporary password is invalid, and sending out voice prompt information.
An offline electronic lock temporary pass code generation system, comprising:
a valid time module generating a first part of the temporary password by the valid time information and the pseudo random number;
a fixed information module which generates a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step;
and the password merging module merges the first part and the second part into the temporary password.
A computer device comprising a memory, a processor and a computer program stored on said memory and executable on said processor, said processor implementing said generating method when executing said computer program.
The invention relates to a potential application field of a household electronic lock, wherein when a nanny wants to clean, an owner can generate a group of temporary passwords through an APP (application) provided with the password generation method, and then the nanny is informed, and the nanny can use the group of temporary passwords to unlock within a time period limited by the owner; the hotel electronic lock takes the scientific and technological internet of things as a selling point, after a guest reserves a room through an internet program, a hotel background program generates a temporary password for the guest according to the password generation method, the guest determines the room type and the stay time period of the hotel, and the guest can unlock the lock by using the temporary password in the room reservation time period.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein, and any reference signs in the claims are not intended to be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (9)

1. A temporary password generation method for an offline electronic lock comprises the following steps:
the method comprises the following steps: generating a first part of a temporary password by the valid time information and the pseudo random number;
step two: generating a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step;
step three: and combining the first part and the second part into the temporary password.
2. The method of claim 1, wherein the pseudo random number is generated in step one and step two using the same initial seed and generation function, and the pseudo random number in step one is the same as the pseudo random number in step two each time the temporary code is generated.
3. The method for generating the temporary password of the off-line electronic lock as claimed in claim 1, wherein the first part P of the temporary password is generated by the valid time information T and the pseudo random number R in the first step1The method comprises the following steps: p1=T*R。
4. The method for generating the temporary password of the off-line electronic lock according to claim 3, wherein the valid time information is the valid time of the temporary password, the valid time information is six digits, the first two digits of the six digits are the valid days of the temporary password, the third digit and the fourth digit are the current date, the fifth digit is the last digit of the current year, and the sixth digit is the last digit of the current month.
5. The method for generating the temporary password of the off-line electronic lock as claimed in claim 1, wherein in the second step, the second part P of the temporary password is generated by the fixed password S and the pseudo random number R2The method comprises the following steps: p2(ii) S + R × H; where H is the room address.
6. The method for generating the temporary password of the offline electronic lock as claimed in claim 5, wherein the fixed password is a four-digit number; the room address is four digits, wherein the first two digits are the number of floors and the second two digits are the room number.
7. The method for generating the temporary password of the offline electronic lock as recited in claim 1, wherein the first part P is a first part P1Has 6-8 bits, a second part P2The number of bits is 4-6; when the first part and the second part are combined into the temporary password in the third step, if the digit number of the second part is less than 6 digits, zero is filled at the beginning of the second part, so that the second part becomes 6 digits; the first 6 digits of the first part are sequentially placed at the odd digits of the temporary password and the second part is sequentially placed at the even digits of the temporary password, and then the digits exceeding 6 digits in the first part are placed at the end of the temporary password.
8. An offline electronic lock temporary password generation system, comprising:
a valid time module generating a first part of the temporary password by the valid time information and the pseudo random number;
a fixed information module which generates a second part of the temporary password by the fixed password and the same pseudo-random number as in the first step;
and the password merging module merges the first part and the second part into the temporary password.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the generating method according to any one of claims 1-7 when executing the computer program.
CN202010969262.4A 2020-09-15 2020-09-15 Method, system and equipment for generating temporary password of off-line electronic lock Pending CN112260821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010969262.4A CN112260821A (en) 2020-09-15 2020-09-15 Method, system and equipment for generating temporary password of off-line electronic lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010969262.4A CN112260821A (en) 2020-09-15 2020-09-15 Method, system and equipment for generating temporary password of off-line electronic lock

Publications (1)

Publication Number Publication Date
CN112260821A true CN112260821A (en) 2021-01-22

Family

ID=74231426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010969262.4A Pending CN112260821A (en) 2020-09-15 2020-09-15 Method, system and equipment for generating temporary password of off-line electronic lock

Country Status (1)

Country Link
CN (1) CN112260821A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241637A (en) * 2021-12-16 2022-03-25 珠海格力电器股份有限公司 Unlocking system and method and intelligent door lock

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070245150A1 (en) * 2006-04-11 2007-10-18 Feitian Technologies, Co., Ltd. Method for preventing unauthorized access to the computer system by using one-time password
CN104581701A (en) * 2014-12-12 2015-04-29 郑锋 Multiple mobile terminal and multiple access terminal connecting and binding method and network system thereof
CN104631961A (en) * 2014-02-17 2015-05-20 袁磊 Dynamic password electronic lock system in which password changes according to random codes
CN108986278A (en) * 2018-07-13 2018-12-11 深圳市欧瑞博科技有限公司 A kind of intelligent door lock off-line cipher authorization method and authoring system
CN109741500A (en) * 2018-12-29 2019-05-10 北京方正数码有限公司 A kind of setting of the temporary password of smart lock and its verification method
CN110853191A (en) * 2019-11-12 2020-02-28 珠海格力电器股份有限公司 Intelligent door lock unlocking method, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070245150A1 (en) * 2006-04-11 2007-10-18 Feitian Technologies, Co., Ltd. Method for preventing unauthorized access to the computer system by using one-time password
CN104631961A (en) * 2014-02-17 2015-05-20 袁磊 Dynamic password electronic lock system in which password changes according to random codes
CN104581701A (en) * 2014-12-12 2015-04-29 郑锋 Multiple mobile terminal and multiple access terminal connecting and binding method and network system thereof
CN108986278A (en) * 2018-07-13 2018-12-11 深圳市欧瑞博科技有限公司 A kind of intelligent door lock off-line cipher authorization method and authoring system
CN109741500A (en) * 2018-12-29 2019-05-10 北京方正数码有限公司 A kind of setting of the temporary password of smart lock and its verification method
CN110853191A (en) * 2019-11-12 2020-02-28 珠海格力电器股份有限公司 Intelligent door lock unlocking method, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241637A (en) * 2021-12-16 2022-03-25 珠海格力电器股份有限公司 Unlocking system and method and intelligent door lock

Similar Documents

Publication Publication Date Title
US9934400B2 (en) System and methods for encrypting data
KR100340936B1 (en) Method of Eeffecting Mutual Authentication
US6035406A (en) Plurality-factor security system
US6647493B1 (en) Method and system for authentication and electronic signature
TWI510954B (en) A method and a device for generating a secret value
EP2202912A1 (en) Method and apparatus for camouflaging of data, information and functional transformations
CN110780847B (en) Random number generation method, random number generation device and electronic equipment
CN105160210B (en) A kind of software authorization method and system, software terminal and software manager
CN108711209A (en) dynamic password generation and verification method and system
WO2007095265A2 (en) Method and system for providing a one time password to work in conjunction with a browser
CN112260821A (en) Method, system and equipment for generating temporary password of off-line electronic lock
CN113223210A (en) Offline control method and device for electronic lock and terminal equipment
CN109166199B (en) Password generation method, device and equipment
CN116527258B (en) Unlocking method, device, equipment and storage medium of coded lock
CN106850206B (en) Dynamic password protection system and method based on PLC
CN107294705B (en) Method, device and system for generating and verifying key
CN104103107A (en) Time-varying password and time-varying password lock
CN116232586A (en) Image encryption method based on fractional order memristor neural network time feedback control
CN115242450A (en) Password data input method, device and storage medium
Ahmadzadegan et al. A method for securing username and password against the Keylogger software using the logistic map chaos function
CN114077731A (en) Timing locking machine and unlocking method for electrical control system
Alsaiari et al. A review of graphical authentication utilising a keypad input method
CN108777672A (en) A kind of authentication method and system of multiple authentication
CN115296879B (en) Encryption authentication method and system for microservice
DE19841886A1 (en) Method and device for generating passwords

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