Patent ID: 11863684
Assignee: FEITIAN TECHNOLOGIES CO., LTD.
Field: Digital communication (Electrical engineering)
Classification: CPC H | IPC H

Claim 0:
1. A method for binding and authorizing a hardware wallet, wherein the method comprises the following steps:
S1) determining, by the hardware wallet, a type of an instruction when the instruction, sent from a terminal, is received by the hardware wallet, executing step S2 if the instruction is a checking and binding state instruction; executing step S5 if the instruction is a generating authorization code instruction; or executing step S7 if the instruction is a binding instruction;
S2) determining, by the hardware wallet, a value of an authenticating data existence flag which is stored in the hardware wallet, setting a binding object as null if the value of the authenticating data existence flag is a first preset data, and setting an authorization state as permitting to generate authorization code, and executing step S4; and executing step S3 if the value of the authenticating data existence flag is a second preset data;
S3) checking, by the hardware wallet, whether authenticating data in the checking and binding instruction is the same as the authenticating data which is stored in the hardware wallet, if yes, setting the binding object as a terminal corresponding to the hardware wallet, and executing step S4; otherwise, setting the binding object as other terminal, and executing step S4;
S4) organizing, by the hardware wallet, command response data according to the binding object and a stored hardware wallet certificate, and returning the command response data to the terminal, and returning to step S1;
S5) determining, by the hardware wallet, whether the authorization state is the permitting to generate state code, if yes, executing step S6; otherwise, returning error information to the terminal, and returning to step S1;
S6) generating, by the hardware wallet, an authorization code, caching and displaying the authorization code, setting the authorization state as the hardware wallet cannot generate the authorization code anymore, setting hardware wallet state as unbinding, returning success information to the terminal, and returning to step S1;
S7) determining, by the hardware wallet, whether the hardware wallet state is unbinding, if yes, obtaining the cached authorization code, executing step S8; otherwise, obtaining the stored authorization code, and executing step S10;
S8) authenticating, by the hardware wallet, the binding instruction by using the authorization code obtained, executing step S9 if the binding instruction is authenticated successfully; returning authentication unsuccessful information to the terminal if the binding instruction is authenticated unsuccessfully, and returning to step S1;
S9) storing, by the hardware wallet, the authenticating data and the cached authorization code which are in the binding instruction, and setting the value of the authenticating data existence flag as the second preset data, returning authorization successful information to the terminal, and returning to step S1;
S10) authenticating, by the hardware wallet, the binding instruction by using the authorization code obtained, executing step S11 if the binding instruction is authenticated successfully; returning authentication unsuccessful information to the terminal if the binding instruction is authenticated unsuccessfully, and returning to step S1; and
S11) determining, by the hardware wallet, whether a currently connected terminal is the terminal corresponding to the hardware wallet according to the binding instruction, if yes, returning authorization successful information to the terminal, and returning to step S1; otherwise, storing the authenticating data which is in the binding instruction, and setting the value of the authenticating data existence flag as the second preset data, and returning authorization successful information to the terminal, and returning to step S1.