CN112291355B - Key backup and recovery method and device for block chain wallet - Google Patents

Key backup and recovery method and device for block chain wallet Download PDF

Info

Publication number
CN112291355B
CN112291355B CN202011200625.4A CN202011200625A CN112291355B CN 112291355 B CN112291355 B CN 112291355B CN 202011200625 A CN202011200625 A CN 202011200625A CN 112291355 B CN112291355 B CN 112291355B
Authority
CN
China
Prior art keywords
storage
backup
mnemonic
key
storage nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011200625.4A
Other languages
Chinese (zh)
Other versions
CN112291355A (en
Inventor
杨安荣
李宏辉
朱超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ajibi Information Technology Co ltd
Original Assignee
Shanghai Ajibi Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Ajibi Information Technology Co ltd filed Critical Shanghai Ajibi Information Technology Co ltd
Priority to CN202011200625.4A priority Critical patent/CN112291355B/en
Publication of CN112291355A publication Critical patent/CN112291355A/en
Application granted granted Critical
Publication of CN112291355B publication Critical patent/CN112291355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a key backup and recovery method and a device of a blockchain wallet, which are applied to a server and comprise the following steps: receiving request information sent by a client, wherein the request information comprises mnemonics; obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm; and storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words, distributing the storage nodes according to the mnemonic words corresponding to the secret keys, and storing the backup files on the storage nodes, thereby improving the safety of the backup files.

Description

Key backup and recovery method and device for block chain wallet
Technical Field
The invention relates to the technical field of blockchain, in particular to a key backup and recovery method and device for a blockchain wallet.
Background
With the rapid development of blockchain technology, the private key of the digital wallet is an important basis for proving the ownership of user blockchain digital assets.
Currently, the way of providing backup for the user is to convert the private key of the user into a text file, and store the text file in the installation path of the client of the blockchain wallet, in a locally specified file directory, or in a server for centralized backup. However, the storage method has a security risk, and when a hacker maliciously attacks the host, the private key backup file of the user can be easily acquired, so that the backup file of the user is leaked, and the security is poor.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for key backup and recovery of a blockchain wallet, which allocate storage nodes according to mnemonics corresponding to keys, store backup files on the storage nodes, and improve the security of the backup files.
In a first aspect, an embodiment of the present invention provides a key backup and recovery method for a blockchain wallet, where the method is applied to a server, and the method includes:
receiving request information sent by a client, wherein the request information comprises mnemonics;
obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm;
and storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words.
Further, after receiving the request information sent by the client, the method includes:
matching the mnemonic words with pre-stored mnemonic words;
and if the mnemonic words are consistent with the pre-stored mnemonic words, the verification is passed.
Further, the obtaining of the storage node corresponding to the backup file by using the mnemonic word through a consistent hash algorithm includes:
the method comprises the steps that block chain link points are divided into fragments to obtain a management fragment region and a storage fragment region, wherein the management fragment region comprises a plurality of management nodes, and the storage fragment region comprises a plurality of storage nodes;
obtaining the total number of the storage nodes according to the number of the plurality of storage nodes;
the mnemonic words are processed by an MD5 algorithm to obtain hash values;
performing decimal conversion on the hash value to obtain a first calculation result;
obtaining a second calculation result according to the first calculation result and the total number of the storage nodes;
and storing the backup file to a storage node corresponding to the second calculation result.
Further, the storing the corresponding relationship between the mnemonic word and the backup file on the storage node includes:
storing the corresponding relation between the hash value corresponding to the mnemonic word and the backup file on a corresponding relation table of the storage node, and storing the backup file on the storage node.
Further, the searching for the backup file on the storage node according to the mnemonic word includes:
and searching the backup file corresponding to the hash value from the corresponding relation table of the storage node according to the hash value corresponding to the mnemonic word.
Further, the method further comprises:
acquiring the mnemonic words from a random sequence word bank;
generating seeds according to the mnemonics;
constructing a key of the blockchain wallet according to the seed;
wherein the secret key of the blockchain wallet comprises a public key and a private key.
Further, the method further comprises:
assigning a node identifier of a corresponding string type to each of the management nodes;
assigning each of the storage nodes a node identifier of a corresponding numerical type;
wherein the length of the node identifier of the character string type is determined by the total number of the management nodes, and the length of the node identifier of the number type is determined by the total number of the storage nodes.
In a second aspect, an embodiment of the present invention provides a key backup and recovery apparatus for a blockchain wallet, where the apparatus is applied to a server, and the apparatus includes:
the receiving unit is used for receiving request information sent by a client, wherein the request information comprises mnemonics;
the storage node acquisition unit is used for obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent hash algorithm;
and the storage unit is used for storing the corresponding relation between the mnemonic words and the backup files on the storage nodes or searching the backup files on the storage nodes according to the mnemonic words.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the method described above when executing the computer program.
In a fourth aspect, embodiments of the invention provide a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method as described above.
The embodiment of the invention provides a key backup and recovery method and a device of a blockchain wallet, which are applied to a server and comprise the following steps: receiving request information sent by a client, wherein the request information comprises mnemonics; obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm; and storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words, distributing the storage nodes according to the mnemonic words corresponding to the secret keys, and storing the backup files on the storage nodes, thereby improving the safety of the backup files.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a key backup and recovery method for a blockchain wallet according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a block link point slicing according to an embodiment of the present invention;
FIG. 3 is a logic diagram of a consistent hashing algorithm according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a process for generating mnemonic words according to an embodiment of the present invention;
fig. 5 is a flowchart of a key backup method for a blockchain wallet according to a second embodiment of the present invention;
fig. 6 is a flowchart of a key recovery method for a blockchain wallet according to a third embodiment of the present invention;
fig. 7 is a schematic diagram of a key backup and recovery device for a blockchain wallet according to a fourth embodiment of the present invention.
Icon:
1-a receiving unit; 2-a storage node acquisition unit; 3-memory cell.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the rapid development of blockchain technology, the private key of the digital wallet is an important basis for proving the ownership of user blockchain digital assets.
Currently, the way of providing backup for the user is to convert the private key of the user into a text file, and store the text file in the installation path of the client of the blockchain wallet, in a locally specified file directory, or in a server for centralized backup. However, the storage method has a security risk, and when a hacker maliciously attacks the host, the private key backup file of the user can be easily acquired, so that the backup file of the user is leaked, and the security is poor.
In addition, if the key is stored in the external device, the key is easy to lose, and once the external device is illegally acquired by others, the property of the user is exposed to a great risk.
The embodiment of the invention provides a key backup and recovery method and device for a blockchain wallet, which are used for obtaining mnemonic words corresponding to a key, obtaining storage nodes corresponding to backup files by the aid of the mnemonic words through a consistent Hash algorithm, storing the mnemonic words and the backup files in a corresponding relation, and storing the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words, so that the safety and the confidentiality of the backup files are improved.
Wherein the Mnemonic (Mnemonic) is specifically as follows: the private key of the blockchain wallet is an irregular string, so that the blockchain wallet is very inconvenient to memorize and use. In order to improve the user experience, the blockchain wallet provides a group of common words to be saved by the user instead of a private key which is difficult to remember, namely mnemonics which are often obtained from a random sequence (entropy) matching word bank with the length of 128 to 256 bits. It simplifies the operation without loss of safety. The mnemonic typically consists of 12-24 words, which are the basis for generating the wallet private key. The system converts the N-bit private key into a plurality of common English words through an algorithm, so that the memory of a user is facilitated, mnemonics are often displayed when a blockchain asset wallet is created, and only one mnemonic cannot be modified in one wallet. The mnemonic words are the basis for creating, backing up and recovering the private key of the blockchain wallet.
The consistent hashing algorithm (consistency hashing) is specifically as follows: an allocation algorithm widely applied to a distributed storage system is characterized in that in the process of storing data to a specific node, a hash algorithm is adopted for routing, the data are mapped to the specific node, for example, key% N is the hash value of the data, N is the number of machine nodes, the simple hash algorithm is corrected, the problem of Hot spots (Hot spots) in the Internet is solved, and the hash algorithm is utilized for mapping the relation between a service request and a processing object, so that the purpose of dynamically allocating the processing object is achieved.
The block chain fragmentation technology (Blockchain sharing) specifically includes: in a traditional block chain, all nodes generally need to undertake functions of consensus, storage, management and the like, which are called as 'all-node attributes', and the method wastes storage resources, so that the expansibility of a system is poor, and computing resources cannot be fully utilized. The method and the device adopt a block chain fragmentation technology to define the attributes of the block chain link points. By dividing functions of different nodes, only part of nodes in the blockchain system have the function of storing data, and the defect that all nodes of the traditional blockchain system need to store data and waste storage space is overcome, so that the expansibility and the safety of the system are improved.
For the understanding of the present embodiment, the following detailed description will be given of the embodiments of the present invention.
The first embodiment is as follows:
fig. 1 is a flowchart of a key backup and recovery method for a blockchain wallet according to an embodiment of the present invention.
Referring to fig. 1, the execution subject is a server, and the method includes the steps of:
step S101, receiving request information sent by a client, wherein the request information comprises mnemonics;
step S102, the mnemonics are processed through a consistent Hash algorithm to obtain storage nodes corresponding to backup files;
step S103, storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words.
Further, after step S101, the method includes the steps of:
step S201, matching the mnemonic words with pre-stored mnemonic words;
and step S202, if the mnemonic words are consistent with the pre-stored mnemonic words, the verification is passed.
Further, step S102 includes the steps of:
step S301, dividing block chain link points into pieces to obtain a management piece area and a storage piece area, wherein the management piece area comprises a plurality of management nodes, and the storage piece area comprises a plurality of storage nodes;
step S302, obtaining the total number of the storage nodes according to the number of the plurality of storage nodes;
specifically, due to the conventional blockchain, generally all nodes need to assume functions of consensus, storage, management, and the like, and this method wastes storage resources, so that the scalability of the system is poor and the computing resources cannot be fully utilized. The method and the device divide the block chain link points into the management block area and the storage block area. The management fragment area is used for playing roles of contract management, member management, consensus verification and the like, verifying data in a network and hash values generated by the data, distributing storage positions for the data and generating a corresponding storage address table. The memory area is used for uploading, downloading and storing the data according to the consensus result of the management node.
Referring to fig. 2, the block link points are partitioned to obtain a management fragment area and a storage fragment area, wherein the management fragment area comprises a management node 1, a management node 2 and a management node … …, and each management node is assigned with a node ID of a corresponding character string type; the memory slice region includes storage node 1, storage node 2, … … storage node N, each of which is assigned a node ID of a corresponding numerical type.
Step S303, obtaining a hash value of the mnemonic word through an MD5 algorithm;
step S304, performing decimal conversion on the hash value to obtain a first calculation result;
step S304, obtaining a second calculation result according to the first calculation result and the total number of the storage nodes;
step S305, storing the backup file on the storage node corresponding to the second calculation result.
Specifically, the backup files of the private key relate to the property security of each user, so in order to ensure the secrecy and randomness of the storage address of the backup files and ensure the load balance of each storage node, a consistent hash algorithm is adopted to allocate the corresponding storage node for the backup files of the private key.
Assuming that the ID of the storage node to which the backup file of the private key is allocated is Y, the mnemonic word of the private key is M, and the total number of storage nodes in the block chain is N, it can be known from the allocation formula (1):
Y=Hash(M)%N
referring to fig. 3, the mnemonic words are subjected to the MD5 algorithm to obtain hash values, so that the confidentiality of storage nodes distributed by the mnemonic words can be improved. The mnemonic words generally consist of 12-24 bits of English, the hash conversion is carried out by adopting an MD5 algorithm, the client sends the mnemonic words to any management node on a block chain, and the mnemonic words are subjected to an MD5 algorithm through an intelligent contract of the management node to generate a 16-system hash value. For example, the hash value is: f9db0f833f1545be2e40f387d6c271 de. The mnemonic words are converted into hash values, so that repetition, tampering and infringement can be prevented.
The decimal conversion is performed on the hash value to obtain a first calculation result, and since the remainder is taken for the hash value, the decimal conversion is performed on the hexadecimal hash value to obtain the first calculation result, for example, the first calculation result is 332115198597019796159838990710599741918.
Obtaining a second calculation result according to the first calculation result and the total number of the storage nodes, that is, performing remainder calculation on the first calculation result according to the total number of the storage nodes to obtain a second calculation result, for example, when the second calculation result is that Y is 332115198597019796159838990710599741918% and 31 is 22, at this time, the backup file of the key is to be stored on the storage node with ID 22;
and finally, storing the corresponding relation between the hash value and the backup file in a corresponding relation table of the storage node.
Further, step S103 includes:
and storing the corresponding relation between the hash value corresponding to the mnemonic word and the backup file in a corresponding relation table of the storage node.
Further, step S103 includes:
and searching a backup file corresponding to the hash value from the corresponding relation table of the storage node according to the hash value corresponding to the mnemonic word.
Further, the method also comprises the following steps:
step S401, obtaining the mnemonic words from a random sequence word bank;
step S402, generating seeds according to the mnemonics;
step S403, constructing a key of the block chain wallet according to the seeds;
the key of the blockchain wallet comprises a public key and a private key.
Specifically, referring to fig. 4, in the creation process of the blockchain digital Wallet, a mnemonic word is first generated by a random sequence thesaurus, a seed (seed) is generated according to the mnemonic word, and then a key of the Wallet (Wallet) is constructed by the generated seed. Wherein the secret key comprises a public key and a private key. The wallet can be opened by the mnemonic words, and the wallet private key is exported to be a backup file or the wallet key is restored.
Further, the method further comprises:
assigning a node identifier of a corresponding string type to each of the management nodes;
assigning each of the storage nodes a node identifier of a corresponding numerical type;
wherein the length of the node identifier of the character string type is determined by the total number of the management nodes, and the length of the node identifier of the number type is determined by the total number of the storage nodes.
Example two:
fig. 5 is a flowchart of a key backup method for a blockchain wallet according to a second embodiment of the present invention.
Referring to fig. 5, the mnemonic word is used as a backup and recovery certificate of the private key of the blockchain wallet, so that when the client sends backup request information to the server, the mnemonic word corresponding to the private key of the wallet needs to be input at the client as a verification basis; when the verification is passed, creating a corresponding backup file, and distributing a corresponding storage node for the backup file; the execution subject is a server, and the method comprises the following steps:
step S501, receiving backup request information sent by a client, wherein the backup request information comprises mnemonics;
step S502, the mnemonic words are verified, and when the verification is passed, a backup file is created;
step S503, the mnemonics are processed by a consistent hash algorithm to obtain storage nodes corresponding to the backup files;
step S504, storing the correspondence between the hash value corresponding to the mnemonic word and the backup file in the correspondence table of the storage node, and storing the backup file in the storage node.
Example three:
fig. 6 is a flowchart of a key recovery method for a blockchain wallet according to a third embodiment of the present invention.
Referring to fig. 6, in the wallet key recovery process, the mnemonic word is still used as the unique credential for key recovery, and the management node performs consensus to find the corresponding storage node. The execution subject is a server, and the method comprises the following steps:
step S601, receiving recovery request information sent by a client, wherein the recovery request information comprises mnemonics;
step S602, the mnemonic words are verified, and when the mnemonic words pass the verification, the mnemonic words pass a consistent Hash algorithm to obtain storage nodes corresponding to the backup files;
step S603, according to the hash value corresponding to the mnemonic word, a backup file corresponding to the hash value is searched from the corresponding relation table of the storage node;
step S604, sending the backup file to the client.
The embodiment of the invention provides a key backup and recovery method of a block chain wallet, which is applied to a server and comprises the following steps: receiving request information sent by a client, wherein the request information comprises mnemonics; obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm; and storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words, distributing the storage nodes according to the mnemonic words corresponding to the secret keys, and storing the backup files on the storage nodes, thereby improving the safety of the backup files.
Example four:
fig. 7 is a schematic diagram of a key backup and recovery device for a blockchain wallet according to a fourth embodiment of the present invention.
Referring to fig. 7, the apparatus, applied to a server, includes:
the receiving unit 1 is used for receiving request information sent by a client, wherein the request information comprises mnemonics;
the storage node acquisition unit 2 is used for obtaining a storage node corresponding to the backup file by the aid of a consistent hash algorithm;
and the storage unit 3 is used for storing the corresponding relation between the mnemonic words and the backup files on the storage nodes or searching the backup files on the storage nodes according to the mnemonic words.
The embodiment of the invention provides a key backup and recovery device of a blockchain wallet, which is applied to a server and comprises the following components: receiving request information sent by a client, wherein the request information comprises mnemonics; obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm; the corresponding relation between the mnemonic words and the backup files are stored on the storage nodes, or the backup files on the storage nodes are searched according to the mnemonic words, the storage nodes are distributed according to the mnemonic words corresponding to the secret keys, the backup files are stored on the storage nodes, and the safety of the backup files is improved.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the key backup and recovery method for a blockchain wallet provided in the above embodiment are implemented.
Embodiments of the present invention further provide a computer readable medium having non-volatile program codes executable by a processor, where the computer readable medium stores a computer program, and when the computer program is executed by the processor, the computer program performs the steps of the key backup and recovery method for a blockchain wallet of the above embodiments.
The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as being fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the following descriptions are only illustrative and not restrictive, and that the scope of the present invention is not limited to the above embodiments: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A key backup and recovery method for a blockchain wallet, which is applied to a server, comprises the following steps:
receiving request information sent by a client, wherein the request information comprises mnemonics;
obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent Hash algorithm;
storing the corresponding relation between the mnemonic words and the backup files on the storage nodes, or searching the backup files on the storage nodes according to the mnemonic words;
the obtaining of the storage node corresponding to the backup file by the mnemonic word through a consistent hash algorithm includes:
the method comprises the steps that block chain link points are divided into fragments to obtain a management fragment region and a storage fragment region, wherein the management fragment region comprises a plurality of management nodes, and the storage fragment region comprises a plurality of storage nodes;
obtaining the total number of the storage nodes according to the number of the plurality of storage nodes;
the mnemonic words are processed by an MD5 algorithm to obtain hash values;
performing decimal conversion on the hash value to obtain a first calculation result;
obtaining a second calculation result according to the first calculation result and the total number of the storage nodes;
and storing the backup file to a storage node corresponding to the second calculation result.
2. The key backup and recovery method for a blockchain wallet of claim 1, wherein after receiving the request information sent by the client, the method comprises:
matching the mnemonic words with pre-stored mnemonic words;
and if the mnemonic words are consistent with the pre-stored mnemonic words, the verification is passed.
3. The key backup and recovery method for a blockchain wallet according to claim 1, wherein the storing the corresponding relationship between the mnemonic word and the backup file on the storage node comprises:
storing the corresponding relation between the hash value corresponding to the mnemonic word and the backup file on a corresponding relation table of the storage node, and storing the backup file on the storage node.
4. The key backup and recovery method for blockchain wallets of claim 1, wherein said searching for the backup file on the storage node according to the mnemonic comprises:
and searching the backup file corresponding to the hash value from the corresponding relation table of the storage node according to the hash value corresponding to the mnemonic word.
5. The key backup and recovery method for a blockchain wallet of claim 1, wherein the method further comprises:
acquiring the mnemonic words from a random sequence word bank;
generating seeds according to the mnemonics;
constructing a key of the blockchain wallet according to the seed;
wherein the key of the blockchain wallet comprises a public key and a private key.
6. The key backup and recovery method for blockchain wallets of claim 1, wherein the method further comprises:
assigning a node identifier of a corresponding string type to each of the management nodes;
assigning each of the storage nodes a node identifier of a corresponding numerical type;
wherein the length of the node identifier of the character string type is determined by the total number of the management nodes, and the length of the node identifier of the number type is determined by the total number of the storage nodes.
7. A key backup and recovery apparatus for a blockchain wallet, applied to a server, the apparatus comprising:
the receiving unit is used for receiving request information sent by a client, wherein the request information comprises mnemonics;
the storage node acquisition unit is used for obtaining a storage node corresponding to the backup file by the aid of the mnemonics through a consistent hash algorithm;
the storage unit is used for storing the corresponding relation between the mnemonic words and the backup files on the storage nodes or searching the backup files on the storage nodes according to the mnemonic words;
the storage node obtaining unit is specifically configured to:
the method comprises the steps that block chain link points are divided into fragments to obtain a management fragment region and a storage fragment region, wherein the management fragment region comprises a plurality of management nodes, and the storage fragment region comprises a plurality of storage nodes;
obtaining the total number of the storage nodes according to the number of the plurality of storage nodes;
the mnemonic words are processed by an MD5 algorithm to obtain hash values;
performing decimal conversion on the hash value to obtain a first calculation result;
obtaining a second calculation result according to the first calculation result and the total number of the storage nodes;
and storing the backup file to a storage node corresponding to the second calculation result.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 6 when executing the computer program.
9. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1 to 6.
CN202011200625.4A 2020-10-30 2020-10-30 Key backup and recovery method and device for block chain wallet Active CN112291355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011200625.4A CN112291355B (en) 2020-10-30 2020-10-30 Key backup and recovery method and device for block chain wallet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011200625.4A CN112291355B (en) 2020-10-30 2020-10-30 Key backup and recovery method and device for block chain wallet

Publications (2)

Publication Number Publication Date
CN112291355A CN112291355A (en) 2021-01-29
CN112291355B true CN112291355B (en) 2022-09-09

Family

ID=74353277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011200625.4A Active CN112291355B (en) 2020-10-30 2020-10-30 Key backup and recovery method and device for block chain wallet

Country Status (1)

Country Link
CN (1) CN112291355B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453862A (en) * 2017-05-15 2017-12-08 杭州复杂美科技有限公司 Private key generation storage and the scheme used
CN108768631A (en) * 2018-05-28 2018-11-06 夸克链科技(深圳)有限公司 A kind of block chain private key recovery mnemonic word System Design
CN108833093A (en) * 2018-06-14 2018-11-16 百度在线网络技术(北京)有限公司 Determination method, apparatus, equipment and the storage medium of account key
CN109474424A (en) * 2018-12-17 2019-03-15 江苏恒宝智能系统技术有限公司 Block chain account cipher key backup and method, the system of recovery
CN110838912A (en) * 2019-11-18 2020-02-25 深圳前海微众银行股份有限公司 Key management method, device, equipment and computer medium based on block chain
CN110930145A (en) * 2020-02-04 2020-03-27 江苏恒宝智能系统技术有限公司 Cold wallet generation method, transaction information processing method, device and storage medium
CN111931246A (en) * 2020-06-01 2020-11-13 山东浪潮质量链科技有限公司 File management method, equipment and medium based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453862A (en) * 2017-05-15 2017-12-08 杭州复杂美科技有限公司 Private key generation storage and the scheme used
CN108768631A (en) * 2018-05-28 2018-11-06 夸克链科技(深圳)有限公司 A kind of block chain private key recovery mnemonic word System Design
CN108833093A (en) * 2018-06-14 2018-11-16 百度在线网络技术(北京)有限公司 Determination method, apparatus, equipment and the storage medium of account key
CN109474424A (en) * 2018-12-17 2019-03-15 江苏恒宝智能系统技术有限公司 Block chain account cipher key backup and method, the system of recovery
CN110838912A (en) * 2019-11-18 2020-02-25 深圳前海微众银行股份有限公司 Key management method, device, equipment and computer medium based on block chain
CN110930145A (en) * 2020-02-04 2020-03-27 江苏恒宝智能系统技术有限公司 Cold wallet generation method, transaction information processing method, device and storage medium
CN111931246A (en) * 2020-06-01 2020-11-13 山东浪潮质量链科技有限公司 File management method, equipment and medium based on block chain

Also Published As

Publication number Publication date
CN112291355A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
CN112396423B (en) Transaction data processing method, device, equipment and storage medium
US10747721B2 (en) File management/search system and file management/search method based on block chain
TW202034654A (en) Systems and methods for efficient and secure processing, accessing and transmission of data via a blockchain network
JP2023025181A (en) Computer-implemented system and method for performing computational tasks across group not requiring management approval or operating in dealer-free manner
CN110602147B (en) Data encryption safe storage method, system and storage medium based on cloud platform
CN111245597A (en) Key management method, system and equipment
CN110851481B (en) Searchable encryption method, device and equipment and readable storage medium
KR20100062013A (en) Method for data encryption and method for data search using conjunctive keyword
CN112948851A (en) User authentication method, device, server and storage medium
WO2020140626A1 (en) Salt-based data possession verification method and terminal device
CN112235104B (en) Data encryption transmission method, system, terminal and storage medium
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN107395587B (en) Data management method and system based on multipoint cooperation mechanism
CN113824553A (en) Key management method, device and system
JP2023551124A (en) self-audit blockchain
CN112291355B (en) Key backup and recovery method and device for block chain wallet
CN112165383A (en) Encryption method, device, equipment and medium based on shared root key
CN109190358B (en) Site password generation method and system and password manager
Chakraborty et al. BSMFS: Blockchain assisted secure multi-keyword fuzzy search over encrypted data
JP2005227331A (en) Secret information management system, secret information management method, and secret information management program
JP6931331B2 (en) Blockchain management system, blockchain management method and blockchain management program
CN112865981A (en) Token obtaining and verifying method and device
CN114128209A (en) Key exchange system, communication device, key exchange method, and program
CN117034370B (en) Data processing method based on block chain network and related equipment
JP2020028052A (en) Data management method

Legal Events

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