Password authentication method and device, storage medium and program product
By introducing authentication passwords with dynamic passwords, count values and variable range values into smart door locks, the problem of inconsistent OTP passwords on the device and platform sides is solved, and a safe and efficient lock unlocking process is achieved, simplifying user operations.
Patent Information
- Application Number
- CN202411343495.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
When the existing smart door lock is disconnected, the OTP password generated by the device and platform terminals are inconsistent, resulting in users being unable to successfully authenticate and unlock the lock, and the storage and operation of mechanical keys are complicated.
Use an authentication password composed of dynamic passwords, count values and variable range values to generate dynamic passwords through preset encryption algorithms and time parameters, and negotiate variable range values between the device and the server to ensure the dynamics of the authentication password. and one-off, providing fault tolerance to avoid inconsistent pace issues.
It improves the security and effectiveness of passwords, ensures that users can unlock locks normally, and provides fault tolerance range when counting values are inconsistent, avoids the hidden dangers of password leakage, and simplifies the unlocking process.
Smart Images

Figure CN119296206A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a password authentication method, device, storage medium and program product. Background Art
[0002] Nowadays, encryption technology has very important advantages in information security protection. Encryption technology is used in various fields and is conducive to protecting privacy and security.
[0003] As an example, smart door locks are an application scenario of encryption technology. Existing smart door locks can be unlocked by fingerprints, faces, cards, digital passwords and other methods. If the smart door lock device communicates with the cloud backend service through the network, the backend service can be manually controlled to send fingerprints, faces, cards, digital passwords and other keys to the smart door lock, enabling the administrator to remotely control the door lock. If the network between the device and the cloud backend is disconnected, the key sent by the administrator cannot reach the device, resulting in unlocking failure. At this time, the lock can be unlocked with a mechanical key or a one-time password generated based on OTP. The administrator generates a one-time password on the platform and sends it to the user end. The device side generates an OTP password based on the same rules as the platform, so that the platform and the device will generate the same dynamic password at the same time, and the user can successfully unlock the door.
[0004] However, the inventors found that the existing technology has at least the following problems: the mechanical key needs to be stored and searched, and the device needs to be manually operated to open, and the unlocking process is relatively cumbersome. In the existing OTP password generation process, a counter or current time is usually combined to achieve the effect of generating a dynamic password. This has the probability that the dynamic password generated by the device and the platform will be out of step, resulting in the user being unable to authenticate successfully. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a password authentication method, device, storage medium and program product, which can enable the generated authentication password to have the characteristic of one-time use and a certain fault tolerance range, which can not only ensure normal unlocking but also prevent the hidden dangers caused by password leakage.
[0006] To achieve the above object, an embodiment of the present invention provides a password authentication method, which is applied to a device, and the method includes:
[0007] Generate a first authentication password; wherein the first authentication password is a string consisting of a first dynamic password, a first count value and a first variable range value;
[0008] Receiving a second authentication password generated by the server and sent by the user; wherein the second authentication password is a character string consisting of a second dynamic password, a second count value, and a second variable range value;
[0009] When the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, it is determined that the password authentication is successful.
[0010] As an improvement of the above solution, the first dynamic password and the second dynamic password are generated according to a preset one-time password generation rule.
[0011] As an improvement of the above solution, the preset one-time password generation rule is:
[0012] Generate a password string using a preset encryption algorithm based on the preset key string and time parameters as a dynamic password; or,
[0013] According to the preset secret key string and time parameters, a preset encryption algorithm is used to generate a password string; a preset interception function is used to intercept a string at a specific position in the password string to generate a dynamic password.
[0014] As an improvement of the above solution, the time parameter is a ratio of the current time to a preset time interval.
[0015] As an improvement of the above solution, the first count value and the second count value are accumulated starting from 0 and are increased by one after each password authentication is passed.
[0016] As an improvement to the above solution, the first variable range value and the second variable range value are pre-negotiated and set by the device end and the server end.
[0017] As an improvement of the above solution, the method further includes:
[0018] When the first dynamic password is different from the second dynamic password, or the first variable range value is different from the second variable range value, or the difference between the first count value and the second count value is greater than the first variable range value, it is determined that the password authentication fails.
[0019] The embodiment of the present invention further provides a password authentication method, which is applied to a server, and the method includes:
[0020] Generate a second authentication password; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value;
[0021] The second authentication password is sent to the user end so that the user end sends the second authentication password to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
[0022] The embodiment of the present invention further provides a password authentication method, which is applied to a user terminal, and the method includes:
[0023] Receive a second authentication password sent by the server; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value;
[0024] The second authentication password is sent to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
[0025] An embodiment of the present invention further provides a password authentication device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the password authentication methods described above when executing the computer program.
[0026] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the password authentication methods described above.
[0027] An embodiment of the present invention further provides a computer program product, which includes a computer program or a computer instruction. When the computer program or the computer instruction is executed by a processor, the password authentication method as described in any one of the above is implemented.
[0028] Compared with the prior art, the password authentication method, device, storage medium and program product disclosed in the present invention optimize the generation method and authentication means of the authentication password. The authentication password is composed of a dynamic password, a count value and a variable range value. By designing the dynamic password and the count value, the password is dynamic and one-time use, thereby improving the security and effectiveness of the password. By introducing the variable range value, the variable range of the count value is determined, and the variable range of the authentication password allowed to be input by the user is introduced, so that there is a certain fault tolerance range for the inconsistency of the count values on the device side and the server side, effectively avoiding the situation where the authentication cannot be successfully performed due to the inconsistency of the count values on the device side and the server side, which can not only ensure normal unlocking, but also prevent the hidden dangers caused by password leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flowchart of a first password authentication method provided by an embodiment of the present invention;
[0030] Figure 2 is a flow chart of a second password authentication method provided by an embodiment of the present invention;
[0031] Figure 3 is a flowchart of a third password authentication method provided by an embodiment of the present invention;
[0032] Figure 4 It is a structural diagram of a password authentication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0035] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0036] See also Figure 1 , is a flow chart of a first password authentication method provided by an embodiment of the present invention. An embodiment of the present invention provides a password authentication method, which is applied to a device end. The method specifically includes steps S11 to S13:
[0037] S11, generating a first authentication password; wherein the first authentication password is a character string consisting of a first dynamic password, a first count value and a first variable range value;
[0038] S12, receiving a second authentication password generated by the server and sent by the user end; wherein the second authentication password is a character string consisting of a second dynamic password, a second count value, and a second variable range value;
[0039] S13. When the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, determine that the password authentication is successful.
[0040] It should be noted that the device side refers to a smart lock device with a locking function, which can be applied to a variety of scenarios, such as smart door locks, vehicle electronic locks, safe locks, etc. The server side can be a cloud-based backend server. When the device side and the server side communicate through the network, the administrator can control the server side to send fingerprint, face or digital password keys to the device side to unlock. When the network between the device side and the server side is disconnected, a one-time password is used to unlock. The device side and the server side generate an OTP password based on the same rules, and generate the same dynamic password at the same time. The server side then sends the dynamic password to the user side, and the user side enters the dynamic password into the device side for password verification and unlocking.
[0041] In an embodiment of the present invention, in order to solve the problem in the prior art that the dynamic passwords generated by the device and the server are inconsistent, resulting in the user being unable to authenticate successfully, improvements are made to the authentication password and password authentication method generated by the device and the server. The authentication password is a string consisting of three parts: a dynamic password, a count value, and a variable range value. The authentication password is in the form of X=OTP+C+n, where X is the generated authentication password, OTP represents the dynamic password, C is the count value generated by the counter, and n is the variable range value.
[0042] The authentication password includes a first authentication password generated by the device and a second authentication password generated by the server. The first authentication password is composed of a first dynamic password, a first count value and a first variable range value, and the second authentication password is composed of a second dynamic password, a second count value and a second variable range value.
[0043] Preferably, the variable range value n (ie, the first variable range value and the second variable range value) is pre-negotiated and set by the device end and the server end, and represents a variation range of the count value C acceptable to the device end.
[0044] The count value C (ie, the first count value and the second count value) starts to accumulate from 0 and is increased by one after each password authentication is passed.
[0045] During the application process, the server and the device generate their own authentication passwords at both ends according to the authentication password generation method. The administrator sends the second authentication password of the server to the user. The user enters the second authentication password on the device. The device verifies the second authentication password and the first authentication password generated by itself. If the verification passes, the lock is unlocked, otherwise the unlocking fails.
[0046] The device side makes the following judgment: judge whether the OTP values are the same; the variable range value n is determined by the two parties in advance through negotiation, and the range of Cn to C+n is judged to deduce the range of changes allowed for the user to enter the password, and unlocking is supported within the range, and unlocking fails beyond the range. That is, after the device side compares the first authentication password with the second authentication password, when the first dynamic password and the second dynamic password are the same, the first variable range value and the second variable range value are the same, and the difference between the first count value and the second count value is less than or equal to the first variable range value, it is determined that the password authentication is passed.
[0047] The password verification process is explained with a specific embodiment:
[0048] Assume that X is a 6-digit password, OTP is a 4-digit number valid for 10 minutes, such as 1234, C is a 1-digit number (starting from 0), and n is a 1-digit number (for example, both parties agree to 5). Under normal circumstances, the values generated by the server and the device are 123405 respectively, and the key sent by the server to the user is 123405, and the user can unlock the door within 10 minutes.
[0049] Assume that due to various reasons, the device and platform are not synchronized with each other for the count value C. If the second count value of the server becomes 1, the first count value of the device can still be 0. The key received by the user from the server is 123415, and the value generated by the device is 123405. The device makes the following judgment:
[0050] Extract the first 4 digits 1234 and determine it as a dynamic password. If the first dynamic password and the second dynamic password are the same, proceed to the next step of judgment.
[0051] The fifth bit is extracted and determined as the count value, where the second count value generated by the server is 1, and the first count value generated by the device is 0. The difference between the two is 1, which is less than the variable range value n=5 agreed by both parties, and the next step of judgment is entered;
[0052] The 6th bit is extracted and determined to be a variable range value. The first variable range value and the second variable range value are the same, and the password verification is successful.
[0053] After comparison, the device-side password authentication is successful and the lock is unlocked successfully.
[0054] Furthermore, the method further comprises step S14:
[0055] S14. When the first dynamic password is different from the second dynamic password, or the first variable range value is different from the second variable range value, or the difference between the first count value and the second count value is greater than the first variable range value, determine that the password authentication fails.
[0056] As an example, still using the above specific embodiment for explanation, assuming that due to various reasons, the device side and the platform side are not synchronized with the count value C, if the second count value of the server side becomes 6, the first count value of the device side can still be 0, the key received by the user side from the server side is 123465, and the value generated by the device side is 123405. Then the device side makes the following judgment:
[0057] Extract the first 4 digits 1234 and determine it as a dynamic password. If the first dynamic password and the second dynamic password are the same, proceed to the next step of judgment.
[0058] The 5th bit is extracted and determined to be the count value, where the second count value generated by the server is 6, and the first count value generated by the device is 0. The difference between the two is 6, which is greater than the variable range value n=5 agreed by both parties, and the password verification fails.
[0059] After comparison, the device-side password authentication failed and unlocking failed.
[0060] By adopting the technical means of the embodiments of the present invention, the generation method and authentication means of the authentication password are optimized. The authentication password is composed of a dynamic password, a count value and a variable range value. By designing the dynamic password and the count value, the password is dynamic and one-time use, thereby improving the security and effectiveness of the password. By introducing the variable range value, the variable range of the count value is determined, and the variable range of the authentication password allowed to be input by the user is introduced, so that there is a certain fault tolerance range for the inconsistency of the count values on the device side and the server side, which effectively avoids the situation where the authentication cannot be successfully performed due to the inconsistency of the count values on the device side and the server side, which can not only ensure normal unlocking, but also prevent the hidden dangers caused by password leakage.
[0061] As a preferred implementation, the first dynamic password and the second dynamic password are generated according to a preset one-time password generation rule.
[0062] Optionally, the preset one-time password generation rule may be a generation rule of HOTP, and the generated dynamic password is HOTP. More preferably, the preset one-time password generation rule is a generation rule of TOTP, and the generated dynamic password is TOTP. Of course, it may also be other forms of one-time passwords in the prior art, which are not specifically limited here.
[0063] As a preferred implementation, the preset one-time password generation rule is:
[0064] Generate a password string using a preset encryption algorithm based on the preset key string and time parameters as a dynamic password; or,
[0065] According to the preset secret key string and time parameters, a preset encryption algorithm is used to generate a password string; a preset interception function is used to intercept a string at a specific position in the password string to generate a dynamic password.
[0066] The time parameter is the ratio of the current time to the preset time interval.
[0067] In the embodiment of the present invention, a dynamic password is generated based on the rule of time synchronization: according to the preset secret key string K and time parameter T, through the preset encryption algorithm, which can be the SHA-1 algorithm of HMAC, a password string is generated, which is expressed as HMAC-SHA-1(K, T), wherein the secret key string K is a random string pre-negotiated and set by the device end and the server end; the time parameter T is the ratio of the current time now and the preset time interval TS, that is, T=now / TS, and the password string is expressed as HMAC-SHA-1(K, (now / TS)), the current time now is updated in real time, so as to ensure that the generated result is dynamic, and the time interval TS is pre-negotiated and set by the device end and the server end, for example, 30 seconds or 60 seconds. Due to the introduction of the TS time interval, the generated dynamic password has a limited validity period. During the validity period, the dynamic password part generated by the device segment and the server end is the same, so the dynamic password part can be successfully verified within the validity period.
[0068] In one way, the password string can be directly used as a dynamic password. In another way, since the string generated by the HMAC-SHA-1 algorithm is very long and inconvenient in actual use, a truncation function is used to take a specific field in the encrypted password string to form a number as a dynamic password. Optionally, the truncation function uses Truncate, and the generated dynamic password is expressed as OTP=Truncate(HMAC-SHA-1(K, (now / TS)).
[0069] By adopting the technical means of the embodiment of the present invention, in the process of generating the authentication password for the device side and the server side, the advantages of generating the OTP password based on time synchronization and counter are integrated, so that the authentication password has both time validity and the advantage of one-time use. By introducing a variable range value, there is a certain fault tolerance range for the inconsistency of the count values between the device side and the server side, which effectively avoids the situation where the count values between the device side and the server side are inconsistent and the authentication fails. It can not only ensure normal unlocking, but also prevent the hidden dangers caused by password leakage. In addition, because the authentication password has a regular pattern and is predictable within a certain range, the user can open the door multiple times according to the regular pattern within the validity period without having to seek assistance from the administrator again, which improves the user experience.
[0070] See also Figure 2 , is a flow chart of a second password authentication method provided by an embodiment of the present invention. An embodiment of the present invention provides another password authentication method, which is applied to a server. The method specifically includes steps S21 and S22:
[0071] S21, generating a second authentication password; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value;
[0072] S22. Send the second authentication password to the user end so that the user end sends the second authentication password to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
[0073] As a preferred implementation, the first dynamic password and the second dynamic password are generated according to a preset one-time password generation rule.
[0074] The preset one-time password generation rule is:
[0075] Generate a password string using a preset encryption algorithm based on the preset key string and time parameters as a dynamic password; or,
[0076] According to the preset secret key string and time parameters, a preset encryption algorithm is used to generate a password string; a preset interception function is used to intercept a string at a specific position in the password string to generate a dynamic password.
[0077] Preferably, the time parameter is a ratio of the current time to a preset time interval.
[0078] As a preferred implementation, the first count value and the second count value are accumulated starting from 0, and are increased by one after each password authentication is passed.
[0079] As a preferred implementation manner, the first variable range value and the second variable range value are pre-negotiated and set by the device end and the server end.
[0080] It should be noted that the password authentication method applied to the server provided in the embodiment of the present invention corresponds one-to-one to all the process steps of the password authentication method applied to the device in the above embodiment, and the working principles and beneficial effects of the two are the same, so they will not be repeated here.
[0081] By adopting the technical means of the embodiments of the present invention, the generation method and authentication means of the authentication password are optimized. The authentication password is composed of a dynamic password, a count value and a variable range value. By designing the dynamic password and the count value, the password is dynamic and one-time use, thereby improving the security and effectiveness of the password. By introducing the variable range value, a certain fault tolerance range is provided for the inconsistency of the count values between the device side and the server side, effectively avoiding the situation where the count values of the device side and the server side are inconsistent and the authentication fails, which can not only ensure normal unlocking, but also prevent the hidden dangers caused by password leakage.
[0082] See also Figure 3 , is a flow chart of a third password authentication method provided by an embodiment of the present invention. An embodiment of the present invention provides another password authentication method, which is applied to a user terminal. The method specifically includes steps S31 and S32:
[0083] S31, receiving a second authentication password sent by the server; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value;
[0084] S32. Send the second authentication password to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
[0085] It should be noted that the password authentication method applied to the user end provided in the embodiment of the present invention corresponds one to one with all the process steps of the password authentication method applied to the device end in the above embodiment, and the working principles and beneficial effects of the two are the same, so they will not be repeated here.
[0086] See also Figure 4 , is a structural diagram of a password authentication device provided in an embodiment of the present invention. An embodiment of the present invention provides a password authentication device 40, including a processor 41, a memory 42, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the password authentication method described in any one of the above embodiments is implemented.
[0087] It should be noted that a password authentication device provided in an embodiment of the present invention is used to execute all process steps of a password authentication method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be described in detail.
[0088] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the password authentication method as described in any one of the above embodiments.
[0089] An embodiment of the present invention further provides a computer program product, which includes a computer program or computer instructions. When the computer program or the computer instructions are executed by a processor, the password authentication method as described in any one of the above embodiments is implemented.
[0090] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0091] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A password authentication method, characterized in that: Applied to a device, the method includes: Generate a first authentication password; wherein the first authentication password is a string consisting of a first dynamic password, a first count value and a first variable range value; Receiving a second authentication password generated by the server and sent by the user; wherein the second authentication password is a character string consisting of a second dynamic password, a second count value, and a second variable range value; When the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, it is determined that the password authentication is successful.
2. The password authentication method according to claim 1, characterized in that: The first dynamic password and the second dynamic password are generated according to a preset one-time password generation rule.
3. The password authentication method according to claim 1, characterized in that: The preset one-time password generation rule is: According to the preset secret key string and time parameters, a preset encryption algorithm is used to generate a password string as a dynamic password; or, Generate a password string using a preset encryption algorithm based on the preset secret key string and time parameters; A preset interception function is used to intercept a character string at a specific position in the password character string to generate a dynamic password.
4. The password authentication method according to claim 3, characterized in that: The time parameter is the ratio of the current time to the preset time interval.
5. The password authentication method according to claim 1, characterized in that: The first count value and the second count value are accumulated starting from 0 and are increased by one after each password authentication is passed.
6. The password authentication method according to claim 1, characterized in that: The first variable range value and the second variable range value are set by the device end and the server end through pre-negotiation.
7. The password authentication method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the first dynamic password is different from the second dynamic password, or the first variable range value is different from the second variable range value, or the difference between the first count value and the second count value is greater than the first variable range value, it is determined that the password authentication fails.
8. A password authentication method, characterized in that: Applied to the server, the method includes: Generate a second authentication password; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value; The second authentication password is sent to the user end so that the user end sends the second authentication password to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
9. A password authentication method, characterized in that: Applied to a user terminal, the method includes: Receive a second authentication password sent by the server; wherein the second authentication password is a string consisting of a second dynamic password, a second count value, and a second variable range value; The second authentication password is sent to the device end for password authentication; wherein the password authentication process is: the device end generates a first authentication password consisting of a first dynamic password, a first count value and a first variable range value; when the first dynamic password is the same as the second dynamic password, the first variable range value is the same as the second variable range value, and the difference between the first count value and the second count value is less than or equal to the first variable range value, the password authentication is determined to be successful.
10. A password authentication device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the password authentication method according to any one of claims 1 to 9 when executing the computer program.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the password authentication method according to any one of claims 1 to 9.
12. A computer program product, characterized in that The computer program product comprises a computer program or a computer instruction, and when the computer program or the computer instruction is executed by a processor, the password authentication method according to any one of claims 1 to 9 is implemented.