Memo word generation method, root key seed restoration method and related products

By mapping root key seed bit sequences to characters and optionally adding verification symbols, the method significantly reduces storage space and enhances accuracy in mnemonic generation and restoration for cryptocurrency key management devices.

CN119172064APending Publication Date: 2024-12-20CHINA MOBILE COMM LTD RES INST +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411234530.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Cryptocurrency key management devices require significant storage space for word lists used in mnemonic generation, which is inefficient and occupies a large amount of storage.

Method used

A method to generate mnemonics by splitting the root key seed into bit sequences and mapping each sequence to characters using a preset character mapping relationship or base conversion algorithm, reducing storage needs by ensuring each character occupies one byte, and optionally adding a verification symbol for accuracy.

Benefits of technology

Reduces storage space requirements by up to 99.2% compared to traditional word-based methods, enhances mnemonic accuracy, and minimizes the risk of errors by using character-based mapping or conversion algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172064A_ABST
    Figure CN119172064A_ABST
Patent Text Reader

Abstract

The invention discloses an assistant word generation method, a root key seed restoration method and a related product, and aims to generate an assistant word or restore a root key seed based on a preset character mapping relation or a preset system conversion algorithm. By adopting the embodiment of the invention, the key management equipment does not need to store a word list, so that the occupied storage space can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of key management technology, and in particular to a mnemonic generation method, a root key seed restoration method and related products. Background Art

[0002] Cryptocurrency key management devices (such as hardware wallets) are used in various application scenarios. When a user uses a cryptocurrency key management device for the first time, the root key seed is initialized, and then the subkeys and account information of various currencies are derived based on the root key seed. Among them, a group of words is generated based on the root key seed, which is used as the mnemonic of the root key seed. The mnemonic is convenient for recovering or migrating keys. For example, the root key seed can be restored through the mnemonic to achieve the effect of recovering the key.

[0003] Specifically, the root key seed is divided into several bit sequences, and then a word list is established to map each bit sequence with a word in the word list to obtain the word corresponding to each bit sequence, and the mapped words form a mnemonic. In addition, the root key seed can also be restored based on the word list.

[0004] Therefore, a word list is stored in the key management device. However, each word occupies 6 bytes on average (5 letters occupy 5 bytes and the separator occupies 1 byte), so the word list occupies a large storage space. Summary of the invention

[0005] The present application provides a mnemonic generation method, a root key seed restoration method and related products to solve the problem in the prior art that a key management device needs to store a word list, resulting in a large storage space being occupied.

[0006] To achieve the above purpose, the present application provides a method for generating a mnemonic phrase, comprising:

[0007] Splitting the root key seed into several bit sequences;

[0008] Based on a preset character mapping relationship or a preset base conversion algorithm, a character corresponding to each bit sequence is generated; wherein a plurality of the characters constitute an original mnemonic; in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0009] Generate a first verification symbol according to the original mnemonic;

[0010] A mnemonic is obtained according to the original mnemonic and the first verification character.

[0011] As an improvement of the above solution, the root key seed is divided into several bit sequences, including:

[0012] Confirm whether the root key seed needs to be padded;

[0013] If yes, then pad the root key seed and divide the padded root key seed into several bit sequences of the same length;

[0014] If not, split the root key seed into several bit sequences of the same length.

[0015] As an improvement of the above solution, generating a first verification symbol according to the original mnemonic includes:

[0016] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a first verification sequence;

[0017] intercepting the first verification sequence to obtain a second verification sequence;

[0018] Perform base conversion on the second check sequence to obtain a first check character.

[0019] To achieve the above purpose, the embodiment of the present application also provides a root key seed restoration method, including:

[0020] Intercept the mnemonic to obtain the original mnemonic and the first verification symbol;

[0021] Verifying the first verification character;

[0022] If the verification is successful, each character in the original mnemonic is restored based on a preset character mapping relationship or a binary conversion algorithm to obtain a bit sequence corresponding to each character; wherein, in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0023] A root key seed is obtained according to the bit sequences.

[0024] As an improvement of the above solution, the verifying the first verification character includes:

[0025] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a third verification sequence;

[0026] intercepting the third check sequence to obtain a fourth check sequence;

[0027] Performing base conversion on the fourth check sequence to obtain a second check symbol;

[0028] If the second verification character is consistent with the first verification character, the verification is successful;

[0029] If the second verification character is inconsistent with the first verification character, the verification fails.

[0030] To achieve the above purpose, the present application also provides a mnemonic generation device, including:

[0031] A splitting module, used for splitting the root key seed into a plurality of bit sequences;

[0032] A character generation module, for generating characters corresponding to each of the bit sequences based on a preset character mapping relationship or a preset base conversion algorithm; wherein a plurality of the characters form an original mnemonic; and in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0033] A verification code generation module, used to generate a first verification code according to the original mnemonic;

[0034] A mnemonic generation module is used to obtain a mnemonic according to the original mnemonic and the first verification character.

[0035] To achieve the above purpose, the embodiment of the present application further provides a root key seed restoration device, comprising:

[0036] An interception module, used for intercepting the mnemonic to obtain the original mnemonic and the first verification character;

[0037] A verification module, used to verify the first verification character;

[0038] A restoration module, for restoring each character in the original mnemonic based on a preset character mapping relationship or a binary conversion algorithm if the verification is passed, to obtain a bit sequence corresponding to each character; wherein, in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0039] A root key seed acquisition module is used for obtaining a root key seed according to the bit sequences.

[0040] To achieve the above-mentioned purpose, an embodiment of the present application also provides a key management device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the mnemonic generation method as described above when executing the computer program, or the processor implements the root key seed restoration method as described above when executing the computer program.

[0041] To achieve the above-mentioned purpose, an embodiment of the present application also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the mnemonic generation method as described above, or when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the root key seed restoration method as described above.

[0042] To achieve the above-mentioned purpose, an embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the mnemonic generation method as described above, or implements the root key seed restoration method as described above.

[0043] Compared with the prior art, the embodiments of the present application provide a mnemonic generation method, a root key seed restoration method and related products, which generate mnemonics or restore root key seeds based on a preset character mapping relationship. In the character mapping relationship, each bit sequence corresponds to a character, and each character occupies one byte, which can greatly reduce the occupied storage space. Alternatively, a mnemonic can be directly generated or a root key seed can be restored through a base conversion algorithm without the need to store a word table, which can minimize the occupied storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of a mnemonic generation method provided in an embodiment of the present application;

[0045] Figure 2 It is a flow chart of a root key seed restoration method provided by an embodiment of the present application;

[0046] Figure 3 It is a structural block diagram of a mnemonic generation device provided in an embodiment of the present application;

[0047] Figure 4 It is a structural block diagram of a root key seed restoration device provided in an embodiment of the present application;

[0048] Figure 5 This is a structural block diagram of a key management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] See also Figure 1 , Figure 1 : is a flow chart of a mnemonic generation method provided in an embodiment of the present application, the mnemonic generation method comprising:

[0051] S11, dividing the root key seed into a plurality of bit sequences;

[0052] S12, based on a preset character mapping relationship or a preset base conversion algorithm, generating a character corresponding to each of the bit sequences; wherein a plurality of the characters constitute an original mnemonic; in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0053] S13, generating a first verification symbol according to the original mnemonic;

[0054] S14. Obtain a mnemonic according to the original mnemonic and the first verification character.

[0055] This application embodiment provides two methods to generate original mnemonics:

[0056] Method 1: Generate a character corresponding to each bit sequence based on a preset character mapping relationship;

[0057] This method requires setting a character mapping relationship (e.g., a character mapping table) in advance. The character mapping relationship is a mapping relationship between a bit sequence and a character. In the character mapping relationship, the bit sequence and the character correspond one to one. According to the character mapping relationship, the character corresponding to each bit sequence is found, and these characters constitute the original mnemonic. At the same time, the reverse operation is also supported, which restores the characters in the original mnemonic to bit sequences one by one, and obtains the original root key seed according to these bit sequences.

[0058] In the embodiment of the present application, the character mapping relationship includes characters, and 1 character only occupies 1 byte, thereby greatly reducing the storage space occupied by the mnemonic generation method.

[0059] In a specific example, the lengths of the bit sequences are the same and are all 6 bits, so the preset bit sequence contains 2 6 =64 characters form a character mapping table. Specifically, the characters can be selected from 0-9 (a total of 10), az (a total of 26), AZ (a total of 26) and 2 common special characters, a total of 64 characters, to form a character mapping table. For this character mapping table, each character occupies 1 byte, and each 6-bit long bit sequence occupies 1 byte, so the character mapping table occupies a total of (1+1)*64=128 bytes of storage space. Compared with the 16KB storage space occupied by a vocabulary containing 2048 words, 99.2% of the storage space is saved, which greatly reduces the occupied storage space.

[0060] For a vocabulary of 2048 words, the 132-bit root key seed is generally divided into 12 bit sequences, each of which is 11 bits long. 11 = A vocabulary of 2048 words, and words corresponding to the bit sequences are obtained according to the vocabulary; for this vocabulary, each word occupies 6 bytes on average, and each 11-bit long bit sequence occupies 2 bytes, so the vocabulary occupies a total of (6+2)*2048=16KB of storage space.

[0061] Method 2: Generate characters corresponding to each bit sequence based on a preset base conversion algorithm.

[0062] Specifically, a preset base conversion algorithm is used to perform base conversion on each of the bit sequences to obtain characters corresponding to each of the bit sequences. The specific base conversion algorithm is not limited here, for example, an octal conversion algorithm, a hexadecimal conversion algorithm, a binary conversion algorithm, etc. can be used, which can be set according to actual needs.

[0063] The method does not need to pre-set character mapping relationships and directly performs base conversion on the root key seed, thereby minimizing the storage space occupied by the mnemonic generation method.

[0064] Moreover, the embodiment of the present application adds a first verification symbol to the original mnemonic to form a final mnemonic, thereby improving the accuracy of restoring the root key seed.

[0065] In addition, the embodiment of the present application generates an original mnemonic consisting of several characters through a preset character mapping table or a preset base conversion algorithm, and forms a mnemonic with the first verification character. The mnemonic is composed of multiple characters, that is, what is actually generated by the present application is a mnemonic. Compared with the mnemonic consisting of several words in the prior art, the length of the mnemonic is greatly shortened, allowing the user to record shorter content and greatly reducing the possibility of errors.

[0066] In an optional embodiment, dividing the root key seed into a plurality of bit sequences includes:

[0067] Confirm whether the root key seed needs to be padded;

[0068] If yes, then pad the root key seed and divide the padded root key seed into several bit sequences of the same length;

[0069] If not, split the root key seed into several bit sequences of the same length.

[0070] In the application embodiment, first confirm whether it is necessary to perform a padding operation on the root key seed; wherein, whether it is necessary to perform a padding operation on the root key seed is confirmed according to the preset bit sequence length, for example, the preset bit sequence length is M, the root key seed length is X, and the root key seed is divided according to the bit sequence length M, then X / M bit sequences can be obtained; if X / M is not an integer, that is, X is not divisible by M, then it is necessary to perform a padding operation on the root key seed so that the padded X can be divided by M, and then the padded root key seed is divided into several bit sequences of the same length; if X / M is an integer, that is, X can be divided by M, then the root key seed is directly divided into several bit sequences of the same length. Preferably, 4bits≤bit sequence length≤7bits, to avoid too many character types and too long character length of the original mnemonic, so as to avoid difficulty for users to remember.

[0071] If so, a padding operation is performed on the root key seed, and the padded root key seed is divided into several bit sequences of the same length; optionally, a padding operation is performed after the last bit of the root key seed, for example, the bits of 0 are padded after the last bit of the root key seed, so that the padded X is divisible by M, and several bit sequences of the same length can be obtained. The embodiment of the present application does not limit the specific padding method, but only needs to ensure that the padded root key seed can be divided into several bit sequences of the same length.

[0072] If not, split the root key seed into several bit sequences of the same length.

[0073] In a specific example, the root key seed length X is 132 bits, the bit sequence length M is 6 bits, and the number of bit sequences obtained after segmentation is: 132 / 6=22. The original mnemonic generated based on the preset character mapping relationship is 22 characters.

[0074] In a specific example, the root key seed length X is 132 bits, the bit sequence length M is 4 bits, and the number of bit sequences obtained after segmentation is: 132 / 4=33. Then the original mnemonic generated based on the preset hexadecimal conversion algorithm is 33 characters.

[0075] In an optional embodiment, generating a first verification symbol according to the original mnemonic includes:

[0076] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a first verification sequence;

[0077] intercepting the first verification sequence to obtain a second verification sequence;

[0078] Perform base conversion on the second check sequence to obtain a first check character.

[0079] In an embodiment of the present application, the original mnemonic is operated by a preset check code generation algorithm to obtain a first check sequence; wherein the check code generation algorithm includes but is not limited to: a general check bit algorithm, a hash algorithm, an encryption algorithm, etc. In order to shorten the length of the mnemonic, the first check sequence is intercepted to obtain a second check sequence. In order to further shorten the length of the mnemonic, a preset base conversion algorithm is used to perform base conversion on the second check sequence to obtain a first check code; the specific base conversion algorithm is not limited here, for example, an octal conversion algorithm, a hexadecimal conversion algorithm, a thirty-binary conversion algorithm, etc. can be used, and the base conversion algorithm used can be different from the base conversion algorithm used for the character corresponding to the generated bit sequence, and can be set according to actual needs.

[0080] Optionally, the first check sequence is intercepted according to the preset first interception information to obtain a second check sequence. The first interception information includes: at least two of the check sequence start bit, the check sequence length, and the check sequence end bit. The embodiment of the present application does not specifically limit the check sequence start bit, the check sequence length, and the check sequence end bit, and can be set according to actual needs.

[0081] In a specific example, the check sequence length N=2, the last N characters of the first check sequence are intercepted, and the last N characters are the second check sequence. Then, the second check sequence is converted using a hexadecimal conversion algorithm to obtain a first check character of 2*N=2*2=4 characters.

[0082] In an optional embodiment, obtaining a mnemonic according to the original mnemonic and the first verification character includes:

[0083] The original mnemonic and the first verification character are concatenated to obtain a mnemonic.

[0084] In an embodiment of the present application, a first verification symbol is added to the original mnemonic to form a final mnemonic, thereby improving the accuracy of restoring the root key seed.

[0085] A mnemonic generation method provided in an embodiment of the present application generates mnemonics based on a preset character mapping relationship. In the character mapping relationship, each bit sequence corresponds to one character, and each character occupies one byte, which can greatly reduce the occupied storage space. Alternatively, a mnemonic is directly generated through a base conversion algorithm without the need to store a word table, which can minimize the occupied storage space.

[0086] See also Figure 2 , Figure 2: is a flow chart of a root key seed restoration method provided by an embodiment of the present application, the root key seed restoration method comprising:

[0087] S21, intercepting the mnemonic to obtain the original mnemonic and the first verification symbol;

[0088] S22, verifying the first verification character;

[0089] S23. If the verification is successful, then based on a preset character mapping relationship or a binary conversion algorithm, each character in the original mnemonic is restored to obtain a bit sequence corresponding to each character; wherein in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0090] S24. Obtain a root key seed according to the plurality of bit sequences.

[0091] This embodiment of the application provides two methods to restore the root key seed:

[0092] Method 1: Based on a preset character mapping relationship, each character in the original mnemonic is restored to obtain a bit sequence corresponding to each character;

[0093] The method requires presetting a character mapping relationship, which is a character mapping relationship between a bit sequence and a character, in which the bit sequence and the character correspond one to one. The bit sequence corresponding to each character is found according to the character mapping relationship, so as to obtain the original root key seed according to these bit sequences.

[0094] In the embodiment of the present application, the character mapping table contains characters, and 1 character only occupies 1 byte, thereby greatly reducing the storage space occupied by the root key seed restoration method.

[0095] Method 2: Based on a binary conversion algorithm, each character in the original mnemonic is restored to obtain a bit sequence corresponding to each character.

[0096] This method does not need to pre-set character mapping relationships, and directly performs binary conversion on each character in the original mnemonic to obtain the bit sequence corresponding to each character, thereby minimizing the space occupied by the root key seed restoration method. This method adds a check symbol to the mnemonic, and can verify the validity of the mnemonic without restoring the original mnemonic through a character relationship table, thereby simplifying the verification operation and enhancing the accuracy of the mnemonic recording process.

[0097] In an optional embodiment, intercepting the mnemonic to obtain the original mnemonic and the first verification symbol includes:

[0098] According to the preset second interception information, the mnemonic is intercepted to obtain the original mnemonic and the first verification character.

[0099] Optionally, the second intercepted information includes: at least two of: a check character start position, a check character length, and a check character end position; or, the second intercepted information includes: at least two of: an original mnemonic start position, an original mnemonic length, and an original mnemonic end position. The embodiment of the present application does not specifically limit the check character start position, the check character length, the check character end position, the original mnemonic start position, the original mnemonic length, and the original mnemonic end position, and can be set according to actual needs.

[0100] In a specific example, for the step of generating the first check mark in the mnemonic generation method, the check sequence length N=2 is used, and the last N characters of the first check sequence are intercepted, and the last N characters are the second check sequence, and then the second check sequence is converted using a hexadecimal conversion algorithm to obtain a first check mark of 2*N=2*2=4 characters. Then the length of the first check mark is 4, and the last 4 characters of the mnemonic can be intercepted to obtain the first check mark, and the rest is the original mnemonic.

[0101] In an optional embodiment, the verifying the first verification character includes:

[0102] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a third verification sequence;

[0103] intercepting the third check sequence to obtain a fourth check sequence;

[0104] Performing base-based conversion on the fourth check sequence to obtain a second check symbol;

[0105] If the second verification character is consistent with the first verification character, the verification is successful;

[0106] If the second verification character is inconsistent with the first verification character, the verification fails.

[0107] In the embodiment of the present application, the same verification code generation method as in the mnemonic code generation method is used to obtain a second verification code by operating the intercepted original mnemonic code. The second verification code is then compared with the intercepted first verification code. If the second verification code is consistent with the intercepted first verification code, the verification is passed, otherwise, the verification fails.

[0108] In a specific example, in a mnemonic generation method, based on a preset check mark generation algorithm, an original mnemonic consisting of several characters is operated to obtain a first check sequence; the last two characters of the first check sequence are intercepted to obtain a second check sequence; and a hexadecimal conversion algorithm is used to convert the second check sequence to obtain a first check mark of 4 characters, and the check mark length of the first check mark is 4.

[0109] In the root key seed restoration, the mnemonic is intercepted according to the length of the check character to obtain the first check character and the original mnemonic. In the check character verification process, the same check character generation algorithm is used to operate on the original mnemonic previously intercepted to obtain the third check sequence, and the last 2 characters of the third check sequence are intercepted to obtain the fourth check sequence; the hexadecimal conversion algorithm is used to convert the fourth check sequence to obtain the second check character. Then the second check character is compared with the first check character intercepted before. If the second check character is consistent with the intercepted first check character, the verification is passed, otherwise, the verification fails.

[0110] In an optional embodiment, obtaining a root key seed according to the plurality of bit sequences includes:

[0111] A plurality of the bit sequences are combined into a total bit sequence, and the total bit sequence is intercepted according to preset third interception information to obtain a root key seed.

[0112] It is understandable that when generating the original mnemonic, the root key seed may be padded. Therefore, after obtaining a total bit sequence composed of several bit sequences, it is necessary to perform an interception operation on the total bit sequence to intercept the padded bits and obtain the root key seed. Optionally, the third interception information includes at least two of: a root key seed start position, a root key seed length, and a root key seed end position. The embodiment of the present application does not specifically limit the root key seed start position, the root key seed length, and the root key seed end position, and can be set according to actual needs.

[0113] A root key seed restoration method provided in an embodiment of the present application restores the root key seed based on a preset character mapping relationship. In the character mapping relationship, each bit sequence corresponds to one character, and each character occupies one byte, which can greatly reduce the occupied storage space. Alternatively, the root key seed can be directly restored through a base conversion algorithm without the need to store a vocabulary, which can minimize the occupied storage space.

[0114] The mnemonic generation method and root key seed restoration method provided in the embodiments of the present application are part of key management and are applied to key management devices. Key management usually needs to be run in a secure and controllable environment. Therefore, the method provided in the embodiments of the present application also needs to be run in a secure environment to ensure the security of information such as mnemonic generation and root key seed restoration results.

[0115] The embodiments of the present application can be combined with a super SIM card, and the logic of mnemonic generation and root key seed restoration can be implemented in the form of a card application. In actual use, a mnemonic generation device and a root key seed restoration device are first installed in the super SIM card. When the user generates a key, the mnemonic generation device is called to generate the corresponding mnemonic, or the root key seed restoration device is called to restore the root key seed. These calling operations are all completed inside the super SIM card application, and the data will not be leaked to the environment outside the super SIM card to ensure information security. If the user needs to view and record the mnemonic, the super will be returned to the mobile phone app for display only after passing the user identity verification. The user identity verification method includes but is not limited to: SIM card PIN code, fingerprint recognition, face recognition, etc., or it can be a combination of the above user identity methods. The embodiments of the present application can also be combined with other hardware-level security devices, such as: U shield, SE module of terminal equipment, etc.

[0116] See also Figure 3 , Figure 3 : is a structural block diagram of a mnemonic generation device 10 provided in an embodiment of the present application, wherein the mnemonic generation device 10 comprises:

[0117] A segmentation module 11, used for segmenting the root key seed into a plurality of bit sequences;

[0118] A character generation module 12, configured to generate a character corresponding to each bit sequence based on a preset character mapping relationship or a preset base conversion algorithm; wherein a plurality of the characters constitute an original mnemonic; and in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0119] A verification code generation module 13, used to generate a first verification code according to the original mnemonic;

[0120] The mnemonic generating module 14 is used to obtain a mnemonic according to the original mnemonic and the first verification character.

[0121] Optionally, the segmentation module 11 is specifically used for:

[0122] Confirm whether the root key seed needs to be padded;

[0123] If yes, then pad the root key seed and divide the padded root key seed into several bit sequences of the same length;

[0124] If not, split the root key seed into several bit sequences of the same length.

[0125] Optionally, the verification character generating module 13 is specifically used for:

[0126] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a first verification sequence;

[0127] intercepting the first verification sequence to obtain a second verification sequence;

[0128] Perform base conversion on the second check sequence to obtain a first check character.

[0129] Optionally, the mnemonic generation module 14 is specifically used for:

[0130] The original mnemonic and the first verification character are concatenated to obtain a mnemonic.

[0131] It is worth noting that the working process of each module in the mnemonic generation device 10 described in the embodiment of the present application can refer to the working process of the mnemonic generation method described in the above embodiment, and will not be repeated here.

[0132] A mnemonic generation device 10 provided in an embodiment of the present application generates mnemonics based on a preset character mapping relationship. In the character mapping relationship, each bit sequence corresponds to one character, and each character occupies one byte, which can greatly reduce the occupied storage space. Alternatively, a mnemonic can be directly generated through a base conversion algorithm without the need to store a word table, which can minimize the occupied storage space.

[0133] See also Figure 4 , Figure 4 : is a structural block diagram of a root key seed restoration device 20 provided in an embodiment of the present application, wherein the root key seed restoration device 20 comprises:

[0134] An interception module 21 is used to intercept the mnemonic to obtain the original mnemonic and the first verification symbol;

[0135] A verification module 22, used for verifying the first verification character;

[0136] A restoration module 23, for restoring each character in the original mnemonic based on a preset character mapping relationship or a binary conversion algorithm if the verification is passed, to obtain a bit sequence corresponding to each character; wherein, in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence;

[0137] The root key seed obtaining module 24 is used as a root key seed obtaining module, and is used to obtain a root key seed according to the plurality of bit sequences.

[0138] Optionally, the interception module 21 is specifically used for:

[0139] According to the preset second interception information, the mnemonic is intercepted to obtain the original mnemonic and the first verification character.

[0140] Optionally, the verification module 22 is specifically used for:

[0141] Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a third verification sequence;

[0142] intercepting the third check sequence to obtain a fourth check sequence;

[0143] Performing base-based conversion on the fourth check sequence to obtain a second check symbol;

[0144] If the second verification character is consistent with the first verification character, the verification is successful;

[0145] If the second verification character is inconsistent with the first verification character, the verification fails.

[0146] Optionally, the root key seed acquisition module 24 is specifically used for:

[0147] A plurality of the bit sequences are combined into a total bit sequence, and the total bit sequence is intercepted according to preset third interception information to obtain a root key seed.

[0148] It is worth noting that the working process of each module in the root key seed restoration device 20 described in the embodiment of the present application can refer to the working process of the mnemonic generation method described in the above embodiment, and will not be repeated here.

[0149] A root key seed restoration device 20 provided in an embodiment of the present application restores the root key seed based on a preset character mapping relationship. In the character mapping relationship, each bit sequence corresponds to one character, and each character occupies one byte, which can greatly reduce the occupied storage space. Alternatively, the root key seed can be directly restored through a base conversion algorithm without the need to store a vocabulary, which can minimize the occupied storage space.

[0150] In addition, an embodiment of the present application further provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the mnemonic generation method as described in any of the above embodiments, or when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the root key seed restoration method as described in any of the above embodiments.

[0151] In addition, an embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements a mnemonic generation method as described in any of the above embodiments, or implements a root key seed restoration method as described in any of the above embodiments when the computer program / instruction is executed by a processor.

[0152] See also Figure 5 , Figure 5 : is a structural block diagram of a key management device 30 provided in an embodiment of the present application, and the key management device 30 includes: a processor 31, a memory 32, and a computer program stored in the memory 32 and executable on the processor 31. When the processor 31 executes the computer program, the steps in the above-mentioned mnemonic generation method embodiment are implemented, or when the processor 31 executes the computer program, the steps in the above-mentioned root key seed restoration method embodiment are implemented. Alternatively, when the processor 31 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0153] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 32 and executed by the processor 31 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the key management device 30.

[0154] The key management device 30 may include, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will appreciate that the schematic diagram is merely an example of the key management device 30 and does not constitute a limitation on the key management device 30. The key management device 30 may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the key management device 30 may also include input and output devices, network access devices, buses, and the like.

[0155] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 31 is the control center of the key management device 30, and uses various interfaces and lines to connect various parts of the entire key management device 30.

[0156] The memory 32 can be used to store the computer program and / or module. The processor 31 implements various functions of the key management device 30 by running or executing the computer program and / or module stored in the memory 32 and calling the data stored in the memory 32. The memory 32 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 32 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0157] Wherein, if the module / unit integrated in the key management device 30 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 31, the steps of the above-mentioned method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0158] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0159] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

Claims

1. A method for generating mnemonics, characterized in that: include: Splitting the root key seed into several bit sequences; Based on a preset character mapping relationship or a preset base conversion algorithm, a character corresponding to each of the bit sequences is generated; wherein a plurality of the characters constitute an original mnemonic; In the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence; Generate a first verification symbol according to the original mnemonic; A mnemonic is obtained according to the original mnemonic and the first verification character.

2. The mnemonic generation method according to claim 1, characterized in that: The step of dividing the root key seed into a plurality of bit sequences comprises: Confirm whether the root key seed needs to be padded; If yes, then pad the root key seed and divide the padded root key seed into several bit sequences of the same length; If not, split the root key seed into several bit sequences of the same length.

3. The mnemonic generation method according to claim 1, characterized in that: The step of generating a first verification symbol according to the original mnemonic includes: Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a first verification sequence; intercepting the first verification sequence to obtain a second verification sequence; Perform base conversion on the second check sequence to obtain a first check character.

4. A root key seed restoration method, characterized in that: include: Intercept the mnemonic to obtain the original mnemonic and the first verification symbol; Verifying the first verification character; If the verification is successful, each character in the original mnemonic is restored based on a preset character mapping relationship or a binary conversion algorithm to obtain a bit sequence corresponding to each character; wherein, in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence; A root key seed is obtained according to the bit sequences.

5. The root key seed restoration method according to claim 4, characterized in that: The verifying the first verification character includes: Based on a preset verification symbol generation algorithm, the original mnemonic is operated to obtain a third verification sequence; intercepting the third check sequence to obtain a fourth check sequence; Performing base-based conversion on the fourth check sequence to obtain a second check symbol; If the second verification character is consistent with the first verification character, the verification is successful; If the second verification character is inconsistent with the first verification character, the verification fails.

6. A mnemonic generation device, characterized in that: include: A splitting module, used for splitting the root key seed into a plurality of bit sequences; A character generation module, for generating characters corresponding to each of the bit sequences based on a preset character mapping relationship or a preset base conversion algorithm; wherein a plurality of the characters form an original mnemonic; and in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence; A verification code generation module, used to generate a first verification code according to the original mnemonic; A mnemonic generation module is used to obtain a mnemonic according to the original mnemonic and the first verification character.

7. A root key seed restoration device, characterized in that: include: An interception module, used for intercepting the mnemonic to obtain the original mnemonic and the first verification character; A verification module, used to verify the first verification character; A restoration module, for restoring each character in the original mnemonic based on a preset character mapping relationship or a binary conversion algorithm if the verification is passed, to obtain a bit sequence corresponding to each character; wherein, in the character mapping relationship, the characters and the bit sequences have a one-to-one correspondence; A root key seed acquisition module is used for obtaining a root key seed according to the bit sequences.

8. A key management device, characterized in that: The invention comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the mnemonic generation method as described in any one of claims 1 to 3 when executing the computer program, or the processor implements the root key seed restoration method as described in any one of claims 4 to 5 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located controls the device to execute the mnemonic generation method as described in any one of claims 1 to 3, or the computer program when running controls the device where the computer-readable storage medium is located executes the root key seed restoration method as described in any one of claims 4 to 5.

10. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the mnemonic generation method as described in any one of claims 1 to 3, or the computer program / instruction, when executed by a processor, implements the root key seed restoration method as described in any one of claims 4 to 5.

Citation Information

Patent Citations

  • Binary data coding and decoding method and device

    CN107919943A

  • Block chain account key backup and recovery methods and systems

    CN109474424A

  • Block chain private key generation method and device based on biological characteristics and medium

    CN109658078A

  • Block chain transaction request processing method and device, electronic device and medium

    CN110866740A

  • Symbol mnemonic word generation method and device, symbol mnemonic word conversion method and device, and electronic equipment

    CN111651964A