CN113542317A - Method, equipment and storage medium for realizing file copy certification by using smart consensus - Google Patents

Method, equipment and storage medium for realizing file copy certification by using smart consensus Download PDF

Info

Publication number
CN113542317A
CN113542317A CN202010292127.0A CN202010292127A CN113542317A CN 113542317 A CN113542317 A CN 113542317A CN 202010292127 A CN202010292127 A CN 202010292127A CN 113542317 A CN113542317 A CN 113542317A
Authority
CN
China
Prior art keywords
data
replication
original text
replicator
code
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.)
Pending
Application number
CN202010292127.0A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010292127.0A priority Critical patent/CN113542317A/en
Publication of CN113542317A publication Critical patent/CN113542317A/en
Pending legal-status Critical Current

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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • 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 invention provides a method for realizing file replication certification by using smart consensus. The method for realizing file replication certification by using the smart consensus comprises the steps of generating a replication code r of a data original text m by using the smart consensus method according to the unit length L of a workload code, the data original text m and a node identifier id of a replicator; and submitting the copy code r and the summary information of the copy code r to a first storage area for storage, and submitting the summary information of the data original text m to a second storage area for storage. The method for realizing file replication by using the smart consensus converts the original content of the data file into the replication code form of each replication storage node for storage, can ensure that a replicator can honestly and truly store the file, effectively prevents the replicator from cheating attack, and can simultaneously carry out workload certification and file coding. The method can be used in the fields of using the smart consensus file storage, and multi-party cooperative data storage verification and cooperation without a trust foundation.

Description

Method, equipment and storage medium for realizing file copy certification by using smart consensus
Technical Field
The invention relates to the technical field of block chains, in particular to a method, equipment and a storage medium for realizing file copy certification by using smart consensus.
Background
In 2008, a scholarly named "Zhongben Mingmoto" (Satoshi Nakamoto) published "Biguo coin: a paper of a point-to-point electronic cash system lays the foundation of a block chain technology. The block chain is a decentralized distributed database system which is jointly maintained by all nodes in a block chain network and consists of a series of data blocks generated based on a cryptography method, wherein each data block is one block in the block chain. The blocks are linked together in order according to the chronological order of the generation times, forming a chain of data, which is referred to visually as a chain of blocks.
The blockchain has the security characteristics of being unchangeable, unforgeable and completely traceable due to the special blockchain and the transaction generation and verification protocol. Therefore, the file storage technology realized by the smart consensus in use is rapidly developed in recent years. Among these, Filecon becomes a benchmarking product in this area, which is intended to be a decentralized storage network, allowing users to trade unused storage in the open market. The core technology of the Filecoid lies in copy proof and space-time proof, and in addition, zero-knowledge proof participation is required, so that the requirement on participating hardware equipment is high. In particular, replication certification, a core problem to be solved is that an incompletely trusted replicator 131 (storage node), without holding a data file specified by a holder 110 (storage requiring node), purportedly participates in holding a replicated copy of the specified data file, and then the replicator 131 spoofs a verifier (verification node) 140 by several means so that the verifier trusts that the replicator 131 actually holds the specified data file. These spoofing methods are broadly classified into several categories:
1. outsourcing, when the verifier 140 attempts to ask the replicator 131, requires that the replicator 131 provide all, part of, or a hash of the content of a specified data file, etc. At this time, the replicator 131 itself does not store the specified data file content, but the spoofing is successfully completed by the file content saved by the other replicator 132.
2. When the content of the designated data file has a certain rule, for example, all the contents stored in one file are space characters, or the contents are an arithmetic progression. Such files are handed to the replicator 131, and the replicator 131 may not store the files, but generate the files instantly by using a specific algorithm or program when the verifier 140 asks the files, thereby achieving the purpose of reducing the use of storage space.
The replicators 131 and 132 establish connections with the holder 110 and the verifier 140 through a File storage System network 120, where the File storage System (internet File System) is an underlying protocol of the internet, similar to the HTTP protocol.
In order to avoid the above problems, so that the replicator actually stores the specified data file, the replication certification scheme proposed by filocoin in the prior art generally adopts the core ideas of slow encoding and fast decoding, so that the replicator prefers to save the encoded replicated copies instead of the original text before encoding. One of the replication certification schemes is chain (chain), and the basic principle is to divide original data into a plurality of small data blocks, introduce mutual dependency between different data blocks, and so on; on the basis, the copy certification scheme which is further improved is also a stated DRG scheme, a zigzag DRG scheme, a VDF scheme and the like, wherein the later scheme further compresses the complexity of decoding verification and improves the randomness. For example, zigbee DRG, the original data is first divided into small data blocks in turn, each small data is to be calculated with a hash value, the small data itself is encoded and decoded with the hash value as an encryption seed, and the hash values of the small data establish a connection relationship according to DRG (depth Robust graph). Therefore, the encoding process can not be parallel, so that the speed is reduced, the encoding process is not too slow, and the cheating behavior of a replicator for caching partial data is reduced.
However, these replication method verification processes require zero knowledge proof participation and have high requirements on participating hardware devices. Therefore, in order to better prevent cheating fraudulent behaviors of replicators, common attacks such as foreign packet attacks, generation attacks and Sybil attacks in an open system are well resisted. There is a need to provide a new document copy certification method to ensure the preservation and verification of multi-party cooperative data without trust.
It is noted that the information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
In order to solve the defects in the prior art, the invention aims to provide a method, a device and a storage medium for realizing file copy certification by using smart consensus.
In order to provide a method for realizing file replication certification by using the smart consensus, the invention is realized by the following technical scheme: a method for realizing file copy certification by using the smart consensus comprises,
s100: according to the unit length L of the workload code, the data original text m and the node identification id of the replicator, generating a replication code r of the data original text m by using the smart consensus method;
s200, submitting the copy code r and the summary information of the copy code r to a first storage area corresponding to the replicator for storage;
s300: and submitting the summary information of the data original text m to a second storage area for storage.
Optionally, the method further includes allocating a plurality of replicators with different node identification ids to the data original text m, allocating the data original text m to the plurality of replicators respectively, and repeatedly executing steps S100 and S200 by each replicator.
Optionally, in step S100, the generating, by using the smart consensus method, a replication code r of the data original text m according to the workload code unit length L, the data original text m, and the node identifier id of the replicator includes,
s110: dividing the data original text m into a plurality of original text sub-data blocks m with the length of Li,m=m1||m2||…||mn
S120: generating each original text sub-data block m by using the smart consensus methodiIs duplicated and coded riThe replica code r ═ r1||r2||…||rnWherein i is more than or equal to 1 and less than or equal to n.
Optionally, in step S120, the method for using smart consensus generates each of the smart cardsOriginal text data block miIs duplicated and coded riComprises the steps of (a) preparing a mixture of a plurality of raw materials,
iteratively attempting said replica code riUp to a hash value hiThe data with the length of L at the appointed position and the original text sub-data block miSame, wherein the hash value hiEncoding r for said replicationiA hash value of a replication attestation parameter, the replication attestation parameter including a node identification id of the replicator and the original text data block miA position in the data original m.
Optionally, a method of verifying a proof of replication, the method of verifying a proof of replication comprising the steps of,
s410: initiating a challenge to a replicator by using challenge data, wherein the challenge data comprises a data combination consisting of random positions and random lengths corresponding to a plurality of original text segments;
s420: according to the replication segment corresponding to the challenge data, the replicator calculates to obtain a first hash and returns the first hash to the verifier;
s430: and the verifier acquires the replication content, calculates a second hash according to the challenge data, compares whether the first hash and the second hash are the same, if so, verifies that the replication certification passes, and otherwise, verifies that the replication certification fails.
Optionally, in step S410, the challenge data further includes random data, and the random data is set as a prefix of the data combination or at an interval with the data combination.
Optionally, in step S420, the returning to the verifier includes the replicator writing the first hash to a block chain.
The invention also provides a device for realizing the file replication by using the smart consensus, which is realized by the following technical scheme, and the device comprises a replication certification module, a first writing module and a second writing module, wherein the replication certification module is configured to be used for generating a replication code r of the data original text m by using the smart consensus method according to the unit length L of the workload code, the data original text m and the node identifier id of a replicator;
the first writing module is configured to submit the replication code r and the summary information of the replication code r to a first storage area corresponding to the replicator for storage;
and the second writing module is configured to submit the summary information of the data original text m to a second storage area for storage.
Optionally, a verifier module is included, the verifier module being configured to initiate a challenge to the replicator verifying the proof of replication.
The invention also provides a device for realizing the file copy certification by using the smart consensus, which comprises a processor and a memory, wherein the processor is suitable for realizing each instruction, the memory is suitable for storing a plurality of instructions, and the instructions are suitable for being loaded by the processor and executing any one of the methods for realizing the file copy certification by using the smart consensus.
The invention also provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed, the method for implementing the document copy certification using the smart consensus as described in any one of the above aspects.
Compared with the prior art, the method for realizing file replication in smart consensus provided by the invention has the following beneficial effects:
the method for realizing file replication by using the smart consensus provided by the invention generates the replication code r of the data original text m by using the smart consensus method according to the unit length L of the workload code, the data original text m and the node identifier id of the replicator. The intelligent consensus algorithm (workload certification/Proof of word/PoW) widely used in the bit money is converted into a coding algorithm with practical application value, and the calculation power (calculation power, calculation capacity of equipment) is used on the duplication certification code, so that a large amount of hardware equipment investment and energy in the prior art in the intelligent consensus algorithm consumed in the prior art are converted into the calculation power which is widely regarded as energy resource waste in the return of the bit money and the like, and the calculation power is converted into the coding algorithm with practical application value for application, and the utilization rate of the energy and the resource is effectively improved.
The invention adopts a simple hash algorithm to carry out coding of selectable difficulty, and is suitable for but not limited to various hash functions sha1/sha256/md5/blake2b and the like.
Furthermore, the verification method for realizing file replication by using the smart consensus provided by the invention converts the original content of the data file into a unique replication coding form of each replication storage node for storage, can effectively resist the fraudulent attack of replicators, effectively reduces the methods of generating attacks, Sybil attacks and the like by the replicators providing storage service in a block chain through outsourcing attack, cheating the behavior of a verifier and reducing the phenomenon of obtaining benefits at low cost. So that the verifier believes that the replicator can honestly and truthfully store the file.
Furthermore, the method for realizing document copy certification by using the smart consensus provided by the invention has higher cost if a replicator loses related results, such as the result after copying the code, and generates copy from the original text again, so that the replicator tends to honestly store the copied and coded content instead of cheating fraud.
Still further, the method for realizing file replication by using smart consensus provided by the invention can be used in the fields of block chain file storage, multi-party cooperative data storage verification and cooperation without trust foundation and the like.
Still further, the method for implementing document replication certification using smart consensus provided by the present invention further includes a method for verifying the replication certification, since in step S410, only the positions of a plurality of original fragments and the lengths of the original fragments need to be sent to the replicator, and the original fragments themselves do not need to be sent, in step S420, only hash of the replicated fragments needs to be sent, and the communication traffic is small; the method can verify the copy of a plurality of original text segments and even all data original texts at one time, has more challenge combinations, can cover the verification of more original text segments at any positions, and has higher efficiency.
Still further, the challenge data further includes random data, the random data is used as a prefix of the data combination or is arranged at an interval with the data combination, a challenge is initiated to the replicator, the random data and the data combination avoid a behavior that the replicator only saves a plurality of randomly selected original text segments for replication, and cheating behaviors of the replicator can be better avoided under the condition that the traffic is increased to a limited extent. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
FIG. 1 is a schematic diagram of a block chain structure in the prior art;
fig. 2 is a schematic flowchart of a method for implementing document copy certification by smart consensus according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of step S100 in FIG. 2;
fig. 4 is a schematic structural diagram of a document duplication certification apparatus implemented by using smart consensus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a document copy certification apparatus implemented by using smart consensus according to an embodiment of the present invention;
wherein the reference numerals are as follows:
110-holder, 120-file storage system, 131, 132-replicator, 140-verifier;
210-duplicate proof module, 220-first write module, 230-second write module, 240-verifier module;
310-processor, 320-memory, 330-multimedia component, 340-I input/output interface, 350-communication component.
Detailed Description
To make the objects, advantages and features of the present invention clearer, the following describes in detail a method and apparatus for document copy certification with smart consensus according to the present invention, and a storage medium. The following detailed description of embodiments of the invention refers to the accompanying drawings.
It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
It is noted that the terms "first," "second," and the like in the description and claims herein and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
It will be apparent that the methods described herein comprise a series of steps and that the order of such steps presented herein is not necessarily the only order in which such steps may be performed, and that some of the described steps may be omitted and/or some other steps not described herein may be added to the methods.
It is further emphasized that the described embodiments are merely a few, if any, embodiments of the 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.
The method for realizing file replication certification by using smart consensus provided by the embodiment of the invention is shown in the attached figure 2, and comprises the following steps:
s100: and according to the unit length L of the workload code, the data original text m and the node identification id of the replicator, generating the replication code r of the data original text m by using the smart consensus method.
And S200, submitting the replication code r and the summary information of the replication code r to a first storage area for storage, wherein the first storage area is a block link point corresponding to the replicator. Preferably, in one embodiment, the digest information of the duplicate code r includes a hash of the duplicate code r.
S300: and submitting the summary information of the data original text m to a second storage area for storage. Specifically, the digest information of the data original m includes a hash of the data original m. In particular, the summary information herein should be understood as mapping transformation on the source data, including but not limited to the result of hash operation, and may also be a summary (index, extraction, etc.) of the original text obtained in other manners, and in order to avoid repetition, the following description is omitted.
Preferably, in one embodiment, the using the smart consensus to implement the file replication attestation method further includes allocating a plurality of replicators with different node identification ids to the data original text m. In one embodiment, the method further includes allocating the data original m to a plurality of replicators, and repeating steps S100 and S200 by each replicator to obtain a plurality of different replication codes r of the data original m. For example, in one embodiment, three replicators are assigned to provide storage services for the data original m, and each replicator has a node identification id1, an id2, and an id3, wherein the node identifications id1, id2, and id3 are public keys and are used only as node identifications of replicators to distinguish the replicators from other replicators and are not used as asymmetric encryption/signatures. In this way, the data original m will be allocated to three replicators of node identification id1, node identification id2 and node identification id3, each replicator will store the respective replication code r and the digest information of the replication code r, respectively, and submit to the respective corresponding first storage area for storage. Further, in one embodiment, the replicator is a resource provider in the blockchain network, and may be a node of the blockchain or a miner of the blockchain, and the first storage area may be located on the blockchain. The second storage area may be a node of the blockchain, or may be another storage medium. The blockchain network is based on a P2P (Peer-to-Peer) network, and each P2P network node participating in transaction and block replication (storage), verification and forwarding is a node in the blockchain network, and can be divided into a replication node and a verification node according to its approximate function. It is obvious that the three described replicators in this embodiment are only used to aid the understanding of the invention and do not constitute any limitation of the invention nor are they limiting.
Specifically, in one embodiment, as shown in fig. 3, in step S100, the generating a duplication code r of the data original text m by using the smart consensus method according to the workload code unit length L, the data original text m, and the node identifier id of the duplicator includes the following steps,
s110: dividing the data original text m into a plurality of original text sub-data blocks with the length of L, wherein m is m1||m2||…||mn
S120: generating each original text sub-data block m by using the smart consensus methodiIs duplicated and coded riThe replica code r ═ r1||r2||…||rnWherein i is more than or equal to 1 and less than or equal to n.
Specifically, in one embodiment, preferably, the original text m is represented by binary, and the original text sub data block m is a sub data block miAlso represented in binary. The workload coding unit length L determines the difficulty of copying, and has a value of L bits, the workload coding unit length L is a positive integer and determines the amount of calculation required by the copier when generating the copy, and the larger the workload coding unit length L is, the larger the difficulty of copying is. The invention relates to a method for proving the workload of each original text data block m by the common knowledge of the Chinese character and the smartiIteratively attempting said replica code riUp to a hash value hiThe data with the length of L at the appointed position and the original text sub-data block miSame, wherein the hash value hiEncoding r for said replicationiAnd the hash value of the copy certification parameter to obtain each original text sub data block miIs duplicated and coded riThen, a copy code r of the data original m is generated. In this embodiment, the replication certification parameter includes a node identifier id of the replicator and the original text data block miA position in the data original m. Obviously, the duplication verification parameter can be adjusted according to actual conditions. In another embodiment, the duplication certification parameter includes a node identifier id of the duplicator and a coding nonce, which may be a number, and is not limited in this disclosure. Specifically, for each original text sub-data block miUsing the node identities id andhash value h is solved by taking nonce as input of hash functioniI.e. hiTry iteration nonce (such as 1 nonce per try) until hash value H (id + nonce)iThe data with the length of L at the appointed position and the original text sub-data block miSame, i.e. mi=H(id+nonce)[-L:]Stopping iteration nonces, and using the nonces as copy codes riTo obtain the original text data block miSaid replica code r ofi. Due to mi=H(id+ri)[-L:]And so on, if the replicator stores the replication code r, the data original text m can be obtained according to the replication code r. More preferably, the position data H (id + i + r) is addedi) The method can avoid a duplicator from establishing a huge reverse hash mapping table to accelerate the duplication proof forgery. In particular, in the process of carrying out workload certification by using the smart consensus, the copy coding can be carried out simultaneously. The basic principle is that the workload proves that a difficulty D needs to be set, and the nonces are iterated (1 is added every time) until the output value of the hash is smaller than the difficulty D. In an attempt to find a target that is less than the difficulty D, a portion of the output of the hash value (e.g., the least significant L bits) may be used for encoding. The length of the designated location of the hash once the workload proves nonce is L bits of data equal to mi,Then r isiNonces. Thus, the workload certification (the nonce adds 1 continuously, looking for the hash output less than the difficulty D) and the copy encoding can be performed simultaneously. Since other replicators only have their own replication codes or original text contents, and other replicators of these contents after replication codes do not store them, since the hash function has unidirectionality and is irreversible, and it takes a long time to calculate the replicated contents from the original text, the replicated contents of the replicators should only be stored by the replicators themselves. Therefore, outsourcing attacks and the like of a third party and behaviors of a deception verifier are effectively resisted.
The method for realizing file replication by using smart consensus provided by the invention adopts a simple hash algorithm to encode the selectable difficulty, and is suitable for various hash functions sha1/sha256/md5/blake2b and the like; further, the invention converts the smart consensus algorithm (Proof of Work/PoW) widely used in bitcoin into a coding algorithm with practical application value, so that the calculation power is used on the copy Proof coding and is used as a useful coding calculation. In the prior art, a large amount of hardware equipment investment and energy are consumed in a traditional smart consensus algorithm to obtain returns such as bitcoin and the like. This practice is widely recognized as a waste of energy resources; still further, in blockchain-based file systems, nodes are not fully trusted. The replicators providing the storage service in the block chain can deceive the verifier by outsourcing attacks, generating attacks, Sybil attacks and other methods so as to reduce the cost and obtain benefits. In order to enable a replicator to honestly and truly store files, the file replication proving method for realizing the intelligent consensus converts original contents of the data files into a unique replication coding form of each replication storage node for storage, and can effectively resist the fraudulent attack of the replicator; furthermore, according to the method for realizing file replication by using the smart consensus provided by the invention, if a replicator loses a result of the replicated code, replication is generated from the original text again, so that the cost is high, and the replicator can honestly store the content of the replicated code instead of cheating and cheating; still further, the method for realizing file replication by using smart consensus provided by the invention can be used in the fields of file storage based on block chains, multi-party cooperative data storage verification and cooperation without a trust foundation and the like.
Further, after the copy code r of the data original m is generated by the replicator, the verifier may randomly ask a question to the replicator to provide the copy-coded content at the designated location of the data original m. If the replicator can provide the content after the corresponding replication code, the replication certification is verified to be passed; otherwise, the copy proof verification fails.
In one embodiment, a method for verifying a replication certificate is provided, in which a verifier challenges a replicator, inputs corresponding index information and a randomly selected original text segment, obtains a replication segment corresponding to the original text segment returned by the replicator, and decodes the replication segment to obtain a decoded replication segment corresponding to the original text segment, and then the verifier compares whether the original text segment and the decoded replication segment are consistent, and if so, the replication certificate is verified to be authentic, which indicates that the replicator is authentic; otherwise, the copy certification fails verification. The method for verifying the copy certification can randomly designate the original text segments at any positions to verify the method for realizing the file copy certification by using the smart consensus provided by the invention, but the method for verifying the copy certification has the defects of large communication traffic, less challenge combination and capability of verifying only one segment at a time.
In an exemplary embodiment of the present invention, another method for verifying the copy certification is further provided, which is used to verify that the method for implementing the file copy certification by using the smart consensus provided in the foregoing embodiment includes the following steps:
s410: and initiating a challenge to the replicator by using challenge data, wherein the challenge data comprises a data combination consisting of random positions and random lengths corresponding to a plurality of original text segments. Specifically, the random positions and the random lengths corresponding to the plurality of original text segments may be positions and lengths of the original text segments in the data original text; the position and length of the copy segment corresponding to the original segment in the copy data may be also possible. For ease of understanding, the following description will take the random position and random length of the text segments in the data text as examples. In one embodiment, the plurality of random positions is a discrete logarithmically generated random number sequence. The random length may be k (thousand) bits. The random position can be the starting position or the ending position of the original text segment, and is preferably the starting position. Preferably, the starting position of each original text segment is a random position, and the length of each original text segment is a random length, that is: several textual segments for the challenge are randomly chosen.
Further, the challenge data further includes random data, and the random data is set as a prefix of the data combination or at an interval from the data combination. The random data is added, so that the cheating behavior of a replicator can be fundamentally avoided under the condition that the traffic is increased to a limited extent.
Optionally, the selection method of the plurality of original text segments at least includes one of the following three ways. In one embodiment, the collection of the text segments is a subset of the data text, for example, for the data text abc, a randomly selected text segment b is taken as an example, the position of b in the data text abc is 2 (with 1 as a start bit), the length of b is 1, and a challenge is issued to a replicator by using the position corresponding to b in the data text abc and the length of b. In another embodiment, the plurality of original fragments consists of a first subset of original fragments and a second subset of original fragments, wherein the first subset of original fragments is a randomly selected plurality of original fragments, and the second subset of original fragments is a complement of the first subset of original fragments. Still taking the data original abc as an example for illustration, the randomly selected original fragment b is the first subset, and then the complementary set a, c of b is the second subset of the original fragment, so that the three original fragments b, a and c are used to initiate a challenge to the replicator. Similarly, if a is taken as the first subset of the randomly selected original text segments, the complementary set bc of a is the second subset of the original text segments. Further, in another embodiment, the plurality of text segments includes a plurality of randomly selected text segments and a full text of the data text. Similarly, taking the data original text abc as an example, b is an original text fragment selected by the data, and then the full text abc of the data original text is also used as the original text fragment to initiate a challenge to the replicator. Thus, if there are 1024-long data originals, if the random challenge uses two original fragments as the challenge, there are 1024 × 1023 combinations, there are 1024 × 1023 1022 combinations using three bits, and so on. Therefore, compared with the first implementation mode, the latter two methods for selecting the original text segment can completely cover the data original text when the replicator is challenged, and can achieve safety under the condition that the traffic is increased to a limited extent, thereby well avoiding the cheating behavior of the replicator.
S420: and according to the replication segment corresponding to the challenge data, the replicator calculates to obtain a first hash and returns the first hash to the verifier.
S430: and the verifier acquires the replication content, calculates a second hash according to the challenge data, compares whether the first hash and the second hash are the same, if so, verifies that the replication certification passes, and otherwise, verifies that the replication certification fails.
Compared with the verification method of the previous implementation method, the verification method for verifying the file replication certification method implemented by using the smart consensus provided by the embodiment only needs to send the positions of a plurality of original fragments and the lengths of the original fragments to a replicator in step S410, and does not need to send the original fragments, and only needs to send the hash of the replicated fragments in step S420, so that the communication traffic is small; moreover, a plurality of original text segments and even all data original texts can be verified at one time, particularly random data is added, a plurality of challenge combinations are provided, more original text segments at any positions can be verified, the efficiency is higher, and cheating behaviors of replicators are better avoided.
Based on the same inventive concept, a further embodiment of the present invention further provides a device for implementing document copy certification by using the smart consensus, and the term "unit" or "module" as used below can implement a combination of software and/or hardware of predetermined functions. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a device for implementing file replication using smart consensus according to an embodiment of the present invention, including a replication proving module 210, a first writing module 220, and a second writing module 230, where the replication proving module 210 is configured to generate a replication code r of a data original m using a smart consensus method according to a unit length L of a workload code, the data original m, and a node identifier id of a replicator; a first writing module 210, configured to submit the replication code r and the summary information of the replication code r to a first storage area for saving, where the first storage area includes a storage node corresponding to the replicator; and the second writing module 230 is configured to submit the summary information of the data original text m to the second storage area for saving.
Preferably, in another embodiment, the apparatus for providing in-use smart consensus enabled document proof of replication further comprises a verifier module 240, wherein the verifier module 240 is configured to initiate a challenge to the replicator to verify proof of replication.
With respect to the apparatus for proving the copy of the smart consensus implementation document in the foregoing embodiments, which is used for implementing the method for proving the copy of the smart consensus implementation document in use, since the principle of solving the problem by the apparatus for proving the copy of the smart consensus implementation document in use is similar to that of the method for proving the copy of the smart implementation document in use, the implementation of the apparatus for proving the copy of the smart consensus implementation document in use can be referred to as the implementation of the method for proving the copy of the smart implementation document in use, and the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail herein.
When the method for proving the copy of the smart consensus implementation file is implemented, the device for proving the copy of the smart consensus implementation file has the same beneficial effects as the method for proving the copy of the smart consensus implementation file in use, and details are not repeated herein.
In addition, the division of the file copying certification device composition module is realized only by one logic function division in the use process, and other division modes can be provided in the actual realization process. Moreover, the physical implementation of each module may also be in various ways, which is not limited in the present invention.
Fig. 5 is a block diagram illustrating an exemplary configuration of a device for implementing file copy attestation using smart consensus according to an embodiment of the present invention. As shown in fig. 5, in this embodiment, the apparatus for implementing document copy using smart consensus includes: a processor 310 and a memory 320, wherein the processor 310 is adapted to implement instructions, and the memory 320 is adapted to store instructions, which are adapted to be loaded by the processor 310 and to perform the method for using the smart consensus to implement the document copy certification according to any of the embodiments described above. Preferably, the apparatus for using the smart consensus realization file replication provided by this embodiment may further include one or more of a multimedia component 330, an input/output interface 340, and a communication component 350, wherein the input/output interface is an I/O interface.
Specifically, the processor 310 is configured to control the overall operation of the apparatus for using the smart consensus to implement file copy attestation, so as to complete all or part of the steps in the method for using the smart consensus to implement file copy attestation. The memory 320 is used to store various types of data to support the operation of the in-use smart enabled document copy attestation apparatus, such data may include, for example, instructions for any application or method operating on the in-use smart enabled document copy attestation device, as well as application related data, such as contact data, transceived messages, pictures, audio, video, and so forth. The Memory 320 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 330 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in the memory 320 or transmitted through the communication component 350. Preferably, the audio assembly further comprises at least one speaker for outputting audio signals. The input/output interface 340 provides an interface between the processor 310 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 350 is configured to enable wired or wireless communication between the documentary duplication certification device and other devices in use. Wherein the wireless communication includes, but is not limited to: such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so that the corresponding Communication component 350 may include: Wi-Fi module, bluetooth module, NFC module.
Further, in an exemplary embodiment, the apparatus for using smart consensus realization file replication certification may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, for executing the above method for using smart consensus realization file replication certification.
When the method for proving the copy of the smart consensus implementation file is executed, the device for proving the copy of the smart consensus implementation file has the same beneficial effects as the method for proving the copy of the smart consensus implementation file in use, and details are not repeated herein.
In another exemplary embodiment, a computer-readable storage medium is further provided, where computer-executable instructions are stored on the computer-readable storage medium, and when executed, the computer-executable instructions implement the steps of using the smart document copy attestation method described above, where the specific steps are described above in detail and are not repeated herein. For example, the computer readable storage medium may be the memory 320 comprising program instructions executable by the processor 310 of the apparatus for performing a document copy attestation using the smart consensus described above to perform the method for performing a document copy attestation using the smart consensus described above.
When the computer executable instruction on the computer readable storage medium provided by the invention is executed to implement the method for realizing the file copy certification by using the smart consensus provided by the invention, the method has the same beneficial effects as the method for realizing the file copy certification by using the smart consensus, and the description is omitted here.
The preferred embodiments of the present invention have been described in detail with reference to the accompanying drawings, however, the present invention is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solution of the present invention within the technical idea of the present invention, and these simple modifications are within the protective scope of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. The invention is not described in detail in order to avoid unnecessary repetition.
In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.
From the above description of embodiments, it should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects that is presently preferred. With this understanding in mind, portions of the present solution that contribute to the prior art can be embodied in the form of a computer software product that is stored on a computer-readable storage medium, which includes but is not limited to disk storage, CD-ROM, optical storage, and the like.
The present invention is described in terms of flowcharts 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 above description is only for the preferred embodiment of the method, apparatus and storage medium for implementing document copy certification using the smart consensus of the present invention, and does not limit the scope of the present invention in any way, including but not limited to the configurations listed in the above embodiments. Various modifications and alterations to the embodiments of the present invention will become apparent to those skilled in the art from the foregoing description of the embodiments. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (11)

1. A method for realizing file copy certification by using the smart consensus is characterized by comprising the following steps,
s100: according to the unit length L of the workload code, the data original text m and the node identification id of the replicator, generating a replication code r of the data original text m by using the smart consensus method;
s200, submitting the copy code r and the summary information of the copy code r to a first storage area corresponding to the replicator for storage;
s300: and submitting the summary information of the data original text m to a second storage area for storage.
2. The method for using the smart consensus for file replication attestation as recited in claim 1, further comprising assigning a plurality of replicators with different node identifiers id to the data original text m, assigning the data original text m to the plurality of replicators respectively, and repeating the steps S100 and S200 by each replicator.
3. The method as claimed in claim 1, wherein in step S100, the generating the replication code r of the data original m by using the smart consensus method according to the unit length L of the workload code, the data original m, and the node identifier id of the replicator comprises,
s110: dividing the data original text m into a plurality of original text sub-data blocks m with the length of Li,m=m1||m2||…||mn
S120: generating each original text sub-data block m by using the smart consensus methodiIs duplicated and coded riThe replica code r ═ r1||r2||…||rnWherein i is more than or equal to 1 and less than or equal to n.
4. The method for realizing document copy certification using smart consensus as claimed in claim 3, wherein in step S120, the method generates each placeThe original text data block miIs duplicated and coded riComprises the steps of (a) preparing a mixture of a plurality of raw materials,
iteratively attempting said replica code riUp to a hash value hiThe data with the length of L at the appointed position and the original text sub-data block miSame, wherein the hash value hiEncoding r for said replicationiA hash value of a replication attestation parameter, the replication attestation parameter including a node identification id of the replicator and the original text data block miA position in the data original m.
5. The method for using the smart consensus for implementing file replication attestation of claim 1, further comprising a method for verifying replication attestation, the method for verifying replication attestation including the steps of,
s410: initiating a challenge to a replicator by using challenge data, wherein the challenge data comprises a data combination consisting of random positions and random lengths corresponding to a plurality of original text segments;
s420: according to the replication segment corresponding to the challenge data, the replicator calculates to obtain a first hash and returns the first hash to the verifier;
s430: and the verifier acquires the replication content, calculates a second hash according to the challenge data, compares whether the first hash and the second hash are the same, if so, verifies the replication certification successfully, and otherwise, verifies the replication certification unsuccessfully.
6. The method for using copy attestation of smart consensus as claimed in claim 5, wherein the challenge data further comprises random data, the random data being a prefix of the data combination or being spaced apart from the data combination in step S410.
7. The method of claim 5, wherein the step S420 of returning to the verifier comprises the replicator writing the first hash to a block chain.
8. The device for realizing file copy certification by using the smart consensus is characterized by comprising a copy certification module, a first writing module and a second writing module, wherein,
the duplication certification module is configured to generate a duplication code r of the data original text m by using a local smart consensus method according to the unit length L of the workload code, the data original text m and the node identification id of the duplicator;
the first writing module is configured to submit the replication code r and the summary information of the replication code r to a first storage area corresponding to the replicator for storage;
and the second writing module is configured to submit the summary information of the data original text m to a second storage area for storage.
9. The apparatus of claim 8, further comprising a verifier module configured to initiate a challenge to the replicator to verify proof of replication.
10. An apparatus for using smart consensus enabled document copy attestation as recited in any of claims 1 to 7, comprising a processor and a memory, the processor being adapted to implement instructions, the memory being adapted to store a plurality of instructions, the instructions being adapted to be loaded by the processor and to perform a method for using smart consensus enabled document copy attestation as recited in any of claims 1 to 7.
11. A computer readable storage medium having computer executable instructions stored thereon, wherein the computer executable instructions, when executed, implement the method for using the smart consensus copy attestation of any one of claims 1 to 7.
CN202010292127.0A 2020-04-14 2020-04-14 Method, equipment and storage medium for realizing file copy certification by using smart consensus Pending CN113542317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010292127.0A CN113542317A (en) 2020-04-14 2020-04-14 Method, equipment and storage medium for realizing file copy certification by using smart consensus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010292127.0A CN113542317A (en) 2020-04-14 2020-04-14 Method, equipment and storage medium for realizing file copy certification by using smart consensus

Publications (1)

Publication Number Publication Date
CN113542317A true CN113542317A (en) 2021-10-22

Family

ID=78119985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010292127.0A Pending CN113542317A (en) 2020-04-14 2020-04-14 Method, equipment and storage medium for realizing file copy certification by using smart consensus

Country Status (1)

Country Link
CN (1) CN113542317A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195488A1 (en) * 2013-01-10 2014-07-10 International Business Machines Corporation Intelligent Selection of Replication Node for File Data Blocks in GPFS-SNC
CN106339473A (en) * 2016-08-29 2017-01-18 北京百度网讯科技有限公司 Method and device for copying file
CN108647523A (en) * 2018-04-28 2018-10-12 华南理工大学 A kind of electronic identification system based on block chain and deposit card, file access pattern method
CN109284624A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of data safety partition method and device based on the storage of block chain
CN109284625A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of Data Access Security method and device based on block chain
WO2019170814A1 (en) * 2018-03-07 2019-09-12 The MaidSafe Foundation Data transaction system and method
US20190327299A1 (en) * 2018-04-24 2019-10-24 International Business Machines Corporation Resolving status and synchronization discrepancies in a distributed computing environment using blockchains

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195488A1 (en) * 2013-01-10 2014-07-10 International Business Machines Corporation Intelligent Selection of Replication Node for File Data Blocks in GPFS-SNC
CN106339473A (en) * 2016-08-29 2017-01-18 北京百度网讯科技有限公司 Method and device for copying file
WO2019170814A1 (en) * 2018-03-07 2019-09-12 The MaidSafe Foundation Data transaction system and method
US20190327299A1 (en) * 2018-04-24 2019-10-24 International Business Machines Corporation Resolving status and synchronization discrepancies in a distributed computing environment using blockchains
CN108647523A (en) * 2018-04-28 2018-10-12 华南理工大学 A kind of electronic identification system based on block chain and deposit card, file access pattern method
CN109284624A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of data safety partition method and device based on the storage of block chain
CN109284625A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of Data Access Security method and device based on block chain

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TENGFEI XUE; YUYU YUAN; ZAHIR AHMED; KRISHNA MONIZ; GANYUAN CAO; CONG WANG: "Proof of Contribution: A Modification of Proof of Work to Increase Mining Efficiency", 2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), pages 636 - 644 *
XU HAO; LONG YU; LIU ZHIQIANG; LIU ZHEN; GU DAWU: "Dynamic Practical Byzantine Fault Tolerance", 2018 IEEE CONFERENCE ON COMMUNICATIONS AND NETWORK SECURITY (CNS), pages 1 - 8 *
郭兵勇;李新宇;: "一个高传输效率的多值拜占庭共识方案", 密码学报, no. 05, pages 66 - 78 *

Similar Documents

Publication Publication Date Title
JP7472338B2 (en) Pseudorandom number generation in blockchain
TWI770022B (en) Computer implemented control method, system and control system
CN110289966B (en) Byzantine fault tolerance-based anti-adaptive attack union chain consensus method
US11474971B2 (en) System and method for creating a mutual reference between a blockchain and a private repository
CN110061850B (en) Collision calculation method of chameleon hash function and editable block chain construction method
CN109379343B (en) Heterogeneous consensus method of block chains and terminal
CN108270874B (en) Application program updating method and device
US20200358619A1 (en) Quantumproof blockchain
EP3632037A1 (en) Network for improved verification speed with tamper resistant data
CN116957790A (en) Method and system for realizing universal certification of exchange on blockchain
US10116450B1 (en) Merkle signature scheme using subtrees
CN110177124B (en) Identity authentication method based on block chain and related equipment
CN111010265B (en) Block chain organization key management method based on hierarchical key and BLS digital signature
CN112219371A (en) Bidirectional block chain
US10938574B2 (en) Cryptographic font script with integrated signature for verification
Cong et al. A blockchain consensus protocol with horizontal scalability
CN111466098A (en) Block chain implemented security system and method for blind result selection
CN113626875A (en) Knowledge graph file storage method for block chain fragment enabling
CN111292190A (en) Transaction generation method, block creation method, related device and equipment
Xu et al. Redactable blockchain-based secure and accountable data management
CN112367168A (en) Method and device for generating key of block chain user
CN109274674B (en) Block chain heterogeneous consensus method with high security and terminal
CN113988831A (en) Transfer method based on alliance chain
Tin et al. Provably secure key exchange: an engineering approach
CN112039837B (en) Electronic evidence preservation method based on block chain and secret sharing

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