CN111651964A - Symbol mnemonic word generating and converting method and device and electronic equipment - Google Patents

Symbol mnemonic word generating and converting method and device and electronic equipment Download PDF

Info

Publication number
CN111651964A
CN111651964A CN202010497480.2A CN202010497480A CN111651964A CN 111651964 A CN111651964 A CN 111651964A CN 202010497480 A CN202010497480 A CN 202010497480A CN 111651964 A CN111651964 A CN 111651964A
Authority
CN
China
Prior art keywords
mnemonic
symbol
mnemonic word
word
words
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.)
Granted
Application number
CN202010497480.2A
Other languages
Chinese (zh)
Other versions
CN111651964B (en
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.)
Jiangsu Hengbao Intelligent System Technology Co Ltd
Original Assignee
Jiangsu Hengbao Intelligent System Technology 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 Jiangsu Hengbao Intelligent System Technology Co Ltd filed Critical Jiangsu Hengbao Intelligent System Technology Co Ltd
Priority to CN202010497480.2A priority Critical patent/CN111651964B/en
Publication of CN111651964A publication Critical patent/CN111651964A/en
Application granted granted Critical
Publication of CN111651964B publication Critical patent/CN111651964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The application provides a symbol mnemonic word generating method, a symbol mnemonic word converting device and electronic equipment, wherein the symbol mnemonic word generating method comprises the following steps: when a wallet establishing instruction is received, acquiring a mnemonic word index sequence number; converting the index sequence number of the mnemonic word into a system number of a preset system; and distributing the binary number as a symbol mnemonic word to the user. Therefore, the user needs to memorize the number elements of the common system number, and then only needs to input the corresponding common number elements when using the mnemonic word, compared with the traditional mnemonic word, the user has higher familiarity with the number elements and is easier to memorize, and the user is less prone to mistake input.

Description

Symbol mnemonic word generating and converting method and device and electronic equipment
Technical Field
The application relates to the technical field of block chains, in particular to a symbol mnemonic word generating method, a symbol mnemonic word converting device and electronic equipment.
Background
Blockchain techniques are based on decentralization and achieve trust through different participant interactions; ownership of its account is determined by a digital key, bitcoin address and digital signature. The digital key is not actually stored in the network but is instead stored in a file called a wallet or simply a database after being generated by the user. The digital key stored in the user's wallet is completely independent of the bitcoin protocol and can be generated and managed by the user's wallet software without reference to the blockchain or access to the network. The key enables many interesting features of bitcoin, including decentralized trust and control ownership authentication and a cryptographically proof-based security model.
The block chain wallet generating method includes generating mnemonic words, generating a private key of a deterministic wallet according to the mnemonic words, generating a public key by the private key, and generating a wallet address by the public key. Once the mnemonic is determined, control is given over the generated wallet. When a wallet is created, mnemonics are required to be recorded; when the wallet needs to be recovered according to the mnemonic words, the mnemonic words need to be input through a keyboard.
The corresponding mnemonic words of the wallets with different security levels are different in number, and the number of the mnemonic words is as much as 24 in some wallets, so that the recording and inputting operation is quite inconvenient. Therefore, in the whole wallet creating or recovering process, the convenience of mnemonic word recording or mnemonic word input plays a very important role in the user experience.
At present, in the BIP (Bitcoin Improvement suggestions) 39 standard, conventional mnemonics are all implemented by 2048 english words, which is advantageous for being used on blockchain wallet devices or APPs (applications) of different manufacturers. However, the conventional mnemonics are realized by English words, users need to input letters of each mnemonic one by one, and many users are often unfamiliar with the words, so that the user input is easy to be mistaken.
Disclosure of Invention
An object of the embodiments of the present application is to provide a symbol mnemonic word generating method, a symbol mnemonic word converting device, and an electronic device, so as to solve the problem that the conventional mnemonic word input is complicated and the user input is easy to be mistaken.
The embodiment of the application provides a symbol mnemonic word generation method, which comprises the following steps: when a wallet establishing instruction is received, acquiring a mnemonic word index sequence number; converting the index sequence number of the mnemonic word into a system number of a preset system; and distributing the binary number as a symbol mnemonic word to the user.
In the implementation process, the index sequence number of the mnemonic word is converted into a binary number of a preset binary system, and the binary number is used as a symbol mnemonic word and is distributed to the user. Therefore, the user needs to memorize the number elements of the common system number, and then only needs to input the corresponding common number elements when using the mnemonic word, compared with the traditional mnemonic word, the user has higher familiarity with the number elements and is easier to memorize, and the user is less prone to mistake input.
Further, the number of characters in the symbol mnemonic word is n; the nth power of the number of elements in the preset system number is more than or equal to the maximum number of the mnemonic words represented by the mnemonic word index sequence number.
In the implementation process, the symbol mnemonic word always has n characters, so that the user only needs to memorize the symbol mnemonic word according to the n characters when memorizing, and the user can memorize the symbol mnemonic word conveniently. Meanwhile, when the user uses the symbol mnemonic words in the later period, the system can also realize the preliminary verification of the symbol mnemonic words input by the user based on the number of the characters of the symbol mnemonic words, and eliminate the condition of obvious input errors, thereby solving the problems of different numbers of the characters of the existing mnemonic words and difficult memory.
Further, the preset scale is a 13 scale.
In the BIP39 standard, conventional mnemonics are implemented using 2048 unified english words. And 3-bit 13-ary number can represent 2197 numbers between 0 and 2196, so that the index sequence numbers of 2048 mnemonics in BIP39 can be completely covered without leaving too many invalid values. Meanwhile, the 13-system number can represent the index sequence number of the corresponding mnemonic word only by 3 characters at most, and the memory of a user is facilitated.
The embodiment of the application also provides a mnemonic word conversion method, which comprises the following steps: receiving an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system; converting the symbol mnemonic words into mnemonic word index serial numbers; and looking up a table to obtain a corresponding mnemonic word according to the mnemonic word index serial number.
In the implementation process, the symbol mnemonic words can be converted back to the corresponding mnemonic word index serial numbers, and then the corresponding mnemonic word (namely the traditional mnemonic word) is obtained based on a table look-up method, so that the symbol mnemonic word is convenient for a user to use in other traditional equipment.
Further, when receiving an externally input symbol mnemonic word, the method further comprises: checking whether the input symbol mnemonic word is in a preset legal range; and when the symbol mnemonic word is not in a preset legal range, prompting that the symbol mnemonic word is illegal.
In the implementation process, the value range of the symbol mnemonic words is checked, so that the symbol mnemonic words which are obviously not obtained by converting the index sequence numbers of the mnemonic words can be quickly eliminated, the modification by a user is facilitated, and the input reliability of the symbol mnemonic words is improved.
Further, the number of characters in the corresponding mnemonic word is n; the nth power of the number of elements in the preset system number is more than or equal to the maximum number of the mnemonic words represented by the mnemonic word index sequence number.
In the implementation process, the symbol mnemonic word always has n characters, so that the user only needs to memorize the symbol mnemonic word according to the n characters when memorizing, and the user can memorize the symbol mnemonic word conveniently. Meanwhile, when the user uses the symbol mnemonic words in the later period, the system can also realize the preliminary verification of the symbol mnemonic words input by the user based on the number of the characters of the symbol mnemonic words, and eliminate the condition of obvious input errors, thereby solving the problems of different numbers of the characters of the existing mnemonic words and difficult memory.
Further, when receiving an externally input symbol mnemonic word, the method further comprises: checking whether the number of characters in the input symbol mnemonic words is n; and when the number of the characters in the symbol mnemonic word is not n, prompting that the symbol mnemonic word is illegal.
In the implementation process, because the number of the characters in the symbol mnemonic words is fixed, the initial verification of the symbol mnemonic words input by the user can be realized based on the number of the characters in the symbol mnemonic words, and the condition of obvious input errors is eliminated, so that the input experience of the user is improved.
Further, the preset scale is a 13 scale, and n is 3.
The embodiment of the application also provides a wallet recovery or backup method, which comprises the following steps: receiving an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system; converting the symbol mnemonic words into mnemonic word index serial numbers; looking up a table to obtain a corresponding mnemonic word according to the mnemonic word index serial number; and generating a wallet secret key according to the mnemonic word.
In the implementation process, the symbol mnemonics can be converted back to the corresponding mnemonic index serial numbers, corresponding mnemonic words (namely the traditional mnemonics) are obtained based on a table look-up method, and then the wallet secret key is generated according to the mnemonic words, so that the wallet can be restored or backed up based on the symbol mnemonics.
An embodiment of the present application further provides a symbol mnemonic word generating device, including: the system comprises an acquisition module, a first conversion module and a distribution module; the acquisition module is used for acquiring the index sequence number of the mnemonic word when a wallet creation instruction is received; the first conversion module is used for converting the mnemonic word index serial number into a preset system number; the allocation module is used for allocating the system number as a symbol mnemonic word to a user.
In the above implementation apparatus, the mnemonic word index number is converted into a predetermined scale, and the scale is assigned to the user as a symbolic mnemonic word. The user only needs to input the corresponding common number when using the mnemonic word, compared with the traditional mnemonic word, the user has higher familiarity with the number, is easier to memorize, and is less prone to error input when inputting.
An embodiment of the present application further provides a mnemonic word conversion apparatus, including: the device comprises a first receiving module, a second conversion module and a first searching module; the first receiving module is used for receiving an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system; the second conversion module is used for converting the symbol mnemonic words into mnemonic word index serial numbers; and the first searching module is used for searching a table according to the mnemonic word index sequence number to obtain a corresponding mnemonic word.
The realization device can convert the symbol mnemonic words back to the index serial numbers of the corresponding mnemonic words, and then obtain the corresponding mnemonic words based on a table look-up method, thereby being convenient for users to use in other traditional devices.
Further, the mnemonic word conversion apparatus further includes: a keyboard module having digit input keys including ten digit keys from 0 to 9 and three symbol digit keys for representing numerals 10, 11 and 12; the keyboard module is used for receiving the symbol mnemonic words input on the number element input keys.
Since the conventional mnemonic word is a word, the number element input keys required by the keyboard thereof should include at least 26 (corresponding to 26 letters respectively), and the size of each number element input key is small, which is inconvenient for the user to input. In the implementation process, only 13 number element input keys are needed by the keyboard module, and compared with a traditional keyboard needed by mnemonic words, the number element input keys are larger, so that a user can input the mnemonic words more conveniently, and the mnemonic word input convenience is higher.
An embodiment of the present application further provides a wallet restoring or backup device, including: the device comprises a second receiving module, a third conversion module, a second searching module and a processing module; the second receiving module is used for receiving the symbol mnemonic words input from the outside; the symbol mnemonic words are binary numbers of a preset binary system; the third conversion module is used for converting the symbol mnemonic words into mnemonic word index serial numbers; the second searching module is used for searching a table according to the mnemonic word index sequence number to obtain a corresponding mnemonic word; and the processing module is used for generating a wallet secret key according to the mnemonic word.
The device can convert the symbol mnemonic words back to the index sequence numbers of the corresponding mnemonic words, then obtain the corresponding mnemonic words based on a table look-up method, and further generate a wallet secret key according to the mnemonic words, thereby realizing the recovery or backup of the wallet based on the symbol mnemonic words.
An embodiment of the present application further provides an electronic device, including: the system comprises a processor, a memory and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement any of the above-described symbol mnemonic generation methods, or to implement any of the above-described mnemonic conversion methods, or to implement any of the above-described wallet recovery or backup methods.
Also provided in an embodiment of the present application is a readable storage medium storing one or more programs which are executable by one or more processors to implement any of the above-described symbol mnemonic generation methods, or implement the above-described mnemonic conversion method, or implement any of the above-described wallet restoration or backup methods.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart illustrating a method for generating a symbol mnemonic word according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a correspondence relationship between an 11-bit binary number and each mnemonic word according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a mnemonic word conversion method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for recovering or backing up a wallet according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a keyboard for 13-ary symbolic mnemonic entry according to an embodiment of the present application;
fig. 6 is a corresponding relationship between a symbol mnemonic word and a mnemonic word index sequence number provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of a symbol mnemonic word generation apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a mnemonic conversion apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a more specific mnemonic word conversion apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a wallet restoring or backup device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
referring to fig. 1, an embodiment of the present application provides a method for generating a symbol mnemonic word, including:
s101: and when a wallet creating instruction is received, acquiring a mnemonic word index sequence number.
It should be understood that, in the existing related protocol, the conventional mnemonic words are predefined, and each mnemonic word is assigned with a corresponding mnemonic index number. In general, during wallet generation, the device or system will derive the mnemonic index sequence number from the randomly generated entropy.
It should be understood that the mnemonic words are assigned to the user when the wallet is created, and the user can use the mnemonic words to perform wallet restoration or backup and other operations later, and the mnemonic words are not assigned to the user again.
S102: and converting the index sequence number of the mnemonic word into a preset system number.
S103: the system number is distributed to the user as a symbol mnemonic.
In the embodiment of the application, in order to facilitate the memory of the user, the number of characters in the system number corresponding to the maximum index number in the index numbers of the mnemonic words should not be too large, so as to prevent the user from difficultly memorizing.
For this reason, in the embodiment of the present application, a carry number of 5 or more and 5 or more may be selected for implementation. Taking the BIP39 standard as an example, as shown in fig. 2, 2048 english words in the BIP39 standard have mnemonic word index numbers ranging from 0 to 2047 (for convenience of description, the mnemonic word index numbers are described in 10-ary system, but in the actual application process, the corresponding relationship between 11-bit binary numbers and each mnemonic word is recorded in the device, and fig. 2 is a binary number), so that 2048 mnemonic word index numbers can be completely covered by 5-bit 5-ary numbers.
For example, in the embodiment of the present application, the preset-carry number may be set to be a 13-carry number. Because the 3-bit 13-system number can represent the 2197 number, the adoption of the 13-system number only needs 3 characters at most to completely cover 2048 mnemonic word index serial numbers, and because one symbol mnemonic word only needs 3 characters at most by a user, the mnemonic word is convenient for the user to memorize.
It should be noted that, in the embodiment of the present application, in order to facilitate the user to memorize and to perform input verification when the user uses the symbol mnemonic word later, the number of characters in the converted binary number (i.e., the symbol mnemonic word) may be set to be n.
It should be noted that the value of n should be greater than or equal to the number of characters required when the preset number of the system number represents the largest index number of the mnemonic word. That is, the nth power of the number of elements in the preset system is greater than or equal to the maximum number of the mnemonic words represented by the index sequence numbers of the mnemonic words. Taking 13-ary number as an example, if the BIP39 standard is adopted, since there are 13 digits in 13-ary, n should be greater than or equal to 3.
Generally, for the convenience of memory of the user, the value of n is equal to the number of characters required when the maximum index number of the mnemonic word is represented by the preset number. For example, when the preset number is a 5-ary number or a 6-ary number, the value of n may be 5; when the preset system number is a 7 system number to a 12 system number, the value of n can be 4; when the preset number is a 13-ary number to an 18-ary number, the value of n may be 3.
It should be noted that the number element is the most basic element constituting the binary number. For example, for binary numbers, 0 and 1 are binary digits. And 0 to 9 for decimal are the decimal number elements. And for the thirteen system, 0 to 9, a, b and c are the number elements of the thirteen system.
It should be noted that, for the number of the mnemonic index that can be expressed without n-bit binary numbers, the symbolic mnemonic can be made to have n characters by complementing 0. Exemplarily, taking a 13-ary number as an example, the 13-ary number has three elements, i.e., a, b, and c, in addition to 10 basic elements, i.e., 0 to 9, where a represents a number 10, b represents a number 11, and c represents a number 12; for the number 10 of the mnemonic word index, the corresponding 13-system number is a, and in order to make the symbol mnemonic word have 3 characters, 0 may be added before a to obtain a symbol mnemonic word 00 a.
It should be understood that, although the embodiment of the present application is described in terms of the BIP39 standard, in practical applications, the solutions provided in the embodiment of the present application may be used for other standards. For example, in the case of the menou coin, the number of mnemonics in the standard used is 1626, and the scheme proposed by the embodiment of the present application can also be used to provide the user with the generated symbolic mnemonics instead of the conventional mnemonic words.
It should be noted that, in the embodiment of the present application, in order to avoid a memory error of the user, when the system number is assigned to the user as a symbol mnemonic word, a confirmation key may be provided for the user to select and confirm whether the memory is completed.
In addition, in order to ensure that the memory of the user is correct, a symbol mnemonic word input interface can be provided after the confirmation information sent by the user is received, so that the user can input the symbol mnemonic word. In the embodiment of the application, the system compares the symbol mnemonic words input by the user with the symbol mnemonic words allocated to the user before, and the user is considered to have memorized the symbol mnemonic words after the comparison result is that the symbol mnemonic words are consistent with the symbol mnemonic words; otherwise, the symbolic mnemonic word can be provided for the user to memorize.
It should be understood that, in order to improve the generality of the symbol mnemonic word in the embodiment of the present application, an embodiment of the present application further provides a mnemonic word conversion method, which is shown in fig. 3 and includes:
s301: an externally input symbol mnemonic word is received.
In the embodiments of the present application, a dedicated device or software may be provided for the mnemonic conversion. The user may enter the assigned symbolic mnemonic using the scheme of the present application on a provided device or software.
S302: and converting the symbol mnemonic words into mnemonic word index serial numbers.
Since the symbolic mnemonics provided in the embodiment of the present application are obtained after the binary number conversion of the preset binary system, the symbolic mnemonics can be converted into the mnemonic index sequence number by the corresponding binary system conversion rule.
S303: and looking up a table to obtain a corresponding mnemonic word according to the mnemonic word index serial number.
According to the corresponding relation between the mnemonic words and the index sequence numbers of the mnemonic words recorded in the equipment or the system. And looking up a table through the index sequence number of the mnemonic word to obtain the corresponding mnemonic word.
In the embodiment of the present application, after obtaining the mnemonic word, the mnemonic word may be displayed to the user or directly imported into the corresponding wallet restoring or backup device, so that in a device that does not support inputting the symbolic mnemonic word provided in the embodiment of the present application, the wallet restoring or backup device may also be implemented based on the symbolic mnemonic word provided in the embodiment of the present application.
In an embodiment of the present application, there is further provided a method for recovering or backing up a wallet, as shown in fig. 4, including:
s401: an externally input symbol mnemonic word is received.
S402: converting the symbol mnemonic words into mnemonic word index serial numbers;
s403: looking up a table to obtain a corresponding mnemonic word according to the mnemonic word index serial number;
s404: and generating a wallet secret key according to the mnemonic word.
It should be understood that in the embodiment of the present application, the symbolic mnemonic word may be input through a keyboard having all the elements of the corresponding system number. Specifically, the apparatus or system may display a keyboard having digit input keys for a user to input a symbol mnemonic word through the digit input keys and receive the symbol mnemonic word input by the user through the digit input keys, before receiving an externally input symbol mnemonic word. The number input key is a key for inputting a certain character. For example, for a 10-system number, the keys corresponding to the numbers 0 to 9 are the number input keys. Meanwhile, the keyboard can be provided with some functional keys, such as a determination key, a cancel key and the like, besides the number element input key.
And in order to ensure the reliability and the effectiveness of input, the keyboard can be set to be matched with the corresponding carry number.
Illustratively, referring to fig. 5, taking 13-ary as an example, the number input keys of the keyboard are composed of ten number keys from 0 to 9 and three symbol number keys (three keys corresponding to characters a, b, c) for representing numbers 10, 11 and 12. In addition to the 13-digit input keys, the drawing may also have a confirm key "OK" and a Cancel key "Cancel".
It should be understood that, in addition to using the corresponding virtual keyboard, the embodiment of the present application may also be implemented by setting or connecting a corresponding physical keyboard on the device.
In the embodiment of the application, after the input symbol mnemonic word is received, whether the input symbol mnemonic word is in the preset legal range or not can be checked, and when the symbol mnemonic word is not in the preset legal range, the symbol mnemonic word is prompted to be illegal. For example, for the BIP39 standard, the preset legal range is 0 to 2047, and if the input symbolic mnemonic word is greater than 2047, it is obvious that the input symbolic mnemonic word is wrong, and the user may be prompted that the symbolic mnemonic word is illegal to re-input.
In addition, if the generated symbol mnemonic word is set to have n characters, in the embodiment of the application, whether the number of the characters in the input symbol mnemonic word is n or not can be checked, so that when the number of the characters in the symbol mnemonic word is not n, the symbol mnemonic word is prompted to be illegal. For example, for a 13-system number symbol mnemonic word, the set n is 3, and if the number of characters of the symbol mnemonic word input by the user is not n, it is obvious that the input symbol mnemonic word is wrong, and the user can be prompted that the symbol mnemonic word is illegal to input again.
In the method for generating the symbol mnemonic words provided in the embodiment of the application, the index serial numbers of the mnemonic words are converted into the binary numbers of the preset binary system, and the binary numbers are further used as the symbol mnemonic words to be distributed to users. Therefore, the user needs to memorize the number elements of the common system number, and then only needs to input the corresponding common number elements when using the mnemonic word, compared with the traditional mnemonic word, the user has higher familiarity with the number elements and is easier to memorize, and the user is less prone to mistake input.
Meanwhile, the mnemonic word conversion method provided by the embodiment of the application can convert the symbol mnemonic words back to the corresponding index serial numbers of the mnemonic words, and further obtain the corresponding mnemonic words based on a table look-up method, so that the method is convenient for users to use in other traditional equipment, and the scheme of the application has universality.
In addition, by the wallet recovery or backup method provided by the embodiment of the application, recovery or backup of the wallet based on the symbolic mnemonic words can be effectively realized. And because the user inputs simple symbol mnemonic words, compared with the driving mnemonic words, the input is simpler and more convenient.
Example two:
the present embodiment is based on the first embodiment, and the scheme of the present application is illustrated by a generation process of a specific 13-ary symbolic mnemonic word matching the BIP39 standard, and a recovery or wallet backup process of the 13-ary symbolic mnemonic word.
The generation process of the symbol mnemonic words comprises the following steps:
firstly, after the device receives a creation instruction of a user for a wallet, entropy is generated, the generated entropy is processed to obtain a binary sequence, each 11 bits of the binary sequence are used as a part, and each part corresponds to a mnemonic word (namely, each 11-bit binary sequence can be used as an mnemonic word index sequence number).
In the embodiment of the present application, each 11-bit binary sequence in the previous step may be converted into a mnemonic index number in 10, so as to perform conversion of a 13-system number.
Then, the index serial number of the mnemonic word in the 10-system scale is recorded as M, the index serial number of the mnemonic word is divided by 169 at first, the quotient is recorded as N, the remainder is O, and N is the highest bit of the symbol mnemonic word; then dividing O by 13 to be marked as P, and then P is the middle bit of the symbol mnemonic word; the remainder of dividing O by 13 is denoted as Q, which is the lowest bit of the signed mnemonic.
The correspondence between the 13-ary number symbol mnemonic word and the 10-ary mnemonic word index number can be seen in fig. 6.
And finally, displaying the obtained symbol mnemonic words to a user for recording.
The symbolic mnemonic displayed to the user is a 3-digit 13-system number. The user can basically judge whether the recorded symbol mnemonic words are correct or not according to the digits of the recorded symbol mnemonic words.
Wallet recovery or backup process:
a keyboard is provided as shown in fig. 5, in which a user can enter symbolic mnemonics.
When the user inputs a symbol mnemonic word, the user can click an OK key to indicate that the input of the symbol mnemonic word is finished. Meanwhile, if the symbol mnemonic word is input incorrectly, the user can click the "Cancel" key to input again.
And converting the symbolic mnemonic words into 10-system mnemonic word index serial numbers.
The process of converting to obtain the sequence number of the mnemonic index may be the reverse process of the foregoing process. The most significant bit N of the symbol mnemonic word may be multiplied by the square of the number of the system, the middle bit P of the symbol mnemonic word may be multiplied by the selected system, and the least significant bit Q of the symbol mnemonic word may be multiplied by the selected system, and added in sequence to obtain the mnemonic word index sequence M.
It should be noted that after the user inputs the symbol mnemonic word, the device may detect whether the symbol mnemonic word input by the user is converted into a decimal value greater than 2047, and if so, it is obvious that the user has input an error, and the user may be prompted to re-input.
In addition, after the user inputs the symbol mnemonic words, the device can detect the number of characters of the symbol mnemonic words input by the user, and if the number of the input characters is not 3, the user can be prompted to input errors and input again.
After the mnemonic word index sequence is obtained through conversion, the mnemonic word can be obtained through table lookup, and then the corresponding private key and the public key are generated according to the mnemonic word, so that the recovery or backup of the wallet is realized.
It should be noted that, in the conventional mnemonic words (i.e. mnemonic words), the keyboard provided by the system needs 26 number input keys, so each key is relatively small, and the user is inconvenient to input and is easy to input by mistake. Even if some systems are provided with an alphabet retrieval function, the rest of the alphabets can be automatically retrieved according to the alphabets input by a user, useless alphabet input is prevented, the alphabet input accuracy is improved, but the problems of consumption of computing resources and low keyboard response speed exist, and the sizes of keys are small. When the keyboard and the symbol mnemonic words provided by the embodiment of the application are adopted, under the same keyboard size, a single key is larger, and the user can input more easily. And meanwhile, retrieval and waiting are not needed. The advantages and disadvantages of using traditional mnemonics and using symbolic mnemonics are shown in the following table one:
watch 1
Figure BDA0002522179760000131
Figure BDA0002522179760000141
The symbol mnemonic words in the embodiment of the application are considered from the aspects of research personnel and users, simple numbers and symbols are used for replacing the word form of the traditional mnemonic words, and the efficiency of recording the mnemonic words and inputting the mnemonic words is greatly improved no matter the user records the mnemonic words when a wallet is created or inputs the mnemonic words when the wallet is recovered, so that the user experience is improved. The 13-system symbol mnemonic words are simple, understandable and easy to convert, can be converted with the traditional mnemonic words at will, and can be used with wallet equipment of other manufacturers. Compared with the number of characters of a single symbol mnemonic word and the traditional mnemonic word, the symbol mnemonic words are all 3 characters, are relatively simple and unified, and are convenient to record and input, while the traditional mnemonic words are different in number of letters, and cannot be identified once the records are wrong or tampered by others.
Example three:
based on the same inventive concept, the embodiment of the application also provides a symbol mnemonic word generating device, a mnemonic word converting device and a wallet restoring or backup device. Referring to fig. 7, 8 and 10, fig. 7 shows a symbol mnemonic generation apparatus 100 corresponding to the symbol mnemonic generation method according to the first embodiment, fig. 8 shows a mnemonic conversion apparatus 200 corresponding to the mnemonic conversion method according to the first embodiment, and fig. 10 shows a wallet restoring or backup apparatus 300 corresponding to the wallet restoring or backup method according to the first embodiment. It should be understood that the specific functions of the apparatuses 100, 200, and 300 can be referred to the above description, and the detailed description is omitted here as appropriate to avoid redundancy. The devices 100, 200 and 300 include at least one software functional module that can be stored in a memory in the form of software or firmware or solidified in an operating system of the devices 100, 200 and 300. Specifically, the method comprises the following steps:
referring to fig. 7, the symbol mnemonic generation apparatus 100 includes: an acquisition module 101, a first conversion module 102 and an allocation module 103. Wherein:
the acquiring module 101 is configured to acquire a mnemonic word index sequence number when a wallet creating instruction is received;
the first conversion module 102 is configured to convert the mnemonic word index sequence number into a binary number of a preset binary system;
the allocating module 103 is configured to allocate the binary number as a symbol mnemonic word to a user.
In the embodiment of the application, the number of characters in the symbol mnemonic word is n; the nth power of the number of elements in the preset system number is more than or equal to the maximum number of the mnemonic words represented by the mnemonic word index sequence number.
In a possible implementation manner of the embodiment of the present application, the preset carry is a 13 carry.
Referring to fig. 8, the mnemonic conversion apparatus 200 includes: a first receiving module 201, a second converting module 202 and a first searching module 203. Wherein:
the first receiving module 201 is configured to receive an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system;
the second conversion module 202 is configured to convert the symbol mnemonic word into a mnemonic word index sequence number;
the first searching module 203 is configured to search a table according to the mnemonic word index sequence number to obtain a corresponding mnemonic word.
In the embodiment of the present application, referring to fig. 9, the mnemonic conversion apparatus 200 further includes: the control processing module 204 is configured to check whether the input symbol mnemonic word is located within a preset legal range when the first receiving module 201 receives an externally input symbol mnemonic word; and when the symbol mnemonic word is not in a preset legal range, prompting that the symbol mnemonic word is illegal.
In the embodiment of the application, the number of characters in the symbol mnemonic word is n; the nth power of the number of elements in the preset system is more than or equal to the maximum number of the mnemonic words represented by the index sequence numbers of the mnemonic words.
In this embodiment of the application, the control processing module 204 is further configured to, when the first receiving module 201 receives an externally input symbol mnemonic word, check whether the number of characters in the input symbol mnemonic word is n; and when the number of the characters in the symbol mnemonic word is not n, prompting that the symbol mnemonic word is illegal.
In the embodiment of the present application, the preset scale is 13 scales, and n is 3.
In the embodiment of the present application, referring to fig. 9, the mnemonic conversion apparatus 200 further includes a keyboard module 205. The structure of the keyboard module 205 can be seen in fig. 5, where the keyboard module 205 has digit input keys including ten digit keys 0 to 9 and three symbol digit keys for representing the numbers 10, 11 and 12; the keyboard module 205 is configured to receive symbol mnemonics entered on the meta-input keys.
Referring to fig. 10, the wallet restoring or backing up device 300 includes: a second receiving module 301, a third converting module 302, a second searching module 303 and a processing module 304. Wherein:
the second receiving module 301 is configured to receive an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system;
the third conversion module 302 is configured to convert the symbol mnemonic word into a mnemonic word index sequence number;
the second searching module 303 is configured to search a table according to the mnemonic word index sequence number to obtain a corresponding mnemonic word;
the processing module 304 is configured to generate a wallet key according to the mnemonic word.
It should be understood that, for the sake of brevity, the contents described in some embodiments are not repeated in this embodiment.
Example four:
the present embodiment provides an electronic device, which is shown in fig. 11 and includes a processor 1101, a memory 1102 and a communication bus 1103. Wherein:
the communication bus 1103 is used to enable communications between the processor 1101 and the memory 1102.
The processor 1101 is configured to execute one or more programs stored in the memory 1102 to implement the symbol mnemonic word generation method in the first embodiment or the second embodiment, or implement the mnemonic word conversion method in the first embodiment or the second embodiment, or implement the wallet restoring or backup method in the first embodiment or the second embodiment.
It will be appreciated that the configuration shown in fig. 11 is merely illustrative and that the electronic device may also include more or fewer components than shown in fig. 11, or have a different configuration than shown in fig. 11, for example, may also have components such as a display screen, data input/output components, etc.
The present embodiment further provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash Memory, a usb (secure digital Card) Card, an MMC (Multimedia Card) Card, etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the symbol mnemonic word generation method in the first embodiment or the second embodiment, or the mnemonic word conversion method in the first embodiment or the second embodiment, or the wallet recovery or backup method in the first embodiment or the second embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In this context, a plurality means two or more.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A method for generating a symbol mnemonic word, comprising:
when a wallet establishing instruction is received, acquiring a mnemonic word index sequence number;
converting the index sequence number of the mnemonic word into a system number of a preset system;
and distributing the binary number as a symbol mnemonic word to the user.
2. The method for generating a symbol mnemonic word as claimed in claim 1, wherein the number of characters in the symbol mnemonic word is n; the nth power of the number of elements in the preset system number is more than or equal to the maximum number of the mnemonic words represented by the mnemonic word index sequence number.
3. The symbol mnemonic generation method according to claim 1 or 2, wherein the predetermined scale is 13 scale.
4. A mnemonic word conversion method, comprising:
receiving an externally input symbol mnemonic word, wherein the symbol mnemonic word is a preset system number;
converting the symbol mnemonic words into mnemonic word index serial numbers;
and looking up a table to obtain a corresponding mnemonic word according to the mnemonic word index serial number.
5. The mnemonic conversion method according to claim 4, wherein upon receiving an externally input symbol mnemonic, the method further comprises:
checking whether the input symbol mnemonic word is in a preset legal range;
and when the symbol mnemonic word is not in the preset range, prompting that the symbol mnemonic word is illegal.
6. A mnemonic word conversion method as claimed in claim 4 or 5, wherein the number of characters in the symbol mnemonic word is n; the nth power of the number of elements in the preset system is more than or equal to the maximum number of the mnemonic words represented by the index sequence numbers of the mnemonic words.
7. The mnemonic conversion method according to claim 6, wherein upon receiving an externally input symbol mnemonic, the method further comprises:
checking whether the number of characters in the input symbol mnemonic words is n;
and when the number of the characters in the symbol mnemonic word is not n, prompting that the symbol mnemonic word is illegal.
8. The mnemonic word conversion method as claimed in claim 6, wherein the predetermined scale is 13 scale, and n is 3.
9. A symbol mnemonic generation apparatus, comprising: the system comprises an acquisition module, a first conversion module and a distribution module;
the acquisition module is used for acquiring the index sequence number of the mnemonic word when a wallet creation instruction is received;
the first conversion module is used for converting the mnemonic word index serial number into a preset system number;
the allocation module is used for allocating the system number as a symbol mnemonic word to a user.
10. A mnemonic conversion apparatus, comprising: the device comprises a first receiving module, a second conversion module and a first searching module;
the first receiving module is used for receiving an externally input symbol mnemonic word; the symbol mnemonic words are binary numbers of a preset binary system;
the second conversion module is used for converting the symbol mnemonic words into mnemonic word index serial numbers;
and the first searching module is used for searching a table according to the mnemonic word index sequence number to obtain a corresponding mnemonic word.
11. The mnemonic conversion apparatus according to claim 10, wherein the mnemonic conversion apparatus further comprises:
a keyboard module having digit input keys including ten digit keys from 0 to 9 and three symbol digit keys for representing numerals 10, 11 and 12;
the keyboard module is used for receiving the symbol mnemonic words input on the number element input keys.
12. An electronic device comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the symbol mnemonic generation method according to any one of claims 1 to 3, or to implement the mnemonic conversion method according to any one of claims 4 to 8.
CN202010497480.2A 2020-06-03 2020-06-03 Symbol mnemonic word generation and conversion method and device and electronic equipment Active CN111651964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010497480.2A CN111651964B (en) 2020-06-03 2020-06-03 Symbol mnemonic word generation and conversion method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010497480.2A CN111651964B (en) 2020-06-03 2020-06-03 Symbol mnemonic word generation and conversion method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111651964A true CN111651964A (en) 2020-09-11
CN111651964B CN111651964B (en) 2023-09-12

Family

ID=72347027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010497480.2A Active CN111651964B (en) 2020-06-03 2020-06-03 Symbol mnemonic word generation and conversion method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111651964B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1321926A (en) * 2001-05-15 2001-11-14 尹治锋 Improved cipher keyboard and its cipher setting method
CN106161006A (en) * 2015-04-06 2016-11-23 汪风珍 A kind of digital encryption algorithm
CN109598489A (en) * 2018-11-09 2019-04-09 海南新软软件有限公司 A kind of method, apparatus and system of the storage of digital wallet mnemonic word
CN110570194A (en) * 2019-08-30 2019-12-13 新明华区块链技术(深圳)有限公司 hardware wallet recovery method and device and hardware wallet
CN110955713A (en) * 2019-11-26 2020-04-03 上海中信信息发展股份有限公司 Mnemonic word generating method and device and storage medium
CN111026876A (en) * 2019-12-04 2020-04-17 杭州复杂美科技有限公司 Mnemonic word generation method, public and private key pair generation method, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1321926A (en) * 2001-05-15 2001-11-14 尹治锋 Improved cipher keyboard and its cipher setting method
CN106161006A (en) * 2015-04-06 2016-11-23 汪风珍 A kind of digital encryption algorithm
CN109598489A (en) * 2018-11-09 2019-04-09 海南新软软件有限公司 A kind of method, apparatus and system of the storage of digital wallet mnemonic word
CN110570194A (en) * 2019-08-30 2019-12-13 新明华区块链技术(深圳)有限公司 hardware wallet recovery method and device and hardware wallet
CN110955713A (en) * 2019-11-26 2020-04-03 上海中信信息发展股份有限公司 Mnemonic word generating method and device and storage medium
CN111026876A (en) * 2019-12-04 2020-04-17 杭州复杂美科技有限公司 Mnemonic word generation method, public and private key pair generation method, equipment and storage medium

Also Published As

Publication number Publication date
CN111651964B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN110383758B (en) Computer system, secret information verification method, and computer
JP2008257720A (en) Technique for sharing data
US20140245433A1 (en) Password authentication
CN112104627B (en) Block chain-based data transmission method and device, electronic equipment and storage medium
CN113112252B (en) Resource transfer method and device based on block chain, electronic equipment and storage medium
CN108829899B (en) Data table storage, modification, query and statistical method
CN110084599A (en) Cipher key processing method, device, equipment and storage medium
CN112217642A (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN114826736A (en) Information sharing method, device, equipment and storage medium
CN109166199B (en) Password generation method, device and equipment
CN116340984B (en) User information management method and system based on intelligent community
WO2019178981A1 (en) Password management method and device employing customized rules, terminal apparatus, and storage medium
CN111651964A (en) Symbol mnemonic word generating and converting method and device and electronic equipment
CN101558600B (en) Fast rsa signature verification
CN112579566B (en) Distributed ID generation method and device
CN113904865A (en) Log transmission method and device based on asymmetric algorithm
CN112669029A (en) Bank card adding method, device, equipment and computer readable storage medium
CN112632507A (en) Electronic document signature device
CN111259946A (en) Mnemonic word generating method, mnemonic word recovering method, equipment and storage medium
CN114884646B (en) System password storage method based on improved MD5 encryption processing
CN114584388B (en) Software compatibility processing method based on artificial intelligence and cloud platform
CN114492311B (en) Method and device for recognizing messy code data, storage medium and computer equipment
CN118395479B (en) Data protection method and device for online mall system, electronic equipment and medium
CN115001833B (en) Login method and device
CN113343269B (en) Encryption method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant