Background
With the development of the internet, when users communicate and trade on the internet, their information security is increasingly threatened by hackers, network monitoring devices, viruses and other forms. The various losses associated with these threats have become a significant component of the cost of use. The key to realizing electronic commerce is to ensure the security and credibility of the system in the process of business activities. In order to establish a secure and trusted relationship between two communicating parties, the parties involved in network communications must prove their identity through some form of identity authentication mechanism. Currently, there are three forms of identity authentication mechanisms: a user name plus password mode, a biological characteristic identification technology (including fingerprints, voice, handwriting, iris and the like), and an identity authentication mode based on a USB Key.
The USB Key is a small and exquisite hardware device with a USB interface, is similar to a common USB flash disk in shape, is internally provided with a CPU, a memory and a Chip Operating System (COS), can store a secret Key or a digital certificate of a user, and realizes the authentication of the identity of the user by utilizing a cryptographic algorithm built in the USB Key.
The USB Key usually adopts an authentication mode of asymmetric Key encryption, and realizes the authentication of the user identity by using a public Key algorithm built in the USB Key. The USB Key can carry out e-mail encryption, digital signature, security certificate, Secure network login and access to the Secure network of an application Secure Socket Layer (SSL) protocol, and provides identity authentication, identity identification and information encryption services for a user. Because the user private Key is stored in the password lock of the USB Key and can not be read by any mode theoretically, the safety of user authentication is ensured. With the continuous popularization of internet electronic commerce, the USBKey is being recognized and used by more and more users with the advantages of safety, reliability, portability, convenient use and the like, and the application is very wide.
Because the USB Key is used as a Key storage, the hardware structure of the USB Key determines that a user can only access data through a manufacturer programming interface, so that the digital certificate stored in the USB Key cannot be copied, and each USB Key is protected by a PIN code, so that the hardware and the PIN code of the USB Key form two necessary factors capable of using the certificate. If the PIN code of the user is leaked, the hardware with the USB Key stored can protect the certificate of the user from being stolen, and if the USBKey of the user is lost, the acquirer cannot steal the certificate of the user in the USB Key because the acquirer does not know the PIN code of the hardware.
But the hardware of the USB Key and the PIN code cannot resist replay attacks. The replay attack means that on the side of a user computer, a hacker or a trojan program intercepts a PIN code message input by a computer client when the user uses a USB Key. When the USB Key is judged to be inserted into a computer, a hacker or a trojan program does not need to decode PIN code information, and only needs to resend the intercepted password, so that the USB Key can be called by the intercepted PIN code under the condition that a user does not know, illegal operation is carried out, and the benefit of the user is damaged.
Fig. 1 is a schematic diagram of a conventional USB Key being stolen during normal use.
Step 101, a user needs to perform online bank transfer through a client, and online bank needs to perform user identity authentication;
102, a user inputs a PIN code and uses a USB Key to perform identity authentication;
and 103, according to the identity authentication message of the USB Key of the user, the account transfer is successful after the authentication.
At the same time, the hacker or trojan horse program is also performing illegal operations:
step 101', a hacker or a trojan horse program monitors the input of a user keyboard to obtain a PIN code;
102', falsely using the user PIN code, and successfully passing the USB Key authentication;
and step 103', calling a USB Key to perform identity authentication, calling a private Key to sign a transfer message, and successfully transferring the account by a hacker or a Trojan horse program through online bank authentication, so that the user suffers loss.
The existing USB Key well solves the contradiction between safety and usability through an authentication mode combining PIN codes and USB hardware-software and hardware; however, a network hacker or trojan horse program can still access and steal the user USB Key in one case: a hacker or a trojan program intercepts a PIN code input by a user at a PC client side, judges that a USB Key is inserted into a computer, and can use the intercepted PIN code to call the USB Key under the condition that the user does not know, and use a private Key in the USB Key to sign an order or perform online transaction, so that lawbreakers can take advantage of the order.
Therefore, the existing solving technology has the defects that hackers or trojan programs do not need to crack the USB Key by invading the computer of a user, but intercept the PIN code of the user, and resend the message and steal the private Key of the user when the USB Key is inserted into the computer, thereby causing the loss of the user. One way to reduce this possibility is to remove it from the computer in a timely manner when the USB Key is not used, but this approach does not fundamentally solve the above-mentioned problem.
Disclosure of Invention
The embodiment of the invention provides USB Key equipment and a method for realizing verification thereof, aiming at solving the potential safety hazard of the existing USB Key.
A USB Key device, comprising a card operating system COS, used for receiving the operation instruction of the security verification, and calling CPU and memorizer in the USB Key to execute the authentication operation, the USB Key further comprises: the prompt input unit is used for prompting the input of a PIN code of the USB Key and an additional verification code aiming at the current operation;
and the card operating system COS is used for triggering a prompt input unit when the safety verification operation instruction is received, receiving and verifying the PIN code and the additional verification code, and executing the safety verification operation indicated by the safety verification operation instruction when the verification passes.
Wherein the additional verification code for the current operation is a dynamic password; the prompt input unit includes:
the dynamic password generating unit is used for generating a dynamic password aiming at the current operation after receiving the trigger notice from the card operating system and transmitting the dynamic password to the display unit;
and the display unit is used for displaying the dynamic password to a user.
Wherein the additional verification code for the current operation is a biometric identifier; the prompt input unit includes:
and the biological characteristic identification code acquisition unit is used for receiving the trigger notice from the card operating system, acquiring the biological characteristic identification code and transmitting the acquired biological characteristic identification code to the card operating system.
Wherein the biometric identifier comprises a fingerprint, voice, handwriting, and/or iris.
A method for realizing verification by applying a USB Key comprises the following steps:
receiving a safety verification operation instruction, and prompting to input a PIN (personal identification number) code of a USB Key and an additional verification code aiming at the current operation;
and verifying the received PIN code and the additional verification code, and if the verification is passed, executing the security verification operation indicated by the security verification operation instruction.
Wherein the additional verification code for the current operation is a dynamic password; after receiving the security verification operation instruction, the method further includes: generating a dynamic password aiming at the current operation and displaying the dynamic password to a user;
the step of verifying the received PIN code and additional verification code comprises: whether the PIN code from the client is accurate is verified, if so, whether the additional verification code from the client is consistent with a dynamic password generated after the USB Key receives a safety verification operation instruction is verified, and if so, the verification is passed; or,
the step of verifying the received PIN code and additional verification code comprises: the method comprises the steps of firstly verifying whether the additional verification code from a client side is consistent with a dynamic password generated after a USB Key receives a safety verification operation instruction, if so, verifying whether the PIN code from the client side is accurate, and if so, passing the verification; or,
the step of verifying the received PIN code and additional verification code comprises: and verifying whether the combination of the PIN code and the additional verification code from the client is consistent with the combination of the stored PIN code and the dynamic password generated after the USB Key receives the safety verification operation instruction, and if so, passing the verification.
Wherein the additional verification code for the current operation is a biometric identifier;
the step of verifying the received PIN code and additional verification code comprises: whether the PIN code from the client is accurate is verified, if so, whether the received biological characteristic identification code through the USB Key is the same as a prestored biological characteristic identification code is verified, and if so, the verification is passed; or,
the step of verifying the received PIN code and additional verification code comprises: firstly, verifying whether the biological characteristic identification code received through the USB Key is the same as a prestored biological characteristic identification code, if so, verifying whether the PIN code from the client is accurate, and if so, passing the verification; or,
the step of verifying the received PIN code and additional verification code comprises: and verifying whether the combination formed by the PIN code and the biological characteristic identification code and the stored PIN code and the stored biological characteristic identification code is consistent, and if so, passing the verification.
Wherein the biometric identifier comprises a fingerprint, voice, handwriting, and/or iris.
Wherein, if the verification fails, the method further comprises:
and judging whether the number of verification times exceeds a set verification time threshold, if so, ending the operation, otherwise, receiving the PIN code and the additional verification code again, and re-executing the verification operation.
And when the additional verification code is a dynamic password, the re-received dynamic password is the same as or different from the previously received dynamic password.
The invention provides a USB Key protection strategy of double factors of PIN code and additional verification code, thus ensuring that a user can not call the USB Key to sign or authenticate the identity by a Trojan horse program or a hacker under the condition that the user does not know the USB Key. The method avoids replay attack and impersonation operation, ensures that the interests of the user are not threatened, creates good internet communication and transaction environments, and effectively prevents the existence of loopholes in interactive operation. Therefore, compared with the traditional technology, the USB Key and the verification method thereof provided by the invention have better safety, are convenient and simple to use, still keep high efficiency and reliability, and have obvious advantages.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The USB Key equipment provided by the invention comprises: the Card Operating System (COS), is used for receiving the safe operation instruction of verifying, call CPU and memorizer in the USB Key to carry out the authentication operation, the said USB Key also includes: the prompt input unit is used for prompting the input of a PIN code of the USB Key and an additional verification code aiming at the current operation; and the card operating system is used for triggering a prompt input unit when receiving the safety verification operation instruction, receiving and verifying the PIN code and the additional verification code, and executing the safety verification operation indicated by the safety verification operation instruction when the verification is passed.
The invention provides a USB Key protection strategy of double factors of PIN code and additional verification code, thus ensuring that a user can not call the USB Key to sign or authenticate the identity by a Trojan horse program or a hacker under the condition that the user does not know the USB Key. The potential safety hazard of the traditional USB Key is avoided, the benefit of a user is not threatened, a good internet communication and transaction environment is created, the vulnerability existing in interactive operation is effectively prevented, and the problem that the USB Key is used in the scene is solved.
FIG. 2 is a schematic diagram of a system structure of a USB Key according to an embodiment of the present invention.
The USB Key comprises the following parts: a USB KEY CPU 201, a Card Operating System (COS)202, a memory card 203, and a prompt input unit 204.
The USB Key CPU 201 is used for realizing various algorithms of data abstraction, data encryption and decryption and signature used in a Public Key Infrastructure (PKI) system, and the encryption and decryption operation is carried out in the USB Key, so that the secret Key is ensured not to appear in a computer memory, and the possibility that the secret Key of a user is intercepted by a hacker or a Trojan program is avoided.
The USB Key storage card 203 is a secure data storage space and is used for storing a private Key and a digital certificate of a user, the read-write operation of the storage space must be realized through a program, the user cannot directly read the private Key, and the private Key of the user cannot be derived, so that the possibility of copying the digital certificate or identity information of the user is avoided. The USB Key storage card 203 may be an EEPROM or a Flash.
The functions of the above two parts are the same as those of the prior art.
The Key point of the Card Operating System (COS)202 is that when the card operating system 202 receives the safety verification operation instruction, the prompt input unit 204 is triggered to receive and verify the PIN code and the additional verification code, and when the verification is passed, the safety verification operation indicated by the safety verification operation instruction is executed.
And a prompt input unit 204 for prompting the input of the PIN code of the USB Key and the additional verification code for the current operation.
The structure of the prompt input unit 204 varies depending on the additional verification code.
If the additional verification code is a dynamic password; the prompt input unit includes:
the dynamic password generating unit is used for generating a dynamic password aiming at the current operation after receiving the trigger notice from the card operating system and transmitting the dynamic password to the display unit; the dynamic password generating unit can run a special cryptographic algorithm, and the algorithm for generating the dynamic password is not limited;
and the display unit is used for displaying the dynamic password to a user.
If the additional verification code is a biological characteristic identification code; the prompt input unit includes:
and the biological characteristic identification code acquisition unit is used for receiving the trigger notice from the card operating system, acquiring the biological characteristic identification code and transmitting the acquired biological characteristic identification code to the card operating system. The biometric identifier includes, but is not limited to, a fingerprint, voice, handwriting, and/or iris.
In this case, the memory card already stores therein a biometric identifier for comparison.
The invention provides a method for realizing verification by applying a USB Key, which comprises the following steps: the USB Key receives a safety verification operation instruction, and prompts input of a PIN code of the USB Key and an additional verification code aiming at the current operation; and verifying the received PIN code and the additional verification code, and if the verification is passed, executing the security verification operation indicated by the security verification operation instruction. The invention provides a USB Key protection strategy of double factors of PIN code and additional verification code, thus ensuring that a user can not call the USB Key to sign or authenticate the identity by a Trojan horse program or a hacker under the condition that the user does not know the USB Key. The potential safety hazard of the traditional USB Key is avoided, the benefit of a user is not threatened, a good internet communication and transaction environment is created, the vulnerability existing in interactive operation is effectively prevented, and the problem that the USB Key is used in the scene is solved.
For convenience of description, the present invention will be described in detail below by taking the appended verification code as an example of the dynamic password.
Refer to fig. 3, which is a schematic diagram of a USB Key according to an embodiment of the present invention for preventing attacks during normal use.
Step 301, a user needs to perform online bank transfer through a client, and online bank needs to perform user identity authentication;
step 302, displaying a dynamic password a on an operation trigger USB Key;
step 303, the client prompts the user to input a password, and the user inputs a PIN code and a dynamic password a;
and step 304, after verifying that the PIN code input by the user and the dynamic password a pass through, the card operating system agrees to the user operation, and the user passes through the authentication according to the USB Key identity authentication message, so that the account transfer is successful.
Step 301', a hacker or a trojan horse program monitors the input of a user keyboard to obtain a PIN code and a dynamic password a;
step 302', falsely use the PIN code intercepted by the user and the dynamic password a to access the USB Key for identity authentication;
step 303', the new operation access triggers the dynamic password generation chip to generate a new password, at this time, the dynamic password b is displayed on the USB, the card operating system compares the PIN code + the dynamic password a input by the hacker or the trojan program with the current PIN code + the dynamic password b, the verification fails, and the misuse fails.
Referring to fig. 4, it is a flowchart of a process for implementing authentication by using a USB Key according to an embodiment of the present invention.
Step 401, the user enables the USB Key.
Step 402, the USB Key receives a security verification operation instruction, such as an instruction for signing, encrypting, decrypting, and authenticating an identity.
At step 403, a dynamic password for the current operation is generated and displayed to the user.
Step 404, receiving a PIN code and a dynamic password input by a user through a client;
and step 405, verifying the received PIN code and the dynamic password, if the received PIN code and the dynamic password pass the verification, executing step 406, otherwise, executing step 407.
Here, the specific verification method may be one of the following methods, but is not limited thereto:
a. whether the PIN code from the client is accurate is verified, if so, whether the additional verification code from the client is consistent with a dynamic password generated after the USB Key receives a safety verification operation instruction is verified, and if so, the verification is passed;
b. the method comprises the steps of firstly verifying whether the additional verification code from a client side is consistent with a dynamic password generated after a USB Key receives a safety verification operation instruction, if so, verifying whether the PIN code from the client side is accurate, and if so, passing the verification;
c. and verifying whether the combination of the PIN code and the additional verification code from the client is consistent with the combination of the stored PIN code and the dynamic password generated after the USB Key receives the safety verification operation instruction, and if so, passing the verification.
And step 406, executing the security verification operation indicated by the security verification operation indication, such as signature, encryption, decryption, identity authentication operation, and the like, and ending.
Step 407, judging whether the set verification time threshold is exceeded, if so, ending the operation, otherwise, re-executing step 404, that is, receiving the PIN code and the dynamic password re-input by the user through the client. It can be understood that the dynamic password re-entered by the user through the client in this embodiment is the same as the dynamic password entered last time.
It should be noted that there is also a possible implementation for step 407 in fig. 4: when the set verification time threshold is not exceeded, step 403 may be executed again, that is, the USB Key regenerates the dynamic password for the current operation and displays the dynamic password to the user, where the dynamic password re-input by the user through the client is different from the dynamic password input last time. That is to say, the dynamic password applied in each verification is different from the previous dynamic password, so that the security of the USB Key is better protected.
Step 407 is an optional step to avoid authentication failure due to user input error.
Therefore, in the embodiment of the invention, when an external part (client or trojan program) requests the USB Key to carry out signature or identity authentication, the dynamic password generation unit is triggered to generate the dynamic password and display the dynamic password on the USB display screen, meanwhile, the client pops up a dialog box to require a user to input the dynamic password at the moment, and after the verification is successful, the next signature or authentication operation is carried out, so that the potential safety hazard of replay attack is eliminated. After one security verification operation, the next dynamic password will be automatically changed, so that even if the Trojan horse program or hacker intercepts the last verification message (PIN code and last dynamic password), the USB Key cannot be called.
Because the dynamic password introduced in the embodiment of the invention is displayed through the USB Key, the dynamic password is convenient for a user to read when in use and is easy to input, and therefore, compared with the traditional USB Key, the dynamic password does not bring a new use threshold to the user. Especially, the randomness, the dynamic property and the uniqueness of the dynamic password effectively prevent hackers or trojan programs from guessing attacks, dictionary attacks and exhaustion attacks on the USB Key of the user.
Yet another possible implementation is that the additional verification code for the current operation is a biometric identifier, and the processing flow is similar to that of fig. 4, except that:
i. the step 403 is not required because the biometric identifier is used;
ii. In step 404, a PIN code input by the user through the client and a biometric identification code input through the USB Key are received, and the step of verifying the received PIN code and the appended verification code may be one of the following ways, but is not limited to this:
whether the PIN code from the client is accurate is verified, if so, whether the received biological characteristic identification code through the USB Key is the same as a prestored biological characteristic identification code is verified, and if so, the verification is passed; or,
firstly, verifying whether the biological characteristic identification code received through the USB Key is the same as a prestored biological characteristic identification code, if so, verifying whether the PIN code from the client is accurate, and if so, passing the verification; or,
and verifying whether the combination formed by the PIN code and the biological characteristic identification code and the stored PIN code and the stored biological characteristic identification code is consistent, and if so, passing the verification.
Similarly, the biometric identifier includes, but is not limited to, a fingerprint, voice, handwriting, and/or iris.
In the embodiment of the invention, when an external part (client or Trojan program) requests the USB Key to carry out signature or identity authentication, the biological characteristic identification code acquisition unit is triggered to acquire the biological characteristic identification code, and the next signature or authentication operation is carried out after the verification is successful, so that the potential safety hazard of replay attack is eliminated. After one time of security verification operation, the next operation also requires the user to input the biometric identification code through the USB Key, so that even if the Trojan program or hacker intercepts the last verification message, the USB Key cannot be called.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.