A key management method and device of a digital currency wallet
By generating instructions in a digital currency wallet, randomly selecting questions, and combining them with hash operations to generate mnemonic phrases, the security and forgetfulness issues of single private key management are solved, achieving highly secure and easy-to-use key management.
Patent Information
- Application Number
- CN202511387024.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-09-26
AI Technical Summary
Existing digital currency wallets rely on a single private key for key management, which means that users lose access if the private key is lost or stolen. Mnemonic phrases are also difficult to remember and easy to forget, making it impossible to effectively protect user assets.
The system generates a command to randomly select a target question from a pre-defined question database. The user answers the question to generate a mnemonic phrase, which is then used to generate a private key and a public key. By combining hash operations and key derivation processes, the security and uniqueness of the mnemonic phrase are ensured, and multiple layers of encryption are used to raise the security threshold.
It reduces the probability of forgetting mnemonic phrases, enhances the security of key management, requires attackers to crack multi-dimensional user information, raises the security threshold, simplifies the user's memory burden, and provides a convenient authentication and asset management process.
Smart Images

Figure CN120875875B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the application relates to the field of digital currency security, and particularly relates to a key management method and device of a digital currency wallet. BACKGROUND
[0002] The digital currency wallet is a tool for storing, managing and trading digital currency, and the key management of the existing digital currency wallet mainly depends on a single private key to control fund access. Once the private key is lost, stolen or damaged, the user will permanently lose the access right to the fund. The mnemonic word of the existing digital currency wallet is generally randomly generated, and it is difficult for the customer to remember. Once forgotten, the access right to the fund will also be lost. SUMMARY
[0003] The technical problem to be solved by the embodiment of the application is to provide a key management method and device of a digital currency wallet, which can solve the problems of difficult mnemonic word memory and high loss risk.
[0004] To solve the above technical problem, the technical scheme of the embodiment of the application is as follows:
[0005] A key management method of a digital currency wallet comprises the following steps:
[0006] Receiving a generation instruction for generating a digital currency wallet sent by a user;
[0007] According to the generation instruction, a target question of a set number and random order is randomly selected from a preset question database;
[0008] Receiving a target answer of the target question sent by the user;
[0009] According to the target answer, a mnemonic word of the digital currency wallet is generated;
[0010] According to the mnemonic word, a private key of the digital currency wallet is generated;
[0011] According to the private key, a public key and a wallet address of the digital currency wallet are generated;
[0012] The preset question database is obtained through the following process: receiving a target question set; and obtaining the preset question database according to the target question set.
[0013] Optionally, the target question of the set number and random order is randomly selected from the preset question database, and the method comprises the following steps:
[0014] According to Q={q a , q b ,..., q j}, the target question is determined;
[0015] Wherein, Q is a target question, P={q1, q2,..., qm} is a preset question database, m is the number of specific questions in the preset question database, q1, q2,..., qm are specific questions, a, b,..., j∈[0, m]. m} and P is a preset question database, m is the number of specific questions in the preset question database, q a , q b ,..., q j are specific questions, a, b,..., j∈[0, m].
[0016] Optionally, according to the target answer, a mnemonic word of a digital currency wallet is generated, comprising:
[0017] The target answer is standardized to obtain a standard target answer;
[0018] Hash operation is performed on the standard target answer to generate a hash value;
[0019] The hash value is divided into a plurality of sub-hash values;
[0020] Each of the sub-hash values is mapped to a corresponding sub-mnemonic word;
[0021] The sub-mnemonic words are combined to generate a mnemonic word of a digital currency wallet.
[0022] Optionally, according to the mnemonic word, a private key of the digital currency wallet is generated, comprising:
[0023] The mnemonic word is converted into a seed value;
[0024] Operation is performed on the seed value to generate key derivation data;
[0025] A byte of a preset length is extracted from the key derivation data as a private key of a digital currency wallet.
[0026] Optionally, according to the private key, a public key and a wallet address of the digital currency wallet are generated, comprising:
[0027] The private key is processed to generate a corresponding public key;
[0028] Hash operation is performed on the public key to obtain a public key hash;
[0029] Hash operation is performed on the public key hash to obtain a wallet address of a digital currency wallet.
[0030] Optionally, the above method further comprises:
[0031] A login instruction for logging into a digital currency wallet is received;
[0032] According to the login instruction, a mnemonic word input box is generated;
[0033] The input mnemonic word in the mnemonic word input box is received.
[0034] If the input mnemonic is consistent with the mnemonic, the login is successful, and the digital currency wallet enters a usable state.
[0035] Optionally, the method further comprises:
[0036] receiving a modification instruction issued by the user for modifying the mnemonic;
[0037] According to the modification instruction, a target question of a set number and fixed order is set from a preset question database;
[0038] receiving a first verification target answer of the target question issued by the user;
[0039] If the first verification target answer is consistent with the target answer, it is determined to modify the mnemonic;
[0040] randomly selecting a secondary target question of a set number and random order from the preset question database;
[0041] receiving a secondary target answer of the secondary target question issued by the user;
[0042] According to the secondary target answer, a secondary mnemonic of the digital currency wallet is generated;
[0043] According to the secondary mnemonic, a secondary private key of the digital currency wallet is generated;
[0044] According to the secondary private key, a secondary public key and a secondary wallet address of the digital currency wallet are generated, and asset migration of the digital currency wallet is performed.
[0045] Optionally, the method further comprises:
[0046] receiving a mnemonic forgetting instruction issued by the user;
[0047] According to the mnemonic forgetting instruction, a target question of a set number and fixed order is set from a preset question database;
[0048] receiving a second verification target answer of the target question issued by the user;
[0049] If the second verification target answer is consistent with the target answer, it is determined to be a personal operation;
[0050] sending the mnemonic to the user.
[0051] Optionally, the method further comprises:
[0052] receiving a freezing instruction issued by the user for freezing the mnemonic;
[0053] According to the freezing instruction, a target question in a preset question database is set in a quantity and fixed in a sequence;
[0054] A third verification target answer of the target question sent by the user is received;
[0055] If the third verification target answer is consistent with the target answer, it is determined to freeze the mnemonic word;
[0056] A login instruction of the mnemonic word is frozen.
[0057] Embodiments of the application also provide a key management device of a digital currency wallet, comprising:
[0058] A receiving module is configured to receive a generation instruction for generating a digital currency wallet sent by a user, and receive a target answer of a target question sent by the user;
[0059] A processing module is configured to randomly select a target question in a preset question database in a quantity and in a random sequence according to the generation instruction, generate a mnemonic word of the digital currency wallet according to the target answer, generate a private key of the digital currency wallet according to the mnemonic word, and generate a public key and a wallet address of the digital currency wallet according to the private key; wherein the preset question database is obtained through the following process: receiving a target question set, and obtaining the preset question database according to the target question set.
[0060] The above-mentioned scheme of the embodiments of the application has at least the following beneficial effects:
[0061] The above-mentioned scheme of the embodiments of the application has at least the following beneficial effects: BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 FIG. 1 is a flowchart of a key management method of a digital currency wallet provided by an embodiment of the application.
[0063] Figure 2 FIG. 2 is a module schematic diagram of a key management device of a digital currency wallet provided by an embodiment of the application. DETAILED DESCRIPTION
[0064] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
[0065] As shown in Figure 1 An embodiment of the present application provides a key management method of a digital currency wallet, comprising:
[0066] Step 11, receiving a generation instruction for generating a digital currency wallet issued by a user;
[0067] Step 12, according to the generation instruction, randomly selecting a set number of target questions randomly sorted from a preset question database;
[0068] Step 13, receiving a target answer to the target question issued by the user;
[0069] Step 14, generating a mnemonic word of a digital currency wallet according to the target answer;
[0070] Step 15, generating a private key of a digital currency wallet according to the mnemonic word;
[0071] Step 16, generating a public key and a wallet address of a digital currency wallet according to the private key;
[0072] Wherein, the preset question database is obtained by the following process:
[0073] Step 101, receiving a target question set;
[0074] Step 102, obtaining the preset question database according to the target question set.
[0075] In this example, the mnemonic word is generated by the user based on the target answer to the target question, and the target answer is the user's high-familiarity memory content, which reduces the probability of forgetting from the source. Through the preset question database, the random selection mechanism and the encryption processing, the single private key single point risk is avoided, and the attacker needs to break through the multi-dimensional user memory information to crack, and the security threshold is significantly improved.
[0076] In an optional embodiment of the present application, in step 101, the target question set is received, comprising:
[0077] Step 1011, receiving a personalized question input by the user;
[0078] Step 1012, performing compliance verification on the personalized question to obtain a target question set.
[0079] Specifically, the personalized question is a special question set by the user based on memory characteristics, life experience or knowledge reserve, and the personalized question can adapt to all users; the character length of a single personalized question is within a preset interval.
[0080] The compliance verification includes content compliance verification, validity verification and repeatability verification.
[0081] In this example, through user self-recording of questions + compliance verification, a secure and practical foundation is built for digital currency wallet key management, and security and personalized adaptation are strengthened. Users can enter special questions based on life experience and knowledge reserve, and such information is highly personalized and difficult for others to guess, avoiding the risk of social engineering attacks on fixed template questions. At the same time, different user memory habits are adapted, allowing users to select the most easily remembered information to reduce the probability of answer forgetting from the source.
[0082] Ensure the validity and compliance of the question set. Content compliance verification filters illegal and privacy disclosure risk questions to avoid legal and dispute risks; validity verification limits character length and excludes ambiguous questions to ensure clear question expression, unique and verifiable answers, and provides reliable basis for subsequent mnemonic word generation and identity verification; repeatability verification avoids similar questions, ensures question diversity, and improves attacker cracking difficulty.
[0083] The target question set after compliance forms a high-quality preset database, which provides standardized and reliable data support for subsequent core processes such as generating mnemonic words by randomly selecting questions and verifying identity through questions, and ensures stable operation of the overall key system.
[0084] In an optional embodiment of the present application, in step 102, the preset question database is obtained according to the target question set, including:
[0085] Step 1021 classifies 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 stores the classified personalized questions respectively to obtain at least two preset question databases; specifically, personal experience, knowledge and preference preset question databases can be obtained.
[0087] In this example, by classifying and storing personalized problems, the security and practicality of the key management system are significantly improved, and the diversity and cracking resistance of problem selection are enhanced. By classifying and storing problems into categories such as personal experiences, knowledge, and preferences, it is ensured that subsequent random selection of target problems can cover multi-dimensional information. Attackers need to master multiple aspects of user information to crack, significantly increasing the attack threshold and avoiding the risk of single-type problems being easily targeted for cracking.
[0088] Optimizing user memory and verification experience. Classified storage makes problem selection more balanced, avoiding focusing on user's weak memory areas and reducing the probability of answer forgetting. At the same time, the classification logic conforms to user's cognitive habits, making the identity verification process more natural and improving the convenience of use.
[0089] Providing structured data support for subsequent functions. The classified database provides a standardized framework for problem selection in scenarios such as modifying mnemonics and retrieving mnemonics, ensuring that verification questions are both random and multi-dimensional, ensuring 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 application, in step 11, the generation instruction for generating a digital currency wallet issued by the user is received, including:
[0091] Receiving a generation instruction for generating a digital currency wallet issued by a user;
[0092] Validating the user, including device interaction, account status, and secure storage condition verification.
[0093] In this example, the security of wallet generation is improved through the validation: device interaction verification ensures the safety of the operating environment, preventing malicious devices; account status verification excludes abnormal account risks; and secure storage condition verification ensures the reliability of the subsequent key storage environment. The three verifications intercept risks from the source, avoid generating wallets in unsafe environments or abnormal states, and build a strong first line of defense for subsequent key management, reducing the risk of key leakage due to device or account problems.
[0094] In an optional embodiment of the present application, in step 12, a set number of target problems are randomly selected from a preset problem database and randomly sorted, including:
[0095] Step 121, determining the target problem according to Q={q a , q b ,..., q j};
[0096] Wherein, Q is the target problem, P={q1, q2,..., q m} is the preset problem database, and m is the number of specific problems in the preset problem database.a , q b ,..., q j For specific problems, a, b,..., j [0, m].
[0097] Specifically, a certain number of target problems can be randomly selected from at least two groups of preset problem databases and randomly sorted to avoid single type of target problems and low security.
[0098] In this example, the anti-attack ability is strengthened, the problems are randomly selected from at least two groups of databases and the order is disturbed, so that the attacker cannot guess the answers by the characteristics of single type of problems. The combination of multiple categories of problems (such as personal experience + knowledge + preference) forces the attacker to master the multi-dimensional information of the user, greatly improves the cracking difficulty, and solves the hidden danger that single type of problems is easily broken through.
[0099] Guaranteeing randomness and fairness, the mathematical model Q={q a , q b ,..., q j} ensures that the selection process is traceable and unbiased, and the probability of each problem being selected is equal, avoiding the risk that regularity can be used due to fixed mode.
[0100] Random sorting avoids the formation of fixed answering habits by the user, and at the same time, the balanced distribution of multiple categories of problems meets the memory characteristics of the user, reduces the probability of answer forgetting caused by the concentration of problems in a certain field, and balances between security and ease of use.
[0101] In an optional embodiment of the present application, in step 13, the target answer of the target problem sent by the user is received, comprising:
[0102] Step 131, sequentially display the target problems selected from the preset problem database in the form of a list, and match the corresponding answer input box;
[0103] Step 132, the answer input by the user is checked for compliance; specifically, the compliance check includes content compliance check and validity check.
[0104] Step 133, receiving and temporarily storing the target answer.
[0105] In this example, the interactive experience is optimized and the operation error is reduced, the problems are sequentially displayed in the form of a list and matched with the input box, so that the interface is clear and intuitive, and the user's answer filling and omission caused by operation confusion are reduced, especially for non-technical users.
[0106] The answer validity is ensured by compliance verification, the content compliance verification filters illegal and sensitive information to avoid risks, and the validity verification ensures that the answer format is standard and unique to avoid fuzzy or invalid answers affecting the accuracy of subsequent mnemonic word generation, thereby providing a reliable input basis for the key system.
[0107] The temporary storage mechanism strengthens data security, temporarily stores the answers to avoid leakage risks caused by long-term storage, and provides temporary data support for subsequent hash operation processing, thereby balancing data availability and security and building a defense line for the intermediate link of key generation.
[0108] In an optional embodiment of the present application, in step 14, the mnemonic word of the digital currency wallet is generated according to the target answer, including:
[0109] In step 141, the target answer is standardized to obtain a standard target answer; specifically, the standardization includes format unification, sequence integration and code conversion; the format unification includes removing spaces, punctuation marks and special characters in all target answers, uniformly converting letters in the target answer to lowercase format, splicing multiple target answers according to their display order of corresponding questions to form a continuous string, and inserting a separator at the splicing position to distinguish different answers; and converting the integrated string into a byte sequence of uniform code to obtain the standard target answer;
[0110] In step 142, a hash operation is performed on the standard target answer to generate a hash value; specifically, according to H1=SHA(S), the original hash value of the standard target answer is obtained;
[0111] Wherein, H1 is the original hash value of the standard target answer, SHA is a hash operation function, and S is the byte sequence of the standard target answer;
[0112] According to H2=SHA(H1), the secondary hash value of the standard target answer is obtained;
[0113] Wherein, H2 is the secondary hash value of the standard target answer;
[0114] The first four bits of the secondary hash value H2 of the standard target answer are taken as the check bit C of the standard target answer;
[0115] According to H=H1||C, the hash value of the standard target answer is obtained;
[0116] In step 143, the hash value is divided into a plurality of sub-hash values; specifically, the hash value is divided into a plurality of sub-hash values in a set unit;
[0117] Step 144, mapping each of the sub-hash values to a corresponding sub-mnemonic; specifically, mapping each of the sub-hash values to a corresponding sub-mnemonic according to a mnemonic word table;
[0118] Step 145, combining the sub-mnemonics to generate a mnemonic of the digital currency wallet; specifically, combining the sub-mnemonics in the order of the sub-hash values to generate the mnemonic of the digital currency wallet.
[0119] In this example, through the systematic encryption processing flow, the user's answer is safely converted into a mnemonic, and the standardized processing eliminates variable interference. By removing special characters, unifying the case, splicing the answer in order and inserting a separator, it is ensured that the same answer can generate a unique standard value regardless of the input form difference (such as punctuation, space change). The encoding is converted into a uniform byte sequence to provide a stable input basis for subsequent encryption operations, avoiding mnemonic deviation caused by format errors from the source, and ensuring the consistency of the generated results.
[0120] The multi-layer encryption mechanism builds a secure defense line. The secondary hash operation hides the answer information in the original hash, and the secondary hash generates a check bit. It not only prevents the answer from being leaked through the irreversibility of the encryption algorithm, but also verifies the data integrity through the check bit to eliminate the risk of tampering during transmission or processing. Hash value segmentation and word table mapping further increase the cracking difficulty, making it impossible for attackers to reverse the original answer from the mnemonic.
[0121] According to the steps of hash segmentation-word table mapping-sequence combination, the mnemonic is generated, which not only conforms to the industry general format and ensures compatibility with the mainstream wallet ecosystem, but also binds with the user's personalized answer to realize the generation of mnemonic-friendly mnemonic, solving the pain point of difficult memory of traditional random mnemonic.
[0122] The whole process of encryption processing from answer input to mnemonic output not only preserves the binding relationship between user memory information and key (convenient for recovery), but also isolates the original answer and the final mnemonic through cryptographic means, realizing the organic unity of easy memory and high security, and providing a reliable basis for subsequent private key generation.
[0123] In an optional embodiment of the present application, in step 15, a private key of the digital currency wallet is generated according to the mnemonic, comprising:
[0124] Step 151, converting the mnemonic into a seed value; specifically, determining the converted seed value according to M = UTF(N);
[0125] Wherein, M is the converted seed value, UTF is a string conversion function, and N is the mnemonic;
[0126] Step 152, operation is performed on the seed value to generate key derivation data; specifically, the key derivation data is determined according to S=PBKDF(M);
[0127] Wherein, S is the key derivation data, and PBKDF is the key derivation function;
[0128] Step 153, extracting a byte of a preset length from the key derivation data as a private key of a digital currency wallet.
[0129] In this example, the mnemonic is securely converted into a private key through a standardized key derivation process, and the standardized conversion ensures key consistency. The mnemonic is converted into a seed value through a string conversion function, eliminating variable differences caused by character encoding, ensuring that the same mnemonic generates a unique seed value in different devices or systems, providing a stable foundation for subsequent operations and avoiding inconsistent private keys due to encoding problems.
[0130] The seed value is processed using a key derivation function, which increases the difficulty of brute force cracking through multiple iterations. Even if the seed value is partially leaked, it is difficult for attackers to quickly reverse the original mnemonic or private key. Compared with the simple way of generating a private key directly from a mnemonic, this processing significantly improves the cracking threshold of the key system.
[0131] Extracting a byte of a preset length from the derived data as a private key ensures that the generated private key meets the encryption standards of the corresponding digital currency, meeting both the security requirements of cryptography and the compatibility with the blockchain network, and avoiding transaction failures due to format errors.
[0132] The whole process from the mnemonic to the seed value and then to the key derivation data forms a secure conversion closed loop of mnemonic-seed-private key, retaining the advantage of easy-to-remember mnemonics and achieving a secure transition from user-friendly form to encryption core through cryptographic operations, laying a solid foundation for subsequent public key and address generation.
[0133] In an optional embodiment of the present application, in step 16, a public key and a wallet address of a digital currency wallet are generated according to the private key, comprising:
[0134] Step 161, processing the private key to generate a corresponding public key; specifically, the corresponding public key is determined according to T=K×G;
[0135] Wherein, T is the corresponding public key, K is the private key, and G is the generator point of the elliptic curve;
[0136] Step 162, performing a hash operation on the public key to obtain a public key hash; specifically, the original hash value of the public key is obtained according to G1=SHA(T);
[0137] Wherein, G1 is the original hash value of the public key, SHA is a hash operation function;
[0138] According to G2=SHA(G1), the second hash value of the public key is obtained;
[0139] Wherein, G2 is the second hash value of the public key;
[0140] The first four bits of the second hash value G2 of the public key are taken as the check digit D of the public key;
[0141] According to G=G1||D, the public key hash is obtained;
[0142] Wherein, G is the public key hash;
[0143] Step 163, performing a hash operation on the public key hash to obtain the wallet address of the digital currency wallet; Specifically, according to B1=SHA(G), the original hash value of the wallet address is obtained;
[0144] Wherein, B1 is the original hash value of the wallet address;
[0145] According to B2=SHA(B1), the second hash value of the wallet address is obtained;
[0146] Wherein, B2 is the second hash value of the wallet address;
[0147] The first four bits of the second hash value B2 of the wallet address are taken as the check digit E of the wallet address;
[0148] According to B=G||E, the wallet address of the digital currency wallet is obtained;
[0149] Wherein, B is the wallet address of the digital currency wallet.
[0150] In this example, the elliptic curve algorithm T=KxG is used, which uses the asymmetric encryption feature to ensure the one-way irreversibility from the private key to the public key. The public key cannot be deduced from the private key, which not only meets the core security requirements of digital currency transactions, but also meets the industry general encryption standard, ensuring compatibility with the blockchain network.
[0151] The public key and the address are subjected to a second hash operation, and a check digit mechanism (the first four hash values are taken as the check digit) is used, which can hide the original public key information through encryption processing, and can quickly verify the validity when the address is transmitted or input, avoiding asset loss due to address errors.
[0152] The generation link from the public key to the address (private key-public key-public key hash-wallet address) completely follows the cryptography specification, ensuring that the same private key always generates a unique address, and the address format conforms to the encoding standard of the corresponding digital currency, compatible with the mainstream transaction ecosystem.
[0153] The full-link encryption process is formed from the user's answer to the final address, which not only retains the core control of the private key, but also realizes the safe public interaction through the public key and the address, and perfectly balances the privacy and transaction openness of the digital currency management.
[0154] In an optional embodiment of the present application, the method further comprises:
[0155] Step 21, receiving a login instruction issued by a user for logging into a digital currency wallet;
[0156] Step 22, generating a mnemonic input box according to the login instruction;
[0157] Step 23, receiving an input mnemonic in the mnemonic input box by the user;
[0158] Step 24, if the input mnemonic is consistent with the mnemonic, the login is successful, and the digital currency wallet enters a usable state.
[0159] In this example, the security of the identity verification is strengthened, the mnemonic is used as the login credential, and the unique binding relationship with the private key is used to ensure that only the legitimate user can access the wallet. Compared with password login, the mnemonic has a longer length and stronger randomness, and the probability of being brute-forced is extremely low, providing a core defense line for asset security.
[0160] The login process is simplified to improve the ease of use, and the user only needs to input the mnemonic to complete the verification, without the need to remember complex private keys or rely on third-party verification. The process is intuitive and simple. The mnemonic is generated based on the user's own answer, and the difficulty of remembering is lower than that of random characters, reducing the use threshold of ordinary users.
[0161] The reliability of the login state is ensured, and the user identity is confirmed through the consistency check of the mnemonic to avoid illegal access. After the verification, the wallet enters a usable state, which not only guarantees the convenience of normal use, but also prevents unauthorized operations through strict verification mechanism, achieving a precise balance between security protection and user experience.
[0162] In an optional embodiment of the present application, the method further comprises:
[0163] Step 31, receiving a modification instruction issued by a user for modifying the mnemonic;
[0164] Step 32, according to the modification instruction, setting a target question of a fixed number and fixed order from a preset question database;
[0165] Step 33, receiving a first verification target answer of the target question issued by the user;
[0166] Step 34, if the first verification target answer is consistent with the target answer, it is determined to modify the mnemonic;
[0167] Step 35, randomly selecting a set number of secondary target questions from the preset question database and randomly sorting the secondary target questions;
[0168] Step 36, receiving a secondary target answer to the secondary target question sent by the user;
[0169] Step 37, generating a secondary mnemonic word of the digital currency wallet according to the secondary target answer;
[0170] Step 38, generating a secondary private key of the digital currency wallet according to the secondary mnemonic word;
[0171] Step 39, generating a secondary public key and a secondary wallet address of the digital currency wallet according to the secondary private key, and performing asset migration of the digital currency wallet.
[0172] In this example, the double verification ensures the security of the modification authority, the original answer is verified through the fixed question to confirm the identity, and the modification process is prevented from being maliciously modified by others; and the secondary mnemonic word is generated by randomly selecting a new question, so as to ensure the privacy of the modification process, and the double verification forms a complete and safe barrier.
[0173] The key system is completely updated, and the full-link update from the secondary answer to the secondary mnemonic word, the private key and the address is realized, and the original key information is completely replaced, so that if the original mnemonic word has a risk of leakage, the hidden danger can be completely eliminated through the process.
[0174] Automatic asset migration improves ease of use, and the system automatically completes asset migration after modification, without the need for manual operation of the user, which not only avoids operation errors in asset transfer, but also ensures that the asset ownership is seamlessly transferred to the new address, and a balance is achieved between safety and convenience.
[0175] In an optional embodiment of the application, the above method further comprises:
[0176] Step 41, receiving a mnemonic word forgetting instruction sent by the user;
[0177] Step 42, selecting a set number of target questions from the preset question database according to the mnemonic word forgetting instruction and sorting the target questions in a fixed order;
[0178] Step 43, receiving a second verification target answer to the target question sent by the user;
[0179] Step 44, if the second verification target answer is consistent with the target answer, it is determined that the operation is performed by the user himself;
[0180] Step 45, sending the mnemonic word to the user.
[0181] In this example, a reliable identity verification path is provided, and the original answer is verified through a fixed sequence of preset questions to ensure that only the person himself / herself can initiate the recovery, thereby avoiding false claims by others. The verification logic is consistent with the question system during wallet generation, and the user's memory information is used as a security anchor, which is convenient and safe.
[0182] The risk of asset loss is reduced, and the user does not need to permanently lose control of the asset due to the forgetting of the mnemonic word. The mnemonic word can be recovered through familiar personalized questions, which greatly reduces the memory burden and operational risk, and is especially suitable for non-professional users.
[0183] The process design takes into account safety and convenience, the fixed question sequence ensures consistent verification standards, the answer comparison mechanism quickly confirms the identity, and the mnemonic word is directly returned after verification, which simplifies the recovery process while ensuring safety, and balances asset protection and user experience.
[0184] In an optional embodiment of the present application, the above method further comprises:
[0185] Step 51, receiving a freezing instruction for freezing the mnemonic word issued by the user;
[0186] Step 52, setting a number of target questions in a fixed sequence from a preset question database according to the freezing instruction;
[0187] Step 53, receiving a third verification target answer of the target question issued by the user;
[0188] Step 54, if the third verification target answer is consistent with the target answer, it is determined to freeze the mnemonic word;
[0189] Step 55, freezing the login instruction of the mnemonic word.
[0190] In this example, a quick emergency stop-loss channel is constructed, and when the user finds that the account is abnormal, the protection can be started immediately through the freezing instruction. After the identity is verified through the question answer, the mnemonic word login permission is frozen. Even if the mnemonic word has been leaked, the attacker cannot log in and operate, which gives the user a time window to check the risk.
[0191] Strict verification ensures the legality of the operation, and the fixed sequence of questions and answer comparison mechanism prevents others from maliciously initiating freezing, ensures the absolute control right of the user on the freezing operation, and avoids the misuse of the function to block normal use.
[0192] Balancing safety and operational flexibility, freezing only restricts mnemonic word login without affecting other security verification methods (such as subsequent unfreezing), which not only realizes risk isolation but also reserves a path for the user to recover and use, and forms a reasonable balance between emergency protection and function availability.
[0193] Example 1
[0194] Example 1 provides a key management method of a digital currency wallet, comprising:
[0195] Step 61, preset question database construction:
[0196] All users need to enter at least five personalized questions (covering three dimensions), each question needs to meet the character length of 15-50 words, unique and verifiable answer standards, user A enters:
[0197] Personal experience type: What is the surname of my primary school class teacher? What city did I travel to for the first time?
[0198] Knowledge type: What is the full name of my university major?
[0199] Preference type: What is my favorite sport? What is the suffix of my commonly used email?
[0200] User B enters:
[0201] Personal experience type: What is the industry of my first job?
[0202] Knowledge type: What is the license type of my driver's license? What is my undergraduate college?
[0203] Preference type: What is my commonly used payment software? What is my favorite season?
[0204] User C enters:
[0205] Personal experience type: What is the county name of my birthplace? What is the first online shopping product I bought?
[0206] Knowledge type: What is the brand and model of my phone?
[0207] Preference type: What is the music type I listen to most often? What is the browser I commonly use?
[0208] All user questions are checked for compliance (content compliance, validity, and non-repetition) to form a target question set;
[0209] Store the questions by category to form a preset question database of three categories: personal experience type, knowledge type, and preference type;
[0210] Step 62, digital currency wallet creation:
[0211] User A clicks to create a wallet, and the system receives the generation instruction and completes the legalization check;
[0212] The system randomly selects 5 questions from the three category databases (randomly sorted):
[0213] Personal experience type: What is the industry of my first job?
[0214] Knowledge category: What is the full name of my university major?
[0215] Preference category: What is my most common type of music?
[0216] Personal experience category: What is the city of my first trip?
[0217] Preference category: What is my favorite season?
[0218] User A inputs the answers in turn: Internet, Computer Science and Technology, Rock and Roll, Shanghai, Autumn;
[0219] The system temporarily stores the answers after compliance verification;
[0220] The system generates a mnemonic, private key, public key, and wallet address according to the process;
[0221] Mnemonic example: Train, Book, Mountain, Flame, Lake, Desert, Cloud, 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 instruction;
[0225] The system displays a mnemonic input box;
[0226] Zhang San inputs the mnemonic: Apple, River, Tree, Sky, Moon, Star, Ocean, Mountain, Flower, Sun, Forest, Stone;
[0227] The system verifies that the input is correct, the login is successful, and the wallet enters an available state;
[0228] Step 64, modify mnemonic:
[0229] Li Si selects to modify the mnemonic, and the system receives the modification instruction;
[0230] The system displays the original 5 questions in fixed order, and Li Si inputs the correct answers, which are verified;
[0231] The system randomly selects 5 new questions;
[0232] Li Si inputs the new answers, and the system generates a new mnemonic, private key, public key, and wallet address, and automatically completes asset migration;
[0233] Step 65, mnemonic forgotten retrieval:
[0234] Wang Wu clicks on the forgotten mnemonic, and the system receives the forgotten instruction;
[0235] The system displays the original five questions in fixed order, and Wang Wu inputs the correct answers to verify the identity;
[0236] The system displays the original mnemonic to Wang Wu;
[0237] Step 66, freeze the mnemonic;
[0238] Zhao Liu finds that the account is abnormal and chooses to freeze the mnemonic;
[0239] The system displays the verification question, and Zhao Liu inputs the correct answer;
[0240] The system freezes the mnemonic login function to prevent others from using the mnemonic to log in.
[0241] The invention completely solves the pain points of mnemonic memory difficulty and high risk of loss. The traditional wallet random mnemonic is meaningless, easy to forget and cannot be recovered after loss. The mnemonic of the invention is generated by the user based on life experience, knowledge reserve, question and answer deduction. This kind of information belongs to daily high familiarity memory, and the forgetting rate is low. At the same time, a closed loop recovery mechanism of question-answer-mnemonic is constructed. The user can retrieve it through fixed question verification after forgetting, ensuring that the access right of funds is always controllable, and eliminating the risk of permanent loss of assets.
[0242] Strengthen the security of the whole link and improve the anti-attack ability; preset the question link, and the user can record the question independently combined with compliance verification (filter risk questions and ensure the uniqueness of answers), and store it in categories (personal experience, knowledge and preference), which avoids the defect that fixed template questions are easy to be attacked by social engineering; when the mnemonic and private key are generated, standardized processing eliminates format errors, secondary hash + check bits prevent tampering and leakage, and the cracking difficulty is improved; the question is randomly selected from multiple libraries and randomly sorted, so that the attacker needs to master multi-dimensional information, and the security threshold is significantly improved.
[0243] Reduce the use threshold and improve the universality; the user does not need to recite meaningless characters, but only needs to remember personalized questions and answers; the interactive design is intuitive (question list + corresponding input box), which reduces the operation error of non-technical users; the mnemonic modification and asset migration functions are automatically completed by the system, avoiding human errors, meeting the needs of users with different memory characteristics and technical backgrounds, and enhancing the universality of the wallet.
[0244] Cover all scene needs and realize flexible and controllable login with mnemonic as the credential, balancing security and convenience; mnemonic modification updates the key through double verification (original question verification + new question generation), eliminating the risk of leakage; the emergency freezing function can quickly block abnormal login, saving time for risk investigation, and does not affect subsequent unfreezing, forming a complete management system of generation, use, maintenance and emergency.
[0245] Compatible with industry standards, stable and reliable; mnemonic, private key, public key and address generation comply with cryptographic specifications and industry standards (such as elliptic curve, hash algorithm), compatible with mainstream digital currency ecology; standardized processing and compliance verification at each link ensure data consistency and operation reliability, with innovation and practicality.
[0246] As Figure 2 shown, the embodiment of the application also provides a key management device 20 of a digital currency wallet, comprising:
[0247] The receiving module 21 is configured to receive a generation instruction for generating a digital currency wallet issued by a user; and receive a target answer of a target question issued by the user.
[0248] The processing module 22 is configured to randomly select a set number of target questions in random order from a preset question database according to the generation instruction; generate a mnemonic of the digital currency wallet according to the target answer; generate a private key of the digital currency wallet according to the mnemonic; generate a public key and a wallet address of the digital currency wallet according to the private key; and wherein the preset question database is obtained by the following process: receiving a target question set, and obtaining the preset question database according to the target question set.
[0249] Optionally, the randomly selecting a set number of target questions in random order from the preset question database comprises:
[0250] According to Q={q a , q b ,..., q j}, determining the target question.
[0251] Wherein, Q is a target question, P={q1, q2,..., q m}, P is a preset question database, m is the number of specific questions in the preset question database, q a , q b ,..., q j is a specific question, a, b,..., j∈[0, m].
[0252] Optionally, the generating a mnemonic of the digital currency wallet according to the target answer comprises:
[0253] Standardizing the target answer to obtain a standard target answer;
[0254] Performing a hash operation on the standard target answer to generate a hash value;
[0255] Dividing the hash value into a plurality of sub-hash values;
[0256] Mapping each sub-hash value to a corresponding sub-mnemonic.
[0257] combining the sub-mnemonics to generate a mnemonic of the digital currency wallet.
[0258] Optionally, generating a private key of the digital currency wallet according to the mnemonic includes:
[0259] converting the mnemonic into a seed value;
[0260] operating the seed value to generate key derivation data;
[0261] extracting bytes of a preset length from the key derivation data as the private key of the digital currency wallet.
[0262] Optionally, generating a public key and a wallet address of the digital currency wallet according to the private key includes:
[0263] processing the private key to generate a corresponding public key;
[0264] performing a hash operation on the public key to obtain a public key hash;
[0265] performing a hash operation on the public key hash to obtain the wallet address of the digital currency wallet.
[0266] Optionally, the processing module 22 is further configured to:
[0267] receive a login instruction issued by a user for logging into the digital currency wallet;
[0268] generate a mnemonic input box according to the login instruction;
[0269] receive an input mnemonic in the mnemonic input box by the user;
[0270] if the input mnemonic is consistent with the mnemonic, the login is successful, and the digital currency wallet enters a usable state.
[0271] Optionally, the processing module 22 is further configured to:
[0272] receive a modification instruction issued by the user for modifying the mnemonic;
[0273] determine a target question of a set number and a fixed order from a preset question database according to the modification instruction;
[0274] receive a first verification target answer of the target question issued by the user;
[0275] if the first verification target answer is consistent with the target answer, it is determined to modify the mnemonic;
[0276] randomly select a secondary target question of a set number and a random order from the preset question database;
[0277] receiving a secondary target answer of the secondary target question issued by the user;
[0278] generating a secondary mnemonic word of the digital currency wallet according to the secondary target answer;
[0279] generating a secondary private key of the digital currency wallet according to the secondary mnemonic word;
[0280] generating a secondary public key and a secondary wallet address of the digital currency wallet according to the secondary private key, and performing asset migration of the digital currency wallet.
[0281] Optionally, the processing module 22 is further configured to:
[0282] receiving a mnemonic word forgetting instruction issued by the user;
[0283] setting a target question in a preset quantity and fixed order from a preset question database according to the mnemonic word forgetting instruction;
[0284] receiving a second verification target answer of the target question issued by the user;
[0285] if the second verification target answer is consistent with the target answer, determining that it is a personal operation;
[0286] sending the mnemonic word to the user.
[0287] Optionally, the processing module 22 is further configured to:
[0288] receiving a freezing instruction for freezing the mnemonic word issued by the user;
[0289] setting a target question in a preset quantity and fixed order from a preset question database according to the freezing instruction;
[0290] receiving a third verification target answer of the target question issued by the user;
[0291] if the third verification target answer is consistent with the target answer, determining to freeze the mnemonic word;
[0292] freezing the login instruction of the mnemonic word.
[0293] It should be noted that the device corresponds to the above method, and all implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0294] The embodiment of the present application further provides a computing device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above. All implementation manners in the above method embodiment are applicable to this embodiment, and the same technical effects can also be achieved.
[0295] The embodiment of the present application further provides a computing device readable storage medium, storing instructions, when the instructions are run on the computing device, the computing device executes the method as described above. All implementation manners in the above method embodiment are applicable to this embodiment, and the same technical effects can also be achieved.
[0296] Those skilled in the art can clearly understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of software and electronic hardware of the computing device. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0297] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0298] In the embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0299] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0300] In addition, each functional unit in various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.
[0301] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of software products. The software product of the computing device is stored in a storage medium and includes a plurality of instructions for causing a computing device (which can be a personal computing device, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various program code storage media.
[0302] In addition, it should be noted that in the device and method of the present application, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of the present application. Moreover, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not necessarily have to be executed in time sequence. Some steps can be executed in parallel or independently of each other. It can be understood by those skilled in the art that all or any steps or components of the method and device of the present application can be realized in hardware, firmware, software or a combination thereof in any computing device (including a processor, a storage medium, etc.) or a network of computing devices, which can be realized by those skilled in the art with basic programming skills by reading the description of the present application.
[0303] Therefore, the object of the present application can also be realized by running a program or a set of programs on any computing device. The computing device can be a commonly known general-purpose device. Therefore, the object of the present application can also be realized only by providing a program product containing program code for realizing the method or device. That is, such a program product also constitutes the present application, and a storage medium storing such a program product also constitutes the present application. Obviously, the storage medium can be any commonly known storage medium or any storage medium developed in the future. It should be noted that in the device and method of the present application, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions of the present application. Moreover, the steps of performing the above series of processes can naturally be executed in time sequence according to the order of description, but do not necessarily have to be executed in time sequence. Some steps can be executed in parallel or independently of each other.
[0304] The above is the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the principles described in the present application, can also be made several improvements and refinements, these improvements and refinements should also be considered the scope of protection of the present application.
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, randomly sorted, are randomly selected from a preset question database; 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. The process of generating a mnemonic phrase for a digital currency wallet based on the target answer includes: 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 phrases for a digital currency wallet; The process of generating a private key for a digital currency wallet based on the mnemonic phrase includes: 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.
2. The key management method for a digital currency wallet according to claim 1, characterized in that, Randomly select a set number of target questions from a pre-defined question database, and sort them randomly. These include: according to Q ={ q a , q b ,..., q j }, Define the target problem; in, Q For the target problem, P ={ q 1, q 2, ..., q m }, P To pre-define the problem database, m To preset the number of specific questions in the question database, q a , q b ,..., q j For specific issues, 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 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.
4. 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.
5. The key management method for a digital currency wallet according to claim 4, 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 of secondary objective problems are randomly selected from a pre-defined problem database and randomly sorted. Receive the secondary objective answer to the secondary objective question sent by the user; Based on the secondary target answer, 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.
6. The key management method for a digital currency wallet according to claim 4, characterized in that, Also includes: Receive instructions from users to forget their mnemonic phrases; Based on the mnemonic phrase forgetting instruction, target questions of a fixed quantity and 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.
7. The key management method for a digital currency wallet according to claim 4, 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.
8. 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 the digital currency wallet based on the mnemonic phrase; and generate a public key and wallet address for the 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. The process of generating a mnemonic phrase for a digital currency wallet based on the target answer includes: 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 phrases for a digital currency wallet; The process of generating a private key for a digital currency wallet based on the mnemonic phrase includes: 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.
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