Asymmetric password authentication method, device and storage medium
By generating asymmetric password authentication method generated by random numbers and user private keys, the elliptic curve generator generates one-time proof code and check code, solving the problem of easy replication of symmetric passwords, realizing secure authentication and user convenience.
Patent Information
- Application Number
- CN202111627173.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing symmetric passwords are easily copied and cannot be effectively recognized, and traditional encryption cannot solve the copying problem because they are restored to real plaintext after decryption, resulting in the unrecognition of the copied password.
Asymmetric password authentication method is used to generate a single-use proof code and check code by generating random numbers, private keys and elliptic curve generators corresponding to the user ID, and authenticate them with the user ID to avoid copy attacks.
It effectively prevents copy attacks without encrypted transmission, simplifies the process of user memory passwords, and due to the nature of asymmetric passwords, the risk of key leakage and theft is avoided.
Smart Images

Figure CN114268434B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an asymmetric password authentication method, device and storage medium. Background Art
[0002] Symmetric passwords in the prior art are passwords that are the same for both parties to interact. If the passwords of both parties are the same, a trust relationship can be established. Generally, symmetric passwords are short, easy to remember, and very convenient to use, but the passwords are fixed, so the copied symmetric passwords are also valid and cannot be recognized. Even if the symmetric passwords are encrypted, the anti-copying problem cannot be solved, because the copied password is the encrypted password, which is automatically decrypted by the other party and restored to the real plain password, so the copied password cannot be recognized. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide an asymmetric password authentication method, device and storage medium, which use random numbers to generate an asymmetric password, generate one and use it once, and effectively solve the problem of copy attack.
[0004] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides an asymmetric password authentication method, including: generating a random number; obtaining a verification code and a check code according to the random number, a private key corresponding to a user identifier, and an elliptic curve generator; sending an asymmetric password to a password authenticator, wherein the asymmetric password includes the user identifier, the verification code, and the check code.
[0005] Furthermore, the certification code is obtained in the following manner: the product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code.
[0006] Furthermore, the certification code is obtained by: obtaining the current date information; taking the sum of the private key corresponding to the user identifier and the current date information as the daily private key; and taking the product of the inverse of the random number and the daily private key as the certification code.
[0007] Furthermore, the check code is obtained in the following manner: the product of the random number and the elliptic curve generator is used as the check code.
[0008] Furthermore, the private key corresponding to the user identification is generated by combining the public key CPK using the user identification.
[0009] Correspondingly, an embodiment of the present invention also provides an asymmetric password authentication method, including: receiving an asymmetric password, the asymmetric password including a user identifier, a verification code and a check code; calculating a public key corresponding to the user identifier; performing password verification based on the public key, the verification code and the check code; when the password verification passes, determining whether the verification code stored in association with the user identifier exists in the local record; when the verification code stored in association with the user identifier exists, determining that the password authentication passes.
[0010] Furthermore, the calculating the public key corresponding to the user identifier includes: using the user identifier and a public key matrix to calculate the public key corresponding to the user identifier.
[0011] Furthermore, the password verification based on the public key, the proof code and the check code includes: obtaining a verification code based on the proof code and the public key; determining whether the verification code is equal to the check code; when the verification code is equal to the check code, determining that the password verification has passed; when the verification code is not equal to the check code, determining that the password verification has failed.
[0012] Furthermore, when the certification code and the private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: the product of the inverse of the certification code and the public key is used as the verification code.
[0013] Furthermore, when the proof code and the daily-varying private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: obtaining the current date information; taking the sum of the public key and the current date information as the daily-varying public key corresponding to the user identifier; and taking the product of the inverse of the proof code and the daily-varying public key as the verification code.
[0014] Furthermore, the local record is a local record of the day.
[0015] Furthermore, after determining that the password authentication is passed, the method further includes: associating the verification code with the user identification and storing it in a local record.
[0016] Furthermore, the method further comprises: determining that the password authentication has failed when the password verification has failed or when the verification code stored in association with the user identification does not exist in the local record.
[0017] Furthermore, the public key is generated by combining the public key CPK using the user identifier.
[0018] Correspondingly, an embodiment of the present invention also provides an asymmetric password authentication device, including: a random number generation module, used to generate a random number; a codeword generation module, used to obtain a verification code and a check code based on the random number, a private key corresponding to a user identifier, and an elliptic curve generator; a sending module, used to send an asymmetric password to a password authenticator, wherein the asymmetric password includes the user identifier, the verification code, and the check code.
[0019] Furthermore, the certification code is obtained in the following manner: the product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code.
[0020] Furthermore, the certification code is obtained by: obtaining the current date information; taking the sum of the private key corresponding to the user identifier and the current date information as the daily private key; and taking the product of the inverse of the random number and the daily private key as the certification code.
[0021] Furthermore, the check code is obtained in the following manner: the product of the random number and the elliptic curve generator is used as the check code.
[0022] Furthermore, the private key corresponding to the user identification is generated by combining the public key CPK using the user identification.
[0023] Correspondingly, an embodiment of the present invention also provides an asymmetric password authentication device, including: a receiving module, used to receive an asymmetric password, the asymmetric password including a user identifier, a proof code and a check code; a calculation module, used to calculate a public key corresponding to the user identifier; a password verification module, used to perform password verification based on the public key, the proof code and the check code; a judgment module, used to judge whether the proof code stored in association with the user identifier exists in the local record when the password verification passes; and a processing module, used to determine that the password authentication passes when the proof code stored in association with the user identifier exists.
[0024] Furthermore, the calculation module is specifically used to calculate the public key corresponding to the user identifier using the user identifier and the public key matrix.
[0025] Furthermore, the password verification module is specifically used to: obtain a verification code based on the proof code and the public key; determine whether the verification code is equal to the check code; when the verification code is equal to the check code, determine that the password verification has passed; when the verification code is not equal to the check code, determine that the password verification has failed.
[0026] Furthermore, when the certification code and the private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: the product of the inverse of the certification code and the public key is used as the verification code.
[0027] Furthermore, when the proof code and the daily-varying private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: obtaining the current date information; taking the sum of the public key and the current date information as the daily-varying public key corresponding to the user identifier; and taking the product of the inverse of the proof code and the daily-varying public key as the verification code.
[0028] Furthermore, the local record is a local record of the day.
[0029] Furthermore, the device also includes: a storage module, which is used to associate the verification code with the user identification and store it in a local record after determining that the password authentication is passed.
[0030] Furthermore, the processing module is also used to determine that the password authentication has failed when the password verification has failed or when the verification code stored in association with the user identifier does not exist in the local record.
[0031] Furthermore, the public key is generated by combining the public key CPK using the user identifier.
[0032] Correspondingly, an embodiment of the present invention also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute an asymmetric password authentication method executed by a password issuer and / or an asymmetric password authentication method executed by a password authenticator.
[0033] Through the above technical solution, asymmetric passwords are generated using random numbers, private keys corresponding to user identifiers, and elliptic curve generators. Compared with traditional symmetric passwords, this effectively solves the problem of copy attacks, and does not require encrypted transmission, and users do not need to remember the password, making it easy for users to use.
[0034] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0036] Figure 1 It is a flowchart of an asymmetric password authentication method provided by an embodiment of the present invention;
[0037] Figure 2 It is a flowchart of another asymmetric password authentication method provided by an embodiment of the present invention;
[0038] Figure 3It is a flowchart of another asymmetric password authentication method provided by an embodiment of the present invention;
[0039] Figure 4 It is a structural schematic diagram of an asymmetric password authentication device provided by an embodiment of the present invention;
[0040] Figure 5 It is a schematic diagram of the structure of another asymmetric password authentication device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0042] The password used in this application is an asymmetric password, which is generated based on CPK (Combined Public Key). Among them, CPK is composed of a combination matrix and a mapping algorithm, where the combination matrix is divided into a public key matrix (R i,j ) and the private key matrix (r i,j ). The private key matrix is only encrypted and kept in the key management center, so the user needs to send the user ID to the key management center to apply for the private key, while the public key matrix is public and everyone has it, so as long as anyone knows the ID, anyone can calculate the corresponding public key.
[0043] Embodiment 1
[0044] Figure 1 FIG. 1 is a flow chart of an asymmetric password authentication method provided by an embodiment of the present invention. Figure 1 As shown, the method is applied to the password issuing party and includes the following steps:
[0045] Step 101, generate a random number;
[0046] Step 102, obtaining a certification code and a check code according to the random number, a private key corresponding to the user identifier, and an elliptic curve generator;
[0047] Step 103: Send an asymmetric password to a password authenticator, wherein the asymmetric password includes the user identifier, a verification code, and a check code.
[0048] When the password issuer needs to issue a password to the password authenticator, it must first generate a random number k.
[0049] Then, the product of the random number k and the elliptic curve generator is used as the check code, that is, the check code c is obtained by the following formula (1):
[0050]
[0051] Where G is the elliptic curve generator, (x, y) is the point of the elliptic curve, n is the order of the additive group, is any arithmetic operation, mod 2 n Determine the checksum length.
[0052] Then, the certification code can be obtained in the following two ways: one is to use the product of the inverse of the random number and the private key corresponding to the user identification as the certification code; the other is to associate the asymmetric password with the current date information to reduce the amount of calculation for identifying the duplicate password, so as to reduce the amount of calculation for identifying the duplicate password to one day. Therefore, by obtaining the current date information, the current date information includes the current year, month and day information, for example, the current date is December 20, 2021. Then, the sum of the private key corresponding to the user identification and the current date information is used as the daily private key, and then the product of the inverse of the random number and the daily private key is used as the certification code.
[0053] Among them, the private key corresponding to the user identifier is generated by combining the public key CPK using the user identifier, which can be applied to the key management center through the user identifier, and will not be repeated in this application.
[0054] Specifically, the proof code s in the first method can be obtained by the following formula (2):
[0055] k -1 sk [a] mod n→s formula (2)
[0056] Among them, sk [a] It is the private key corresponding to the user ID A1 of the password issuer.
[0057] In addition, the proof code s' in the second method can be obtained by the following formula (3):
[0058] k -1 (sk [a] +time)mod n→s' formula (3)
[0059] Among them, time is the current date information, (sk [a] +time) is a daily private key. For example, if the current date is December 20, 2021, then time is 20211220.
[0060] The password issuer and the password authenticator will negotiate in advance to determine whether to authenticate through the verification code in the first method or the verification code in the second method.
[0061] The embodiment of the present invention performs authentication through an asymmetric password. Compared with the traditional symmetric password, encryption is not required because the asymmetric password used in the present application is generated by using CPK and belongs to an encryption algorithm. Therefore, the asymmetric password of the present application saves the encryption process during transmission and avoids the risk of password theft due to leakage of the key used for encryption. The asymmetric password in the present application does not need to be memorized. When it is needed, the proof code and check code in the password can be obtained by using the private key and random number corresponding to the user identifier. Therefore, the asymmetric password in the present application is easy for users to use and reduces the inconvenience of users having to remember many passwords. In addition, the asymmetric password in the present application is a non-fixed password, which is generated through random numbers and used once, effectively avoiding the problem of copy attacks.
[0062] Embodiment 2
[0063] Accordingly, Figure 2 FIG. 1 is a flow chart of an asymmetric password authentication method provided by an embodiment of the present invention. Figure 2 As shown, the method is applied to the password authentication party and includes the following steps:
[0064] Step 201, receiving an asymmetric password, wherein the asymmetric password includes a user identification, a verification code and a check code;
[0065] Step 202, calculating the public key corresponding to the user identifier;
[0066] Step 203, performing password verification according to the public key, the certification code and the check code;
[0067] Step 204, when the password verification is passed, determining whether there is the verification code stored in association with the user identifier in the local record;
[0068] Step 205: When the verification code stored in association with the user identification exists, it is determined that the password authentication is successful.
[0069] When the password authenticator receives the asymmetric password sent by the password sender, it calculates the public key corresponding to the user identifier through the user identifier in the asymmetric password and the locally stored public key matrix. That is, the public key in this application is generated through CPK using the user identifier, which will not be repeated here.
[0070] Then, in step 203, a verification code c' is obtained according to the certification code and the public key, and it is determined whether the verification code c' is equal to the check code c. When the verification code is equal to the check code, that is, c=c', it is determined that the password verification has passed, and step 204 is continued to be executed, and when the verification code is not equal to the check code, that is, c≠c', it is determined that the password verification has not passed, and it is directly determined that the password authentication has not passed.
[0071] Among them, corresponding to the proof code sent by the password sender, there are also two implementation methods when the password authenticator determines the verification code.
[0072] In the first implementation, when the certification code and the private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained by the following formula (4), that is, the product of the inverse of the certification code s and the public key is used as the verification code c':
[0073] s -1 PK [A] =kG→c' Formula (4)
[0074] Among them, PK [A] It is the public key corresponding to user identity A1.
[0075] The second implementation method is that when the certification code and the daily changing private key corresponding to the user identifier are in a one-to-one mapping relationship, the current date information is obtained, the sum of the public key and the current date information is used as the daily changing public key corresponding to the user identifier, and then the product of the inverse of the certification code s' and the daily changing public key is used as the verification code, and the verification code c' can be obtained by the following formula (5):
[0076] s' -1 (PK [A] +time)=kG→c' Formula (5)
[0077] Where time is the current date information, and the daily public key is PK [A] +time.
[0078] After determining that the password verification has passed in step 203, in step 204, it is determined whether the verification code associated with the user identification is stored in the local record. Since asymmetric passwords are one-time use, in order to solve the problem of copy attacks, the verification code of the previously received password authentication and its corresponding user identification can be managed and stored in the local record, so that in the subsequent password authentication process, it is queried whether there is a duplicate verification code, thereby effectively identifying the copied asymmetric password.
[0079] In addition, when the proof code and the daily changing private key corresponding to the user identifier are in a one-to-one mapping relationship, since the proof code is related to the current date information, the asymmetric password is a daily changing password, which is used once a day and only works on that day. Therefore, in order to further narrow the search scope, when judging whether there is a copy attack, it is judged whether there is the proof code stored in association with the user identifier in the local daily record.
[0080] Embodiment 3
[0081] In order to facilitate understanding of the embodiments of the present invention, Figure 3 1 is a flow chart of an asymmetric password authentication method between a password issuer and a password authenticator provided by an embodiment of the present invention, comprising the following steps:
[0082] Step 301, the password issuer generates a random number;
[0083] Step 302, obtaining a certification code and a check code according to the random number, a private key corresponding to the user identifier, and an elliptic curve generator;
[0084] Step 303, sending an asymmetric password to a password authenticator, wherein the asymmetric password includes the user ID, the verification code and the check code;
[0085] Step 304: the password authenticator receives the asymmetric password;
[0086] Step 305, calculating the public key corresponding to the user identifier;
[0087] Step 306, obtaining a verification code according to the certification code and the public key, wherein the verification code is determined in two ways as described above, and which way is used depends on the agreement between the password issuer and the password authenticator;
[0088] Step 307, determining whether the verification code is equal to the check code, if they are equal, executing step 308, if they are not equal, determining that the password authentication fails;
[0089] Step 308, determining whether the verification code associated with the user identifier is stored in the local record, if so, determining that the password authentication has failed, if not, determining that the password authentication has passed.
[0090] In the embodiment of the present invention, an asymmetric password based on a user identification is proposed, which can not only prove the authenticity of the password, but also prove the authenticity of the user identification, and does not require any manual operation. In addition, the number of bytes of the verification code and the check code in the password is small, which ensures the verification speed. For example, when the private key length is 64 bits, the verification code is 8 bytes and the check code is 2 bytes. The verification only requires one elliptic curve operation, and a machine can verify hundreds of thousands of times in one second.
[0091] If an attacker copies the daily changing password proposed in this application (i.e., the verification code included in the asymmetric password and the daily changing private key corresponding to the user identifier are in a one-to-one mapping correspondence), it will only be valid if it is copied on the same day and the crime is committed on the same day, because the passwords copied on different dates will be invalid when verifying the verification code because the verification codes generated on different dates are different. Therefore, the verification codes and check codes obtained during verification will not be the same. Therefore, the passwords copied on different dates are all invalid passwords and the password verification will not pass. Even if the copied password is a daily changing password, it will not pass the duplicate checking process because as long as the daily changing password is received by the password authentication party, it will be associated and stored under the corresponding user identifier. Therefore, when checking for duplicates, it will be found that the verification code already exists, and the password authentication will not pass in the end, effectively preventing password copy attacks. In addition, because the main means of DOS attacks are copy attacks, asymmetric daily changing passwords are an effective method to prevent DOS attacks.
[0092] The asymmetric daily changing password proposed in this application can be applied to terminals for interconnected communication. For example, one terminal is a local control station and the other terminal is a satellite. When the local control station sends an asymmetric daily changing password, the password is to control the satellite to deflect to a set angle. The satellite executes the deviation of the set angle under the control of the password. If there is another monitoring device, which monitors the password and sends the password to the satellite again, the satellite can implement the password verification and determine whether the proof code in the password exists in the local record through the second implementation method of this application. Since the monitoring device copies the password of the day, it can pass the password verification, but it will not pass when searching for the proof code in the local record, because the password has been associated and stored under the user ID, so the password will not be authenticated, so that the satellite will not continue to deflect according to the set angle, further ensuring the safety of the satellite.
[0093] Accordingly, Figure 4 Schematic diagram of the structure of an asymmetric password authentication device provided by an embodiment of the present invention. Figure 4 As shown, the device 40 includes: a random number generation module 41, used to generate a random number; a codeword generation module 42, used to obtain a verification code and a check code based on the random number, a private key corresponding to the user identifier and an elliptic curve generator; a sending module 43, used to send an asymmetric password to a password authentication party, wherein the asymmetric password includes the user identifier, the verification code and the check code.
[0094] Furthermore, the private key corresponding to the user identification is generated by combining the public key CPK using the user identification.
[0095] Furthermore, the certification code is obtained in the following manner: the product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code.
[0096] Furthermore, the certification code is obtained by: obtaining the current date information; taking the sum of the private key corresponding to the user identifier and the current date information as the daily private key; and taking the product of the inverse of the random number and the daily private key as the certification code.
[0097] Furthermore, the check code is obtained in the following manner: the product of the random number and the elliptic curve generator is used as the check code.
[0098] For the operation process and beneficial effects of the present device, refer to the implementation process and beneficial effects of the asymmetric password authentication method related to the password sender in the above-mentioned Embodiment 1 and Embodiment 3.
[0099] Accordingly, Figure 5 Schematic diagram of the structure of an asymmetric password authentication device provided by an embodiment of the present invention. Figure 5 As shown, the device 50 includes: a receiving module 51, used to receive an asymmetric password, wherein the asymmetric password includes a user identifier, a verification code and a check code; a calculation module 52, used to calculate a public key corresponding to the user identifier; a password verification module 53, used to verify the password according to the public key, the verification code and the check code; a judgment module 54, used to judge whether there is the verification code stored in association with the user identifier in the local record when the password verification passes; and a processing module 55, used to determine that the password authentication passes when there is the verification code stored in association with the user identifier.
[0100] Furthermore, the calculation module is specifically used to calculate the public key corresponding to the user identifier using the user identifier and the public key matrix.
[0101] Furthermore, the password verification module is specifically used to: obtain a verification code based on the proof code and the public key; determine whether the verification code is equal to the check code; when the verification code is equal to the check code, determine that the password verification has passed; when the verification code is not equal to the check code, determine that the password verification has failed.
[0102] Furthermore, when the certification code and the private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: the product of the inverse of the certification code and the public key is used as the verification code.
[0103] Furthermore, when the proof code and the daily-varying private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: obtaining the current date information; taking the sum of the public key and the current date information as the daily-varying public key corresponding to the user identifier; and taking the product of the inverse of the proof code and the daily-varying public key as the verification code.
[0104] Furthermore, the local record is a local record of the day.
[0105] Furthermore, if Figure 5 As shown, the device further includes: a storage module 56, which is used to associate the verification code with the user identification and store it in a local record after determining that the password authentication is passed.
[0106] Furthermore, the processing module is also used to determine that the password authentication has failed when the password verification has failed or when the verification code stored in association with the user identifier does not exist in the local record.
[0107] Furthermore, the public key is generated by combining the public key CPK using the user identifier.
[0108] For the operation process and beneficial effects of the present device, refer to the implementation process and beneficial effects of the asymmetric password authentication method related to the password authenticator in the above-mentioned second and third embodiments.
[0109] Correspondingly, an embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the asymmetric password authentication method described in the above-mentioned embodiment 1 and / or the asymmetric password authentication method described in embodiment 2.
[0110] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0118] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. An asymmetric password authentication method, characterized in that: include: Generate random numbers; According to the product of the random number and the elliptic curve generator, a check code is obtained. The check code c is obtained by the following formula: Where k is a random number, G is the elliptic curve generator, (x, y) is the point of the elliptic curve, and n is the order of the additive group. is any arithmetic operation, mod 2 n Determine the check code length; The verification code is obtained according to the random number, the private key corresponding to the user identifier and the agreed verification code calculation method. The certification code is obtained in the following manner: The product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code; or Get the current date information, The sum of the private key corresponding to the user identifier and the current date information is used as the daily private key, The product of the inverse of the random number and the daily private key is used as the certification code; An asymmetric password is sent to a password authenticator, wherein the asymmetric password includes the user identification, a verification code and a check code.
2. The asymmetric password authentication method according to claim 1, characterized in that: The private key corresponding to the user identification is generated by combining the public key CPK with the user identification.
3. An asymmetric password authentication method, characterized in that: include: Receiving an asymmetric password, wherein the asymmetric password includes a user identification, a verification code, and a check code; Calculate the public key corresponding to the user identifier; Performing password verification according to the public key, the certification code and the check code; When the password verification is passed, determining whether the verification code stored in association with the user identifier exists in the local record; When the verification code stored in association with the user identification exists, it is determined that the password authentication is passed, The check code is obtained according to the product of the random number and the elliptic curve generator. The check code c is obtained by the following formula: Where k is a random number, G is the elliptic curve generator, (x, y) is the point of the elliptic curve, and n is the order of the additive group. is any arithmetic operation, mod 2 n Determine the check code length, The verification code is obtained according to the random number, the private key corresponding to the user identifier and the agreed verification code calculation method. The certification code is obtained in the following manner: The product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code; or The sum of the private key corresponding to the user ID and the current date information is used as the daily private key. The product of the inverse of the random number and the daily changing private key is used as the certification code.
4. The asymmetric password authentication method according to claim 3, characterized in that: The calculating of the public key corresponding to the user identifier comprises: The public key corresponding to the user identification is calculated using the user identification and the public key matrix.
5. The asymmetric password authentication method according to claim 3, characterized in that: The performing of password verification according to the public key, the certification code and the check code comprises: Obtaining a verification code according to the certification code and the public key; Determining whether the verification code is equal to the check code; When the verification code is equal to the check code, it is determined that the password verification is passed; When the verification code is not equal to the check code, it is determined that the password verification has failed.
6. The asymmetric password authentication method according to claim 5, characterized in that: When the verification code and the private key corresponding to the user identifier are in a one-to-one mapping relationship, the verification code is obtained in the following manner: The product of the inverse of the certification code and the public key is used as the verification code.
7. The asymmetric password authentication method according to claim 6, characterized in that: When the certification code and the daily changing private key corresponding to the user identification are in a one-to-one mapping relationship, the verification code is obtained in the following manner: Get the current date information; The sum of the public key and the current date information is used as the daily public key corresponding to the user identifier; The product of the inverse of the certification code and the daily public key is used as the verification code.
8. The asymmetric password authentication method according to claim 7, characterized in that: The local record is the local record of the day.
9. The asymmetric password authentication method according to claim 3, characterized in that: After determining that the password authentication is passed, the method further includes: The authentication code is stored in association with the user identification in a local record.
10. The asymmetric password authentication method according to claim 5, characterized in that: The method further comprises: When the password verification fails or when the verification code stored in association with the user identification does not exist in the local record, it is determined that the password authentication fails.
11. The asymmetric password authentication method according to claim 3, characterized in that: The public key is generated by combining the public key CPK using the user identifier.
12. An asymmetric password authentication device, characterized in that: include: A random number generation module, used to generate random numbers; Codeword generation module, used for: According to the product of the random number and the elliptic curve generator, a check code is obtained. The check code c is obtained by the following formula: Where k is a random number, G is the elliptic curve generator, (x, y) is the point of the elliptic curve, and n is the order of the additive group. is any arithmetic operation, mod 2 n Determine the check code length; The verification code is obtained according to the random number, the private key corresponding to the user identifier and the agreed verification code calculation method. The certification code is obtained in the following manner: The product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code; or Get the current date information, The sum of the private key corresponding to the user identifier and the current date information is used as the daily private key, The product of the inverse of the random number and the daily private key is used as the certification code; The sending module is used to send an asymmetric password to a password authenticator, wherein the asymmetric password includes the user identification, a certification code and a check code.
13. An asymmetric password authentication device, characterized in that: include: A receiving module, used for receiving an asymmetric password, wherein the asymmetric password includes a user identification, a verification code and a check code; A calculation module, used to calculate the public key corresponding to the user identification; A password verification module, used to perform password verification based on the public key, the certification code and the check code; A judgment module, used for judging whether there is the verification code stored in association with the user identification in the local record when the password verification is passed; a processing module, configured to determine that the password authentication is successful when the authentication code stored in association with the user identification exists, The check code is obtained according to the product of the random number and the elliptic curve generator. The check code c is obtained by the following formula: Where k is a random number, G is the elliptic curve generator, (x, y) is the point of the elliptic curve, and n is the order of the additive group. is any arithmetic operation, mod 2 n Determine the check code length, The verification code is obtained according to the random number, the private key corresponding to the user identifier and the agreed verification code calculation method. The certification code is obtained in the following manner: The product of the inverse of the random number and the private key corresponding to the user identifier is used as the certification code; or The sum of the private key corresponding to the user ID and the current date information is used as the daily private key. The product of the inverse of the random number and the daily changing private key is used as the certification code.
14. A machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the asymmetric password authentication method described in claim 1 or 2 and / or the asymmetric password authentication method described in any one of claims 3-11.
