CN114244519B - Password verification method, password verification device, computer equipment and storage medium - Google Patents
Password verification method, password verification device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114244519B CN114244519B CN202111398531.7A CN202111398531A CN114244519B CN 114244519 B CN114244519 B CN 114244519B CN 202111398531 A CN202111398531 A CN 202111398531A CN 114244519 B CN114244519 B CN 114244519B
- Authority
- CN
- China
- Prior art keywords
- password
- account
- encryption algorithm
- verified
- checked
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3226—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application relates to a password verification method, a password verification device, computer equipment and a storage medium. The method comprises the following steps: responding to a first account triggering operation of a user, acquiring a password to be verified and an account to be verified, which are input by the user, determining the account type of the account to be verified, determining a first target encryption algorithm from a first encryption algorithm and a second encryption algorithm according to the account type, and verifying the password to be verified by adopting the first target encryption algorithm; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the account type is data generated after the plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank; the efficiency of password verification can be improved, and the number of times of calling the second password algorithm interface of the other row can be reduced.
Description
Technical Field
The present application relates to the field of artificial intelligence identification and classification technologies, and in particular, to a method and apparatus for verifying a password, a computer device, and a storage medium.
Background
With the continuous expansion of banking business, the diversity and complexity of banking business are higher and higher, and more business can be transacted across travelling business in order to provide more convenient business transacting service for users. For a bank (abbreviated as this line), account information (such as an account name, a card number, an account password, etc.) of registered accounts of other banks (abbreviated as other lines) except the bank (namely this line) needs to be stored, and different banks adopt different one-way encryption algorithms for encryption storage when storing the account information.
In the conventional technology, when the line registration account of the line performs the line crossing operation on the line, the line needs to call the password encryption algorithm interface of the line to verify the password input by the user.
However, the existing password verification process is complex, resulting in low password verification efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for verifying a password, which can simplify the verification process of the present line for verifying the password of the other line account, and improve the password verification efficiency.
In a first aspect, a method for verifying a password is provided, the method comprising:
responding to a first account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
and determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
In one embodiment, the method further comprises:
responding to a second account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining a second target encryption algorithm according to the bank type of the account to be verified, and verifying the password to be verified by adopting the second target encryption algorithm;
And under the condition that the verification is successful, determining that the password to be verified is a legal plaintext password, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data.
In one embodiment, the verifying the password to be verified by using the second target encryption algorithm includes:
encrypting the password to be verified by adopting the second target encryption algorithm to obtain a first password abstract;
judging whether the first password abstract is consistent with second password data corresponding to the account to be checked stored in advance;
and under the condition that the first password abstract is consistent with the second password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, after encrypting the legal plaintext password by using the first encryption algorithm to obtain the first password data, the method further includes:
and replacing the second password data corresponding to the pre-stored account to be verified with the first password data, and marking the account to be verified as a marked account.
In one embodiment, determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifying the password to be verified by adopting the first target encryption algorithm includes:
And under the condition that the account type is the marked account type, determining the first encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the first encryption algorithm.
In one embodiment, the verifying the password to be verified by using the first encryption algorithm includes:
encrypting the password to be verified by adopting the first encryption algorithm to obtain a second password abstract;
judging whether the second password abstract is consistent with the first password data corresponding to the account to be checked stored in advance;
and under the condition that the second password abstract is consistent with the first password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifying the password to be verified by adopting the first target encryption algorithm, further includes:
and under the condition that the account type is a non-marked account type, determining the second encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the second encryption algorithm.
In a second aspect, there is provided a password verification apparatus, the apparatus comprising:
The first acquisition module is used for responding to the triggering operation of the first account of the user and acquiring the password to be checked and the account to be checked which are input by the user;
the determining module is used for determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
and the first verification module is used for determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifying the password to be verified by adopting the first target encryption algorithm.
In one embodiment, the apparatus further comprises:
the second acquisition module is used for responding to the triggering operation of the second account of the user and acquiring the password to be checked and the account to be checked which are input by the user;
the second verification module is used for determining a second target encryption algorithm according to the bank type of the account to be verified, and verifying the password to be verified by adopting the second target encryption algorithm;
And the encryption module is used for determining that the password to be verified is a legal plaintext password under the condition that verification is successful, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data.
In one embodiment, the second verification module is specifically configured to encrypt the password to be verified by using the second target encryption algorithm to obtain a first password digest;
judging whether the first password abstract is consistent with second password data corresponding to the account to be checked stored in advance;
and under the condition that the first password abstract is consistent with the second password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the apparatus further comprises:
and the replacing module is used for replacing the second password data corresponding to the pre-stored account to be checked with the first password data after the encrypting module encrypts the legal plaintext password by adopting the first encrypting algorithm to obtain the first password data, and marking the account to be checked as a marked account.
In one embodiment, the first verification module includes a first verification unit;
and the first verification unit is used for determining the first encryption algorithm as the first target encryption algorithm if the account type is the marked account type, and verifying the password to be verified by adopting the first encryption algorithm.
In one embodiment, the first verification unit is specifically configured to encrypt the password to be verified by using the first encryption algorithm to obtain a second password digest;
judging whether the second password abstract is consistent with the first password data corresponding to the account to be checked stored in advance;
and under the condition that the second password abstract is consistent with the first password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the first verification module further includes a second verification unit;
and the second verification unit is used for determining the second encryption algorithm as the first target encryption algorithm if the account type is the non-marked account type, and verifying the password to be verified by adopting the second encryption algorithm.
In a third aspect, a computer device is provided, comprising a memory storing a computer program and a processor implementing the following steps when the computer program is executed:
responding to a first account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
And determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to a first account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
and determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
The method, the device, the computer equipment and the storage medium for verifying the passwords comprise the steps that a server obtains a password to be verified and an account to be verified, which are input by a user, by responding to a first account triggering operation of the user, then, the account type of the account to be verified is determined, a first target encryption algorithm is determined from the first encryption algorithm and the second encryption algorithm according to the account type, and the password to be verified is verified by adopting the first target encryption algorithm; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank; that is, when the bank is used in the current check bank, the second cryptographic data encrypted by the second cryptographic algorithm of the bank is stored in the current check bank, and the first cryptographic data encrypted by the first cryptographic algorithm of the bank is also stored in the current check bank, that is, when the bank is used in the current check bank, the first cryptographic algorithm of the bank is used for cryptographic check according to the type of the account to be checked, or the second cryptographic algorithm of the bank is used for cryptographic check, when the first cryptographic algorithm of the bank is used for cryptographic check, the second cryptographic algorithm interface of the bank is not required to be called, the first cryptographic algorithm of the bank is directly used for cryptographic check, the calling process of the second cryptographic algorithm interface of the bank is avoided, the process of cryptographic check is greatly simplified, the efficiency of cryptographic check is further improved, the calling times of the second cryptographic algorithm interface of the bank can be reduced, even when the first cryptographic algorithm of the bank is used for cryptographic check, the second cryptographic algorithm of the bank is not required to be called, the performance of the bank is further improved, and the bank is further related to the bank operation efficiency is improved.
Drawings
FIG. 1 is an application environment diagram of a password verification method in one embodiment;
FIG. 2 is a flow chart of a method for verifying a password in a first embodiment;
FIG. 3 is a flow chart of a method for verifying a password in a second embodiment;
FIG. 4 is a flow chart of a method for verifying a password in a third embodiment;
FIG. 5 is a flow chart of a method for verifying a password in a fourth embodiment;
FIG. 6 is a schematic diagram of a complete flow of a method for verifying a password in a fifth embodiment;
FIG. 7 is a block diagram showing the configuration of a password verification apparatus in the first embodiment;
FIG. 8 is a block diagram showing the configuration of a password verification apparatus in the second embodiment;
FIG. 9 is a block diagram showing the construction of a password verification apparatus in the third embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The password verification method provided by the application can be applied to an application environment shown in fig. 1. Wherein the terminal 101 communicates with the server 102 via a network. The terminal 101 may be, but not limited to, a banking terminal, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 102 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers. Optionally, in the interaction process between the terminal 101 and the server 102, the transmission data may be encrypted by using a reversible encryption algorithm, so as to improve the security and integrity of data transmission and avoid data leakage.
In one embodiment, as shown in fig. 2, a method for verifying a password is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
The first account may be a registered account of any other bank than the registered account of the current check bank.
When a user performs a transaction operation with a first account (for example, a registered account of the user) at a current check bank, the user inputs an account password of the first account through a terminal device of the current check bank, and the terminal device of the current check bank responds to a triggering operation of the user on the first account to acquire a password to be checked (the account password of the first account) and an account to be checked (the first account) which are input by the user.
Wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank.
Alternatively, all registered account information (which may include account and account password) of any other line may be stored in advance in the database of the current check bank, and all registered accounts of these other lines are marked as non-marked accounts; the database of the current check bank can also store the account information of any other row of accounts used in the current check bank, and mark the used accounts of the other row as marked accounts. In addition, the database of the current check bank can also store a second encryption algorithm corresponding to each other bank, wherein the second encryption algorithm corresponding to each other bank can be different.
Optionally, in the case that the account to be checked is determined to be the registered account of the other bank except the current check bank, the account type of the account to be checked can be determined, and whether the current check account is a marked account or a non-marked account is judged.
And 203, determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
Optionally, after determining the account type of the account to be verified, a first target encryption algorithm for performing password verification on the password to be verified corresponding to the account to be verified may be determined according to the account type, and according to the above steps, the marked account corresponds to the first encryption algorithm of the current verification bank, and the unmarked account corresponds to the second encryption algorithm of the other row.
Optionally, in the case that the account type is a signed account type, determining that the first encryption algorithm is the first target encryption algorithm, and verifying the password to be verified by adopting the first encryption algorithm; and under the condition that the account type is a non-marked account type, determining that the second encryption algorithm is the first target encryption algorithm, and adopting the second encryption algorithm to verify the password to be verified.
In the password verification method, a server acquires a password to be verified and an account to be verified which are input by a user by responding to a first account triggering operation of the user, then determines the account type of the account to be verified, determines a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifies the password to be verified by adopting the first target encryption algorithm; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank; that is, when the bank is used in the current check bank, the second cryptographic data encrypted by the second cryptographic algorithm of the bank is stored in the current check bank, and the first cryptographic data encrypted by the first cryptographic algorithm of the bank is also stored in the current check bank, that is, when the bank is used in the current check bank, the first cryptographic algorithm of the bank is used for cryptographic check according to the type of the account to be checked, or the second cryptographic algorithm of the bank is used for cryptographic check, when the first cryptographic algorithm of the bank is used for cryptographic check, the second cryptographic algorithm interface of the bank is not required to be called, the first cryptographic algorithm of the bank is directly used for cryptographic check, the calling process of the second cryptographic algorithm interface of the bank is avoided, the process of cryptographic check is greatly simplified, the efficiency of cryptographic check is further improved, the calling times of the second cryptographic algorithm interface of the bank can be reduced, even when the first cryptographic algorithm of the bank is used for cryptographic check, the second cryptographic algorithm of the bank is not required to be called, the performance of the bank is further improved, and the bank is further related to the bank operation efficiency is improved.
Fig. 3 is a flow chart of a method for verifying a password in another embodiment. The embodiment relates to an optional implementation process of password verification when a bank card of the other bank is used for carrying out transaction operation at present for the first time; on the basis of the above embodiment, as shown in fig. 3, the above method further includes:
The second account may register an account of the account when the current check bank is first used for his bank.
Optionally, when the bank is used for the first time in the current check bank, the current check bank responds to the triggering operation of the user on the bank registration account (i.e. the second account), and can acquire the password to be checked (the account password corresponding to the bank registration account) and the account to be checked (the bank registration account) which are input by the user.
Optionally, the current checking bank may store in advance a corresponding relation between the bank types of the banks of different other banks and the second encryption algorithm used by the banks of other banks, and after the account to be checked is obtained, the second encryption algorithm corresponding to the bank type to which the account to be checked belongs may be determined as the second target encryption algorithm for performing password checking on the account to be checked according to the bank type to which the account to be checked belongs and the corresponding relation; the second target encryption algorithm may then be employed to verify the password to be verified.
Optionally, the second target encryption algorithm may be a one-way encryption algorithm or a two-way encryption algorithm; when the second target encryption algorithm is a bidirectional encryption algorithm, the password to be verified can be encrypted through the second target encryption algorithm to obtain encrypted ciphertext, whether the encrypted ciphertext is consistent with the prestored ciphertext of the account to be verified or not can be compared, and verification can be determined to be successful when the encrypted ciphertext is consistent with the prestored ciphertext of the account to be verified; in addition, when the second target encryption algorithm is a bidirectional encryption algorithm, the ciphertext of the account to be verified, which is stored in advance, can be decrypted by the second target encryption algorithm to obtain a decrypted initial plaintext password, then, whether the initial plaintext password is consistent with the password to be verified or not can be compared, and verification can be determined to be successful when the password to be verified is consistent with the initial plaintext password.
Optionally, after the password to be verified is successfully verified by adopting a second target encryption algorithm corresponding to the bank type to which the account to be verified belongs, the password to be verified can be determined to be a legal plaintext password, then the legal plaintext password (the password to be verified) can be encrypted by adopting a first encryption algorithm corresponding to the current verification bank, so that first encrypted data of the password to be verified of the account to be verified of other row in the current verification bank can be obtained; in addition, the account type of the account to be verified can be marked as a marked account type, namely, the account type of the account to be verified is modified from an initial non-marked account type to a marked account type.
And step 304, under the condition of verification failure, sending reminding information of password errors to the user terminal so as to instruct the user to input the password to be verified again.
In this embodiment, when the registered account of the other bank is used for the first time in the current check bank, the server of the current check bank acquires the password to be checked and the account to be checked input by the user by responding to the triggering operation of the second account of the user; determining a second target encryption algorithm according to the bank type of the account to be verified, and verifying the password to be verified by adopting the second target encryption algorithm; under the condition of successful verification, determining that the password to be verified is a legal plaintext password, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data; that is, in the case that the current check bank uses the second target encryption algorithm of the other bank to successfully check the password to be checked when the transaction operation is performed by the current check bank for the first time by using the other bank registration account, the current check bank may use the first encryption algorithm of the other bank to encrypt the password to be checked (plaintext password) to obtain encrypted first password data, and modify the account type of the account to be checked into the marked account type, so that the first encryption algorithm of the current check bank may be directly used to perform password check on the password to be checked of the account to be checked when the transaction operation is performed by the current check bank again, so that the efficiency of performing password check on the account to be checked of the other bank can be greatly improved, and the password check flow is simplified. In addition, as more and more other line registered accounts carry out transaction operations in the line, the line can obtain more and more first password data corresponding to the other line registered accounts, and when the other line registered accounts carry out cross-service transaction again in the line, the verification efficiency of the line on the passwords of the other line accounts can be greatly improved.
Fig. 4 is a flow chart of a method for verifying a password in another embodiment. The embodiment relates to an optional implementation process of performing password verification on the password to be verified by adopting a second target encryption algorithm of the bank when the bank card of the bank is used for performing transaction operation at present for the first time; on the basis of the above embodiment, as shown in fig. 4, the step 302 includes:
and step 401, encrypting the password to be verified by adopting the second target encryption algorithm to obtain a first password abstract.
Optionally, in the case that the second target encryption algorithm is a one-way encryption algorithm, since the one-way encryption algorithm encrypts the plaintext to obtain the ciphertext, the plaintext cannot be decrypted by the ciphertext; therefore, account password information is registered for the one-way encrypted other row, and the password to be verified can be encrypted by adopting a second target encryption algorithm of the other row, so that an encrypted first password abstract is obtained.
Optionally, the current checking bank may determine, according to the account to be checked, second password data corresponding to the account to be checked from all registered account information of the other row stored in the database in advance, and determine whether the first password abstract is consistent with the second password data corresponding to the account to be checked stored in advance.
And step 403, determining that the verification is successful when the first password abstract is consistent with the second password data corresponding to the account to be verified, which is stored in advance.
And step 404, determining that the verification fails under the condition that the first password abstract is inconsistent with the second password data corresponding to the account to be verified, which is stored in advance.
In this embodiment, the current verification bank encrypts the password to be verified by using the second target encryption algorithm to obtain a first password abstract, and determines whether the first password abstract is consistent with the second password data corresponding to the pre-stored account to be verified, and determines that verification is successful when the first password abstract is consistent with the second password data corresponding to the pre-stored account to be verified, so that verification of the password to be verified is achieved, and feasibility of password verification is improved.
In an optional embodiment of the present application, after the step 303 of encrypting the legal plaintext password by using the first encryption algorithm to obtain the first password data, the method may further include replacing the second password data corresponding to the account to be verified, which is stored in advance, with the first password data, and marking the account to be verified as a marked account; that is, after the current verification bank obtains the first password data corresponding to the plaintext password of the account to be verified of the other line by adopting the first encryption data of the present line, the first password data can be used for replacing the second password data which is stored in advance and is encrypted by adopting the second encryption algorithm of the other line; in this way, the second password data can be gradually replaced by the first password data, so that the password data obtained after the password of the registered account of the other row is encrypted by the first encryption algorithm of the line is obtained, unified management of the password data of the registered account of the other row by the line is facilitated, and the data storage capacity is reduced; and when the registered account of the other line is used in the line, the first encryption algorithm of the line is directly adopted to carry out the password verification on the password to be verified, the encryption algorithm interface of the other line is not required to be additionally called, the password verification process is simplified, and the password verification efficiency is improved.
Fig. 5 is a flow chart of a method for verifying a password in another embodiment. The embodiment relates to an optional implementation process that a current check bank adopts a first encryption algorithm of the line to check the password with check; on the basis of the above embodiment, as shown in fig. 5, the step of "verifying the password to be verified using the first encryption algorithm" may include:
and step 501, encrypting the password to be verified by adopting the first encryption algorithm to obtain a second password abstract.
Optionally, in the case that the first target encryption algorithm is a one-way encryption algorithm, the first encryption algorithm may be adopted to encrypt the password to be verified, so as to obtain a second password digest. Preferably, the first target encryption algorithm may adopt a national encryption one-way encryption algorithm.
In step 503, if the second password digest is consistent with the first password data corresponding to the account to be checked, the check is determined to be successful.
And step 504, determining that verification fails under the condition that the second password abstract is inconsistent with the first password data corresponding to the account to be verified, which is stored in advance.
In this embodiment, the current verification bank encrypts the password to be verified by adopting the first encryption algorithm of the present line to obtain a second password abstract, and judges whether the second password abstract is consistent with the prestored first password data corresponding to the account to be verified, and if the second password abstract is consistent with the prestored first password data corresponding to the account to be verified, the verification is determined to be successful, so that the verification of the password to be verified is realized, and the feasibility of the password verification is improved.
FIG. 6 is a flow chart illustrating a method of verifying a password in one embodiment. On the basis of the above embodiment, as shown in fig. 6, the method includes:
step 602, determining a second target encryption algorithm corresponding to the account to be verified according to the type of the non-marked account to which the account to be verified belongs and the type of the bank to which the account to be verified belongs;
step 609, replacing the second password data corresponding to the account to be checked stored in advance with the first password data, and marking the account to be checked as a marked account;
step 610, when the registered account of the other row is used again in the current check bank, the current check bank responds to the first account triggering operation of the user to acquire the password to be checked and the account to be checked which are input by the user;
Step 611, determining a first encryption algorithm of the current check bank according to the type of the marked account to which the account to be checked belongs;
It should be understood that, although the steps in the flowcharts of fig. 2-6 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-6 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 7, there is provided a password verification apparatus, including: a first acquisition module 701, a determination module 702 and a first verification module 703, wherein:
the first obtaining module 701 is configured to obtain a password to be verified and an account to be verified, which are input by a user, in response to a first account triggering operation of the user;
a determining module 702, configured to determine an account type of the account to be verified; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
the first verification module 703 is configured to determine a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verify the password to be verified by using the first target encryption algorithm.
In one embodiment, as shown in fig. 8, the apparatus further comprises:
a second obtaining module 704, configured to obtain a password to be verified and an account to be verified, which are input by a user, in response to a second account triggering operation of the user;
The second checking module 705 is configured to determine a second target encryption algorithm according to a bank type to which the account to be checked belongs, and check the password to be checked by adopting the second target encryption algorithm;
and the encryption module 706 is configured to determine that the password to be verified is a legal plaintext password if the verification is successful, and encrypt the legal plaintext password by using the first encryption algorithm to obtain the first password data.
In one embodiment, the second verification module 705 is specifically configured to encrypt the password to be verified by using the second target encryption algorithm to obtain a first password digest; judging whether the first password abstract is consistent with second password data corresponding to the account to be checked stored in advance; and under the condition that the first password abstract is consistent with the second password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, as shown in fig. 9, the apparatus further comprises: and the replacing module 707 is configured to replace the second password data corresponding to the account to be checked stored in advance with the first password data after the encrypting module encrypts the legal plaintext password by using the first encrypting algorithm to obtain the first password data, and mark the account to be checked as a marked account.
In one embodiment, the first verification module 703 includes a first verification unit;
and the first verification unit is used for determining the first encryption algorithm as the first target encryption algorithm if the account type is the marked account type, and verifying the password to be verified by adopting the first encryption algorithm.
In one embodiment, the first verification unit is specifically configured to encrypt the password to be verified by using the first encryption algorithm to obtain a second password digest; judging whether the second password abstract is consistent with the first password data corresponding to the account to be checked stored in advance; and under the condition that the second password abstract is consistent with the first password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the first verification module 703 further includes a second verification unit;
and the second verification unit is used for determining the second encryption algorithm as the first target encryption algorithm if the account type is the non-marked account type, and verifying the password to be verified by adopting the second encryption algorithm.
For specific limitations of the password verification device, reference may be made to the above limitation of the password verification method, which is not repeated here. The modules in the password verification device can be realized in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing second password data of all registered accounts of other lines except the current check bank and first password data of the registered accounts of other lines except the current check bank. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of verifying a password.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
responding to a first account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
and determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
In one embodiment, the processor when executing the computer program further performs the steps of: responding to a second account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user; determining a second target encryption algorithm according to the bank type of the account to be verified, and verifying the password to be verified by adopting the second target encryption algorithm; and under the condition that the verification is successful, determining that the password to be verified is a legal plaintext password, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data.
In one embodiment, the processor when executing the computer program further performs the steps of: encrypting the password to be verified by adopting the second target encryption algorithm to obtain a first password abstract; judging whether the first password abstract is consistent with second password data corresponding to the account to be checked stored in advance; and under the condition that the first password abstract is consistent with the second password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the processor when executing the computer program further performs the steps of: and after the first encryption algorithm is adopted to encrypt the legal plaintext password to obtain the first password data, replacing the second password data corresponding to the account to be checked, which is stored in advance, with the first password data, and marking the account to be checked as a marked account.
In one embodiment, the processor when executing the computer program further performs the steps of: and under the condition that the account type is the marked account type, determining the first encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the first encryption algorithm.
In one embodiment, the processor when executing the computer program further performs the steps of: encrypting the password to be verified by adopting the first encryption algorithm to obtain a second password abstract; judging whether the second password abstract is consistent with the first password data corresponding to the account to be checked stored in advance; and under the condition that the second password abstract is consistent with the first password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the processor when executing the computer program further performs the steps of: and under the condition that the account type is a non-marked account type, determining the second encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the second encryption algorithm.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to a first account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user;
determining the account type of the account to be checked; wherein the account type comprises a signed account type or a non-signed account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting the plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
and determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the password to be checked by adopting the first target encryption algorithm.
In one embodiment, the computer program when executed by the processor further performs the steps of: responding to a second account triggering operation of a user, and acquiring a password to be checked and an account to be checked which are input by the user; determining a second target encryption algorithm according to the bank type of the account to be verified, and verifying the password to be verified by adopting the second target encryption algorithm; and under the condition that the verification is successful, determining that the password to be verified is a legal plaintext password, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data.
In one embodiment, the computer program when executed by the processor further performs the steps of: encrypting the password to be verified by adopting the second target encryption algorithm to obtain a first password abstract; judging whether the first password abstract is consistent with second password data corresponding to the account to be checked stored in advance; and under the condition that the first password abstract is consistent with the second password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the computer program when executed by the processor further performs the steps of: and after the first encryption algorithm is adopted to encrypt the legal plaintext password to obtain the first password data, replacing the second password data corresponding to the account to be checked, which is stored in advance, with the first password data, and marking the account to be checked as a marked account.
In one embodiment, the computer program when executed by the processor further performs the steps of: and under the condition that the account type is the marked account type, determining the first encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the first encryption algorithm.
In one embodiment, the computer program when executed by the processor further performs the steps of: encrypting the password to be verified by adopting the first encryption algorithm to obtain a second password abstract; judging whether the second password abstract is consistent with the first password data corresponding to the account to be checked stored in advance; and under the condition that the second password abstract is consistent with the first password data corresponding to the account to be checked, which is stored in advance, determining that the check is successful.
In one embodiment, the computer program when executed by the processor further performs the steps of: and under the condition that the account type is a non-marked account type, determining the second encryption algorithm as the first target encryption algorithm, and checking the password to be checked by adopting the second encryption algorithm.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (12)
1. A method for verifying a password, the method comprising:
responding to a first account triggering operation of a user, and acquiring a first password to be verified and a first account to be verified which are input by the user; the first account is any other registered account except the registered account of the current check bank;
determining the account type of the first account to be checked; wherein the account type comprises a marked account type or a non-marked account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting a plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
Determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and checking the first password to be checked by adopting the first target encryption algorithm;
the method further comprises the steps of:
responding to a second account triggering operation of a user, and acquiring a second password to be checked and a second account to be checked which are input by the user; the second account is an account of the registered account of the other bank when the current check bank is used for the first time;
determining a second target encryption algorithm according to the bank type of the second account to be verified, and verifying the second password to be verified by adopting the second target encryption algorithm;
if the verification is successful, determining that the second password to be verified is a legal plaintext password, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data;
and replacing the second password data corresponding to the second account to be checked, which is stored in advance, with the first password data, and marking the second account to be checked as a marked account.
2. The method of claim 1, wherein the verifying the second password to be verified using the second target encryption algorithm comprises:
Encrypting the second password to be verified by adopting the second target encryption algorithm to obtain a first password abstract;
judging whether the first password abstract is consistent with second password data corresponding to the second account to be checked stored in advance;
if the verification is consistent, the verification is determined to be successful.
3. The method according to any one of claims 1 to 2, wherein determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifying the first password to be verified using the first target encryption algorithm, comprises:
and if the account type is the marked account type, determining that the first encryption algorithm is the first target encryption algorithm, and checking the first password to be checked by adopting the first encryption algorithm.
4. A method according to claim 3, wherein said verifying said first password to be verified using said first encryption algorithm comprises:
encrypting the first password to be verified by adopting the first encryption algorithm to obtain a second password abstract;
judging whether the second password abstract is consistent with the first password data corresponding to the first account to be checked stored in advance;
If the verification is consistent, the verification is determined to be successful.
5. The method of claim 3, wherein the determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm based on the account type and verifying the first password to be verified using the first target encryption algorithm further comprises:
and if the account type is a non-marked account type, determining that the second encryption algorithm is the first target encryption algorithm, and checking the first password to be checked by adopting the second encryption algorithm.
6. A password verification device, the device comprising:
the first acquisition module is used for responding to a first account triggering operation of a user and acquiring a first password to be checked and a first account to be checked which are input by the user; the first account is any other registered account except the registered account of the current check bank;
the determining module is used for determining the account type of the first account to be checked; wherein the account type comprises a marked account type or a non-marked account type; the first password data corresponding to the marked account type is data generated after a plaintext password is encrypted by adopting a first encryption algorithm of a current check bank; the second password data corresponding to the non-marked account type is data generated by encrypting a plaintext password by adopting a second encryption algorithm of other lines except the current check bank;
The first verification module is used for determining a first target encryption algorithm from the first encryption algorithm and the second encryption algorithm according to the account type, and verifying the first password to be verified by adopting the first target encryption algorithm;
the apparatus further comprises:
the second acquisition module is used for responding to the triggering operation of a second account of the user and acquiring a second password to be checked and a second account to be checked which are input by the user; the second account is an account of the registered account of the other bank when the current check bank is used for the first time;
the second verification module is used for determining a second target encryption algorithm according to the bank type of the second account to be verified, and verifying the second password to be verified by adopting the second target encryption algorithm;
the encryption module is used for determining that the second password to be verified is a legal plaintext password if verification is successful, and encrypting the legal plaintext password by adopting the first encryption algorithm to obtain the first password data;
and the replacing module is used for replacing the second password data corresponding to the second account to be checked, which is stored in advance, with the first password data and marking the second account to be checked as a marked account.
7. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the second verification module is specifically configured to encrypt the second password to be verified by using the second target encryption algorithm to obtain a first password digest;
judging whether the first password abstract is consistent with second password data corresponding to the second account to be checked stored in advance;
if the verification is consistent, the verification is determined to be successful.
8. The apparatus of any one of claims 6 to 7, wherein the first verification module comprises a first verification unit;
and the first verification unit is used for determining that the first encryption algorithm is the first target encryption algorithm if the account type is the marked account type, and verifying the first password to be verified by adopting the first encryption algorithm.
9. The apparatus of claim 8, wherein the device comprises a plurality of sensors,
the first verification unit is specifically configured to encrypt the first password to be verified by using the first encryption algorithm to obtain a second password digest;
judging whether the second password abstract is consistent with the first password data corresponding to the first account to be checked stored in advance;
If the verification is consistent, the verification is determined to be successful.
10. The apparatus of claim 8, wherein the first verification module further comprises a second verification unit;
and the second verification unit is used for determining the second encryption algorithm as the first target encryption algorithm if the account type is a non-marked account type, and verifying the first password to be verified by adopting the second encryption algorithm.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111398531.7A CN114244519B (en) | 2021-11-19 | 2021-11-19 | Password verification method, password verification device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111398531.7A CN114244519B (en) | 2021-11-19 | 2021-11-19 | Password verification method, password verification device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114244519A CN114244519A (en) | 2022-03-25 |
CN114244519B true CN114244519B (en) | 2023-05-23 |
Family
ID=80750718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111398531.7A Active CN114244519B (en) | 2021-11-19 | 2021-11-19 | Password verification method, password verification device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114244519B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116094764B (en) * | 2022-12-07 | 2024-06-04 | 南方电网数字电网研究院有限公司 | Power grid data storage method, device and equipment of power monitoring system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104408611A (en) * | 2014-10-29 | 2015-03-11 | 中国建设银行股份有限公司 | Method and system for electronic banking transactions of other bank cards |
CN107948155A (en) * | 2017-11-24 | 2018-04-20 | 重庆金融资产交易所有限责任公司 | Cryptographic check method, apparatus, computer equipment and computer-readable recording medium |
CN109933973A (en) * | 2019-01-24 | 2019-06-25 | 平安科技(深圳)有限公司 | Cryptographic check method, apparatus, computer equipment and storage medium |
US10515368B1 (en) * | 2013-10-01 | 2019-12-24 | Wells Fargo Bank, N.A. | Interbank account verification and funds transfer system and method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6910020B2 (en) * | 1996-10-16 | 2005-06-21 | Fujitsu Limited | Apparatus and method for granting access to network-based services based upon existing bank account information |
-
2021
- 2021-11-19 CN CN202111398531.7A patent/CN114244519B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10515368B1 (en) * | 2013-10-01 | 2019-12-24 | Wells Fargo Bank, N.A. | Interbank account verification and funds transfer system and method |
CN104408611A (en) * | 2014-10-29 | 2015-03-11 | 中国建设银行股份有限公司 | Method and system for electronic banking transactions of other bank cards |
CN107948155A (en) * | 2017-11-24 | 2018-04-20 | 重庆金融资产交易所有限责任公司 | Cryptographic check method, apparatus, computer equipment and computer-readable recording medium |
CN109933973A (en) * | 2019-01-24 | 2019-06-25 | 平安科技(深圳)有限公司 | Cryptographic check method, apparatus, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114244519A (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109614825B (en) | Contract signing method, contract signing device, computer equipment and storage medium | |
CN108306876A (en) | Client identity verification method, device, computer equipment and storage medium | |
US10917249B2 (en) | Processing data elements stored in blockchain networks | |
EP3791538B1 (en) | Shared blockchain data storage based on error correction code | |
CN109741016B (en) | Electronic contract signing method, electronic contract signing device, computer equipment and storage medium | |
CN109587154A (en) | Digital identity verification method, device, computer equipment and storage medium | |
CN104484628B (en) | It is a kind of that there is the multi-application smart card of encrypting and decrypting | |
CN110135175A (en) | Information processing, acquisition methods, device, equipment and medium based on block chain | |
CN114244519B (en) | Password verification method, password verification device, computer equipment and storage medium | |
CN114222288B (en) | Equipment identifier generation method, equipment identifier verification method and device | |
CN110445757A (en) | Personnel information encryption method, device, computer equipment and storage medium | |
CN116049802B (en) | Application single sign-on method, system, computer equipment and storage medium | |
CN116962021A (en) | Method, device, equipment and medium for user real name authentication in financial cooperative institution | |
CN117034358A (en) | Service certificate processing method and device and computer equipment | |
CN114567557B (en) | Message processing method, device, computer equipment and storage medium | |
CN115664772A (en) | Access request processing method and device, computer equipment and storage medium | |
CN105574425B (en) | Access the method and device of storage data | |
Sabry et al. | ArchiveSafe LT: Secure Long-term Archiving System | |
CN114499869B (en) | Resource cross-chain exchange method and device based on block chain and computer equipment | |
CN114928551B (en) | System configuration method, device and storage medium | |
CN116094764B (en) | Power grid data storage method, device and equipment of power monitoring system | |
CN118427805A (en) | Security authentication method, apparatus, device, storage medium, and program product | |
CN117714099A (en) | Anticreeper method, anticreeper device, computer equipment and storage medium | |
CN116882983A (en) | Resource transfer method, device, computer equipment and storage medium | |
CN117196802A (en) | Method, apparatus, device, storage medium and program product for processing delegated service |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |