Password retrieving method based on block chain wallet mnemonic word and storage medium
By using blockchain wallet mnemonics and auxiliary identity verification during the password recovery process, the security risks existing in existing password recovery methods are solved, achieving higher security and convenience.
Patent Information
- Application Number
- CN202411903265.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
AI Technical Summary
Existing password recovery methods have security risks, such as users cannot access the registered email address, the answers to security questions are easily guessed, or the phone is lost or stolen, resulting in the password recovery process being unsafe.
The password recovery method based on the blockchain wallet mnemonic is adopted to generate mnemonics and associate them with the user account. Through mnemonics verification and auxiliary authentication, the account recovery key is exported and a new password is re-encrypted.
Improve the security of password recovery, avoid security risks in traditional methods, and ensure the security and convenience of the account recovery process.
Smart Images

Figure CN119834965A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method and storage medium for retrieving a password based on a blockchain wallet mnemonic. Background Art
[0002] With the widespread popularity of mobile Internet, people will register accounts on various websites or apps. After a long time, they will forget their passwords. Currently, there are three common ways to retrieve passwords:
[0003] 1. Retrieve through the registered email address. Users usually provide an email address when registering an account. When they forget their password, they can reset their password through this email address.
[0004] 2. Retrieve through security questions. When creating an account, the system will ask the user to set a few questions that only they know (such as "What was the name of your first pet?"). When you forget your password, you can answer these questions to verify your identity and reset your password.
[0005] 3. Retrieve via SMS verification code. The mobile phone number provided by the user when registering the account can be used to receive the verification code. After verifying the identity by entering the verification code, the password can be reset.
[0006] However, the above three methods of recalling passwords have the following problems:
[0007] a. If the user cannot access their registered email address or forgets their email login information, this method becomes ineffective;
[0008] b. When retrieving via security questions, if the answers to the security questions are easy to guess or obtain, the security of the account will be reduced. In addition, over time, the user may forget the answer or the answer itself may change;
[0009] c. When retrieving via SMS verification code, this method may also have security risks if the user's phone is lost or stolen, or the SIM card is copied. In addition, if the user's mobile phone number has been changed and the contact information in the account has not been updated in time, this method will not be feasible. Summary of the invention
[0010] In view of the above problems, the present application provides a method and storage medium for retrieving passwords based on blockchain wallet mnemonics to solve the problem of security risks in existing password retrieval methods.
[0011] To achieve the above purpose, the inventor provides a method for retrieving a password based on a blockchain wallet mnemonic, comprising the following steps:
[0012] When a user registers an account, a mnemonic phrase is generated;
[0013] Based on the blockchain BIP39 proposal, the generated mnemonic phrase is associated with the user's registered account;
[0014] When the user retrieves the password, obtain the mnemonic phrase entered by the user;
[0015] Verify the correspondence between the mnemonic phrase entered by the user and the account;
[0016] After the mnemonic verification is passed, the user will undergo auxiliary identity verification;
[0017] When the secondary identity authentication is passed, the account recovery key is exported using the seed data generated by the mnemonic, and the new password is re-encrypted using the account recovery key.
[0018] In some embodiments, generating a mnemonic specifically includes the following steps:
[0019] Generate entropy, where the entropy is a 128-bit random number;
[0020] Calculate the hash of the entropy and take the first 4 bits to get the checksum;
[0021] Connect the checksum to the end of the entropy to form a 132-bit binary string;
[0022] Cut the binary string into 12 equal parts to obtain 12 binary substrings;
[0023] Convert each binary substring into decimal and search the mnemonic with the corresponding number in the mnemonic database;
[0024] Connect the 12 mnemonics in order using connectors to form a mnemonic phrase.
[0025] In some embodiments, the process of establishing an association between the generated mnemonic and the user's registered account based on the blockchain BIP39 proposal specifically includes the following steps:
[0026] Based on the blockchain BIP39 proposal, the mnemonic phrase is generated into a seed;
[0027] Use the hdkeychain package in btcutil to pass in the seed to generate the MasterKey;
[0028] Iteratively calculate the MasterKey value and convert the final MasterKey into the private key of the ecdsa algorithm;
[0029] Infer the public key based on the private key using the elliptic curve algorithm;
[0030] Pass in the public key and call the PubkeyToAddress function to generate a blockchain wallet address;
[0031] Bind the blockchain wallet address to the account to establish a one-to-one correspondence.
[0032] In some embodiments, the auxiliary identity verification includes a text message verification code, email verification, or hardware verification.
[0033] In some embodiments, the following steps are also included:
[0034] Monitor user login behavior in real time and trigger an alarm when abnormal behavior is detected.
[0035] In some embodiments, the following steps are also included:
[0036] The encryption key is generated from the mnemonic through the PBKDF2 algorithm and the user's sensitive data is encrypted.
[0037] In some embodiments, the following steps are also included:
[0038] After the user's data is encrypted, it is distributed and stored in multiple nodes of the blockchain network.
[0039] In some embodiments, the following steps are also included:
[0040] A redundant strategy is used to store user data.
[0041] In some embodiments, the following steps are also included:
[0042] When the user enters the mnemonic phrase more than the preset number of times in a row, the user's account will be locked.
[0043] Another technical solution is also provided, a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the method for retrieving a password based on a blockchain wallet mnemonic as described above are executed.
[0044] Different from the existing technology, the above technical solution automatically generates a mnemonic when the user registers an account, and then establishes an association between the generated mnemonic and the user's registered account through the blockchain BIP39 proposal. When the user forgets the password and retrieves the password, the user enters the corresponding mnemonic. After obtaining the mnemonic entered by the user, the corresponding relationship between the mnemonic entered by the user and the account is verified; when the mnemonic is verified, the user's auxiliary identity verification is performed. When the auxiliary identity verification is passed, the mnemonic is used to generate seed data, and the account recovery key is derived through the seed data. The account recovery key is used to decrypt the original encrypted data and re-encrypt to generate a new password. By utilizing the mnemonic generation and verification technology of the blockchain wallet and combining it with modern password retrieval technology, the security of password retrieval is improved and the security risks of traditional methods are avoided.
[0045] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings are only used to illustrate the principles, implementation methods, applications, characteristics and effects of the specific embodiments of the present invention and other related contents, and shall not be considered as limiting the present application.
[0047] In the drawings of the specification:
[0048] Figure 1 A flowchart of a method for retrieving a password based on a blockchain wallet mnemonic described in a specific implementation method;
[0049] Figure 2 A schematic diagram of a process for generating mnemonics according to a specific implementation method;
[0050] Figure 3 Another schematic diagram of a process for generating a mnemonic phrase according to a specific implementation method;
[0051] Figure 4 A schematic diagram of a flow chart of step S120 described in the specific implementation method;
[0052] Figure 5 Another flowchart of step S120 of the specific implementation method is shown in FIG.
[0053] Figure 6 A schematic diagram of the structure of the storage medium described in the specific implementation method.
[0054] The reference numerals in the above drawings are described as follows:
[0055] 610. Storage medium,
[0056] 620. Processor. DETAILED DESCRIPTION
[0057] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0058] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0059] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0060] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0061] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0062] Without further limitations, in this application, the words "include", "comprises", "has" or other similar open-ended expressions used in sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0063] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0064] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0065] The processor described in the embodiments of the present application can be implemented by hardware, firmware, software or a combination thereof, and can use a circuit, a single or multiple application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, at least one of a microprocessor, and also includes other physical, biological or chemical structures that can achieve similar or equivalent functions to the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of the present application, or any combination of the steps mentioned therein.
[0066] The computer program involved in the embodiment can be stored in a computer device readable storage medium, which includes but is not limited to a disk, a tape, a magnetic card, a floppy disk, a flash memory, an optical disk, an optical card, a read-only memory (ROM), a random access memory (RAM), an erasable programmable ROM (EPROM) and an electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical or chemical structures that can achieve the same or equivalent functions as the storage media listed above, such as DNA, RNA, protein and other units with information storage capabilities. In a specific embodiment, the storage medium involved can be one of the above-mentioned media types, or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiment can be stored in a single medium in a centralized manner, or it can be stored in multiple media in a distributed manner. The memory containing the computer device readable storage medium can be a non-volatile memory or a random access memory. These computer device readable storage media can be built into the device, or they can be connected to the device involved in the embodiment as an external device or a part of an external device. In some embodiments, a memory with a computer device readable storage medium is deployed locally; in other embodiments, a solution of deploying the memory away from the processor may also be adopted, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), etc., or a suitable combination thereof, as long as the computer device can access the memory. In addition, the computer program involved in the embodiment may be stored in plaintext / ciphertext form, or may be designed as training data, which may be integrated and reorganized through model training and implicitly stored in the parameter state of a deep neural network or other machine learning model.
[0067] See also Figure 1 , this embodiment provides a method for retrieving a password based on a blockchain wallet mnemonic, comprising the following steps:
[0068] Step S110: When a user registers an account, a mnemonic phrase is generated;
[0069] Step S120: Establishing an association between the generated mnemonic and the user's registered account based on the blockchain BIP39 proposal;
[0070] Step S130: When the user retrieves the password, obtain the mnemonic phrase input by the user;
[0071] Step S140: verifying the correspondence between the mnemonic phrase input by the user and the account;
[0072] Step S150: After the mnemonic verification is passed, the user is subjected to auxiliary identity verification;
[0073] Step S160: When the auxiliary identity authentication is passed, the account recovery key is derived using the seed data generated by the mnemonic, and the new password is re-encrypted using the account recovery key.
[0074] When a user registers an account, a mnemonic is automatically generated, and then the generated mnemonic is associated with the user's registered account through the blockchain BIP39 proposal. When the user forgets the password and retrieves the password, the user enters the corresponding mnemonic. After obtaining the mnemonic entered by the user, the corresponding relationship between the mnemonic entered by the user and the account is verified; when the mnemonic is verified, the user's auxiliary identity verification is performed. When the auxiliary identity verification passes, the mnemonic is used to generate seed data, and the account recovery key is exported through the seed data. The account recovery key is used to decrypt the original encrypted data and re-encrypt to generate a new password. By utilizing the mnemonic generation and verification technology of the blockchain wallet and combining it with modern password retrieval technology, the security of password retrieval is improved and the security risks of traditional methods are avoided.
[0075] See also Figure 2 In some embodiments, generating a mnemonic word specifically includes the following steps:
[0076] Step S210: Generate entropy, where the entropy is a 128-bit random number;
[0077] Step S220: Calculate the hash of the entropy and take the first 4 bits to obtain the checksum;
[0078] Step S230: Connect the checksum to the end of the entropy to form a 132-bit binary string;
[0079] Step S240: cutting the binary string into 12 equal parts to obtain 12 binary substrings;
[0080] Step S250: convert each binary substring into decimal and search for the mnemonic word with the corresponding number in the mnemonic word library;
[0081] Step S260: Connect the 12 mnemonics in order using connectors to form a mnemonic phrase.
[0082] Mnemonics are the basis of this method, and their generation and verification process are directly related to account security. This process complies with the blockchain BIP39 (Bitcoin Improvement Proposals) proposal, and the generated logic process is as follows: Figure 3 As shown, the following steps are included:
[0083] Step 1: Generate entropy, which is a 128-bit random number;
[0084] Step 2: Calculate the hash of the entropy and take the first 4 bits to get the checksum;
[0085] Step 3: Connect the checksum to the end of the entropy to form a 132-bit binary string;
[0086] Step 4: Cut the 132-bit binary string into 12 equal parts;
[0087] Step 5: After converting each piece of data into decimal, search for the mnemonic with the corresponding number in the pre-defined mnemonic database;
[0088] Step 6: Connect the 12 words in order using spaces to form the final mnemonic phrase.
[0089] Among them, when a mnemonic phrase of 12 words is generated, the user can be reminded to back it up immediately to avoid irreversible account loss due to the loss of the mnemonic phrase. In addition, the mnemonic dictionary (a total of 2048 words) can support multiple languages. For example, in an English environment, 2048 commonly used English words can be selected to form a mnemonic dictionary. Among them, the mnemonic phrase is only displayed once, and the user needs to save it properly. Allow users to encrypt and store mnemonics in a private cloud or save them to other secure media. The system can regularly remind users to check whether the mnemonic backup is available. If the user has not backed up the mnemonic phrase, the system will provide backup suggestions when logging in.
[0090] In some embodiments, the auxiliary identity verification includes a text message verification code, email verification, or hardware verification.
[0091] When users register, a mnemonic will be generated according to the mnemonic generation logic and backup instructions will be provided. Users need to set a login password at the same time and bind a mobile phone number, email or device as an auxiliary identity verification method; after the mnemonic verification is passed, users need to complete auxiliary identity verification, including but not limited to:
[0092] SMS verification code: The system sends a one-time password (OTP) to the bound mobile phone number.
[0093] Email verification: Send a secure link to the user's bound email address.
[0094] Hardware verification: Verification is performed through the hardware device bound to the user.
[0095] Failure of secondary verification will prevent the password recovery operation.
[0096] See also Figure 4 In some embodiments, the step of establishing an association between the generated mnemonic and the user's registered account based on the blockchain BIP39 proposal specifically includes the following steps:
[0097] Step S410: Generate a seed from the mnemonic phrase based on the blockchain BIP39 proposal;
[0098] Step S420: Use the hdkeychain package in btcutil to pass in the seed to generate the MasterKey;
[0099] Step S430: iteratively calculate the MasterKey value and convert the final MasterKey into a private key of the ecdsa algorithm;
[0100] Step S440: inferring the public key using the elliptic curve algorithm according to the private key;
[0101] Step S450: pass in the public key, call the PubkeyToAddress function, and generate a blockchain wallet address;
[0102] Step S460: Bind the blockchain wallet address to the account to establish a one-to-one correspondence.
[0103] The mnemonic and account are as follows Figure 5 The mnemonic words are associated with the account in the following steps. The original mnemonic words will not be saved on the server to prevent the risk of leakage. Specifically, the mnemonic words are associated with the account in the following steps:
[0104] Step 1: Generate a seed from the mnemonic phrase using the BIP39 proposal;
[0105] Step 2: Use the hdkeychain package in btcutil to pass in the seed to generate the MasterKey;
[0106] Step 3: Iteratively calculate the key value and convert the final key into the private key (PrivateKey) of the ecdsa algorithm;
[0107] Step 4: Infer the public key (PublicKey) based on the private key using the elliptic curve algorithm;
[0108] Step 5: Pass in the public key (PublicKey), call the PubkeyToAddress function, and generate the blockchain wallet address (Address);
[0109] Step 6: Bind the blockchain wallet address to the account to establish a one-to-one correspondence.
[0110] Among them, after the user clicks the "retrieve password" function, he needs to enter the complete mnemonic phrase in the same order. The mnemonic phrase entered by the user is matched with the mnemonic phrase library one by one to verify the legitimacy of the mnemonic phrase. After the legitimacy verification is passed, the blockchain wallet address is inferred step by step using the mnemonic phrase through the steps described above, and then the correspondence between the wallet address and the account is verified.
[0111] In some embodiments, the following steps are also included:
[0112] Monitor user login behavior in real time and trigger an alarm when abnormal behavior is detected.
[0113] Real-time monitoring of user login behavior, including device fingerprints, IP addresses, and geographic locations. When abnormal behavior is detected (such as multiple incorrect mnemonics input in a short period of time, cross-regional logins), an alarm will be triggered.
[0114] In some embodiments, the following steps are also included:
[0115] The encryption key is generated from the mnemonic through the PBKDF2 algorithm and the user's sensitive data is encrypted.
[0116] The PBKDF2 algorithm is used to generate encryption keys from mnemonics and encrypt user sensitive data. AES-256 is used to encrypt user passwords, account information, and verification data.
[0117] In some embodiments, the following steps are also included:
[0118] After the user's data is encrypted, it is distributed and stored in multiple nodes of the blockchain network.
[0119] After user data is encrypted, it is distributed and stored in multiple nodes of the blockchain network to avoid single point failure. Data access is controlled by smart contracts, and only authenticated users can decrypt it.
[0120] In some embodiments, the following steps are also included:
[0121] A redundant strategy is used to store user data.
[0122] Data storage adopts a redundant strategy to ensure that user data can be recovered even if some nodes fail. Mnemonic backup is updated synchronously with account data to ensure consistency.
[0123] In some embodiments, the following steps are also included:
[0124] When the user enters the mnemonic phrase more than the preset number of times in a row, the user's account will be locked.
[0125] If the user enters the wrong mnemonic more than the set number of times (such as 3 times), the system will lock the account to prevent brute force cracking. The system will send an account abnormality notification to the user, prompting him to check whether the binding information is safe. At the same time, before the user logs in, he will be prompted to unlock through additional verification (such as CAPTCHA). The user can apply for unlocking through the bound email or mobile phone number. Account unlocking requires multi-factor verification to ensure the authenticity of the user's identity.
[0126] In some embodiments, the following steps are also included:
[0127] Check the user's account status, and when an account abnormality is detected, send an alarm notification to the user's bound device or email.
[0128] In some embodiments, a method for retrieving passwords based on blockchain wallet mnemonics is provided. By using the mnemonic generation and verification technology of the blockchain wallet (Wallet) and combining it with modern password retrieval technology, a set of safe and convenient password retrieval solutions is designed. Its core modules include the following parts:
[0129] Mnemonic generation module: responsible for generating mnemonic phrases that comply with the BIP39 standard.
[0130] User registration and binding module: realizes the binding of users and mnemonic phrases and the secure storage of mnemonics.
[0131] Password retrieval process module: restore account permissions by having the user enter a mnemonic phrase.
[0132] Data encryption and storage module: encrypt sensitive data and store them in a distributed manner.
[0133] Abnormal monitoring and user protection module: monitor abnormal account behavior in real time and take security protection measures.
[0134] The main goal of this method is to improve the security of password recovery and avoid the security risks of traditional methods, while providing ease of use and ensuring that users can quickly recover their accounts if they forget their passwords.
[0135] This method improves the security of password retrieval: through the mechanism based on blockchain wallet mnemonics, the vulnerable vulnerabilities in traditional methods are avoided during the password retrieval process. Mnemonics combine the characteristics of high entropy randomness and distributed storage, greatly enhancing the system's anti-cracking ability.
[0136] This method improves retrieval efficiency and ease of operation: users can complete verification and password retrieval by entering a mnemonic phrase without complicated steps, and multi-factor authentication is combined to further enhance security.
[0137] Compared with existing password recovery methods, it has the following advantages:
[0138] 1. Higher security:
[0139] Use mnemonic generation technology based on the BIP39 standard to ensure the uniqueness and anti-cracking of the mnemonic.
[0140] Data encryption uses the AES-256 algorithm, combined with the tamper-proof nature of blockchain, to significantly improve user data security.
[0141] 2. Stronger privacy protection:
[0142] Mnemonics are only generated and stored on the user side and not saved on the server, eliminating the risk of server-side leakage.
[0143] Keys and sensitive information are encrypted through distributed storage, and attackers cannot obtain data through centralized attacks.
[0144] 3. Convenience of operation:
[0145] Users do not need to perform complicated operations, they only need to enter the mnemonic to complete the password retrieval. The length and content of the mnemonic are easy to remember, and users are prompted to back it up to prevent loss.
[0146] It supports a variety of auxiliary verification methods (such as SMS, email, hardware devices). Even if the mnemonic phrase is lost, the user still has a certain probability of recovering the account.
[0147] 4. Real-time security monitoring:
[0148] The system monitors user behavior in real time and automatically triggers protection measures when anomalies are detected (such as brute force cracking, cross-region login).
[0149] Provide notification alerts to ensure users are informed of account status and can take action in a timely manner.
[0150] 5. Internationalization support:
[0151] The mnemonic word library supports multiple language environments, such as English, Chinese, etc., which is convenient for global users and enhances the user experience.
[0152] See also Figure 6 In another embodiment, a storage medium 610 stores a computer program, and when the computer program is executed by a processor 620, the steps in the method for retrieving a password based on a blockchain wallet mnemonic in the above embodiment are executed.
[0153] Specifically, the following steps are included:
[0154] When a user registers an account, a mnemonic phrase is generated;
[0155] Based on the blockchain BIP39 proposal, the generated mnemonic phrase is associated with the user's registered account;
[0156] When the user retrieves the password, obtain the mnemonic phrase entered by the user;
[0157] Verify the correspondence between the mnemonic phrase entered by the user and the account;
[0158] After the mnemonic verification is passed, the user will undergo auxiliary identity verification;
[0159] When the secondary identity authentication is passed, the account recovery key is exported using the seed data generated by the mnemonic, and the new password is re-encrypted using the account recovery key.
[0160] When a user registers an account, a mnemonic is automatically generated, and then the generated mnemonic is associated with the user's registered account through the blockchain BIP39 proposal. When the user forgets the password and retrieves the password, the user enters the corresponding mnemonic. After obtaining the mnemonic entered by the user, the corresponding relationship between the mnemonic entered by the user and the account is verified; when the mnemonic is verified, the user's auxiliary identity verification is performed. When the auxiliary identity verification passes, the mnemonic is used to generate seed data, and the account recovery key is exported through the seed data. The account recovery key is used to decrypt the original encrypted data and re-encrypt to generate a new password. By utilizing the mnemonic generation and verification technology of the blockchain wallet and combining it with modern password retrieval technology, the security of password retrieval is improved and the security risks of traditional methods are avoided.
[0161] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. A method for retrieving a password based on a blockchain wallet mnemonic, characterized in that: The following steps are involved: When a user registers an account, a mnemonic phrase is generated; Based on the blockchain BIP39 proposal, the generated mnemonic phrase is associated with the user's registered account; When the user retrieves the password, obtain the mnemonic phrase entered by the user; Verify the correspondence between the mnemonic phrase entered by the user and the account; After the mnemonic verification is passed, the user will undergo auxiliary identity verification; When the secondary identity authentication is passed, the account recovery key is exported using the seed data generated by the mnemonic, and the new password is re-encrypted using the account recovery key.
2. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The generating of mnemonics specifically comprises the following steps: Generate entropy, where the entropy is a 128-bit random number; Calculate the hash of the entropy and take the first 4 bits to get the checksum; Connect the checksum to the end of the entropy to form a 132-bit binary string; Cut the binary string into 12 equal parts to obtain 12 binary substrings; Convert each binary substring into decimal and search the mnemonic with the corresponding number in the mnemonic database; Connect the 12 mnemonics in order using connectors to form a mnemonic phrase.
3. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The method of establishing an association between the generated mnemonic and the user's registered account based on the blockchain BIP39 proposal specifically includes the following steps: Based on the blockchain BIP39 proposal, the mnemonic phrase is generated into a seed; Use the hdkeychain package in btcutil to pass in the seed to generate the MasterKey; Iteratively calculate the MasterKey value and convert the final MasterKey into the private key of the ecdsa algorithm; Infer the public key based on the private key using the elliptic curve algorithm; Pass in the public key and call the PubkeyToAddress function to generate a blockchain wallet address; Bind the blockchain wallet address to the account to establish a one-to-one correspondence.
4. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The auxiliary identity verification includes SMS verification code, email verification or hardware verification.
5. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The following steps are also included: Monitor user login behavior in real time and trigger an alarm when abnormal behavior is detected.
6. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The following steps are also included: The encryption key is generated from the mnemonic through the PBKDF2 algorithm and the user's sensitive data is encrypted.
7. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The following steps are also included; After the user's data is encrypted, it is distributed and stored in multiple nodes of the blockchain network.
8. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 7, characterized in that: The following steps are also included: A redundant strategy is used to store user data.
9. The method for retrieving a password based on a blockchain wallet mnemonic according to claim 1, characterized in that: The following steps are also included: When the user enters the mnemonic phrase more than the preset number of times in a row, the user's account will be locked.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the steps in the method for retrieving a password based on a blockchain wallet mnemonic as described in any one of claims 1 to 9 are executed.