A method for generating and verifying an offline temporary password and a smart door lock thereof
By combining administrator passwords and pre-stored constants, and combining the current time to encrypt and calculate the generation of temporary passwords, the problem of high computational calculations in smart door locks is solved, and a safe and efficient temporary password generation and verification process is realized.
Patent Information
- Application Number
- CN202211354603.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-11-01
AI Technical Summary
The temporary password generation process in existing smart door locks is computationally expensive, resulting in insecurity and inefficiency.
The offline temporary password generation method is adopted, and the administrator password and pre-stored constants are used to encrypt and calculate them in combination with the current time to generate a simple and secure temporary password, and the preset encryption algorithm is used for comparison during the verification process.
It improves the security of temporary passwords and the simplicity of generation process, reduces the amount of calculation, and ensures the reliability and ease of use of passwords.
Smart Images

Figure CN115690956B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart door locks, and in particular to a method for generating and verifying an offline temporary password and a smart door lock thereof. Background Art
[0002] At present, smart door locks have become more and more popular. Smart door locks are improved on the basis of traditional mechanical locks, and are more intelligent and simple in terms of user security, identification, and management. Since smart door locks can be unlocked by passwords, fingerprints, face recognition, etc., it avoids the embarrassment of forgetting to bring keys and being unable to enter the door.
[0003] For the convenience of use, most smart door locks are equipped with a visitor mode, which generates a temporary password to unlock the door, making it easier for visitors to enter and avoiding the situation where the owner is unable to return in time to open the door for the guest, causing the guest to wait outside for a long time. In the past, the generation of temporary passwords mostly used the AES algorithm or the Hash algorithm, both of which have the problem of large computational complexity.
[0004] Therefore, whether it is possible to develop a temporary password generation method with low computational complexity and high security has become an urgent problem to be solved. Summary of the invention
[0005] In view of the above, the present invention provides a method for generating and verifying an offline temporary password and an intelligent door lock thereof, so as to solve the problem that the temporary password has a large amount of calculation in the past.
[0006] On the one hand, the present invention provides a method for generating an offline temporary password, which is applied to an APP end of a smart door lock, and the generation method comprises the following steps:
[0007] Obtain the administrator password X in the smart door lock APP, intercept the first n digits of the administrator password X as the initial password A, where n is a natural number greater than or equal to 6;
[0008] Obtain a pre-stored constant Z in the APP of the smart door lock, where the number of digits of the constant Z is the same as the number of digits of the initial password A;
[0009] Based on the initial password A and the constant Z, a first password N1 having the same number of digits as the initial password A is obtained;
[0010] Get the current time and read the month, day, hour and minute corresponding to the current time;
[0011] According to the first password N1 and the month, day, hour and minute corresponding to the read current time, a processed password N3 is obtained using a preset encryption algorithm;
[0012] Insert the read minute in the form of two digits into the preset position of the processed password N3 to obtain the final temporary password P.
[0013] Preferably, the step of obtaining the processed password N3 using a preset encryption algorithm according to the first password N1 and the month, day, hour and minute corresponding to the read current time is specifically as follows:
[0014] Add each digit of the first password N1 to the read minute, and keep the unit digit for each digit, to obtain a second password N2 with the same number of digits as the initial password A;
[0015] Multiply each digit of the second password N2 by the read month, then add the read day and hour in sequence, divide each result by the read minute + 1, and keep the units digit of the remainder to obtain a processed password N3 with the same number of digits as the initial password A.
[0016] More preferably, based on the initial password A and the constant Z, obtaining the first password N1 having the same number of digits as the initial password A is specifically:
[0017] Add each bit of the initial password A to each bit of the constant Z, retaining the unit digit of each result, to obtain a first password N1 with the same number of digits as the initial password A;
[0018] or,
[0019] After reversing the initial password A, each bit of the reversed initial password A is added to each bit of the constant Z, and the units digit of each result is retained to obtain a first password N1 with the same number of digits as the initial password A.
[0020] On the other hand, the present invention also provides an offline temporary password verification method, which is applied to a smart door lock end, and the verification method comprises the following steps:
[0021] Receiving an input final temporary password P and extracting the minutes in the temporary password P, wherein the final temporary password P is generated by any method;
[0022] Obtaining an administrator password X' in the smart door lock system, intercepting the first n digits of the administrator password X' as the initial password A', where n is a natural number greater than or equal to 6;
[0023] Obtaining a pre-stored constant Z' in the smart door lock system, wherein the number of digits of the constant Z' is the same as the number of digits of the initial password A';
[0024] Based on the initial password A' and the constant Z', a first password N1' having the same number of digits as the initial password A' is obtained;
[0025] Extract the time in the smart door lock system, replace the minutes in the extracted time with the minutes in the temporary password P, generate an updated time, and read the month, day, and minute corresponding to the updated time;
[0026] According to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time, 24 processed passwords N3' are calculated using a preset encryption algorithm, wherein the number of hours is an integer greater than or equal to 0 and less than or equal to 23;
[0027] Insert the minutes extracted from the final temporary password P into the preset positions of the 24 processed passwords N3' in the form of two digits to generate 24 final temporary passwords P' of the smart door lock end;
[0028] The input final temporary password P is compared with the 24 final temporary passwords P' generated by the smart door lock end one by one. If there is a match, the verification is successful; otherwise, the verification fails.
[0029] Preferably, the step of calculating and obtaining 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time is specifically:
[0030] 1) Add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain a second password N2' with the same number of digits as the initial password A';
[0031] 2) Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0;
[0032] 3) After adding 1 to the number of hours, repeat step 2) until the number of hours is 23, and obtain 24 processed passwords N3'.
[0033] More preferably, the first password N1' having the same number of digits as the initial password A' is obtained based on the initial password A' and the constant Z', specifically:
[0034] Each bit of the initial password A' is added to each bit of the constant Z', and the units digit of each result is retained to obtain a first password N1' with the same number of bits as the initial password A';
[0035] or,
[0036] After reversing the initial password A', each bit of the reversed initial password A' is added to each bit of the constant Z', and the units digit of each result is retained to obtain a first password N1' with the same number of bits as the initial password A'.
[0037] In addition, the present invention also provides an intelligent door lock, comprising:
[0038] A password receiving unit, used for receiving an input final temporary password P;
[0039] A storage unit, used to store an administrator password X' and a constant Z';
[0040] A time extraction unit, used to extract the minute in the final temporary password P in the password receiving unit; and extract the time in the smart door lock system, replace the minute in the extracted time with the minute in the final temporary password P, generate an updated time, and read the month, day and minute corresponding to the updated time;
[0041] A password generating unit is used to obtain an administrator password X' and a constant Z' from the storage unit, intercept the first n digits of the administrator password X' as an initial password A', wherein n is a natural number greater than or equal to 6, and based on the initial password A' and the constant Z', obtain a first password N1' having the same number of digits as the initial password A'; obtain 24 processed passwords N3' using a preset encryption algorithm according to the number of hours of the first password N1' and the month, day and minute corresponding to the read updated time; insert the minutes extracted from the temporary password P into the preset positions of the 24 processed passwords N3' in the form of two digits, respectively, to generate 24 final temporary passwords P' of the smart door lock end;
[0042] Password verification unit: read the final temporary password P in the password receiving unit and the 24 final temporary passwords P' of the smart door lock end in the password generation unit respectively, and compare the final temporary password P with the 24 final temporary passwords P' of the smart door lock end one by one. If there is a consistency, the verification is successful; otherwise, the verification fails.
[0043] Preferably, the step of obtaining 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time in the password generating unit is specifically:
[0044] 1) Add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain a second password N2' with the same number of digits as the initial password A';
[0045] 2) Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0;
[0046] 3) After adding 1 to the number of hours, repeat step 2) until the number of hours is 23, and obtain 24 processed passwords N3'.
[0047] The offline temporary password generation method provided by the present invention is generated based on the administrator password set by the administrator and the preset encryption method. The generation process is irreversible, so even when the calculation formula of the preset encryption method is exposed, it is still difficult to deduce the original password, thereby improving the security of the generated temporary password. The preset encryption method in the generation method is calculated based on the month, day, hour and minute in the time. The calculation process is simple, the calculation amount is small, and a relatively reliable temporary password can be obtained. It does not require complex mathematical algorithms and is simple and practical.
[0048] The offline temporary password generation method provided by the present invention has the advantages of small calculation amount and high security in generating the temporary password.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A schematic diagram of a flow chart of a method for generating an offline temporary password provided in an embodiment of the present invention;
[0053] Figure 2 A schematic flow chart of step S5 in a method for generating an offline temporary password according to an embodiment of the present invention;
[0054] Figure 3 A flowchart of an offline temporary password verification method provided by an embodiment of the present invention;
[0055] Figure 4 A flowchart of step S6' in an offline temporary password verification method provided by an embodiment of the present invention;
[0056] Figure 5 A schematic diagram of the components of a smart door lock provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION
[0057] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods consistent with some aspects of the present invention as detailed in the appended claims.
[0058] In order to solve the problem that the temporary passwords in previous smart door locks are generated by using the AES algorithm or the Hash algorithm, which has the problem of large amount of calculation, this implementation scheme provides a method for generating an offline temporary password, which is mainly used in the APP end of the smart door lock, see Figure 1 , the specific steps include:
[0059] S1: Obtain the administrator password X in the smart door lock APP, intercept the first n digits of the administrator password X as the initial password A, where n is a natural number greater than or equal to 6;
[0060] S2: Obtain a pre-stored constant Z in the smart door lock APP, the number of digits of the constant Z is the same as the number of digits of the initial password A;
[0061] S3: Based on the initial password A and the constant Z, obtain a first password N1 with the same number of digits as the initial password A;
[0062] S4: Get the current time, and read the month, day, hour, and minute corresponding to the current time;
[0063] S5: Obtain a processed password N3 using a preset encryption algorithm according to the first password N1 and the month, day, hour and minute corresponding to the read current time;
[0064] S6: Insert the read minute in the form of two digits into the preset position of the processed password N3 to obtain the final temporary password P.
[0065] In the offline temporary password generation method provided by the above implementation scheme, when intercepting the administrator password X, step S1 usually intercepts the first 6 digits of the administrator password X. In order to prevent the intercepted initial password A from being all 0s and generating a meaningless password of all 0s, a constant Z is extracted in step S2, and a meaningful first password N1 that is not 0 is obtained through the initial password A and the constant Z. The above administrator password X and constant Z are both pre-stored in the APP software. In step S5, the time corresponding to the month, day, hour and minute extracted in step S4 is encrypted with the first password N1 through an encryption algorithm to obtain the processed password N3. Since the extraction time is random and not a fixed constant, it can further increase the difficulty of deciphering and improve the security of the password. In order to add a time mark to the generated final temporary password, the read minute is inserted into the preset position of the processed password N3 in the form of two digits in step S6 to form the final temporary password. Usually, the minute is inserted after the processed password N3. If the initial password A is 6 digits, the generated final temporary password is 8 digits. If the minute corresponds to a single digit, 0 is added in front to fill the digit to form a two-digit form.
[0066] See also Figure 2 In the above step S5, according to the first password N1 and the month, day, hour and minute corresponding to the read current time, a preset encryption algorithm is used to obtain the processed password N3, which is specifically:
[0067] S501: Add each digit of the first password N1 to the read minute, retaining the unit digit of each digit, to obtain a second password N2 with the same number of digits as the initial password A;
[0068] S502: Multiply each digit of the second password N2 by the read month, then add the read day and hour in sequence, divide each digit of the result by the read minute + 1, and retain the units digit of the remainder to obtain a processed password N3 with the same number of digits as the initial password A.
[0069] The above scheme only gives an encryption algorithm. In actual applications, other methods similar to addition, subtraction, multiplication and division can also be used to encrypt the first password N1 using the month, day, hour and minute corresponding to the current time. The above overall encryption process is a simple logical calculation. Since it is based on the administrator password and combined with the randomness of the reading time, a relatively reliable temporary password can be obtained through simple logical calculations. It is simple and practical.
[0070] In the above step S3, based on the initial password A and the constant Z, a first password N1 with the same number of digits as the initial password A is obtained, specifically:
[0071] Add each digit of the initial password A to each digit of the constant Z, and keep the unit digit of each result to obtain the first password N1 with the same number of digits as the initial password A;
[0072] or,
[0073] After reversing the initial password A, each digit of the reversed initial password A is added to each digit of the constant Z, and the units digit is retained for each result, so as to obtain the first password N1 with the same digit as the initial password A.
[0074] The main purpose of the above operation is to apply the constant Z to the initial password A to avoid the situation where the intercepted initial password A is all 0. Among them, if the reverse order is added, it is to increase the difficulty of decryption and improve the security of the generated password.
[0075] This embodiment provides a verification method for an offline temporary password generated by the above embodiment, which is applied to a smart door lock. Figure 3 , specifically including the following steps:
[0076] S1': receiving an input final temporary password P and extracting the minute in the temporary password P, wherein the final temporary password P is generated by the method provided in the above embodiment;
[0077] S2': Obtain the administrator password X' in the smart door lock system, and intercept the first n digits of the administrator password X' as the initial password A', where n is a natural number greater than or equal to 6;
[0078] S3': obtaining a pre-stored constant Z' in the smart door lock system, wherein the number of digits of the constant Z' is the same as the number of digits of the initial password A';
[0079] S4': Based on the initial password A' and the constant Z', obtain a first password N1' with the same number of digits as the initial password A';
[0080] S5': extract the time in the smart door lock system, replace the minutes in the extracted time with the minutes in the temporary password P, generate an updated time, and read the month, day and minute corresponding to the updated time;
[0081] S6': Calculate 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time, where the number of hours is an integer greater than or equal to 0 and less than or equal to 23;
[0082] S7': insert the minutes extracted from the final temporary password P into the preset positions of the 24 processed passwords N3' in the form of two digits, and generate 24 final temporary passwords P' of the smart door lock end;
[0083] S8': Compare the input final temporary password P with the 24 final temporary passwords P' generated by the smart door lock end one by one. If there is a match, the verification is successful; otherwise, the verification fails.
[0084] In the offline temporary password verification method provided by the above implementation scheme, the administrator password X' and the constant Z' are both pre-stored in the smart door lock system, and their values are the same as the administrator password X and the constant Z pre-stored in the APP. The door lock system essentially discards the minutes of the time extracted from the door lock system and replaces them with the minutes in the final temporary password input, thereby ensuring that the month, day and minute used in the calculation of the two are the same as those on the APP side, and the hours are transformed from 0 to 23. 24 sets of passwords are calculated using the same method as on the APP side, and then the calculated 24 sets of passwords are compared one by one with the input password. If there is a consistency, the verification is successful and the lock is unlocked. If there is no consistency, the verification fails and the lock is not unlocked.
[0085] For time-limited passwords, you can add a date in front of the password. When using it, enter the password and date into the door lock together. After activating it once, the door lock will record the date. Next time you use it, you don't need to enter the date, you can just enter the password to open the door.
[0086] See also Figure 4 In the above step S6', according to the first password N1', the number of hours and the month, day and minute corresponding to the updated time, a preset encryption algorithm is used to calculate and obtain 24 processed passwords N3'. The specific process is the same as the generation method on the APP side, specifically:
[0087] S601': add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain the second password N2' with the same number of digits as the initial password A';
[0088] S602': Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0;
[0089] S603': after adding 1 to the number of hours, repeat step S602' until the number of hours is 23, and obtain 24 processed passwords N3'.
[0090] Similar to the APP side, the above only gives one encryption algorithm method. In actual applications, other methods similar to addition, subtraction, multiplication and division can also be used to encrypt the first password N1' using the month, day and minute corresponding to the current time read, as long as the encryption algorithm in the door lock system is completely consistent with the encryption algorithm on the APP side.
[0091] In the above step S4', based on the initial password A' and the constant Z', a first password N1' with the same number of digits as the initial password A' is obtained, which is also the same as the APP end and can be:
[0092] Add each bit of the initial password A' to each bit of the constant Z', and keep the unit digit of each result, to obtain the first password N1' with the same number of digits as the initial password A';
[0093] or,
[0094] After reversing the initial password A', each bit of the reversed initial password A' is added to each bit of the constant Z', and the units digit of each result is retained to obtain the first password N1' with the same number of bits as the initial password A'.
[0095] When the APP side adds directly, the door lock system adopts direct addition; when the APP side adopts reverse order and then adds, the door lock system adopts reverse order and then adds.
[0096] See also Figure 5 , this embodiment provides a smart door lock, including:
[0097] A password receiving unit 1, used for receiving an input final temporary password P;
[0098] Storage unit 2, used to store the administrator password X' and the constant Z';
[0099] The time extraction unit 3 is used to extract the minute in the final temporary password P in the password receiving unit 1; and extract the time in the smart door lock system, replace the minute in the extracted time with the minute in the final temporary password P, generate an updated time, and read the month, day and minute corresponding to the updated time;
[0100] The password generating unit 4 is used to obtain the administrator password X' and the constant Z' from the storage unit, intercept the first n digits of the administrator password X' as the initial password A', where n is a natural number greater than or equal to 6, and obtain the first password N1' with the same number of digits as the initial password A' based on the initial password A' and the constant Z'; obtain 24 processed passwords N3' using a preset encryption algorithm according to the number of hours of the first password N1' and the month, day and minute corresponding to the read updated time; insert the minutes extracted from the temporary password P in the form of two digits into the preset positions of the 24 processed passwords N3', respectively, to generate 24 final temporary passwords P' of the smart door lock end;
[0101] Password verification unit 5: reads the final temporary password P in the password receiving unit and the 24 final temporary passwords P' of the smart door lock end in the password generation unit respectively, and compares the final temporary password P with the 24 final temporary passwords P' of the smart door lock end one by one. If there is a consistency, the verification is successful; otherwise, the verification fails.
[0102] The steps of obtaining 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time in the password generating unit are specifically:
[0103] 1) Add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain the second password N2' with the same number of digits as the initial password A';
[0104] 2) Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0;
[0105] 3) After adding 1 to the number of hours, repeat step 2) until the number of hours is 23, and obtain 24 processed passwords N3'.
[0106] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0107] It should be understood that the present invention is not limited to what has been described above and that various modifications and changes may be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for generating an offline temporary password, applied to an APP end of a smart door lock, characterized in that: The steps include: Obtain the administrator password X in the smart door lock APP, intercept the first n digits of the administrator password X as the initial password A, where n is a natural number greater than or equal to 6; Obtain a pre-stored constant Z in the APP of the smart door lock, where the number of digits of the constant Z is the same as the number of digits of the initial password A; Based on the initial password A and the constant Z, a first password N1 having the same number of digits as the initial password A is obtained; Get the current time and read the month, day, hour and minute corresponding to the current time; According to the first password N1 and the month, day, hour and minute corresponding to the read current time, a processed password N3 is obtained using a preset encryption algorithm; Insert the read minute in the form of two digits into the preset position of the processed password N3 to obtain the final temporary password P.
2. The method for generating an offline temporary password according to claim 1, characterized in that: The step of obtaining the processed password N3 using a preset encryption algorithm according to the first password N1 and the month, day, hour and minute corresponding to the read current time is specifically as follows: Add each digit of the first password N1 to the read minute, and keep the unit digit for each digit, to obtain a second password N2 with the same number of digits as the initial password A; Multiply each digit of the second password N2 by the read month, then add the read day and hour in sequence, divide each result by the read minute + 1, retain the units digit of the remainder, and obtain a processed password N3 with the same number of digits as the initial password A.
3. The method for generating an offline temporary password according to claim 1, characterized in that: The method of obtaining the first password N1 having the same number of digits as the initial password A based on the initial password A and the constant Z is specifically: Add each bit of the initial password A to each bit of the constant Z, retaining the unit digit of each result, to obtain a first password N1 with the same number of digits as the initial password A; or, After reversing the initial password A, each bit of the reversed initial password A is added to each bit of the constant Z, and the units digit of each result is retained to obtain a first password N1 with the same number of digits as the initial password A.
4. An offline temporary password verification method, applied to a smart door lock, characterized in that: The steps include: Receiving an input final temporary password P, and extracting the minutes in the final temporary password P, wherein the final temporary password P is generated by any one of the methods described in claims 1-3; Obtaining an administrator password X' in the smart door lock system, intercepting the first n digits of the administrator password X' as the initial password A', where n is a natural number greater than or equal to 6; Obtaining a pre-stored constant Z' in the smart door lock system, wherein the number of digits of the constant Z' is the same as the number of digits of the initial password A'; Based on the initial password A' and the constant Z', a first password N1' having the same number of digits as the initial password A' is obtained; Extract the time in the smart door lock system, replace the minutes in the extracted time with the minutes in the final temporary password P, generate an updated time, and read the month, day and minute corresponding to the updated time; According to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time, 24 processed passwords N3' are calculated using a preset encryption algorithm, wherein the number of hours is an integer greater than or equal to 0 and less than or equal to 23; Insert the minutes extracted from the final temporary password P into the preset positions of the 24 processed passwords N3' in the form of two digits to generate 24 final temporary passwords P' of the smart door lock end; The input final temporary password P is compared with the 24 final temporary passwords P' generated by the smart door lock end one by one. If there is a match, the verification is successful; otherwise, the verification fails.
5. The offline temporary password verification method according to claim 4, characterized in that: The step of calculating and obtaining 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time is specifically as follows: 1) Add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain a second password N2' with the same number of digits as the initial password A'; 2) Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0; 3) After adding 1 to the number of hours, repeat step 2) until the number of hours is 23, and obtain 24 processed passwords N3'.
6. The offline temporary password verification method according to claim 4, characterized in that: The method of obtaining the first password N1' having the same number of digits as the initial password A' based on the initial password A' and the constant Z' is specifically: Each bit of the initial password A' is added to each bit of the constant Z', and the units digit of each result is retained to obtain a first password N1' with the same number of bits as the initial password A'; or, After reversing the initial password A', each bit of the reversed initial password A' is added to each bit of the constant Z', and the units digit of each result is retained to obtain a first password N1' with the same number of bits as the initial password A'.
7. A smart door lock, characterized in that: include: A password receiving unit, used for receiving an input final temporary password P; A storage unit, used to store an administrator password X' and a constant Z'; A time extraction unit, used to extract the minutes in the final temporary password P in the password receiving unit; And extract the time in the smart door lock system, replace the minutes in the extracted time with the minutes in the final temporary password P, generate an updated time, and read the month, day and minute corresponding to the updated time; A password generating unit is used to obtain an administrator password X' and a constant Z' from the storage unit, intercept the first n digits of the administrator password X' as an initial password A', wherein n is a natural number greater than or equal to 6, and based on the initial password A' and the constant Z', obtain a first password N1' having the same number of digits as the initial password A'; obtain 24 processed passwords N3' using a preset encryption algorithm according to the number of hours of the first password N1' and the month, day and minute corresponding to the read updated time; insert the minutes extracted from the temporary password P into the preset positions of the 24 processed passwords N3' in the form of two digits, respectively, to generate 24 final temporary passwords P' of the smart door lock end; Password verification unit: read the final temporary password P in the password receiving unit and the 24 final temporary passwords P' of the smart door lock end in the password generation unit respectively, and compare the final temporary password P with the 24 final temporary passwords P' of the smart door lock end one by one. If there is a consistency, the verification is successful; otherwise, the verification fails.
8. The smart door lock according to claim 7, characterized in that: The step of obtaining 24 processed passwords N3' using a preset encryption algorithm according to the first password N1', the number of hours, and the month, day, and minute corresponding to the read updated time in the password generating unit is specifically: 1) Add each digit of the first password N1' to the minute corresponding to the updated time, and keep the unit digit for each digit, to obtain a second password N2' with the same number of digits as the initial password A'; 2) Multiply each digit of the second password N2' by the month corresponding to the updated time, then add the hours and the day corresponding to the updated time, and divide each digit by the minute corresponding to the updated time + 1, retaining the units digit of the remainder, to obtain a processed password N3' with the same number of digits as the initial password A', where the number of hours is 0; 3) After adding 1 to the number of hours, repeat step 2) until the number of hours is 23, and obtain 24 processed passwords N3'.
Citation Information
Patent Citations
Network security defense method
CN109067797A
Automobile CAN bus encryption method
CN110545257A