Key management method and device for digital currency wallet
By generating randomized questions in the digital currency wallet and combining hash operations and elliptic curve algorithms, the problem of difficult mnemonic phrase memorization and high risk of forgetting is solved, achieving highly secure and easy-to-use mnemonic phrase management and enhancing the protection of private keys.
Patent Information
- Application Number
- CN202511387024.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-26
AI Technical Summary
The mnemonic phrases for existing digital currency wallets are difficult to remember and have a high risk of being forgotten. Once the private key is lost or stolen, the user will permanently lose access to the funds.
The system generates a target question by randomly selecting it from a pre-defined question database. The user inputs the answer to generate a mnemonic phrase, which is then used to generate a private key and a public key. By combining hash operations and elliptic curve algorithms, the security and uniqueness of the mnemonic phrase are ensured. Security is further enhanced through categorized storage and a dual verification mechanism.
It reduces the probability of forgetting the mnemonic phrase, improves the security of the private key, requires attackers to crack multi-dimensional user memory information, and enhances the security and ease of use of digital currency wallets.
Smart Images

Figure CN120875875A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital currency security, and in particular to a key management method and apparatus for a digital currency wallet. Background Technology
[0002] A cryptocurrency wallet is a tool used to store, manage, and trade cryptocurrencies. Current cryptocurrency wallets primarily rely on a single private key to control fund access. If the private key is lost, stolen, or damaged, the user will permanently lose access to their funds. Furthermore, the mnemonic phrases for existing cryptocurrency wallets are generally randomly generated, making them difficult for customers to remember. Forgetting these phrases will also result in the loss of access to funds. Summary of the Invention
[0003] The technical problem to be solved by the embodiments of the present invention is to provide a key management method and device for digital currency wallets, which can solve the problems of difficulty in remembering mnemonic phrases and high risk of loss.
[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0005] A key management method for a digital currency wallet includes:
[0006] Receive user-sent instructions to generate a digital currency wallet;
[0007] According to the generation instructions, a set number of target questions are randomly selected from a preset question database and randomly sorted.
[0008] Receive the target answer to the target question submitted by the user;
[0009] Based on the target answer, generate a mnemonic phrase for a digital currency wallet;
[0010] Generate a private key for your digital currency wallet based on the mnemonic phrase.
[0011] Based on the private key, generate the public key and wallet address for the digital currency wallet;
[0012] The preset question database is obtained through the following process: receiving a target question set; and obtaining the preset question database based on the target question set.
[0013] Optionally, a set number of target questions, randomly sorted, are randomly selected from a preset question database, including:
[0014] According to Q={q a q b , ..., q j}, Define the target problem;
[0015] Where Q is the objective problem, and P = {q1, q2, ..., q} m}, where P is the preset problem database, m is the number of specific problems in the preset problem database, and q a q b , ..., q j For a specific problem, a, b, ..., j ∈ [0, m].
[0016] Optionally, based on the target answer, a mnemonic phrase for a digital currency wallet is generated, including:
[0017] The target answer is standardized to obtain the standard target answer;
[0018] Perform a hash operation on the standard target answer to generate a hash value;
[0019] The hash value is divided into several sub-hash values;
[0020] Map each of the sub-hash values to a corresponding sub-mnemonic phrase;
[0021] The sub-mnemonic phrases are combined to generate the mnemonic phrase for a digital currency wallet.
[0022] Optionally, based on the mnemonic phrase, a private key for the digital currency wallet is generated, including:
[0023] Convert the mnemonic phrase into a seed value;
[0024] The seed value is used to generate key derivation data;
[0025] Extract bytes of a preset length from the key-derived data to serve as the private key for the digital currency wallet.
[0026] Optionally, based on the private key, a public key and wallet address for the digital currency wallet are generated, including:
[0027] The private key is processed to generate the corresponding public key;
[0028] Perform a hash operation on the public key to obtain the public key hash;
[0029] The public key hash is hashed to obtain the wallet address of the digital currency wallet.
[0030] Optionally, the above methods also include:
[0031] Receive login commands from users for logging into their digital currency wallets;
[0032] Based on the login command, a mnemonic phrase input box is generated;
[0033] Receive the mnemonic phrase entered by the user in the mnemonic phrase input box;
[0034] If the entered mnemonic phrase matches the mnemonic phrase, the login is successful, and the digital currency wallet becomes usable.
[0035] Optionally, the above methods also include:
[0036] Receive modification instructions from users to change their mnemonic phrases;
[0037] According to the modification instructions, a target number of questions with a fixed order are set from a preset question database;
[0038] Receive the first verified target answer to the target question sent by the user;
[0039] If the first verification target answer matches the target answer, then the mnemonic phrase will be modified.
[0040] A predetermined number of secondary objective problems are randomly selected from a pre-defined problem database and randomly sorted.
[0041] Receive the secondary objective answer to the secondary objective question sent by the user;
[0042] Based on the secondary target answer, generate a secondary mnemonic phrase for the digital currency wallet;
[0043] Based on the secondary mnemonic phrase, a secondary private key for the digital currency wallet is generated;
[0044] Based on the secondary private key, a secondary public key and a secondary wallet address for the digital currency wallet are generated, and asset migration of the digital currency wallet is performed.
[0045] Optionally, the above methods also include:
[0046] Receive instructions from users to forget their mnemonic phrases;
[0047] Based on the mnemonic phrase forgetting instruction, target questions of a fixed quantity and order are set from a preset question database;
[0048] Receive the second verification target answer to the target question sent by the user;
[0049] If the second verification target answer matches the target answer, it is confirmed that the operation was performed by the user.
[0050] The mnemonic phrase is sent to the user.
[0051] Optionally, the above methods also include:
[0052] Receive a freeze command from the user to freeze the mnemonic phrase;
[0053] According to the freeze command, a target number of questions with a fixed order are set from a preset question database;
[0054] Receive the third verification target answer to the target question sent by the user;
[0055] If the third verification target answer matches the target answer, then the mnemonic phrase is frozen.
[0056] Freeze the login command for the mnemonic phrase.
[0057] Embodiments of the present invention also provide a key management device for a digital currency wallet, comprising:
[0058] The receiving module is used to receive the user's command to generate a digital currency wallet; and to receive the target answer to the target question issued by the user.
[0059] The processing module is configured to: randomly select a set number of target questions and randomly sort them from a preset question database according to the generation instruction; generate a mnemonic phrase for a digital currency wallet based on the target answer; generate a private key for a digital currency wallet based on the mnemonic phrase; and generate a public key and wallet address for a digital currency wallet based on the private key. The preset question database is obtained through the following process: receiving a set of target questions and obtaining the preset question database based on the set of target questions.
[0060] The above-described solutions of the embodiments of the present invention have at least the following beneficial effects:
[0061] In the above-described scheme of this invention, the mnemonic phrase is generated by the user based on the target answer to the target question. The target answer is content that the user is highly familiar with, thus reducing the probability of forgetting from the source. By using a preset question database, a random selection mechanism, and encryption processing, the single point of failure of a single private key is avoided. Attackers need to break through multiple dimensions of user memory information to crack the code, significantly raising the security threshold. Attached Figure Description
[0062] Figure 1 This is a flowchart illustrating the key management method for a digital currency wallet provided in an embodiment of the present invention.
[0063] Figure 2 This is a schematic diagram of a key management device for a digital currency wallet provided in an embodiment of the present invention. Detailed Implementation
[0064] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0065] like Figure 1 As shown, an embodiment of the present invention provides a key management method for a digital currency wallet, including:
[0066] Step 11: Receive the user's command to generate a digital currency wallet;
[0067] Step 12: According to the generation instruction, randomly select a set number of target questions from the preset question database and sort them randomly;
[0068] Step 13: Receive the target answer to the target question sent by the user;
[0069] Step 14: Generate a mnemonic phrase for the digital currency wallet based on the target answer;
[0070] Step 15: Generate the private key for the digital currency wallet based on the mnemonic phrase;
[0071] Step 16: Generate the public key and wallet address of the digital currency wallet based on the private key;
[0072] The preset problem database is obtained through the following process:
[0073] Step 101: Receive the target question set;
[0074] Step 102: Obtain the preset problem database based on the target problem set.
[0075] In this example, the mnemonic phrase is generated by the user based on the target answer to the target question. The target answer is content that the user is highly familiar with, thus reducing the probability of forgetting from the source. By using a pre-set question database, a random selection mechanism, and encryption, the single point of failure of a single private key is avoided. Attackers would need to break through multiple dimensions of user memory information to crack the code, significantly raising the security threshold.
[0076] In an optional embodiment of the present invention, step 101, receiving the target problem set, includes:
[0077] Step 1011: Receive personalized questions entered by the user.
[0078] Step 1012: Perform compliance verification on the personalized questions to obtain the target question set.
[0079] Specifically, the personalized questions are exclusive questions set by users based on their own memory characteristics, life experiences, or knowledge reserves, and the personalized questions can be adapted to all users; the character length of a single personalized question is within a preset range.
[0080] The compliance verification includes: content compliance verification, validity verification, and duplication verification.
[0081] In this example, by combining user-generated questions with compliance verification, a solid security and practical foundation is laid for digital currency wallet key management, enhancing security and personalized adaptation. Users can independently input exclusive questions based on their life experiences and knowledge reserves. This type of information is highly personalized and difficult for others to guess, avoiding the risk of social engineering attacks that are easily exploited by fixed template questions. At the same time, it adapts to different users' memory habits, allowing users to choose the information that is easiest to remember, reducing the probability of forgetting answers from the source.
[0082] Ensure the validity and compliance of the question set. Content compliance verification filters out risks such as illegality and privacy leaks, avoiding potential legal and dispute issues; validity verification ensures clear question descriptions and unique, verifiable answers by limiting character length and eliminating ambiguity, providing a reliable basis for subsequent mnemonic phrase generation and identity verification; duplicate verification avoids similar questions, ensures diverse question dimensions, and increases the difficulty for attackers to crack the code.
[0083] Once compliant, the target question set forms a high-quality pre-set database, providing standardized and reliable data support for core processes such as generating mnemonic phrases through random question selection and verifying identity through questions, thus ensuring the stable operation of the overall key system.
[0084] In an optional embodiment of the present invention, step 102, obtaining the preset problem database based on the target problem set, includes:
[0085] Step 1021: Classify the personalized questions in the target question set; specifically, the personalized questions can be classified into personal experience, knowledge, and preference categories.
[0086] Step 1022: Store the categorized personalized questions separately to obtain at least two sets of preset question databases; specifically, you can obtain a preset question database for personal experience, a preset question database for knowledge, and a preset question database for preferences.
[0087] In this example, by categorizing and storing personalized questions, the security and practicality of the key management system are significantly improved, enhancing the diversity of question selection and resistance to cracking. Questions are categorized and stored separately based on personal experience, knowledge, preferences, etc., ensuring that subsequent random selection of target questions covers multi-dimensional information. Attackers would need to possess multiple aspects of user information to crack the system, significantly raising the attack threshold and avoiding the risk of single-type questions being easily targeted and cracked.
[0088] Optimize the user's memory and verification experience. Categorized storage ensures a more balanced selection of questions, avoiding concentration on areas users are less adept at remembering, thus reducing the probability of forgetting answers. Simultaneously, the categorization logic aligns with user cognitive habits, making the identity verification process more natural and improving ease of use.
[0089] This provides structured data support for subsequent functions. The categorized database provides a standardized framework for selecting questions in scenarios such as modifying and retrieving mnemonic phrases, ensuring that verification questions are both random and multi-dimensional, guaranteeing the security and consistency of the entire process, and strengthening the stability of the overall key management system.
[0090] In an optional embodiment of the present invention, step 11, receiving a generation instruction from a user for generating a digital currency wallet, includes:
[0091] Receive user-sent instructions to generate a digital currency wallet;
[0092] The user is verified for legitimacy, including verification of device interaction, account status, and secure storage conditions.
[0093] In this example, the security of wallet generation is enhanced through legitimacy verification: device interaction verification ensures a secure operating environment and prevents malicious devices; account status verification eliminates the risk of abnormal accounts; and secure storage condition verification ensures a reliable key storage environment for subsequent transactions. This triple verification intercepts risks at the source, preventing wallet generation in insecure environments or abnormal conditions, building a solid first line of defense for subsequent key management, and reducing the risk of key leakage due to device or account issues.
[0094] In an optional embodiment of the present invention, step 12, randomly selecting a predetermined number and randomly sorted target questions from a preset question database, includes:
[0095] Step 121, according to Q={q a q b , ..., q j}, Define the target problem;
[0096] Where Q is the objective problem, and P = {q1, q2, ..., q} m}, where P is the preset problem database, m is the number of specific problems in the preset problem database, and qa q b , ..., q j For a specific problem, a, b, ..., j ∈ [0, m].
[0097] Specifically, a set number of target questions can be randomly selected from at least two preset question databases and randomly sorted to avoid the problem of having a single type of target question and low security.
[0098] In this example, enhanced anti-attack capabilities are achieved by randomly selecting questions from at least two databases and shuffling their order, preventing attackers from guessing answers based on single-type question characteristics. Combinations of multiple question categories (such as personal experience + knowledge + preferences) force attackers to possess multi-dimensional information about the user, significantly increasing the difficulty of cracking the code and mitigating the vulnerability of single-type questions being easily exploited.
[0099] To ensure randomness and fairness, the mathematical model is Q={q a q b , ..., q j Ensure that the selection process is traceable and unbiased, and that each question has an equal probability of being selected, thus avoiding the risk that patterns can be exploited due to fixed models.
[0100] Random sorting prevents users from forming fixed answer habits, while the balanced distribution of multiple question categories conforms to users' memory characteristics, reducing the probability of forgetting answers due to questions being concentrated in a certain area, thus achieving a balance between security and ease of use.
[0101] In an optional embodiment of the present invention, step 13, receiving the target answer to the target question sent by the user, includes:
[0102] Step 131: Display the target questions selected from the preset question database in a list format, and provide corresponding answer input boxes;
[0103] Step 132: Perform compliance verification on the user-inputted answer; specifically, the compliance verification includes: content compliance verification and validity verification.
[0104] Step 133: Receive and temporarily store the target answer.
[0105] In this example, the interactive experience is optimized to reduce operational errors. Questions are displayed in an orderly list format and matched with input boxes, making the interface clear and intuitive. This reduces the chances of users filling in the wrong or missing answers due to operational confusion, and is especially user-friendly for non-technical users.
[0106] Compliance verification ensures the validity of answers, while content compliance verification filters out illegal and sensitive information to mitigate risks. Validity verification ensures that answers are formatted correctly and unique, preventing ambiguous or invalid answers from affecting the accuracy of subsequent mnemonic phrase generation and providing a reliable input foundation for the key system.
[0107] Temporary storage mechanisms enhance data security by saving answers only temporarily, avoiding the risk of leakage caused by long-term storage. At the same time, they provide temporary data support for subsequent hash operations and other processing, achieving a balance between data availability and security, and strengthening the defense line in the intermediate link of key generation.
[0108] In an optional embodiment of the present invention, step 14, generating a mnemonic phrase for a digital currency wallet based on the target answer, includes:
[0109] Step 141: Standardize the target answer to obtain a standard target answer. Specifically, the standardization process includes: format unification, sequence integration, and encoding conversion. The format unification includes: removing spaces, punctuation marks, and special characters from all target answers; converting all letters in the target answers to lowercase; concatenating multiple target answers according to the display order of their corresponding questions to form a continuous string, and inserting separators at the concatenation points to distinguish different answers; converting the integrated string into a Unicode-encoded byte sequence to obtain the standard target answer.
[0110] Step 142: Perform a hash operation on the standard target answer to generate a hash value; specifically, obtain the original hash value of the standard target answer according to H1=SHA(S);
[0111] Where H1 is the original hash value of the standard target answer, SHA is the hash operation function, and S is the byte sequence of the standard target answer;
[0112] Based on H2=SHA(H1), the quadratic hash value of the standard target answer is obtained;
[0113] Where H2 is the quadratic hash value of the standard target answer;
[0114] The first four bits of the secondary hash value H2 of the standard target answer are used as the check bits C of the standard target answer;
[0115] Based on H=H1||C, the hash value of the standard target answer is obtained;
[0116] Step 143: Divide the hash value into several sub-hash values; specifically, divide the hash value into several sub-hash values in a set unit.
[0117] Step 144: Map each of the sub-hash values to a corresponding sub-mnemonic phrase; specifically, according to the mnemonic phrase vocabulary, map each of the sub-hash values to a corresponding sub-mnemonic phrase;
[0118] Step 145: Combine the sub-mnemonic words to generate the mnemonic words for the digital currency wallet. Specifically, combine the sub-mnemonic words according to the order of sub-hash value segmentation to generate the mnemonic words for the digital currency wallet.
[0119] In this example, a systematic encryption process securely converts user answers into mnemonic phrases. Standardization eliminates interference from variables by removing special characters, unifying capitalization, concatenating answers in order, and inserting separators. This ensures that the same answer generates a unique standard value regardless of differences in input format (such as variations in punctuation and spaces). Encoding is converted into a uniform byte sequence, providing a stable input foundation for subsequent encryption operations. This avoids mnemonic phrase deviations caused by format errors from the source, ensuring the consistency of the generated results.
[0120] A multi-layered encryption mechanism strengthens the security defense. It employs a double hash operation: the original hash hides the answer information, while the double hash generates a checksum. This prevents answer leakage through the irreversibility of the encryption algorithm and verifies data integrity through the checksum, eliminating the risk of tampering during transmission or processing. Hash value segmentation and word mapping further increase the difficulty of cracking, making it impossible for attackers to deduce the original answer from the mnemonic phrase.
[0121] The mnemonic phrases are generated by following the steps of hash segmentation, word mapping, and sequential combination. This not only conforms to the industry's common format and ensures compatibility with mainstream wallet ecosystems, but also achieves memory-friendly mnemonic phrase generation by binding them to users' personalized answers, thus solving the pain point of traditional random mnemonic phrases being difficult to remember.
[0122] The entire process of encryption, from answer input to mnemonic phrase output, preserves the binding relationship between the user's memory information and the key (for easy retrieval) while using cryptographic means to isolate the original answer from the final mnemonic phrase, achieving an organic unity of easy memorization and high security, and providing a reliable foundation for subsequent private key generation.
[0123] In an optional embodiment of the present invention, step 15, generating a private key for a digital currency wallet based on the mnemonic phrase, includes:
[0124] Step 151: Convert the mnemonic phrase into a seed value; specifically, determine the converted seed value according to M=UTF(N);
[0125] Where M is the seed value after conversion, UTF is the string conversion function, and N is the mnemonic word;
[0126] Step 152: Calculate the seed value to generate key derivation data; specifically, determine the key derivation data according to S=PBKDF(M);
[0127] Where S is the key derivation data and PBKDF is the key derivation function;
[0128] Step 153: Extract bytes of a preset length from the key derivation data as the private key for the digital currency wallet.
[0129] In this example, a standardized key derivation process securely converts the mnemonic phrase into a private key, and this standardized conversion ensures key consistency. The mnemonic phrase is converted into a seed value using a string conversion function, eliminating variables caused by character encoding differences. This ensures that the same mnemonic phrase generates a unique seed value on different devices or systems, providing a stable foundation for subsequent operations and avoiding private key inconsistencies due to encoding issues.
[0130] The seed value is processed using a key derivation function. This function increases the difficulty of brute-force attacks through multiple rounds of iterative computation. Even if part of the seed value is leaked, attackers will find it difficult to quickly deduce the original mnemonic phrase or private key. Compared to the simple method of directly generating the private key from the mnemonic phrase, this processing significantly raises the barrier to entry for the key system.
[0131] Extracting bytes of a preset length from the derived data as a private key ensures that the generated private key conforms to the encryption standards of the corresponding digital currency, satisfying both cryptographic security requirements and compatibility with the blockchain network, thus preventing transaction failures due to format errors.
[0132] The entire process, from mnemonic phrase to seed value and then to key derivation data, forms a secure closed loop of mnemonic phrase-seed-private key conversion. This retains the advantage of mnemonic phrases being easy to remember, while also achieving a secure transition from a user-friendly form to the encryption core through cryptographic operations, laying a reliable foundation for the subsequent generation of public keys and addresses.
[0133] In an optional embodiment of the present invention, step 16, generating the public key and wallet address of the digital currency wallet based on the private key, includes:
[0134] Step 161: Process the private key to generate the corresponding public key; specifically, determine the corresponding public key according to T=K×G.
[0135] Where T is the corresponding public key, K is the private key, and G is the point where the elliptic curve is generated;
[0136] Step 162: Perform a hash operation on the public key to obtain the public key hash; specifically, obtain the original hash value of the public key according to G1=SHA(T);
[0137] Where G1 is the original hash value of the public key, and SHA is the hash operation function;
[0138] Based on G2=SHA(G1), the quadratic hash value of the public key is obtained;
[0139] Where G2 is the second hash value of the public key;
[0140] Use the first four bits of the secondary hash value G2 of the public key as the check bits D of the public key;
[0141] The public key hash is obtained based on G=G1||D;
[0142] Where G is the public key hash;
[0143] Step 163: Perform a hash operation on the public key hash to obtain the wallet address of the digital currency wallet; specifically, obtain the original hash value of the wallet address according to B1=SHA(G);
[0144] Where B1 is the original hash value of the wallet address;
[0145] The second hash value of the wallet address is obtained by using B2=SHA(B1);
[0146] Where B2 is the second hash value of the wallet address;
[0147] Use the first four bits of the secondary hash value B2 of the wallet address as the check bits E of the wallet address;
[0148] Based on B=G||E, the wallet address of the digital currency wallet is obtained;
[0149] Where B is the wallet address of the digital currency wallet.
[0150] In this example, the elliptic curve algorithm with T=K×G is used. The asymmetric encryption property ensures the one-way irreversibility from the private key to the public key. The private key cannot be derived from the known public key. This not only meets the core security requirements of digital currency transactions, but also complies with industry-standard encryption and ensures compatibility with blockchain networks.
[0151] By performing a second hash operation on the public key and address, and combining it with a check bit mechanism (taking the first four hash values as check bits), the original public key information can be hidden through encryption, and the validity can be quickly verified during address transmission or input, thus avoiding asset loss due to incorrect addresses.
[0152] The generation chain from public key to address (private key - public key - public key hash - wallet address) fully complies with cryptographic standards, ensuring that the same private key always generates a unique address, and that the address format conforms to the encoding standard of the corresponding digital currency, making it compatible with mainstream trading ecosystems.
[0153] The entire process, from user answers to the final address, is encrypted. This process retains core control over the private key while enabling secure public interaction through the public key and address, perfectly balancing the privacy of digital currency management with the openness of transactions.
[0154] In an optional embodiment of the present invention, the method further includes:
[0155] Step 21: Receive the login command from the user for logging into the digital currency wallet;
[0156] Step 22: Generate a mnemonic phrase input box according to the login instruction;
[0157] Step 23: Receive the mnemonic phrase entered by the user in the mnemonic phrase input box;
[0158] Step 24: If the input mnemonic phrase matches the mnemonic phrase, the login is successful and the digital currency wallet is ready for use.
[0159] In this example, enhanced authentication security is achieved by using a mnemonic phrase as login credentials. The unique binding between the mnemonic phrase and the private key ensures that only authorized users can access the wallet. Compared to password login, mnemonic phrases are longer and more random, making them extremely difficult to crack through brute force, thus providing a core line of defense for asset security.
[0160] The simplified login process enhances usability; users only need to enter a mnemonic phrase to complete verification, eliminating the need to remember complex private keys or rely on third-party verification. The process is intuitive and concise. The mnemonic phrase is generated based on the user's own answer, making it easier to remember than random characters, thus lowering the barrier to entry for ordinary users.
[0161] To ensure the reliability of login status, user identity is verified through mnemonic phrase consistency checks to prevent unauthorized access. Once verification is successful, the wallet becomes usable, ensuring both ease of normal use and preventing unauthorized operations through a strict verification mechanism, achieving a precise balance between security and user experience.
[0162] In an optional embodiment of the present invention, the method further includes:
[0163] Step 31: Receive the user's modification instruction for changing the mnemonic phrase;
[0164] Step 32: According to the modification instruction, set the number and fixed order of target questions from the preset question database;
[0165] Step 33: Receive the first verification target answer to the target question sent by the user;
[0166] Step 34: If the first verification target answer is consistent with the target answer, determine to modify the mnemonic phrase;
[0167] Step 35: Randomly select a set number of secondary objective problems from the preset problem database and sort them randomly;
[0168] Step 36: Receive the secondary objective answer to the secondary objective question sent by the user;
[0169] Step 37: Based on the secondary target answer, generate a secondary mnemonic phrase for the digital currency wallet;
[0170] Step 38: Generate a secondary private key for the digital currency wallet based on the secondary mnemonic phrase;
[0171] Step 39: Based on the secondary private key, generate the secondary public key and secondary wallet address for the digital currency wallet, and perform asset migration for the digital currency wallet.
[0172] In this example, dual verification ensures the security of modification permissions. First, the original answer is verified by a fixed question to confirm the identity and prevent malicious modification by others. Then, a new question is randomly selected to generate a secondary mnemonic phrase to ensure the privacy of the modification process. The dual verification forms a complete security barrier.
[0173] This process enables a complete update of the key system, from the secondary answer to the secondary mnemonic phrase, private key, and address, thoroughly replacing the original key information. If the original mnemonic phrase is at risk of being leaked, this process can completely eliminate the potential danger.
[0174] Automatic asset migration enhances usability. After modification, the system automatically completes asset migration without manual operation by the user. This avoids operational errors during asset transfer and ensures a seamless transition of asset ownership to the new address, achieving a balance between security and convenience.
[0175] In an optional embodiment of the present invention, the method further includes:
[0176] Step 41: Receive the user's instruction to forget the mnemonic phrase;
[0177] Step 42: According to the mnemonic phrase forgetting instruction, set the number and fixed order of target questions from the preset question database;
[0178] Step 43: Receive the second verification target answer to the target question sent by the user;
[0179] Step 44: If the second verification target answer matches the target answer, it is confirmed that the operation was performed by the user.
[0180] Step 45: Send the mnemonic phrase to the user.
[0181] This example provides a reliable identity verification path, verifying the original answer through preset questions in a fixed order, ensuring that only the account holder can initiate the retrieval and preventing unauthorized claims. The verification logic is consistent with the question system used when the wallet was generated, utilizing user memory information as a security anchor, making it both convenient and secure.
[0182] Reduce the risk of asset loss. Users do not have to permanently lose control of their assets due to forgetting their mnemonic phrase. They can recover their mnemonic phrase by answering familiar personalized questions, which greatly reduces the burden of memory and operational risks, making it especially suitable for non-professional users.
[0183] The process design balances security and convenience. The fixed question order ensures consistent verification standards, and the answer comparison mechanism quickly confirms identity. Once verification is successful, the mnemonic phrase is returned directly. This simplifies the retrieval process while ensuring security, thus balancing asset protection and user experience.
[0184] In an optional embodiment of the present invention, the method further includes:
[0185] Step 51: Receive the user's command to freeze the mnemonic phrase;
[0186] Step 52: According to the freeze command, set the number and fixed order of target questions from the preset question database;
[0187] Step 53: Receive the third verification target answer to the target question sent by the user;
[0188] Step 54: If the third verification target answer is consistent with the target answer, determine to freeze the mnemonic words;
[0189] Step 55: Freeze the login command for the mnemonic phrase.
[0190] In this example, a rapid emergency loss mitigation channel is established. When a user discovers an account anomaly, they can immediately initiate protection by issuing a freeze command. After verifying their identity with the answer to a security question, login privileges based on the mnemonic phrase are frozen. Even if the mnemonic phrase has been leaked, attackers cannot log in, giving users time to investigate the risks.
[0191] Strict verification ensures the legality of operations, and a fixed-order question and answer comparison mechanism prevents malicious freezing by others, protects users' absolute control over freezing operations, and avoids abuse of the function that could hinder normal use.
[0192] Balancing security and operational flexibility, freezing only restricts login via mnemonic phrase and does not affect other security verification methods (such as subsequent unfreezing). This achieves risk isolation while preserving a path for users to restore their access, thus striking a reasonable balance between emergency protection and functional availability.
[0193] Example 1
[0194] Example 1 provides a key management method for a digital currency wallet, including:
[0195] Step 61, Pre-built problem database:
[0196] All users must enter at least five personalized questions (covering three dimensions). Each question must meet the criteria of 15-50 characters in length, unique and verifiable answers. User A enters:
[0197] Personal experience questions: What was my elementary school homeroom teacher's surname? What was the city of my first trip?
[0198] Knowledge-based question: What is the full name of my university major?
[0199] Preferences: What is my favorite sport? What is my usual email address suffix?
[0200] User B enters:
[0201] Personal experience category: What industry was my first job in?
[0202] Knowledge-based questions: What types of vehicles does my driver's license permit me to drive? What is my undergraduate institution?
[0203] Preferences: What payment apps do I use most often? What is my favorite season?
[0204] User C enters:
[0205] Personal experience category: What is the name of the county where I was born? What was the first item I bought online?
[0206] Knowledge-based question: What is the brand and model of my phone?
[0207] Preferences: What is my most frequently listened-to music genre? What is my preferred browser?
[0208] All user questions are subject to compliance verification (content is compliant, valid, and not duplicated) to form a target question set;
[0209] The questions are categorized and stored to form a pre-defined question database with three categories: personal experience, knowledge, and preferences.
[0210] Step 62, Creating a digital currency wallet:
[0211] User A clicks "Create Wallet," and the system receives the generation instruction and completes the legality verification.
[0212] The system randomly selects 5 questions from three category databases (randomly sorted):
[0213] Personal experience category: What industry was my first job in?
[0214] Knowledge-based question: What is the full name of my university major?
[0215] Preference category: What type of music do I listen to most often?
[0216] Personal experience category: What was the first city I traveled to?
[0217] Preference category: What is my favorite season?
[0218] User A entered the following answers in sequence: Internet, Computer Science and Technology, Rock Music, Shanghai, Autumn;
[0219] The system temporarily stores the answers after verifying their compliance.
[0220] The system generates a mnemonic phrase, private key, public key, and wallet address according to the process;
[0221] Examples of mnemonic phrases: train, book, high mountain, flame, lake, desert, white cloud, black night, lightning, rainbow, road, bridge;
[0222] Wallet address example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy;
[0223] Step 63, Wallet Login:
[0224] Zhang San clicks "Login," and the system receives the login command.
[0225] The system displays a mnemonic phrase input box;
[0226] Zhang San inputs the mnemonic phrase: apple, river, tree, sky, moon, star, ocean, mountain, flower, sun, forest, stone;
[0227] The system verifies that the input is correct, login is successful, and the wallet is now available.
[0228] Step 64, Modify the mnemonic phrase:
[0229] Li Si chooses to change his mnemonic phrase, and the system receives the modification instruction;
[0230] The system displays the original 5 questions in a fixed order. After Li Si enters the correct answers, the verification is successful.
[0231] The system will randomly select 5 new questions.
[0232] When Li Si enters a new answer, the system generates a new mnemonic phrase, private key, public key, and wallet address, and automatically completes the asset migration.
[0233] Step 65, Retrieving Forgotten Mnemonic Phrases:
[0234] Wang Wu clicked "Forget Mnemonic Phrase," and the system received the forgetting instruction.
[0235] The system displays the original 5 questions in a fixed order. Wang Wu enters the correct answers to verify his identity.
[0236] The system displayed the original mnemonic phrase to Wang Wu;
[0237] Step 66, Freeze the mnemonic phrase:
[0238] Zhao Liu discovered the account was suspicious and chose to freeze the mnemonic phrase.
[0239] The system displays a verification question; Zhao Liu enters the correct answer.
[0240] The system has frozen the mnemonic phrase login function to prevent others from logging in using the mnemonic phrase.
[0241] This invention completely solves the pain points of difficult mnemonic phrase memorization and high risk of loss. Traditional wallets use random mnemonic phrases that are meaningless, easily forgotten, and irretrievable once lost. This invention generates mnemonic phrases based on questions and answers derived from the user's life experiences and knowledge reserves. This type of information is highly familiar to the user and has a low forgetting rate. At the same time, it constructs a closed-loop recovery mechanism of question-answer-mnemonic phrase. If the user forgets the phrase, they can retrieve it by verifying it with a fixed question, ensuring that access to funds is always controllable and eliminating the risk of permanent asset loss.
[0242] The entire security chain is strengthened to enhance resistance to attacks. The pre-set question stage allows users to self-report questions, which are then combined with compliance verification (filtering risky questions and ensuring unique answers). This is combined with categorized storage (personal experience / knowledge / preference categories) to avoid the vulnerability of fixed template questions to social engineering attacks. When generating mnemonic phrases and private keys, standardized processing eliminates format errors, and double hashing and check bits prevent tampering and leakage, increasing the difficulty of cracking. Questions are randomly selected from multiple databases and randomly sorted, requiring attackers to have multi-dimensional information, significantly raising the security threshold.
[0243] Lowering the barrier to entry and enhancing universality; users do not need to memorize meaningless characters, but only need to remember personalized questions and answers; the interactive design is intuitive (question list + corresponding input box), reducing operational errors for non-technical users; functions such as mnemonic phrase modification and asset migration are completed automatically by the system, avoiding human error, catering to the needs of users with different memory characteristics and technical backgrounds, and enhancing the universality of the wallet.
[0244] It covers all scenarios and is flexible and controllable; login uses mnemonic phrases as credentials, balancing security and convenience; mnemonic phrase modification updates the key through dual verification (original question verification + new question generation), eliminating the risk of leakage; the emergency freeze function can quickly block abnormal logins, buy time for risk investigation, and does not affect subsequent unfreezing, forming a complete management system of generation-use-maintenance-emergency.
[0245] It is compatible with industry standards, ensuring stable availability; the generation of mnemonic phrases, private keys, public keys, and addresses all follow cryptographic norms and industry standards (such as elliptic curves and hash algorithms), and is compatible with mainstream digital currency ecosystems; standardized processing and compliance verification at each stage ensure data consistency and operational reliability, combining innovation and practicality.
[0246] like Figure 2 As shown, embodiments of the present invention also provide a key management device 20 for a digital currency wallet, comprising:
[0247] The receiving module 21 is used to receive the generation instruction issued by the user for generating a digital currency wallet; and to receive the target answer to the target question issued by the user.
[0248] The processing module 22 is configured to: randomly select a set number of target questions and randomly sort them from a preset question database according to the generation instruction; generate a mnemonic phrase for a digital currency wallet according to the target answer; generate a private key for a digital currency wallet according to the mnemonic phrase; and generate a public key and wallet address for a digital currency wallet according to the private key. The preset question database is obtained through the following process: receiving a set of target questions and obtaining the preset question database according to the set of target questions.
[0249] Optionally, a set number of target questions, randomly sorted, are randomly selected from a preset question database, including:
[0250] According to Q={q a q b , ..., q j}, Define the target problem;
[0251] Where Q is the objective problem, and P = {q1, q2, ..., q} m}, where P is the preset problem database, m is the number of specific problems in the preset problem database, and q a q b , ..., q j For a specific problem, a, b, ..., j ∈ [0, m].
[0252] Optionally, based on the target answer, a mnemonic phrase for a digital currency wallet is generated, including:
[0253] The target answer is standardized to obtain the standard target answer;
[0254] Perform a hash operation on the standard target answer to generate a hash value;
[0255] The hash value is divided into several sub-hash values;
[0256] Map each of the sub-hash values to a corresponding sub-mnemonic phrase;
[0257] The sub-mnemonic phrases are combined to generate the mnemonic phrase for a digital currency wallet.
[0258] Optionally, based on the mnemonic phrase, a private key for the digital currency wallet is generated, including:
[0259] Convert the mnemonic phrase into a seed value;
[0260] The seed value is used to generate key derivation data;
[0261] Extract bytes of a preset length from the key-derived data to serve as the private key for the digital currency wallet.
[0262] Optionally, based on the private key, a public key and wallet address for the digital currency wallet are generated, including:
[0263] The private key is processed to generate the corresponding public key;
[0264] Perform a hash operation on the public key to obtain the public key hash;
[0265] The public key hash is hashed to obtain the wallet address of the digital currency wallet.
[0266] Optionally, the processing module 22 is also used for:
[0267] Receive login commands from users for logging into their digital currency wallets;
[0268] Based on the login command, a mnemonic phrase input box is generated;
[0269] Receive the mnemonic phrase entered by the user in the mnemonic phrase input box;
[0270] If the entered mnemonic phrase matches the mnemonic phrase, the login is successful, and the digital currency wallet becomes usable.
[0271] Optionally, the processing module 22 is also used for:
[0272] Receive modification instructions from users to change their mnemonic phrases;
[0273] According to the modification instructions, a target number of questions with a fixed order are set from a preset question database;
[0274] Receive the first verified target answer to the target question sent by the user;
[0275] If the first verification target answer matches the target answer, then the mnemonic phrase will be modified.
[0276] A predetermined number and randomized number of secondary objective problems are randomly selected from a pre-defined problem database.
[0277] Receive the secondary objective answer to the secondary objective question sent by the user;
[0278] Based on the secondary target answer, generate a secondary mnemonic phrase for the digital currency wallet;
[0279] Based on the secondary mnemonic phrase, a secondary private key for the digital currency wallet is generated;
[0280] Based on the secondary private key, a secondary public key and a secondary wallet address for the digital currency wallet are generated, and asset migration of the digital currency wallet is performed.
[0281] Optionally, the processing module 22 is also used for:
[0282] Receive instructions from users to forget their mnemonic phrases;
[0283] Based on the mnemonic phrase forgetting instruction, target questions of a fixed quantity and order are set from a preset question database;
[0284] Receive the second verification target answer to the target question sent by the user;
[0285] If the second verification target answer matches the target answer, it is confirmed that the operation was performed by the user.
[0286] The mnemonic phrase is sent to the user.
[0287] Optionally, the processing module 22 is also used for:
[0288] Receive a freeze command from the user to freeze the mnemonic phrase;
[0289] According to the freeze command, a target number of questions with a fixed order are set from a preset question database;
[0290] Receive the third verification target answer to the target question sent by the user;
[0291] If the third verification target answer matches the target answer, then the mnemonic phrase is frozen.
[0292] Freeze the login command for the mnemonic phrase.
[0293] It should be noted that this device is a device corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0294] Embodiments of the present invention also provide a computing device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0295] Embodiments of the present invention also provide a computing device readable storage medium storing instructions that, when executed on a computing device, cause the computing device to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0296] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computing device software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0297] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0298] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0299] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0300] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0301] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computing device-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computing device software product is stored in a storage medium and includes several instructions to cause a computing device (which may be a personal computing device, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0302] Furthermore, it should be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent solutions of the present invention. Moreover, the steps performing the above-described series of processes can naturally be executed in the order described, but are not necessarily required to be executed in chronological order; some steps can be executed in parallel or independently of each other. Those skilled in the art will understand that all or any step or component of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or a combination thereof. This is something that those skilled in the art can achieve using basic programming skills after reading the description of the present invention.
[0303] Therefore, the object of the present invention can also be achieved by running a program or a set of programs on any computing device. The computing device can be a known general-purpose device. Therefore, the object of the present invention can also be achieved simply by providing a program product containing program code implementing the method or apparatus. That is, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent to the present invention. Furthermore, the steps performing the above series of processes can naturally be performed in the order described, but are not necessarily required to be performed in chronological order. Some steps can be performed in parallel or independently of each other.
[0304] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A key management method for a digital currency wallet, characterized in that, include: Receive user-sent instructions to generate a digital currency wallet; According to the generation instructions, a set number of target questions are randomly selected from a preset question database and randomly sorted. Receive the target answer to the target question submitted by the user; Based on the target answer, generate a mnemonic phrase for a digital currency wallet; Generate a private key for your digital currency wallet based on the mnemonic phrase. Based on the private key, generate the public key and wallet address for the digital currency wallet; The preset question database is obtained through the following process: receiving a target question set; and obtaining the preset question database based on the target question set.
2. The key management method for a digital currency wallet according to claim 1, characterized in that, A predetermined number of target questions are randomly selected from a pre-defined question database and randomly sorted, including: According to Q={q a q b , ..., q j }, Define the target problem; Where Q is the objective problem, and P = {q1, q2, ..., q} m }, where P is the preset problem database, m is the number of specific problems in the preset problem database, and q a q b , ..., q j For a specific problem, a, b, ..., j ∈ [0, m].
3. The key management method for a digital currency wallet according to claim 1, characterized in that, Based on the target answer, generate a mnemonic phrase for your digital currency wallet, including: The target answer is standardized to obtain the standard target answer; Perform a hash operation on the standard target answer to generate a hash value; The hash value is divided into several sub-hash values; Map each of the sub-hash values to a corresponding sub-mnemonic phrase; The sub-mnemonic phrases are combined to generate the mnemonic phrase for a digital currency wallet.
4. The key management method for a digital currency wallet according to claim 1, characterized in that, Based on the mnemonic phrase, a private key for a digital currency wallet is generated, including: Convert the mnemonic phrase into a seed value; The seed value is used to generate key derivation data; Extract bytes of a preset length from the key-derived data to serve as the private key for the digital currency wallet.
5. The key management method for a digital currency wallet according to claim 1, characterized in that, Based on the private key, generate the public key and wallet address for the digital currency wallet, including: The private key is processed to generate the corresponding public key; Perform a hash operation on the public key to obtain the public key hash; The public key hash is hashed to obtain the wallet address of the digital currency wallet.
6. The key management method for a digital currency wallet according to claim 1, characterized in that, Also includes: Receive login commands from users for logging into their digital currency wallets; Based on the login command, a mnemonic phrase input box is generated; Receive the mnemonic phrase entered by the user in the mnemonic phrase input box; If the entered mnemonic phrase matches the mnemonic phrase, the login is successful, and the digital currency wallet becomes usable.
7. The key management method for a digital currency wallet according to claim 6, characterized in that, Also includes: Receive modification instructions from users to change their mnemonic phrases; According to the modification instructions, a target number of questions with a fixed order are set from a preset question database; Receive the first verified target answer to the target question sent by the user; If the first verification target answer matches the target answer, then the mnemonic phrase will be modified. A predetermined number and randomized number of secondary objective problems are randomly selected from a pre-defined problem database. Receive the secondary objective answer to the secondary objective question sent by the user; Based on the answer to the secondary target, generate a secondary mnemonic phrase for the digital currency wallet; Based on the secondary mnemonic phrase, a secondary private key for the digital currency wallet is generated; Based on the secondary private key, a secondary public key and a secondary wallet address for the digital currency wallet are generated, and asset migration of the digital currency wallet is performed.
8. The key management method for a digital currency wallet according to claim 6, characterized in that, Also includes: Receive instructions from users to forget their mnemonic phrases; Based on the mnemonic phrase forgetting instruction, a target number of questions with a fixed order are set from a preset question database; Receive the second verification target answer to the target question sent by the user; If the second verification target answer matches the target answer, it is confirmed that the operation was performed by the user. The mnemonic phrase is sent to the user.
9. The key management method for a digital currency wallet according to claim 6, characterized in that, Also includes: Receive a freeze command from the user to freeze the mnemonic phrase; According to the freeze command, a target number of questions with a fixed order are set from a preset question database; Receive the third verification target answer to the target question sent by the user; If the third verification target answer matches the target answer, then the mnemonic phrase is frozen. Freeze the login command for the mnemonic phrase.
10. A key management device for a digital currency wallet, characterized in that, include: The receiving module is used to receive the user's command to generate a digital currency wallet; and to receive the target answer to the target question issued by the user. The processing module is configured to: randomly select a set number of target questions and randomly sort them from a preset question database according to the generation instruction; generate a mnemonic phrase for a digital currency wallet based on the target answer; generate a private key for a digital currency wallet based on the mnemonic phrase; and generate a public key and wallet address for a digital currency wallet based on the private key. The preset question database is obtained through the following process: receiving a set of target questions and obtaining the preset question database based on the set of target questions.
Citation Information
Patent Citations
Digital currency wallet management method and device, electronic apparatus and storage medium
CN109003059A
Method and system for hosting wallets by decentralized smart contracts
CN111159774A
Passkey-based key-free block chain wallet implementation method
CN119338461A