CN109150968B - Block chain distributed storage method based on secret sharing - Google Patents
Block chain distributed storage method based on secret sharing Download PDFInfo
- Publication number
- CN109150968B CN109150968B CN201810767888.XA CN201810767888A CN109150968B CN 109150968 B CN109150968 B CN 109150968B CN 201810767888 A CN201810767888 A CN 201810767888A CN 109150968 B CN109150968 B CN 109150968B
- Authority
- CN
- China
- Prior art keywords
- nodes
- key
- position information
- network
- node
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/085—Secret sharing or secret splitting, e.g. threshold schemes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
Abstract
The invention discloses a block chain distributed storage method based on secret sharing, which comprises the following steps: 1) the network distributes the data of each block to nodes in the network according to the same probability and records the position information of the nodes; 2) in order to prevent the attack of malicious nodes, the position information of the nodes is encrypted by a key, and the network broadcasts the encrypted position information of the nodes to all the nodes in the whole network; in order to prevent an adversary from deciphering the key, a Shamir threshold method is used for protecting the key; 3) the nodes in the network obtain accounting rights according to a POW consensus mechanism, so that the position information of the encrypted nodes is recorded in a block chain; 4) when data of a certain block is recovered, collecting the sub-secrets of nodes in the network, and recovering the key according to a Lagrange interpolation formula; the encrypted node position information is decrypted by using the key to obtain the position information of the node storing the block data, and the block data can be downloaded as long as any one node is found out.
Description
Technical Field
The invention relates to a block chain distributed storage method based on secret sharing, and belongs to the technical field of data storage.
Background
Distributed storage technology is the decentralized storage of data on multiple independent devices. The distributed network storage system adopts an expandable system structure, utilizes a plurality of storage devices to share the storage load, and utilizes the position server to position the storage information, thereby not only improving the reliability, the availability and the storage efficiency of the system, but also being easy to expand. The traditional network storage system adopts a centralized storage server to store all data, the storage server becomes the bottleneck of the system performance, is also the focus of reliability and safety, and cannot meet the requirement of large-scale storage application. The blockchain technology is used as a distributed book accounting technology, transactions can be packed to generate a new block in a certain time, and the formed whole blockchain data is huge along with the accumulation of the transactions once and again. The nodes in the network need to store these data constantly, which takes up a lot of storage space. The most famous bitcoin at present, after being started in 2009, especially in 2013, the trade is exponentially increased, the accumulated block data at present exceeds 140G, and the index file breaks through 170G. This means that each miner needs to store more than 140G of data, which is constantly increasing. Therefore, it is important to research a method for storing the whole block chain data by a plurality of nodes in a distributed manner, but it is important to recover some block data arbitrarily according to the needs.
Disclosure of Invention
The invention provides a block chain distributed storage method based on secret sharing aiming at the vacancy of a block data storage technology in a block chain. The entire network then broadcasts the encrypted information to the nodes, allowing the nodes in the network to record the location information in the new block. The node generating the new block is selected by using the POW consensus, and finally, the corresponding node can be found to acquire the block data only according to the position information of the node stored in the current block.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a block chain distributed storage method based on secret sharing comprises the following specific operation steps:
1) the network distributes the data of each block to 8% -12% nodes in the network according to the same probability and records the position information of the nodes;
2) in order to prevent the attack of malicious nodes, the position information of the nodes is encrypted by a key S, and the network broadcasts the encrypted position information of the nodes to all the nodes in the whole network; in order to prevent adversaries from deciphering the key, a Shamir threshold method is used for protecting the key S, namely the key S is divided into t sub-secrets to be distributed to nodes in the network;
3) the nodes in the network obtain accounting rights according to a POW consensus mechanism, so that the position information of the encrypted nodes is recorded in a block chain;
4) when data of a certain block is recovered, collecting t sub-secrets of nodes in a network, and recovering a secret key S according to a Lagrange interpolation formula; the encrypted node position information is decrypted by using the secret key S, the position information of the node storing the block data is obtained, and the block data can be downloaded as long as any one node is found.
The key S is protected by using a Shamir threshold method, and the specific steps are as follows:
let t, n (t ≦ n) be a positive integer if each node distributes a secret number s among n nodesiThen any node greater than or equal to t can be represented by siCalculating a secret key S, wherein any node less than or equal to t-1 cannot be represented by SiCalculating a secret key S, wherein S is a secret key for encrypting the position information, SiFor the secret share held by each node, i.e. the shard of the sub-secret or key S, t is a threshold value, and is set to 5% × n:
selecting a large prime number p to be larger than any possible key S and the number n of nodes, executing modulo operation by all calculation, and constructing a t-1 degree polynomial on a finite field GF (p):
f(x)=a0+a1x+a2x2+……+at-1xt-1mod p (1)
wherein: secret a0S is a number over the finite field gf (p), the other coefficient a1……at-1Is t-1 mutually different numbers randomly selected from GF (p);
regarding key splitting: for n nodes P1,P2,……PnSelecting n different integers x1<x2<……<xnSubstituting the formula (1) to calculate f (x)i) Then (x)i,f(xi) Is the divided sub-secret, which is distributed to each node Pi;
Regarding the key reconstruction: if t values (x) of the polynomial f (x) are knowni,f(xi) (1 ≦ i ≦ t), i.e., the sub-secrets provided by the t nodes, can serve as t interpolation points, using lagrange interpolation formula (2):
the polynomial f (x) is determined, and the key S ═ a is determined0=f(0)。
Compared with the prior art, the invention has the following advantages:
1) the nodes in the whole block chain are used for distributed storage, block data can be recovered even if some nodes are offline, and the fault tolerance of the system is enhanced.
2) The position information of the node is encrypted, so that the attack of a malicious node can be avoided.
3) The key is protected by using a Shamir threshold scheme, so that the security of the key is improved, and an adversary is prevented from deciphering the key.
Drawings
Fig. 1 is a flowchart of a secret sharing-based blockchain distributed storage method according to the present invention.
FIG. 2 is a block diagram according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings:
assuming that there are m blocks and n nodes in the whole block chain, each block data is distributed to 10% of nodes in the network with the same probability, assuming that the number of nodes is 100, the data of each block is stored by 10 nodes, the whole network records the position information of the nodes, encrypts the position information by using a key, and publishes the information to all the nodes, so that the nodes of the whole network record the information in the block chain. When the position information is encrypted, a Shamir secret sharing scheme is used, the secret key can be recovered only by combining more than 5% of nodes in the whole network, and the data of the block can be recovered only by one of 10 nodes in the network working normally.
As shown in fig. 1, a block chain distributed storage method based on secret sharing includes the following specific operation steps:
1) the network distributes the data of each block to 10% of nodes in the network according to the same probability and records the position information of the nodes;
2) to prevent attack of malicious nodesThe position information of these nodes is encrypted with a key S (assuming that the number of nodes in the entire network is 100, the encrypted position information is Ek(ID1,ID2…ID10) The network broadcasts the position information of the encrypted nodes to each node in the whole network; in order to prevent adversaries from deciphering the key, a Shamir threshold method is used for protecting the key S, namely the key S is divided into t sub-secrets to be distributed to nodes in the network;
3) the nodes in the network obtain E according to the POW consensus mechanismk(ID1,ID2…ID10) Thereby recording location information of the encrypted nodes in the blockchain;
4) when data of a certain block is recovered, collecting t sub-secrets of nodes in a network, and recovering a secret key S according to a Lagrange interpolation formula; encrypted node location information E with a key Sk(ID1,ID2…ID10) Decrypting to obtain the position information ID of the node storing the block data1,ID2…ID10And the block data can be downloaded only by finding out any one node.
In this embodiment, a complete block structure mainly includes the following parts: the number of gods, the size of the block, the head of the block, the position information of the encrypted node and the signature of the block output person. The number of gods is a separator between blocks, and the size of the block records the size of the current block. Block header, i.e. block header a in fig. 2nIt consists of two chunk metadata, first a set of data that references the parent chunk hash value, which is used to connect the chunk with the previous chunk in the chain of chunks. The second set of metadata, i.e., difficulty, timestamp, and nonce, is related to mine excavation competition. The encrypted node position information records the position information of the encrypted node storing the block original data. As shown in FIG. 2, the encrypted node position information in the nth block is represented by En=Ek(ID″1,ID″2…ID″10) And (4) showing. In fig. 2, assuming that there are 100 nodes in the network, the data tongshi of one block is stored by 10 nodes, and therefore 10 nodes are labeled in the figureThe ID of the point. The signature of the chunking person is sig (h (a)n,En) Is the block head a of the block output personnAnd encrypted position information EnAnd the hashed signature is used for marking the identity for verification by other nodes.
The key S is protected by using a Shamir threshold method, and the specific steps are as follows:
let t, n (t ≦ n) be a positive integer if each node distributes a secret number s among n nodesiThen any node greater than or equal to t can be represented by siCalculating a secret key S, wherein any node less than or equal to t-1 cannot be represented by SiCalculating a secret key S, wherein S is a secret key for encrypting the position information, SiFor the secret share held by each node, i.e. the shard of the sub-secret or key S, t is a threshold value, and is set to 5% × n:
selecting a large prime number p to be larger than any possible key S and the number n of nodes, executing modulo operation by all calculation, and constructing a t-1 degree polynomial on a finite field GF (p):
f(x)=a0+a1x+a2x2+……+at-1xt-1mod p (1)
wherein: secret a0S is a number over the finite field gf (p), the other coefficient a1……at-1Is t-1 mutually different numbers randomly selected from GF (p);
regarding key splitting: for n nodes P1,P2,……PnSelecting n different integers x1<x2<……<xnSubstituting the formula (1) to calculate f (x)i) Then (x)i,f(xi) Is the divided sub-secret, which is distributed to each node Pi;
Regarding the key reconstruction: if t values (x) of the polynomial f (x) are knowni,f(xi) (1 ≦ i ≦ t), i.e., the sub-secrets provided by the t nodes, can serve as t interpolation points, using lagrange interpolation formula (2):
the polynomial f (x) is determined, and the key S ═ a is determined0F (0). As long as the sub-secrets of any nodes larger than or equal to 5% in n nodes of the whole network are obtained, the secret key S can be recovered, and the position information of 10% of nodes storing original block data is decrypted; as long as any one of the 10% nodes is online, the original block data can be obtained.
Claims (2)
1. A block chain distributed storage method based on secret sharing is characterized by comprising the following specific operation steps:
1) the network distributes the data of each block to 8% -12% nodes in the network according to the same probability and records the position information of the nodes;
2) in order to prevent the attack of malicious nodes, the position information of the nodes is encrypted by a key S, and the network broadcasts the encrypted position information of the nodes to all the nodes in the whole network; in order to prevent adversaries from deciphering the key, a Shamir threshold method is used for protecting the key S, namely the key S is divided into t sub-secrets to be distributed to nodes in the network;
3) the nodes in the network obtain accounting rights according to a POW consensus mechanism, so that the position information of the encrypted nodes is recorded in a block chain;
4) when data of a certain block is recovered, collecting t sub-secrets of nodes in a network, and recovering a secret key S according to a Lagrange interpolation formula; the encrypted node position information is decrypted by using the secret key S, the position information of the node storing the block data is obtained, and the block data can be downloaded as long as any one node is found.
2. The secret sharing based blockchain distributed storage method according to claim 1, wherein the key S is protected by using a Shamir threshold method, which comprises the following steps:
if t, n is a positive integer, t is less than or equal to n, if each node distributes a secret number s in n nodesiThen, thenAny node larger than or equal to t can be formed by siCalculating a secret key S, wherein any node less than or equal to t-1 cannot be represented by SiCalculating a secret key S, wherein S is a secret key for encrypting the position information, SiFor the secret share held by each node, i.e. the shard of the sub-secret or key S, t is a threshold value, and is set to 5% × n:
selecting a large prime number p to be larger than any possible key S and the number n of nodes, executing modulo operation by all calculation, and constructing a t-1 degree polynomial on a finite field GF (p):
f(x)=a0+a1x+a2x2+……+at-1xt-1mod p (1)
wherein: secret a0S is a number over the finite field gf (p), the other coefficient a1……at-1Is t-1 mutually different numbers randomly selected from GF (p);
regarding key splitting: for n nodes P1,P2,……PnSelecting n different integers x1<x2<……<xnSubstituting the formula (1) to calculate f (x)i) Then (x)i,f(xi) Is the divided sub-secret, which is distributed to each node Pi;
Regarding the key reconstruction: if t values (x) of the polynomial f (x) are knowni,f(xi) 1 ≦ i ≦ t, i.e., the child secrets provided by the t nodes, can serve as t interpolation points, using lagrange interpolation formula (2):
the polynomial f (x) is determined, and the key S ═ a is determined0=f(0)。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810767888.XA CN109150968B (en) | 2018-07-13 | 2018-07-13 | Block chain distributed storage method based on secret sharing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810767888.XA CN109150968B (en) | 2018-07-13 | 2018-07-13 | Block chain distributed storage method based on secret sharing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109150968A CN109150968A (en) | 2019-01-04 |
CN109150968B true CN109150968B (en) | 2021-09-14 |
Family
ID=64800478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810767888.XA Active CN109150968B (en) | 2018-07-13 | 2018-07-13 | Block chain distributed storage method based on secret sharing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109150968B (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109672529A (en) * | 2019-01-07 | 2019-04-23 | 苏宁易购集团股份有限公司 | A kind of method and system for going anonymization of combination block chain and privacy sharing |
CN109768863A (en) * | 2019-01-16 | 2019-05-17 | 杭州趣链科技有限公司 | A kind of block chain key based on elliptic curve is shared and dynamic updating method |
CN109921900A (en) * | 2019-02-18 | 2019-06-21 | 深圳市优学链科技有限公司 | A kind of algorithm of distributed key generation |
CN110297831A (en) * | 2019-07-01 | 2019-10-01 | 电子科技大学 | A kind of block chain fragment storage method based on threshold secret sharing |
CN110851859B (en) * | 2019-10-22 | 2023-09-29 | 华东师范大学 | Authentication method of distributed authority node block chain system with (n, t) threshold |
CN111291398B (en) * | 2020-03-04 | 2022-09-20 | 恒安嘉新(北京)科技股份公司 | Block chain-based authentication method and device, computer equipment and storage medium |
CN111371790B (en) * | 2020-03-05 | 2022-06-17 | 中国工商银行股份有限公司 | Data encryption sending method based on alliance chain, related method, device and system |
CN111475567B (en) * | 2020-03-09 | 2021-07-23 | 上海能链众合科技有限公司 | Internet of things data sequential recording method |
CN111447057B (en) * | 2020-03-25 | 2023-04-28 | 南方电网科学研究院有限责任公司 | Safe storage method and device based on threshold secret sharing technology |
CN112487100A (en) * | 2020-04-02 | 2021-03-12 | 支付宝(杭州)信息技术有限公司 | Information publishing method and device based on block chain and computer equipment |
CN112272087B (en) * | 2020-10-26 | 2023-04-18 | 链盟智能科技(广州)有限公司 | Application method in block chain based on safe multi-party calculation |
CN112839085A (en) * | 2021-01-06 | 2021-05-25 | 上海能链众合科技有限公司 | Internet of things data recording method based on block chain |
CN113098697B (en) * | 2021-06-08 | 2022-03-18 | 清华大学 | Block chain data writing and accessing method and device |
CN113434905B (en) * | 2021-07-05 | 2022-11-15 | 网易(杭州)网络有限公司 | Data transmission method and device, computer equipment and storage medium |
CN114499894B (en) * | 2022-04-01 | 2022-09-09 | 南京金宁汇科技有限公司 | File storage and reading method and system in block chain network |
CN115051853B (en) * | 2022-06-10 | 2023-07-21 | 广东技术师范大学 | Digital collection platform system |
CN114793160B (en) * | 2022-06-21 | 2022-09-20 | 聚梦创新(北京)软件技术有限公司 | Encryption and decryption method and device for block chain system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106548345A (en) * | 2016-12-07 | 2017-03-29 | 北京信任度科技有限公司 | The method and system of block chain private key protection are realized based on Secret splitting |
CN106775497A (en) * | 2017-01-19 | 2017-05-31 | 郑志超 | Distributed storage method and equipment based on block chain |
CN107181599A (en) * | 2017-07-18 | 2017-09-19 | 天津理工大学 | The storage of route location data confidentiality and sharing method based on block chain |
CN107623569A (en) * | 2017-09-30 | 2018-01-23 | 矩阵元技术(深圳)有限公司 | Block chain key escrow and restoration methods, device based on Secret sharing techniques |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6533771B2 (en) * | 2016-11-15 | 2019-06-19 | 富士通株式会社 | Communication method, apparatus and program |
CN106991334B (en) * | 2016-11-24 | 2021-03-02 | 创新先进技术有限公司 | Data access method, system and device |
CN107995270A (en) * | 2017-11-24 | 2018-05-04 | 成都赤乌软件技术有限公司 | A kind of method that distributed document storage is realized based on block chain |
-
2018
- 2018-07-13 CN CN201810767888.XA patent/CN109150968B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106548345A (en) * | 2016-12-07 | 2017-03-29 | 北京信任度科技有限公司 | The method and system of block chain private key protection are realized based on Secret splitting |
CN106775497A (en) * | 2017-01-19 | 2017-05-31 | 郑志超 | Distributed storage method and equipment based on block chain |
CN107181599A (en) * | 2017-07-18 | 2017-09-19 | 天津理工大学 | The storage of route location data confidentiality and sharing method based on block chain |
CN107623569A (en) * | 2017-09-30 | 2018-01-23 | 矩阵元技术(深圳)有限公司 | Block chain key escrow and restoration methods, device based on Secret sharing techniques |
Non-Patent Citations (1)
Title |
---|
一种有效的(t,n)门限可验证多密钥共享方案;王斌,等;《扬州大学学报( 自然科学版)》;20090828;第12卷(第3期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109150968A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109150968B (en) | Block chain distributed storage method based on secret sharing | |
CN110062034B (en) | Block chain large file secure storage method and system | |
CN108809652B (en) | Block chain encrypted account book based on secret sharing | |
US10540514B1 (en) | Distributed network for storing a redundant array of independent blockchain blocks | |
US20100268966A1 (en) | Efficient and secure data storage utilizing a dispersed data storage system | |
US8656187B2 (en) | Dispersed storage secure data decoding | |
JP2007299088A (en) | Data protection system, method and program | |
CN108197484B (en) | Method for realizing node data security in distributed storage environment | |
CN106100832A (en) | Key management method based on convergent encryption in a kind of cloud storage data deduplication | |
CN109962769B (en) | Data security deduplication method based on threshold blind signature | |
CN111526197B (en) | Cloud data secure sharing method | |
EP3163789B1 (en) | Forward-secure crash-resilient logging device | |
CN101917403A (en) | Distributed key management method for ciphertext storage | |
CN105356997A (en) | Security distributed data management method based on public cloud | |
CN108400970A (en) | Set of metadata of similar data message locking encryption De-weight method, cloud storage system in cloud environment | |
CN104396182A (en) | Method of encrypting data | |
CN104657494A (en) | Access method for website database | |
CN113726517A (en) | Information sharing method and device | |
CN104636673B (en) | A kind of secure storage method of data under big data background | |
CN112073372B (en) | Dual encryption method and decryption method for communication message of power system and message interaction system | |
Li et al. | A data assured deletion scheme in cloud storage | |
Abo-Alian et al. | Auditing-as-a-service for cloud storage | |
EP3852305B1 (en) | Transaction verification system and method of operation thereof | |
Wei et al. | Image encryption algorithm based on fractional order chaotic system | |
CN108494552B (en) | Cloud storage data deduplication method supporting efficient convergence key management |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230224 Address after: 201601 3 / F and 4 / F, building 18, No. 51, ZHAOFEI Road, Sijing Town, Songjiang District, Shanghai Patentee after: Zhixun password (Shanghai) Testing Technology Co.,Ltd. Address before: 200444 No. 99, upper road, Shanghai, Baoshan District Patentee before: Shanghai University |