CN112565201B - Private key processing method and device in block chain and computer storage medium - Google Patents

Private key processing method and device in block chain and computer storage medium Download PDF

Info

Publication number
CN112565201B
CN112565201B CN202011288252.0A CN202011288252A CN112565201B CN 112565201 B CN112565201 B CN 112565201B CN 202011288252 A CN202011288252 A CN 202011288252A CN 112565201 B CN112565201 B CN 112565201B
Authority
CN
China
Prior art keywords
private key
sub
block chain
private
determining
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
CN202011288252.0A
Other languages
Chinese (zh)
Other versions
CN112565201A (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.)
Zhuo Erzhi Lian Wuhan Research Institute Co Ltd
Original Assignee
Zhuo Erzhi Lian Wuhan Research Institute 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 Zhuo Erzhi Lian Wuhan Research Institute Co Ltd filed Critical Zhuo Erzhi Lian Wuhan Research Institute Co Ltd
Priority to CN202011288252.0A priority Critical patent/CN112565201B/en
Publication of CN112565201A publication Critical patent/CN112565201A/en
Application granted granted Critical
Publication of CN112565201B publication Critical patent/CN112565201B/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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/12Simultaneous equations, e.g. systems of linear equations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The application discloses a private key processing method and device in a block chain and a computer storage medium, wherein the method comprises the following steps: determining the number of parts of a private key divided into sub-private keys based on information of the private key in a block chain; constructing a first polynomial function for representing the sub private key according to the number of parts; determining the child private key based on the first polynomial function; and respectively sending the sub private keys to each node and a server of the block chain. The embodiment of the application also provides a private key processing device and a computer storage medium in the block chain, so that the privacy and the safety of transaction are ensured, the confidentiality is high, and the data stored by the private key cannot be lost.

Description

Private key processing method and device in block chain and computer storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method and an apparatus for processing a private key in a block chain, and a computer storage medium.
Background
In the prior art, the key is directly backed up and stored on the server, or the key is verified in a multi-signature mode. The multiple signatures are that the signatures of all the signing parties are stored in a block chain record in a chain broadcasting mode, the corresponding relation between the signatures and the addresses and the number of the signatures are equivalent to be disclosed and can be tracked by a person with interest, and the relation between the addresses and services is identified, so that the privacy of transactions cannot be protected.
Disclosure of Invention
In view of the above technical problems, the present invention provides a method and an apparatus for processing a private key in a block chain, and a computer storage medium, which can improve the security of a transaction.
The embodiment of the invention provides the following specific technical scheme:
the embodiment of the invention provides a private key processing method in a block chain, which comprises the following steps:
determining the number of parts of a private key divided into sub-private keys based on information of the private key in a block chain;
constructing a first polynomial function for representing the sub private key according to the number of parts;
determining the child private key based on the first polynomial function;
and respectively sending the sub private keys to each node and a server of the block chain.
In some embodiments, the determining, based on information of private keys in a blockchain, the number of copies of the private key divided into child private keys comprises:
processing the private key in the block chain to obtain a number corresponding to the private key;
and determining the number of the sub private keys according to the size of the number and the service information corresponding to the private key.
In some embodiments, said constructing a first polynomial function to characterize said child private key based on the number of shares of said child private key comprises:
determining the first polynomial function as an N-1 degree first polynomial function according to the number N of the sub-private keys;
and determining that the number corresponding to the private key is a first constant of the first polynomial function.
In some embodiments, said determining said child private key based on said first polynomial function comprises:
the first polynomial function is an N-1 degree polynomial and is substituted into N +1 variables to obtain N +1 solutions of the first polynomial function corresponding to the N +1 variables;
and determining N +1 variables and N +1 solutions corresponding to the N +1 variables respectively as N +1 sub private keys.
In some embodiments, said sending said child private keys to respective nodes and servers of said block chain comprises:
respectively sending the N sub private keys to N different nodes of the block chain;
sending one of the child private keys to the server.
The embodiment of the invention also provides a private key processing method in the block chain, which comprises the following steps:
acquiring a corresponding sub-private key from each node of the N nodes of the block chain;
a private key is determined based on the child private key.
In some embodiments, said determining a private key based on said child private key comprises:
constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions;
the private key is determined based on the system of equations.
An embodiment of the present application provides a private key processing apparatus in a block chain, including:
the first determining module is used for determining the number of parts of the private key divided into the sub private keys based on the private key information in the block chain;
the construction module is used for constructing a first polynomial function for representing the sub private key according to the number of the parts;
a second determination module that determines the child private key based on the first polynomial function; and respectively sending the sub private keys to each node and a server of the block chain.
In some embodiments, the first determining module is configured to process a private key in the block chain to obtain a number corresponding to the private key;
and determining the number of the sub private keys according to the size of the number and the service information corresponding to the private key.
In some embodiments, the construction module is configured to determine the first polynomial function as a first polynomial function of degree N-1 based on the number N of the child private keys;
and determining that the number corresponding to the private key is a first constant of the first polynomial function.
In some embodiments, the second determining module is configured to substitute the first polynomial function as an N-1 degree polynomial into N +1 variables to obtain N +1 solutions of the first polynomial function for the N +1 variables;
and determining N +1 variables and N +1 solutions corresponding to the N +1 variables respectively as N +1 sub private keys.
In some embodiments, the second determining module is configured to send the N sub-private keys to N different nodes of the block chain, respectively;
sending one of the child private keys to the server.
In some embodiments, the construction module is configured to determine the number of split copies of the private key according to the private key information, and process distribution verification of the private key according to deployment of the intelligent contract; wherein the intelligent contract comprises an auto-execute protocol in a block chain;
in some embodiments, the construction module is configured to construct a polynomial function according to the private key partition degree, and set parameter information.
In some embodiments, the second determining module is configured to determine a set of values of the polynomial function according to the polynomial function and the parameter information, and send the set of values to each node.
An embodiment of the present application further provides a device for processing a private key in a block chain, including:
an obtaining module, configured to obtain a corresponding child private key from each node of the N nodes of the block chain; a private key is determined based on the child private key.
The processing module is used for constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions; the private key is determined based on the system of equations.
In some embodiments, the obtaining module is configured to construct a corresponding second polynomial function based on each sub-private key, to obtain an equation set including N second polynomial functions; the private key is determined based on the system of equations.
An embodiment of the present application further provides a device for processing a private key in a block chain, where the device includes: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the private key processing method in the above-described blockchain when executing the computer program.
Embodiments of the present application further provide a private key processing computer storage medium in a blockchain, where the storage medium is configured to store one or more computer programs, where the one or more computer programs include program code for executing a private key processing method in the blockchain when the computer programs run on a computer.
The embodiment of the application provides a private key processing method and device in a block chain and a computer storage medium. Determining the number of parts of a private key divided into sub-private keys based on information of the private key in a block chain; constructing a first polynomial function for representing the sub private key according to the number of parts; determining the child private key based on the first polynomial function; and respectively sending the sub private keys to each node and a server of the block chain. According to the method, the private key is divided into the sub private keys in the block chain, each node and the server in the block chain respectively store one sub private key, and the original private key can be restored only after the holding node of each sub private key submits the sub private key. As long as the sub-private keys in all the nodes are not illegally stolen, the original private key cannot be restored, the privacy and the safety of the transaction are ensured, and the strong confidentiality is realized.
Drawings
Fig. 1 is a flowchart of a private key processing method in a blockchain according to a first embodiment of the present disclosure;
fig. 2 is a flowchart of a private key processing method in a blockchain according to a second embodiment of the present application;
fig. 3 is a block diagram of a private key processing apparatus module in a block chain according to a third embodiment of the present application;
fig. 4 is a block diagram of a private key processing apparatus module in a block chain according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of a hardware component structure of a private key processing apparatus in a block chain according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Before the embodiments of the present application are described in detail, information related to a blockchain is briefly described.
The blockchain system is actually a system for maintaining a public data ledger, and all technical units are designed to better maintain the public ledger. Data consistency of the account book of the node is achieved through a consensus algorithm; the method comprises the steps of ensuring the non-tampering property of the account book data and the safety of data transmission through a cryptographic algorithm; and expanding the expression scope of the account book data through a script system. The blockchain system may be considered to be a specially designed database system or distributed database system in fact, where digital currency may be stored, as well as more complex intelligent contracts, and a wider variety of business data.
In the process of building the blockchain application software, a problem of storing a user key is usually encountered, and a key held by a general user is a private key. How to ensure that the private key information is not leaked while ensuring the convenient use of the user is a technical problem to be processed by confirming that the private key information is safe. Meanwhile, the way of private key verification also needs to be continuously expanded, and the method is suitable for various scenes. For example, in a multi-verification scenario, certain information can be obtained only after different nodes pass verification together, the private key can be divided into multiple parts, and specific information can be obtained only when the private key held by each node forms a complete private key.
Based on the above scenes, the invention provides a private key processing method in a block chain, which can divide the private key into N parts by using an algorithm for storage, and can restore the original private key only after each private key holding node submits the private key. The private key processing method provided by the embodiment of the application is safer than a backup private key backup method in the related technology. In the traditional method, the private key is backed up in the server, and once the private key is illegally stolen, safety problems can be caused; the private key processing method provided by the application embodiment stores the private keys in a plurality of nodes, and even if one private key is lost, the encrypted information cannot be obtained. Meanwhile, the method can also replace the traditional multiple signature verification mode.
First embodiment
Fig. 1 is a flowchart of a private key processing method in a block chain according to a first embodiment of the present application, as shown in fig. 1, including:
step S101: determining the number of parts of the private key divided into the sub-private keys based on information of the private key in the block chain.
In some embodiments, the child private key can be understood as a private key processing device in a blockchain that splits the private key into N shares, each referred to as a child private key.
In some embodiments, a private key processing device in a blockchain processes a private key in the blockchain to obtain a number corresponding to the private key; and the private key processing device determines the number of the sub private keys according to the size of the number and the service information corresponding to the private key.
In some embodiments, when the private key is character string information, the private key processing device extracts numbers in the character string in sequence, and the obtained group of numbers is the number corresponding to the private key; and when the private key is random number information, the private key processing device determines that a group of numbers corresponding to the random number are the numbers corresponding to the private key.
The node in the blockchain system is usually a private key separately stored, and the public key is information disclosed to the chain, so the processing and storing object of the application is the private key in the system.
In some embodiments, depending on the form of the cryptosystem, the form of the private key may be specified, for example, a 256-bit random number is a common key encrypted by an Elliptic Current Cryptography (ECC), and the random number can be directly used for division. In some encryption systems, the private key is in the form of a character string, and the character string contains English and numbers, and then a specific mapping rule is set in the intelligent contract, and English characters are mapped to designated numbers to form a new random number, and then the new random number is divided.
In some embodiments, the representation of the private key is a character string composed of English letters and numbers, and the length and the rule are the same according to different chains. For example, the private key for a bitcoin may be a set of strings 13TdUYzEso2 ivlhhpcxjwy 1 yjmmuveqngebk; at this time, the private key may be 1321 according to the mapping rule. Data encryption and verification are also often performed in a blockchain system using an Elliptic Cryptography (ECC), which is typically a random number, such as 15424654874903; at this point, the private key may be 15424654874903.
The service information comprises the form of a cryptology system adopted by the system, the number of users of the system and the authority distribution of the users.
In some embodiments, the number of parts of the private key is determined according to the private key information and the service information in the system. For example, according to the authority setting, only 3 users can view certain information, and meanwhile, an administrator with the highest authority of 1 bit in the system can access the information only after the administrator approves. The information is encrypted using a symmetric encryption algorithm, and the encrypted private key needs to be divided into 4 shares, 3 shares for authorized use and 1 share for administrator use.
Step S102: and constructing a first polynomial function for characterizing the sub-private key according to the number of parts.
In some embodiments, the private key processing device determines the first polynomial function to be a first polynomial function of degree N-1 according to the number N of splits of the private key, and the form is as follows:
y=a1x+a2x2+…+an-1xn-1+c,
wherein a is1,a2…an-1Taking a random number, c taking the set of digits of the private key information. The random number is generated by an algorithm built in an intelligent contract in a block chain system; recording the polynomial function in an intelligent contract, the parameter a1,a2…an-1And is used only as a local authentication of the smart contract.
The private key processing device determines that the number corresponding to the private key is a first constant c of the first polynomial function.
Step S103: determining the child private key based on the first polynomial function.
In some embodiments, the private key processing device determines a child private key of the first polynomial function based on the first polynomial function and parameter information.
The first polynomial function is an N-1 degree polynomial and is substituted into N +1 variables to obtain N +1 solutions of the first polynomial function corresponding to the N +1 variables;
and determining N +1 variables and N +1 solutions corresponding to the N +1 variables respectively as N +1 sub private keys. The N +1 solutions to which the N +1 variables correspond determine the values of the N +1 set (x, y). The set of values may be understood as a child private key.
In some embodiments, the private key processing device substitutes N +1 variables x after obtaining the first polynomial function of S102 according to an intelligent contract, where x is a positive integer, and calculates the right-side expression of the first polynomial to obtain N +1 groups (x, y) of values (x, y)1,y1),(x2,y2),…,(xn,yn),(xn+1,yn+1)。
In some embodiments, the intelligent contract is an automatic execution protocol in a blockchain, and a blockchain system designer can complete data recording and processing on the chain through the intelligent contract. This step completes the distribution verification operation of the private key according to the specific intelligent contract deployed in the blockchain system.
And the private key processing device records information such as the name, address information and private key backup node information of the private key distribution node according to the intelligent contract. The private key processing device processes the logic of the distribution and verification process of the private key, and meanwhile, business codes can be added according to an intelligent contract, access logic is set, which nodes can be distributed according to authority setting and can hold the private key, and information such as the corresponding relation between the private key and specific access authority is set.
Step S104: and respectively sending the sub private keys to each node and a server of the block chain.
In some embodiments, the private key processing apparatus sends N of the sub-private keys to N different nodes of the blockchain, respectively; and the private key processing device sends one sub private key to the server.
In some embodiments, the private key processing apparatus assigns groups 1 through nth values to each node participating in authentication, and group N +1 is stored to an administrator account. And distributing the numerical value of each node as a sub private key, wherein the sub private key is stored on each node of the block chain. Meanwhile, a recorded in step S102 may be deleted1,a2,…an-1The values of the set of parameters; in this way, the parameter a can be avoided1,a2,…an-1And the private key is reversely deduced after the leakage, so that the private key information is prevented from being leaked.
For example, the constant term c of the first polynomial function in step S102 is the private key, and in some embodiments, c is set to 3. Optionally, let a1=2,a22, so the equation is y 2x2+2x + 3. Then, y is calculated by taking any four random integers x (assuming that N is 3), and 4 sets of values are obtained, which are (-1, 3), (-2, 7), (1, 7), and (2, 15), respectively. The private key processing device distributes the 1 st, 2 nd and 3 rd groups of values to a specific node (the specific node is selected according to the business process, for example, a certain data in the block chain only has the right of viewing for a certain number of nodes, and the certain nodes need to be jointly authorized to view, and then the private key is distributed to the certain nodes).
And the private key processing device stores the value of the (N + 1) th group (x, y) to an administrator account for backup. The common account and the administrator account are nodes in the blockchain system, the (N + 1) th group (x, y) is sent to the administrator node through an intelligent contract, and the (N + 1) th group (x, y) is stored in the local database by the administrator node.
Second embodiment
The first embodiment briefly describes the private key processing method in the blockchain of the present invention, and in this embodiment, it will be further described with reference to the drawings.
As shown in fig. 2, a method for processing a private key in a blockchain includes the following steps:
step S201: and acquiring a corresponding sub private key from each node in the N nodes of the block chain.
When the private key processing device needs to access specific information in a block chain, each node holding a private key submits a sub-private key stored in the block chain, and the sub-private key can be an array value (x, y).
Step S202: and constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions.
The private key processing device submits the intelligent contract of the sub private key to the block chain, and the private key processing device constructs an equation set based on N sets of values according to the contract:
Figure BDA0002783061170000091
wherein the private key processing means considers the N sets of numerical values (x, y) as known parameters of a polynomial equation, and solves the solution (a) of the equation set1,a2…an-1,c)。
Step S203: the private key is determined based on the system of equations.
And the private key processing device solves the equation set through an intelligent contract to obtain a private key number c. And the private key processing device restores the c into a complete private key according to a set rule and uses the private key to carry out the next verification operation.
In some embodiments, the private key processing means considers (x, y) as known parameters of a polynomial equation, having N sets of values, and thus N-ary equations of a first degree. c is the value of the private key, (a)1,a2…an-1And c) is the solution of the system of equations, which is considered as an equation. The private key processing device solves the equation according to the intelligent contract to obtain a private key number c, reduces the sum of c to a complete private key according to the rule set in the S101, and carries out the next verification operation by using the private key. (e.g., authentication of elliptic encryption with a private key by obtaining a particular access right).
In some embodiments, in step S202, the values of the 1, 2, and 3 nodes are taken to obtain the following equation system:
Figure BDA0002783061170000101
the private key processing device obtains the following data according to an intelligent contract solution equation set: a is1=2,a22, c is 3; and c is 3, namely the value of the private key, and then the value is restored into a complete private key according to the value of the private key.
In some embodiments, when an accident occurs, for example, an Encrypted File System (EFS) encrypted File cannot be opened after the operating System of the computer is reinstalled, and no key is found after the hard disk is restored, optionally, the private key processing device may enable an administrator authority, and call the saved backup private key to restore the complete private key.
In some embodiments, the private key processing device divides the divided sub-private keys into N nodes for storage, and determines the recovery state of the private key according to the authorization state of the nodes. And after the private key processing device confirms the division number, the length of each private key random number is obtained by using the digit number or the division number of the random number. And if the number corresponding to the private key cannot be divided, taking the divisible part as the divided and restored divided private key, establishing a related index in the intelligent contract, and after the divided private key is restored, splicing the transmitted private key with the residual random numbers by using the index to restore the original private key.
In some embodiments, the equation to the power of N-1 has N unknown coefficients; for example, N is 3 and the coefficient of the system is a1,a2C, only 3 linearly uncorrelated equations are needed to solve for the coefficient a1,a2,c。
Coefficient a1,a2,…an-1Is a random number, and the coefficient a is the number (x, y) of the structure1,a2,…an-1Are known; after the values (x, y) are distributed to each node, a is deleted according to the intelligent contract1,a2,…an-1The data of (1). Then, only N divided sub-private key (x, y) values can form N equations to solve the N coefficients, wherein the N coefficients are a1,a2,…an-1And a private key c; and recovering the complete private key according to the c.
And the private key processing device carries out the next private key encryption or signature operation according to the reduction state of the private key.
Third embodiment
The above first to second embodiments respectively describe the method for processing the private key in the blockchain in detail, and the private key processing apparatus 300 in a blockchain will be further described with reference to fig. 3.
The private key processing device 300 of the present invention includes:
a first determining module 301, configured to determine, based on private key information in a block chain, the number of parts of a private key divided into sub-private keys;
a constructing module 302, configured to construct a first polynomial function for characterizing the sub-private key according to the number of shares;
a second determining module 303 for determining said sub-private key based on said first polynomial function; and respectively sending the sub private keys to each node and a server of the block chain.
In some embodiments, the first determining module 301 is configured to process a private key in the block chain to obtain a number corresponding to the private key;
and determining the number of the sub private keys according to the size of the number and the service information corresponding to the private key.
In some embodiments, the constructing module 302 is configured to determine the first polynomial function as a first polynomial function of degree N-1 according to the number N of the sub-private keys;
and determining that the number corresponding to the private key is a first constant of the first polynomial function.
In some embodiments, the second determining module 303 is configured to substitute the first polynomial function as an N-1 th-order polynomial into N +1 variables to obtain N +1 solutions of the first polynomial function for the N +1 variables;
and determining N +1 variables and N +1 solutions corresponding to the N +1 variables respectively as N +1 sub private keys.
In some embodiments, the second determining module 303 is configured to send N of the sub-private keys to N different nodes of the block chain, respectively;
sending one of the child private keys to the server.
In some embodiments, the building module 302 is configured to determine the number of split copies of the private key according to the private key information, and process distribution verification of the private key according to deployment of the intelligent contract; wherein the intelligent contract comprises an auto-execute protocol in a block chain;
in some embodiments, the constructing module 302 is configured to construct a polynomial function according to the dividing times of the private key, and set parameter information.
In some embodiments, the second determining module 303 is configured to determine a set of values of the polynomial function according to the polynomial function and the parameter information, and send the set of values to each node.
Fourth embodiment
The above first to second embodiments describe the method for processing the private key in the blockchain in detail, and the private key processing apparatus 400 in a blockchain will be further described with reference to fig. 4.
The private key processing apparatus 400 of the present invention includes:
an obtaining module 401, configured to obtain a corresponding child private key from each node of the N nodes of the block chain; a private key is determined based on the child private key.
A processing module 402, configured to construct a corresponding second polynomial function based on each sub-private key, to obtain an equation set including N second polynomial functions; the private key is determined based on the system of equations.
In some embodiments, the obtaining module 401 is configured to construct a corresponding second polynomial function based on each sub-private key, so as to obtain an equation set including N second polynomial functions; the private key is determined based on the system of equations.
Fifth embodiment
Fig. 5 is a schematic diagram of a hardware component structure of a private key processing apparatus in a block chain according to an embodiment of the present application. The apparatus 800 comprises: at least one processor 801, memory 802, and at least one network interface 804. The various components in the device 800 are coupled together by a bus system 805. It is understood that the bus system 805 is used to enable communications among the components connected. The bus system 805 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 805 in fig. 5.
It will be appreciated that the memory 802 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The nonvolatile Memory may be ROM, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic Random Access Memory (FRAM), Flash Memory (Flash Memory), magnetic surface Memory, optical Disc, or Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced Synchronous DRAM), Direct Memory Access (DRAM), and Direct Memory Access (DRDRU). The memory 802 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 802 in embodiments of the present invention is used to store various types of data to support the operation of the device 800. Examples of such data include: any computer program for operation on device 800, such as application 8022. A program implementing a method according to an embodiment of the present invention may be included in application program 8022.
The methods disclosed in the embodiments of the present invention described above may be implemented in the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 801. The Processor 801 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 801 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium that is located in the memory 802, and the processor 801 reads the information in the memory 802 to perform the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), FPGAs, general purpose processors, controllers, MCUs, MPUs, or other electronic components for performing the foregoing methods.
Fifth embodiment
An embodiment of the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
acquiring a corresponding sub-private key from each node of the N nodes of the block chain;
constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions;
the private key is determined based on the system of equations.
Optionally, the storage medium may be applied to the terminal device in the embodiment of the present application, and the computer program enables the computer to execute corresponding processes in each method in the embodiment of the present application, which is not described herein again for brevity.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The invention provides a private key processing method, a private key processing device and a computer storage medium in a block chain, wherein the number of parts of a private key divided into sub private keys is determined based on the information of the private key in the block chain; constructing a first polynomial function for representing the sub private key according to the number of parts; determining the child private key based on the first polynomial function; and respectively sending the sub private keys to each node and a server of the block chain. The method and the device have the advantages that the segmentation private key is added into the block chain system, the backup function is provided, the application scenes of private key verification can be enriched, and meanwhile, compared with the traditional private key backup or multiple signature modes, the safety is higher. The privacy and the safety of the transaction are ensured, the security is strong, and the data stored by the private key cannot be lost. Meanwhile, the encrypted private key is stored in the intelligent contract, and the characteristic of distributed storage data of the block chain technology is utilized, so that the situation that the private key data is stored in a system server in a centralized manner is avoided, the risk that the private key data is lost due to the fault of the system server is reduced, the private key exists on the block chain in an intelligent contract mode, the access of the contract data can be accessed only when the contract data meets the contract requirements, the intelligent contract is difficult to tamper as long as the contract is successfully established in the block chain, and the data protection capability is extremely high.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of private key processing in a blockchain, the method comprising:
determining the number of parts of a private key divided into sub-private keys based on information of the private key in a block chain;
constructing a first polynomial function for representing the sub private key according to the number of parts;
determining the child private key based on the first polynomial function;
respectively sending the sub private keys to each node and a server of the block chain;
wherein the determining the number of parts of the private key divided into the sub-private keys based on the information of the private key in the block chain comprises:
processing the private key in the block chain to obtain a number corresponding to the private key;
determining the number of parts for dividing the sub-private keys according to the size of the number and the service information corresponding to the private key; the service information corresponding to the private key comprises the number of users of the system and the authority distribution of the users.
2. The method of claim 1, wherein constructing a first polynomial function that characterizes the child private key based on the number of shares of the child private key comprises:
determining the first polynomial function as an N-1 degree first polynomial function according to the number N of the sub-private keys;
and determining that the number corresponding to the private key is a first constant of the first polynomial function.
3. The method of claim 1, wherein determining the child private key based on the first polynomial function comprises:
the first polynomial function is an N-1 degree polynomial and is substituted into N +1 variables to obtain N +1 solutions of the first polynomial function corresponding to the N +1 variables;
and determining N +1 variables and N +1 solutions corresponding to the N +1 variables respectively as N +1 sub private keys.
4. The method of claim 3, wherein sending the child private keys to the nodes and servers of the block chain, respectively, comprises:
respectively sending the N sub private keys to N different nodes of the block chain;
sending one of the child private keys to the server.
5. A method of private key processing in a blockchain, the method comprising:
acquiring a corresponding sub-private key from each node of the N nodes of the block chain;
a private key is determined based on the child private key.
6. The method of claim 5, wherein determining a private key based on the child private key comprises:
constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions;
the private key is determined based on the system of equations.
7. An apparatus for private key processing in a blockchain, the apparatus comprising:
the first determining module is used for determining the number of parts of the private key divided into the sub private keys based on the private key information in the block chain;
the construction module is used for constructing a first polynomial function for representing the sub private key according to the number of the parts;
a second determination module that determines the child private key based on the first polynomial function;
respectively sending the sub private keys to each node and a server of the block chain;
the first determining module is further configured to process a private key in the block chain to obtain a number corresponding to the private key; determining the number of parts for dividing the sub private key according to the size of the number and the service information corresponding to the private key; the service information corresponding to the private key comprises the number of users of the system and the authority distribution of the users.
8. An apparatus for private key processing in a blockchain, the apparatus comprising:
an obtaining module, configured to obtain a corresponding child private key from each node of the N nodes of the block chain;
a processing module that determines a private key based on the child private key;
the determining a private key based on the child private key comprises:
and constructing a corresponding second polynomial function based on each sub-private key to obtain an equation set comprising N second polynomial functions.
9. Private key processing apparatus in a blockchain, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the private key processing method in the blockchain according to any one of claims 1 to 4 when executing the computer program or implementing the private key processing method in the blockchain according to claim 5 or 6 when executing the computer program.
10. A computer storage medium, characterized in that the storage medium is adapted to store one or more computer programs, the one or more computer programs comprising program code for performing the method of processing a private key in a blockchain of any of the above claims 1 to 4, or for performing the method of processing a private key in a blockchain of the above claims 5 or 6, when the computer program runs on a computer.
CN202011288252.0A 2020-11-17 2020-11-17 Private key processing method and device in block chain and computer storage medium Active CN112565201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011288252.0A CN112565201B (en) 2020-11-17 2020-11-17 Private key processing method and device in block chain and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011288252.0A CN112565201B (en) 2020-11-17 2020-11-17 Private key processing method and device in block chain and computer storage medium

Publications (2)

Publication Number Publication Date
CN112565201A CN112565201A (en) 2021-03-26
CN112565201B true CN112565201B (en) 2021-11-16

Family

ID=75043064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011288252.0A Active CN112565201B (en) 2020-11-17 2020-11-17 Private key processing method and device in block chain and computer storage medium

Country Status (1)

Country Link
CN (1) CN112565201B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114254370B (en) * 2021-12-31 2024-04-12 上海创能国瑞新能源科技股份有限公司 Method and device for improving transaction matching degree based on multiparty security privacy calculation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878011A (en) * 2017-02-27 2017-06-20 中国银联股份有限公司 A kind of key storage method and device
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
CN109379184A (en) * 2018-09-28 2019-02-22 北京金山安全软件有限公司 Block chain private key storage method and device and electronic equipment
CN111339199A (en) * 2020-02-28 2020-06-26 中国工商银行股份有限公司 Block chain key recovery method and device
CN111641499A (en) * 2020-04-13 2020-09-08 山东浪潮质量链科技有限公司 Block chain-based private key restoration method, device, equipment and medium
WO2020185245A1 (en) * 2019-03-14 2020-09-17 Hoyos Integrity Corporation Improving computer system security using a biometric authentication gateway for user service access with a divided and distributed private encryption key

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878011A (en) * 2017-02-27 2017-06-20 中国银联股份有限公司 A kind of key storage method and device
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
CN109379184A (en) * 2018-09-28 2019-02-22 北京金山安全软件有限公司 Block chain private key storage method and device and electronic equipment
WO2020185245A1 (en) * 2019-03-14 2020-09-17 Hoyos Integrity Corporation Improving computer system security using a biometric authentication gateway for user service access with a divided and distributed private encryption key
CN111339199A (en) * 2020-02-28 2020-06-26 中国工商银行股份有限公司 Block chain key recovery method and device
CN111641499A (en) * 2020-04-13 2020-09-08 山东浪潮质量链科技有限公司 Block chain-based private key restoration method, device, equipment and medium

Also Published As

Publication number Publication date
CN112565201A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN113765657B (en) Key data processing method, device and server
TWI723665B (en) Authentication based on a recoverd public key
Zheng et al. Fair and dynamic proofs of retrievability
US5530757A (en) Distributed fingerprints for information integrity verification
US10833871B2 (en) System and method for deterministic signing of a message using a multi-party computation (MPC) process
CN107210006B (en) Inconsistency detection method, inconsistency detection system, inconsistency detection apparatus, and recording medium
JP7047133B2 (en) Indexing and restoration of coded blockchain data
US10880100B2 (en) Apparatus and method for certificate enrollment
CN110784320A (en) Distributed key implementation method and system and user identity management method and system
JP3871996B2 (en) Data division management method and program
CN112789825A (en) Computer-implemented system and method for transferring access to digital resources
US10630471B1 (en) System and method for enforcement of correctness for key derivation
CN112446039A (en) Block chain transaction processing method, device, equipment and storage medium
KR20230042346A (en) Master Key Escrow Process
CN111404892B (en) Data supervision method and device and server
CN112100144A (en) Block chain file sharing method and device, storage medium and electronic equipment
CN112565201B (en) Private key processing method and device in block chain and computer storage medium
CN117155551A (en) Secret information sharing method, system, equipment and storage medium
CN114398651B (en) Secret data sharing method and distributed system
CN112751675B (en) Information monitoring method, system, equipment and storage medium based on block chain
JP2023531695A (en) secure secret recovery
CN112613018A (en) Block chain-based digital certificate using system
KR20210036700A (en) Blockchain system for supporting change of plain text data included in transaction
JP6830868B2 (en) Authenticated encryption system with additional data, decryption device, authenticated encryption method with additional data, and program
Li Novel availability and integrity verification protocol for ISMAC system under cloud environment

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