CN110570194A - hardware wallet recovery method and device and hardware wallet - Google Patents

hardware wallet recovery method and device and hardware wallet Download PDF

Info

Publication number
CN110570194A
CN110570194A CN201910813419.1A CN201910813419A CN110570194A CN 110570194 A CN110570194 A CN 110570194A CN 201910813419 A CN201910813419 A CN 201910813419A CN 110570194 A CN110570194 A CN 110570194A
Authority
CN
China
Prior art keywords
dictionary
input
user
hardware wallet
code
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.)
Pending
Application number
CN201910813419.1A
Other languages
Chinese (zh)
Inventor
刘国飞
王东
粟立嘉
骆伟宁
刘明轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinminghua Block Chain Technology (shenzhen) Co Ltd
Original Assignee
Xinminghua Block Chain Technology (shenzhen) Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xinminghua Block Chain Technology (shenzhen) Co Ltd filed Critical Xinminghua Block Chain Technology (shenzhen) Co Ltd
Priority to CN201910813419.1A priority Critical patent/CN110570194A/en
Publication of CN110570194A publication Critical patent/CN110570194A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

the invention is suitable for the technical field of block chains, and provides a hardware wallet recovery method, a device and a hardware wallet, wherein the method comprises the following steps: acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary; acquiring a plurality of corresponding mnemonics according to the dictionary codes; and restoring the hardware wallet according to the corresponding plurality of mnemonics. According to the hardware wallet recovery method provided by the invention, the entry of the mnemonic word can be realized by inputting the dictionary code corresponding to the mnemonic word by the user, so that the user only needs to input the dictionary code corresponding to the mnemonic word on the existing input method keyboard without inputting the mnemonic word, the problem that the existing keyboard cannot input the mnemonic word of the required language is avoided, and the problem that the existing mnemonic word is inconvenient to input is solved.

Description

hardware wallet recovery method and device and hardware wallet
Technical Field
the invention belongs to the technical field of block chains, and particularly relates to a hardware wallet recovery method and device and a hardware wallet.
background
the block chain technology is a method which can create a consensus network without trusting a single node, has the characteristics of complete traceability, decentralization and credit removal, can be applied to the fields of finance, government, enterprises, cross-industry and the like based on the characteristics of the block chain technology, and has a wide prospect.
The blockchain is the underlying technology supporting the development of virtual currency, and anyone can generate new currency blocks by performing specific cryptographic calculation so as to obtain digital currency which can be used for transaction. There are two types of hardware wallets for digital currency: one is a hot wallet, which is a hardware wallet always in a networking state, and although the hot wallet is convenient to use, the hot wallet has the risk of being attacked by hackers; one is a cold wallet, which stores user key in hardware device safely, when the user needs to issue transaction, sends the transaction information to the hardware wallet, the hardware wallet uses the stored key to sign and return to the user, and broadcasts to the block chain network, wherein, the private key does not contact the internet, can effectively prevent from being stolen by hacker, and is relatively safe.
To prevent the loss of the hardware wallet, a user-safe backup of the hardware wallet key is required to be able to recover the hardware wallet after it is lost. At present, a method of mnemonic words is generally adopted for key backup of the cold wallet, seeds for generating the keys are backed up, and after the hardware wallet is lost, the user keys are recovered by using the backup mnemonic words, so that the hardware wallet is recovered. At this time, when the mnemonic words are checked and backed up, the user is required to enter the mnemonic words in the cold hardware wallet. The user can use a plurality of different languages to input the mnemonic words, however, for a chip-level hardware wallet without a touch screen, the hardware wallet input method keyboard has the problem of incompatibility with global languages, so that the user cannot input the language characters required by the user under the condition of depending on the input method keyboard, and the problem of inconvenience in inputting the mnemonic words is caused.
disclosure of Invention
the embodiment of the invention aims to provide a hardware wallet recovery method, a hardware wallet recovery device and a hardware wallet, and aims to solve the problem that existing mnemonics are inconvenient to input.
the embodiment of the invention is realized as follows, and provides a hardware wallet recovery method, which comprises the following steps:
acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary;
acquiring a plurality of corresponding mnemonics according to the dictionary codes;
And restoring the hardware wallet according to the corresponding plurality of mnemonics.
Further, the step of obtaining a plurality of dictionary codes sequentially input by the user comprises:
Sequentially acquiring numbers input by a user;
determining the dictionary code according to the acquired plurality of sequentially input numbers;
And sequentially acquiring each dictionary code.
further, the step of determining the dictionary code according to the obtained plurality of sequentially inputted numbers includes:
judging whether dictionary codes determined according to a plurality of sequentially input numbers exceed a preset coding range;
If yes, sending an error prompt, and modifying the dictionary code to prompt that the dictionary code input by the user at present is wrong.
Further, the step of determining the dictionary code according to the obtained plurality of numbers input in sequence comprises:
When a deleting instruction for the currently input number is acquired, deleting the currently input number;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
Further, the step of determining the dictionary code according to the obtained plurality of sequentially inputted numbers further includes:
when a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
When the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
still further, the step of recovering the hardware wallet according to the corresponding plurality of mnemonics may be preceded by the steps of:
displaying a plurality of dictionary codes input by a user in sequence, and determining corresponding mnemonics according to the dictionary codes so that the user can determine whether the input dictionary codes and the determined mnemonics are correct according to displayed information.
still further, the step of recovering the hardware wallet according to the corresponding plurality of mnemonics may be preceded by the steps of:
When a first modification instruction of a user for a target mnemonic word is acquired, displaying each number corresponding to a dictionary code of the target mnemonic word;
when a second modification instruction for the target number is acquired, replacing the target number according to the acquired number input by the user;
when a confirmation instruction for a plurality of numbers is acquired, determining a modified dictionary code according to the acquired numbers, and acquiring a corresponding modified mnemonic word according to the modified dictionary code;
the target mnemonic word is a mnemonic word of the target modification position, and the target number is a number of the target modification position.
further, before the step of obtaining a plurality of dictionary codes sequentially input by the user, the method further includes:
acquiring a language code input by a user;
determining the type of the mnemonic word language according to the language code;
And determining the mnemonic words corresponding to the dictionary codes according to the language type of the mnemonic words.
An embodiment of the present invention further provides a hardware wallet recovery apparatus, where the apparatus includes:
The dictionary code acquisition module is used for acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary;
The memory-aid word acquisition module is used for acquiring a plurality of corresponding memory-aid words according to the dictionary codes;
and the hardware wallet recovery module is used for recovering the hardware wallet according to the corresponding plurality of mnemonics.
further, the dictionary code obtaining module comprises:
The digital acquisition unit is used for sequentially acquiring the numbers input by the user;
The dictionary code determining unit is used for determining the dictionary code according to the acquired plurality of sequentially input numbers;
And the dictionary code acquisition unit is used for sequentially acquiring the dictionary codes.
further, the dictionary code obtaining module further includes:
A judging unit for judging whether dictionary codes determined according to a plurality of sequentially input numbers exceed a preset coding range;
and the prompting unit is used for sending an error prompt and modifying the dictionary code to prompt the user that the currently input dictionary code is wrong when the judging unit judges that the dictionary code exceeds the preset coding range.
Further, the dictionary code determination unit is configured to:
when a deleting instruction for the currently input number is acquired, deleting the currently input number;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
still further, the dictionary code determination unit is further configured to:
when a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
When the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
And when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
still further, the apparatus further comprises:
The display module is used for displaying a plurality of dictionary codes input by a user in sequence and determining corresponding mnemonics according to the dictionary codes so that the user can determine whether the input dictionary codes and the determined mnemonics are correct or not according to displayed information.
Still further, the apparatus further comprises:
the dictionary code display module is used for displaying each number corresponding to the dictionary code of the target mnemonic word when a first modification instruction of a user for the target mnemonic word is acquired;
The digital replacement module is used for replacing the target digit according to the obtained digit input by the user when a second modification instruction for the target digit is obtained;
The memory aid word modification module is used for determining a modified dictionary code according to the obtained numbers when confirming instructions of the numbers are obtained, and obtaining corresponding modified memory aid words according to the modified dictionary code;
the target mnemonic word is a mnemonic word of the target modification position, and the target number is a number of the target modification position.
still further, the apparatus further comprises:
the language code acquisition module is used for acquiring the language code input by the user;
the memory-aid word language type determining module is used for determining the memory-aid word language type according to the language code;
And the memory-aid word determining module is used for determining the memory-aid words corresponding to the dictionary codes according to the language types of the memory-aid words.
An embodiment of the present invention further provides a hardware wallet, including:
The input device is used for providing user number and function key input;
display means for providing a user information display; and
The hardware wallet recovery device is described above.
According to the hardware wallet recovery method provided by the invention, all the mnemonics are respectively corresponding to the dictionary codes, when the hardware wallet is recovered, the entry of the mnemonics can be realized by inputting the dictionary codes corresponding to the mnemonics by a user, so that the user only needs to input the dictionary codes corresponding to the mnemonics on the existing input method keyboard, the recovery of the hardware wallet is realized according to a plurality of acquired dictionary codes input by the user without inputting the mnemonics, the problem that the existing keyboard cannot input the mnemonics of a required language is avoided, and the problem that the existing mnemonics are inconvenient to input is solved.
drawings
fig. 1 is a flowchart of a hardware wallet recovery method according to an embodiment of the present invention;
fig. 2 is a flow chart of a hardware wallet recovery method according to a preferred embodiment of the present invention;
fig. 3 is a block diagram of a hardware wallet recovery apparatus according to an embodiment of the present invention;
Fig. 4 is a block diagram of a hardware wallet restoring apparatus provided in a preferred embodiment of the present invention;
fig. 5 is a block diagram of a hardware wallet provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
the present application relates to a Block Chain technology, and for ease of understanding, a Block Chain (Block Chain) in the embodiment of the present invention will be briefly described below, and is a data structure of distributed storage disclosed for all Block Chain nodes of an access server, and includes several blocks (blocks). The user terminal containing the client can be registered as a block chain node, and forms a Peer-to-Peer network (Peer-to-Peer, P2P) with other block chain nodes accessed into the block chain server, block chain data can be stored in the P2P network, and any one or more block chain nodes of the P2P network are broken down, which can not cause the loss of the block chain data, so that the block chain data has strong security, and the permanent storage and the non-falsification of the data are ensured. In the block chain world, the account can be unlocked as long as the private key is reserved, but generally the private key is composed of a very long character string of 64 bits, if the user wants to create 100 accounts, 100 private keys are recorded, the recording and storage cost is very high, moreover, in the process of recording a large number of private keys, the problem that the address and the private key cannot be matched can also occur, or the problem that letters are wrongly written carelessly and carelessly during recording can also occur, and the probability of errors is very high, and in conclusion, due to the characteristic of 'only confirming the private key without a person' of digital currency, the assets cannot be found back due to small errors.
to solve the above problem, a Bip39 protocol (bitchoice protocol) has been proposed, which determines a user account by 12 mnemonics, and since the 12 mnemonics generate a large seed, a number is selected from the power of 256 of 2, and since the randomly generated number is large, there is no fear that the generated 12 mnemonics will be repeated. The process of generating the mnemonic words mainly comprises the following steps: first, a 128-bit random number is generated, and then a 4-bit check number for checking the random number is added to obtain a 132-bit number, then a segmentation is performed every 11 bits, so that 12 binary numbers are provided, and then each number is used to look up a word list defined by BIP39, so that 12 mnemonics are obtained. It is understood that in other embodiments of the present invention, when the number of the random numbers is different, the number of the mnemonic words may also be 15, 18, 21, or 24, which is set according to the actual use requirement, and is not limited herein.
The hardware wallet recovery method provided by the invention comprises the following steps: acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary; acquiring a plurality of corresponding mnemonics according to the dictionary codes; and restoring the hardware wallet according to the corresponding plurality of mnemonics. The method of the invention can realize the input of the mnemonic words by respectively corresponding all the mnemonic words with the dictionary codes and inputting the dictionary codes corresponding to the mnemonic words by the user when restoring the hardware wallet, so that the user only needs to input the dictionary codes corresponding to the mnemonic words on the existing input method keyboard, the hardware wallet can be restored according to a plurality of dictionary codes input by the user without inputting the mnemonic words, the problem that the existing keyboard can not input the mnemonic words of the required language is avoided, and the problem that the existing mnemonic words are inconvenient to input is solved.
In order to illustrate the technical solution of the present invention, the following is illustrated by specific examples:
example one
Fig. 1 is a flowchart illustrating a hardware wallet recovering method according to an embodiment of the present invention.
The hardware wallet recovery method provided by the embodiment of the invention comprises the following steps:
step S101, acquiring a plurality of dictionary codes sequentially input by a user;
The method is mainly applied to hardware wallets which are used for managing keys, addresses, tracking balance, creating transactions and the like. Wherein the hardware wallet may proceed to create a wallet private key and the new hardware wallet recovers the private key of the lost hardware wallet.
the main process of creating and generating the private key in the hardware wallet is as follows:
one, randomly generating a random number (entropy) of 128 to 258 bits;
Secondly, generating mnemonic words by the entropy through a certain processing method;
Thirdly, the mnemonic words pass through a key extension function PBKDF2 to generate seeds;
Fourthly, generating a mother key by the seed through an HMAC-SHA512 algorithm;
And fifthly, generating a plurality of sub keys by the parent key through a CKD (child key derivation) function.
in an embodiment of the present invention, a 128-bit random number is specifically generated, and at this time, a 4-bit check number for checking the random number is added to the 128-bit random number to obtain a 132-bit number, which is divided into 11 bits each to obtain 12 mnemonics, where it is to be noted that, in other embodiments of the present invention, the number of the mnemonics may also be any one of 15/18/21/24 by setting the number of the random numbers differently, and the number of the mnemonics may be set according to actual use requirements, which is not limited herein, and does not constitute a limitation to the present invention.
In this embodiment, 2048 mnemonics without grammar structure in a certain sequence are in one-to-one correspondence with dictionary codes through a preset rule, and a mnemonic dictionary in which the dictionary codes correspond to the mnemonics is determined.
when the hardware wallet is created, the hardware wallet randomly generates 12 mnemonics, generates a seed according to the 12 mnemonics, and further generates a sub private key subsequently. At this time, when the user recovers the hardware wallet, the user can recover the hardware wallet by inputting 12 mnemonics randomly generated at the time of creation in the hardware wallet.
Further, when the hardware wallet performs a recovery operation, the hardware wallet acquires a dictionary code input by a user through an input method keyboard, wherein the dictionary code is a unique code of a mnemonic word in the dictionary, and the dictionary code is mainly the number of the hardware wallet, for example, when the user inputs '1234' through the input method keyboard, the hardware wallet determines that the acquired dictionary code is '1234'.
Step S102, a plurality of corresponding mnemonic words are obtained according to the dictionary codes;
It should be noted that the mnemonics may be represented by a plurality of different languages, each language includes 2048 mnemonics corresponding to the language, and the existing languages include, but are not limited to, "simplified chinese," traditional chinese, "" english, "" french, "" japanese, "" korean, "" spanish, "and" italian.
the mnemonic word dictionary records the corresponding relation between each mnemonic word and the dictionary code thereof, and in the corresponding mnemonic words determined by the simplified Chinese through the preset rules, if the corresponding mnemonic word is 'one' when the dictionary serial number is '1', the corresponding mnemonic word is 'one' when the dictionary serial number is '2', and the corresponding mnemonic word is 'intermittent' when the dictionary serial number is '2048'. In each corresponding mnemonic word determined by the english through the preset rule, for example, the corresponding mnemonic word is "abandon" when the dictionary serial number is "1", the corresponding mnemonic word is "ability" when the dictionary serial number is "2", and the corresponding mnemonic word is "zoo" when the dictionary serial number is "2048".
at the moment, because the corresponding relation between each dictionary code and the mnemonic word is correspondingly formed through the preset rule, the mnemonic word required to be input by the user can be determined through dictionary inquiry of the mnemonic word according to the acquired dictionary code input by the user. Furthermore, when the user inputs the mnemonic words, the user needs to know the dictionary codes corresponding to the mnemonic words to be input in the mnemonic word dictionary in advance, and at the moment, the user can obtain and determine the corresponding mnemonic words by inputting the dictionary codes.
Step S103, restoring the hardware wallet according to the corresponding plurality of mnemonics;
in an embodiment of the present invention, the number of the mnemonics required to be generated is 12, so that the user sequentially inputs 12 dictionary codes, the hardware wallet acquires each mnemonic corresponding to each dictionary code according to each input dictionary code, and after acquiring the required number of mnemonics input by the user, the hardware wallet restores the hardware wallet according to each mnemonic, specifically, the hardware wallet generates seeds according to the acquired plurality of mnemonics and generates a sub-private key according to the seeds, so as to realize the restoration of the hardware wallet.
According to the hardware wallet recovery method provided by the embodiment of the invention, all the mnemonics are respectively corresponding to the dictionary codes, and when the hardware wallet is recovered, the entry of the mnemonics can be realized by inputting the dictionary codes corresponding to the mnemonics by a user, so that the user only needs to input the dictionary codes corresponding to the mnemonics on the existing input method keyboard, the recovery of the hardware wallet is realized according to a plurality of acquired dictionary codes input by the user without inputting the mnemonics, the problem that the existing keyboard cannot input the mnemonics of a required language is avoided, and the problem that the existing mnemonics are inconvenient to input is solved.
example two
Fig. 2 is a flowchart of a hardware wallet recovering method according to a preferred embodiment of the present invention.
the hardware wallet recovery method provided by the embodiment of the invention comprises the following steps:
step S201, sequentially acquiring numbers input by a user;
the hardware wallet inputs the mnemonic words through the input method keyboard, and at the moment, the hardware wallet can acquire keyboard numbers input by a user, for example, the user needs to input Chinese mnemonic word 'yarn', but the user cannot input the mnemonic words due to the limitation of the input method keyboard, at the moment, the user can search dictionary codes corresponding to the mnemonic words, the dictionary codes are determined to be '1234', at the moment, the user can sequentially press numbers '1', '2', '3' and '4' on the keyboard, and at the moment, the hardware wallet can acquire the numbers input by the user sequentially.
wherein, it should be noted that, before sequentially acquiring the numbers input by the user, it further includes:
acquiring a language code input by a user;
Determining the type of the mnemonic word language according to the language code;
and determining the mnemonic words corresponding to the dictionary codes according to the language type of the mnemonic words.
The user can select the type of the mnemonic word language generated by the required input, and corresponding mnemonic words and corresponding dictionary codes are obtained according to the type of the mnemonic word language selected by the user. For example, in this embodiment, the language includes "simplified chinese", "traditional chinese", "english", "french", "japanese", "korean", "spanish", and "italian", and each language also corresponds to a language code, for example, the language code corresponding to "simplified chinese" is "1", and the language code corresponding to "italian" is "8", at this time, the hardware wallet needs to confirm the language that the user needs to input before the user inputs the dictionary code corresponding to the mnemonic word, when the user inputs the language code "1" according to the prompt of the hardware wallet, the hardware wallet prompts the user whether to input the mnemonic word in "simplified chinese" corresponding to the language code "1", when the user presses the confirmation key, the dictionary code corresponding to the mnemonic word type that the user inputs is determined at this time, and acquiring the mnemonic words corresponding to each dictionary code in the mnemonic word language type.
Step S202, determining the dictionary code according to the acquired plurality of numbers which are input in sequence;
In the embodiment of the present invention, the number of the digits required for inputting the dictionary code is specifically 4-digit number, and the dictionary code required for inputting the dictionary code by the user can be determined according to the four digits input by the user, for example, when four digits "1", "2", "3" and "4" are sequentially input by the user, the dictionary code required for inputting by the user can be determined as "1234".
It should be noted that, in other embodiments of the present invention, a user may further input numbers less than 4 digits and determine the dictionary code corresponding to each number through a confirmation instruction, for example, when the dictionary code that the user needs to input is "0123", the user may input "0", "1", "2", "3", and confirm through the confirmation key, at this time, the hardware wallet determines that the dictionary code is "0123" according to the number of the first preset digit input by the user, the user may further input "1", "2", "3", and confirm through the confirmation key, at this time, the hardware wallet determines that the dictionary code is "0123" according to the number less than 4 digits input by the user.
the step of determining the dictionary code according to the obtained plurality of sequentially input numbers has a plurality of implementation manners, and in this embodiment, the following two implementation manners are provided:
the first method is as follows: when a deleting instruction for the currently input number is acquired, deleting the currently input number;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
the second method comprises the following steps: when a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
When the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
in the first mode, when a user has an error in currently input digits, the user can press a clear key on a keyboard, at this time, when the hardware wallet acquires a deletion instruction of the digits, the hardware wallet deletes the currently input digits and continues to acquire the digits input by the user until the user sequentially inputs the digits with 4 digits, at this time, each digit is displayed on the hardware wallet, when the user confirms that each digit has no problem, the user can press a confirmation key on the hardware wallet, and at this time, the hardware wallet determines a dictionary code according to the acquired confirmation instruction.
in the second mode, when the user inputs a plurality of numbers and has numbers input by mistake, the user can move to the current wrong input position by the moving key, when the user moves to delete the numbers of the target digit on the target digit, the numbers of the target digit can be deleted at this time, for example, when the user inputs "1", "3" and "4" in sequence, the user can move to the "1" of the second digit and delete the numbers by the deleting key when finding that the input numbers of the second digit are input by mistake, wherein it needs to be pointed out that the user can input the needed input numbers again after deleting the numbers of the target digit, in the embodiment, the input numbers can be added to the position of the target digit, for example, after the user inputs the needed "2", the "2" is added to the second digit so as to determine that the input dictionary code is "1234", or the number it enters may also be added to the end positions entered in turn. The specific positions of the added numbers can be set according to the actual use requirements, and are not limited herein, and the added numbers do not limit the invention.
Furthermore, after the user inputs a plurality of numbers and determines the dictionary code according to the input numbers, the hardware wallet judges whether the dictionary code determined according to the numbers input in sequence exceeds a preset code range;
if the dictionary code determined according to the plurality of sequentially input digits exceeds the preset coding range, sending an error prompt, and modifying the dictionary code to prompt a user that the currently input dictionary code is incorrect; otherwise, determining the dictionary code according to the acquired multiple numbers input in sequence.
for example, the preset rule determines that 2048 Chinese mnemonics correspond to each dictionary code and the corresponding code is 0001-2048, and at this time, it needs to determine whether the dictionary code input by the user exceeds the range of 0001-2048, for example, when the user inputs "3456", the hardware wallet cannot determine the corresponding mnemonics according to the input dictionary code, and at this time, when it is determined that the dictionary code input by the user exceeds the preset code range, an error prompt is issued to prompt the user to input the correct dictionary code and modify the currently input dictionary code. Specifically, the dictionary code may be modified in a manner that each number exceeding the preset code range is deleted, so that the user re-inputs four digits to determine a new modified dictionary code; or each digit can be displayed to ensure that a user determines the digit required to be modified, and after the corresponding digit is modified correspondingly, when the dictionary code is determined not to exceed the preset coding range according to the four modified digits, a new dictionary code is determined according to the current modification. It should be noted that when the dictionary code determined according to the numbers input by the user exceeds the preset coding range, the dictionary code will send an error prompt and no longer receive new numbers input by the user, and at this time, when the dictionary code exceeding the preset coding range is modified by the user and does not exceed the preset coding range, the dictionary code newly input by the user can be continuously received and obtained, and the corresponding dictionary code is sequentially determined according to a plurality of subsequently input numbers.
step S203, acquiring each dictionary code in sequence;
in this embodiment, the required number of mnemonics is 12, so that the user needs to input 12 dictionary codes in sequence, and it can be understood that in other embodiments of the present invention, other mnemonics meeting the number of rules can be input, which is not limited herein, and at this time, the hardware wallet sequentially obtains each dictionary code input by the user.
step S204, a plurality of corresponding mnemonic words are obtained according to the dictionary codes;
the hardware wallet searches the mnemonic word corresponding to the dictionary code according to the dictionary code input by the user, for example, when the dictionary code input by the user is 1234, the hardware wallet searches the corresponding mnemonic word as yarn through the mnemonic dictionary, and at the moment, the hardware wallet obtains the corresponding mnemonic word as yarn according to the dictionary code input by the user.
When the dictionary code input by the user exceeds the range of the dictionary code set by the preset rule, an error prompt is sent to the user, so that the user can re-input the dictionary code corresponding to the mnemonic word according to the error prompt.
step S205, displaying a plurality of dictionary codes sequentially input by a user and corresponding mnemonics determined according to the dictionary codes;
It should be noted that, a display device may be further disposed on the hardware wallet for displaying information input by the user. At the moment, when a user inputs dictionary codes through an input method keyboard, a display device of the hardware wallet can display the numbers input by the user in real time, the dictionary codes determined according to a plurality of numbers input by the user and the corresponding mnemonics determined according to the dictionary codes, so that the user can determine whether the input dictionary codes and the determined mnemonics are correct or not according to displayed information.
when the user determines that the input mnemonic word is wrong, the method further includes a step of modifying the mnemonic word, wherein the method for modifying the mnemonic word includes multiple methods, and in the embodiment, the following three embodiments are specifically provided:
The first method is as follows: when a deleting instruction of the currently input mnemonic word is acquired, the currently input mnemonic word is deleted, and the dictionary code input by the user is acquired again to determine the currently input mnemonic word.
the second method comprises the following steps: when a deleting instruction of the mnemonic words of the target digit is obtained, deleting the mnemonic words input by the target digit;
and when the mnemonic words determined by the dictionary code input by the user are acquired, adding the input mnemonic words to the positions of the target digits or the sequentially input tail end positions.
the third method comprises the following steps: when a first modification instruction of a target mnemonic word is acquired, displaying each number corresponding to a dictionary code of the target mnemonic word;
When a second modification instruction for the target number is acquired, replacing the target number according to the acquired number input by the user;
when a confirmation instruction for a plurality of numbers is acquired, determining a modified dictionary code according to the acquired numbers, and acquiring a corresponding modified mnemonic word according to the modified dictionary code;
the target mnemonic words are mnemonic words located in the target digit, and the target digits are digits of the target modification position.
in the second mode, after the user deletes the mnemonic word with the target digit, the position where the mnemonic word input again is added can be set according to the actual use requirement, and the position is not limited herein, and does not form the limitation of the invention.
in the third mode, when the user determines that the generated mnemonic word is wrong, the user can modify the mnemonic word through the first modification instruction, and when the hardware wallet acquires the first modification instruction input by the user, the hardware wallet backs to the dictionary code corresponding to the mnemonic word and displays each number;
Further, when the user determines that the target number in the dictionary code needs to be modified, the user may move the target number to the target number at the position where the modification is needed by moving the key, and issue a second modification instruction, such as deleting the key, deleting the target number, and re-acquiring the number input by the user to replace the target number, where it is noted that in other embodiments of the present invention, when the number of the target number to be modified is too large, for example, when all the four-digit numbers input by the user need to be modified, the user may delete each number and re-input the dictionary code of the required mnemonic word;
Furthermore, when the user determines that the input numbers are correct after replacing the target numbers with the input numbers, the user can press the confirmation key again, and when the hardware wallet acquires the confirmation instruction, the hardware wallet determines the modified dictionary codes according to the acquired numbers and generates corresponding modified mnemonics according to the modified dictionary codes.
it should be noted that, when the user determines that the input mnemonic word is incorrect, the step of modifying the mnemonic word may also occur in any step between steps S202 to S204, and the specific implementation is not limited by the embodiment.
step S206, restoring the hardware wallet according to the corresponding plurality of mnemonics;
When the hardware wallet acquires a determination instruction for the plurality of mnemonics, seeds are sequentially generated according to the acquired plurality of mnemonics, a sub private key is generated according to the seeds, and the hardware wallet is recovered according to the generated sub private key.
According to the hardware wallet recovery method provided by the embodiment of the invention, the corresponding mnemonic words are obtained by obtaining the dictionary codes input by the user, so that the entry of the mnemonic words is realized, and when all the mnemonic words are entered, the hardware wallet recovery is carried out through the entered multiple mnemonic words, so that the problem that the mnemonic words of a required language cannot be input through an input method keyboard in the prior art is avoided, and the problem that the input of the existing mnemonic words is inconvenient is solved. Furthermore, the type of the language to be input can be confirmed before the mnemonic words are input, an error prompt is given when the dictionary codes input exceed a preset range, and the dictionary codes or the mnemonic words are modified when being input in error.
EXAMPLE III
an embodiment of the present invention further provides a hardware wallet recovery apparatus, as shown in fig. 3, which is a structural diagram of the hardware wallet recovery apparatus provided in the embodiment of the present invention, the hardware wallet recovery apparatus 30 includes:
The dictionary code acquisition module 31 is configured to acquire a plurality of dictionary codes sequentially input by a user, where the dictionary codes are unique codes of mnemonics in a dictionary;
a mnemonic word obtaining module 32, configured to obtain a plurality of corresponding mnemonic words according to the plurality of dictionary codes;
And a hardware wallet restoring module 33, configured to restore a hardware wallet according to the corresponding multiple mnemonics.
example four
fig. 4 is a block diagram of a hardware wallet restoring apparatus according to a preferred embodiment of the present invention. The implementation principle and the generated technical effects are the same as those of the third embodiment, and for the sake of brief description, no mention is made to the third embodiment of the present invention, and the corresponding contents in the third embodiment can be referred to.
the difference is that in a preferred embodiment of the present invention, the hardware wallet recovering device 30 further includes:
the display module 34 is configured to display a plurality of dictionary codes sequentially input by a user and corresponding mnemonics determined according to the dictionary codes, so that the user determines whether the input dictionary codes and the determined mnemonics are correct according to displayed information;
the dictionary code display module 35 is configured to display each number corresponding to a dictionary code of a target mnemonic word when a first modification instruction of a target mnemonic word by a user is obtained, where the target mnemonic word is a mnemonic word at a target modification position;
the digit replacing module 36 is configured to, when a second modification instruction for a target digit is obtained, replace the target digit according to the obtained digit input by the user, where the target digit is a digit of a target modification position;
A mnemonic word modification module 37, configured to, when a confirmation instruction for a plurality of digits is obtained, determine a modified dictionary code according to the obtained plurality of digits, and obtain a corresponding modified mnemonic word according to the modified dictionary code;
a language code acquiring module 38, configured to acquire a language code input by a user;
a mnemonic word language type determining module 39, configured to determine a mnemonic word language type according to the language code;
And a mnemonic word determining module 310, configured to determine a mnemonic word corresponding to each dictionary code according to the language type of the mnemonic word.
Further, the dictionary code acquiring module 31 includes:
A number acquisition unit 311 for sequentially acquiring numbers input by a user;
a dictionary code determining unit 312, configured to determine the dictionary code according to the obtained multiple numbers that are sequentially input;
a dictionary code obtaining unit 313, configured to obtain each dictionary code in sequence.
Further, the dictionary code obtaining module 31 further includes:
A judging unit 314 for judging whether dictionary coding determined according to a plurality of numbers sequentially input exceeds a preset coding range;
The prompting unit 315 is configured to issue an error prompt and modify the dictionary code to prompt a user that the currently input dictionary code is incorrect when the determining unit 314 determines that the dictionary code exceeds the preset coding range.
Further, the dictionary code determining unit 312 is configured to:
When a deleting instruction for the currently input number is acquired, deleting the currently input number;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
Further, the dictionary code determining unit 312 is further configured to:
When a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
when the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
the hardware wallet recovery apparatus provided in the embodiment of the present invention has the same implementation principle and technical effect as those of the foregoing method embodiment, and for brief description, no mention is made in the embodiment of the apparatus, and reference may be made to the corresponding contents in the foregoing method embodiment.
EXAMPLE five
an embodiment of the present invention further provides a hardware wallet, as shown in fig. 5, which is a structural diagram of the hardware wallet provided in the embodiment of the present invention, and the hardware wallet 50 includes:
an input device 51 for providing user number and function key input;
Display means 52 for providing a user information display; and
the hardware wallet recovery device 30 described above.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (17)

1. a hardware wallet recovery method, the method comprising:
acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary;
acquiring a plurality of corresponding mnemonics according to the dictionary codes;
and restoring the hardware wallet according to the corresponding plurality of mnemonics.
2. the hardware wallet recovery method of claim 1, wherein the step of obtaining a plurality of dictionary codes sequentially input by a user comprises:
sequentially acquiring numbers input by a user;
determining the dictionary code according to the acquired plurality of sequentially input numbers;
And sequentially acquiring each dictionary code.
3. the hardware wallet recovery method of claim 2, wherein the step of determining the dictionary code from the captured sequentially entered plurality of digits is followed by the step of:
Judging whether dictionary codes determined according to a plurality of sequentially input numbers exceed a preset coding range;
If yes, sending an error prompt, and modifying the dictionary code to prompt that the dictionary code input by the user at present is wrong.
4. The hardware wallet recovery method of claim 2, wherein the step of determining the dictionary code from the captured sequentially entered plurality of digits comprises:
when a deleting instruction for the currently input number is acquired, deleting the currently input number;
And when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
5. The hardware wallet recovery method of claim 2, wherein the step of determining the dictionary code from the captured sequentially entered plurality of digits further comprises:
When a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
when the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
And when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
6. The hardware wallet restoration method of claim 2, wherein the step of restoring the hardware wallet according to the corresponding plurality of mnemonics is preceded by:
Displaying a plurality of dictionary codes input by a user in sequence, and determining corresponding mnemonics according to the dictionary codes so that the user can determine whether the input dictionary codes and the determined mnemonics are correct according to displayed information.
7. The hardware wallet restoration method of claim 6, wherein the step of restoring the hardware wallet according to the corresponding plurality of mnemonics is preceded by:
when a first modification instruction of a user for a target mnemonic word is acquired, displaying each number corresponding to a dictionary code of the target mnemonic word;
when a second modification instruction for the target number is acquired, replacing the target number according to the acquired number input by the user;
when a confirmation instruction for a plurality of numbers is acquired, determining a modified dictionary code according to the acquired numbers, and acquiring a corresponding modified mnemonic word according to the modified dictionary code;
the target mnemonic word is a mnemonic word of the target modification position, and the target number is a number of the target modification position.
8. The hardware wallet recovery method of claim 1, wherein the step of obtaining the plurality of dictionary codes sequentially input by the user is preceded by:
acquiring a language code input by a user;
determining the type of the mnemonic word language according to the language code;
and determining the mnemonic words corresponding to the dictionary codes according to the language type of the mnemonic words.
9. A hardware wallet recovery device, the device comprising:
the dictionary code acquisition module is used for acquiring a plurality of dictionary codes sequentially input by a user, wherein the dictionary codes are unique codes of mnemonics in a dictionary;
the memory-aid word acquisition module is used for acquiring a plurality of corresponding memory-aid words according to the dictionary codes;
And the hardware wallet recovery module is used for recovering the hardware wallet according to the corresponding plurality of mnemonics.
10. The hardware wallet recovery apparatus of claim 9, wherein the dictionary code acquisition module comprises:
The digital acquisition unit is used for sequentially acquiring the numbers input by the user;
The dictionary code determining unit is used for determining the dictionary code according to the acquired plurality of sequentially input numbers;
and the dictionary code acquisition unit is used for sequentially acquiring the dictionary codes.
11. the hardware wallet recovery device of claim 10, wherein the dictionary code acquisition module further comprises:
a judging unit for judging whether dictionary codes determined according to a plurality of sequentially input numbers exceed a preset coding range;
and the prompting unit is used for sending an error prompt and modifying the dictionary code to prompt the user that the currently input dictionary code is wrong when the judging unit judges that the dictionary code exceeds the preset coding range.
12. the hardware wallet recovery apparatus of claim 10, wherein the dictionary code determination unit is to:
when a deleting instruction for the currently input number is acquired, deleting the currently input number;
And when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
13. the hardware wallet recovery device of claim 10, wherein the dictionary code determination unit is further to:
when a deleting instruction for the number of the target digit is acquired, deleting the number input by the target digit;
When the number input by the user is obtained again, adding the input number to the position of the target digit or the tail end position of the target digit;
and when a confirmation instruction for a plurality of numbers input in sequence is acquired, determining the dictionary code according to the acquired plurality of numbers.
14. The hardware wallet recovery device of claim 10, wherein the device further comprises:
the display module is used for displaying a plurality of dictionary codes input by a user in sequence and determining corresponding mnemonics according to the dictionary codes so that the user can determine whether the input dictionary codes and the determined mnemonics are correct or not according to displayed information.
15. the hardware wallet recovery device of claim 14, wherein the device further comprises:
the dictionary code display module is used for displaying each number corresponding to the dictionary code of the target mnemonic word when a first modification instruction of a user for the target mnemonic word is acquired;
the digital replacement module is used for replacing the target digit according to the obtained digit input by the user when a second modification instruction for the target digit is obtained;
The memory aid word modification module is used for determining a modified dictionary code according to the obtained numbers when confirming instructions of the numbers are obtained, and obtaining corresponding modified memory aid words according to the modified dictionary code;
the target mnemonic word is a mnemonic word of the target modification position, and the target number is a number of the target modification position.
16. the hardware wallet recovery device of claim 9, wherein the device further comprises:
the language code acquisition module is used for acquiring the language code input by the user;
the memory-aid word language type determining module is used for determining the memory-aid word language type according to the language code;
and the memory-aid word determining module is used for determining the memory-aid words corresponding to the dictionary codes according to the language types of the memory-aid words.
17. a hardware wallet, comprising:
The input device is used for providing user number and function key input;
display means for providing a user information display; and
the hardware wallet recovery device of any one of claims 9-16.
CN201910813419.1A 2019-08-30 2019-08-30 hardware wallet recovery method and device and hardware wallet Pending CN110570194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910813419.1A CN110570194A (en) 2019-08-30 2019-08-30 hardware wallet recovery method and device and hardware wallet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910813419.1A CN110570194A (en) 2019-08-30 2019-08-30 hardware wallet recovery method and device and hardware wallet

Publications (1)

Publication Number Publication Date
CN110570194A true CN110570194A (en) 2019-12-13

Family

ID=68776875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910813419.1A Pending CN110570194A (en) 2019-08-30 2019-08-30 hardware wallet recovery method and device and hardware wallet

Country Status (1)

Country Link
CN (1) CN110570194A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651964A (en) * 2020-06-03 2020-09-11 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generating and converting method and device and electronic equipment
TWI741900B (en) * 2020-12-03 2021-10-01 安瀚科技股份有限公司 Cryptocurrency management system for business use

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008864A (en) * 2006-01-28 2007-08-01 北京优耐数码科技有限公司 Multifunctional and multilingual input system for numeric keyboard and method thereof
CN101882004A (en) * 2009-05-06 2010-11-10 蔡志仁 Character input method and input system
CN104049770A (en) * 2014-07-03 2014-09-17 任文 Chinese character candidate selecting, locating and correcting scheme based on Chinese sentence input
CN109214167A (en) * 2018-08-01 2019-01-15 深圳市文鼎创数据科技有限公司 A kind of intelligent key safety equipment and its key recovery method, storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008864A (en) * 2006-01-28 2007-08-01 北京优耐数码科技有限公司 Multifunctional and multilingual input system for numeric keyboard and method thereof
CN101882004A (en) * 2009-05-06 2010-11-10 蔡志仁 Character input method and input system
CN104049770A (en) * 2014-07-03 2014-09-17 任文 Chinese character candidate selecting, locating and correcting scheme based on Chinese sentence input
CN109214167A (en) * 2018-08-01 2019-01-15 深圳市文鼎创数据科技有限公司 A kind of intelligent key safety equipment and its key recovery method, storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651964A (en) * 2020-06-03 2020-09-11 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generating and converting method and device and electronic equipment
CN111651964B (en) * 2020-06-03 2023-09-12 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generation and conversion method and device and electronic equipment
TWI741900B (en) * 2020-12-03 2021-10-01 安瀚科技股份有限公司 Cryptocurrency management system for business use

Similar Documents

Publication Publication Date Title
CN114868143A (en) Destination addressing for transactions associated with a distributed ledger
CN107181600B (en) Password login authentication method and system, user equipment and authentication server
CN108683667B (en) Account protection method, device, system and storage medium
EP2803031A1 (en) Machine-learning based classification of user accounts based on email addresses and other account information
CN110930145B (en) Cold wallet generation method, transaction information processing method, device and storage medium
CN110570194A (en) hardware wallet recovery method and device and hardware wallet
CN106973043B (en) Password verification system and password verification method
CN110445792B (en) Verification code generation method and verification code login system
JP6636265B2 (en) Computer application system and method for generating and restoring authentication code
CN108365949B (en) Client real-name system information management method, device and system
CN102891841A (en) Method, device and system for locking Internet bank account
KR102375973B1 (en) Security server using case based reasoning engine and storage medium for installing security function
CN106446660A (en) Method and system for providing verification code and terminal device
CN108063742B (en) Sensitive information providing and tracking method and device
CN115688199A (en) Key generation method and device for intelligent device, electronic device and medium
Chan et al. Evolution of Bitcoin addresses from security perspectives
CN110472405B (en) Input-free dynamic verification code implementation method
CN113409055A (en) Payment method, system, electronic device and storage medium
CN113674083A (en) Internet financial platform credit risk monitoring method, device and computer system
KR20170128994A (en) Apparatus and method for spam message filtering
CN105426736A (en) Password setting method and apparatus
CN111651964B (en) Symbol mnemonic word generation and conversion method and device and electronic equipment
CN110555027A (en) information security processing method and device, storage medium and computing equipment
CN204791026U (en) Thief -proof secure transmission system of getting of sensitive information
CN114785585B (en) Information verification method, device, equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213