Patent ID: 8732793

Claim:
A method for improving security of a key device, comprising steps of: A) connecting the key device with a computer, and authenticating a device user who inputs a PIN code by the key device, after which if authentication is passed, the computer receives the data input by the user and transfers the data to the key device; B) displaying the data received from the computer by the key device, and making digital signature or encryption of the data input by the user after receiving a confirmation information input by the user according to the data displayed by the key device; C) sending the digital signature to a server through the computer; D) authenticating the digital signature by the server; E) returning an error information in response to failing the authentication of the digital signature; and F) completing a transaction in response to passing the authentication of the digital signature, wherein the confirmation information is input by the user with an input component of the key device; the Step B further comprises sub-steps in which the key device generates a random authentication code and then displays it; and verifies whether the confirmation information input is consistent with that random authentication code currently after receiving the confirmation information input by the user from the computer; if so, the key device makes digital signature or encryption of the data input by the user; and the authentication code generated randomly by the key device differs every time.