Blockchain-based file sharing system file authenticity verification method and system

By associating file content with a verifiable delay function in a blockchain file-sharing system, a challenge-response interaction protocol is constructed. The majority decision mechanism and Byzantine protocol are used to verify the authenticity of files, solving the security and efficiency problems of file authenticity verification in P2P systems and achieving efficient and privacy-preserving file authenticity verification.

CN117792617BActive Publication Date: 2026-08-25INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211184248.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2026-08-25
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

Existing P2P file sharing systems rely on a central server or DHT to verify file authenticity, which poses risks of single point of failure and malicious node attacks. Furthermore, existing consensus protocols cannot effectively verify file authenticity.

Method used

A blockchain-based file-sharing system is adopted, which constructs a challenge-response interaction protocol by associating file content with a verifiable delay function (VDF), uses a majority decision mechanism of honest nodes to verify the authenticity of files, and combines Merkle trees and Byzantine protocols to ensure the reliability and privacy of the verification process.

Benefits of technology

With more than two-thirds of the nodes being honest, it can efficiently verify the authenticity of files, reduce resource consumption, avoid dependence on a central server, and ensure the privacy and authenticity of file content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117792617B_ABST
    Figure CN117792617B_ABST
Patent Text Reader

Abstract

The application discloses a file authenticity verification method and system based on a blockchain file sharing system, which is based on the association of identity and file content with VDF and the construction of a challenge-response interactive protocol according to a VDF algorithm. The method comprises the following steps: a file downloader node sends a first challenge to the whole network based on a random string ch of the file content of a downloaded file; a file sharer node responds to the first challenge and generates a response fragment, and at the same time, sends a second challenge to the whole network to increase the challenge between the file sharer nodes; the file sharer node generates a response fragment based on the second challenge; and the authenticity of the file is verified based on the response distribution. The application solves the problem that the existing consensus protocol cannot verify the authenticity of the file, and reduces the resource consumption in the protocol verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of blockchain and file sharing systems, and more specifically, to a method and system for verifying the authenticity of files in a blockchain-based file sharing system. Background Technology

[0002] File-sharing systems based on peer-to-peer (P2P) communication technology are widely used in data sharing due to their advantages such as distributed nature and scalability. Currently, the most popular P2P file-sharing systems include BitTorrent, eDonkey, eMule, μTorrent, Napster, and KaZaA. These systems rely on a central server or a distributed hash table (DHT) to search for files. File authenticity verification (i.e., the downloader can verify that the file is indeed the file they need before downloading) depends on the authenticity of the central server or DHT. In practical applications, the central server or DHT may face various attacks, such as single points of failure, information tampering, and malicious nodes. Therefore, relying solely on a trusted central server or DHT to verify the authenticity of shared files is risky.

[0003] The development of blockchain technology offers a possibility for solving the above problems. If the decentralized, tamper-proof, and malicious node prevention characteristics of blockchain technology can be applied to P2P-based file-sharing systems, the problems encountered by traditional file-sharing systems can be solved. Currently, research on blockchain-based file-sharing systems is very popular, and common, relatively mature blockchain-based file-sharing systems include BTFS, BlockIPFS, Filecoin, and Storj. These systems use token reward mechanisms to attract more users to participate in file sharing, with the aim of creating a perpetually online file-sharing system.

[0004] In the above systems, consensus protocols are typically used to verify the quality of shared files. Common consensus protocols include Proof of Work (PoW), Proof of Stake (PoS), and Proof of Space (PoSpace). However, these consensus protocols have limitations. For example, PoW wastes a lot of electricity, PoS is at risk of being monopolized by a few, and PoSpace occupies a large amount of space unrelated to the shared files. Furthermore, these consensus protocols are not tied to the file content; users can declare erroneous files because they only need to prove the file's existence, not its content. If the file content could serve as evidence, it would not only reduce resource consumption but also verify the file's authenticity. Therefore, in blockchain-based file-sharing systems, a practical solution needs to be designed that can not only prove the existence of files but also prove their authenticity with limited resource consumption. Summary of the Invention

[0005] The present invention aims to realize a method and system for verifying the authenticity of files in a blockchain-based file sharing system. The method can prove that a file has indeed been stored for a period of time and that the file is indeed needed by the file downloader (i.e., the authenticity of the file).

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A method for verifying the authenticity of files in a blockchain-based file-sharing system, wherein n out of N nodes in the blockchain are honest nodes, characterized in that the method includes:

[0008] The file downloader node issues its first challenge to the entire network based on the file content of the downloaded file and the random string ch generated by the file downloader.

[0009] The file-sharing node responds to the first challenge based on the stored file content corresponding to the downloaded file and the proof π of that file content, in order to generate a proof phase response σ. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. And based on the corresponding file content and the random string ech, a second challenge is issued to the entire network; where i represents the node number in the blockchain, j represents the shard number, and the information in the execution phase response includes: the proof phase response σ P And prove π;

[0010] The file-sharing node responds to the second challenge based on the stored file content corresponding to the downloaded file and the proof π of that file content, in order to generate a proof phase response σ. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments.

[0011] Each node receives a response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification.

[0012] Each node receives the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification.

[0013] Each node is based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π;

[0014] Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained.

[0015] Furthermore, the number of honest nodes n ≥ 2N / 3.

[0016] Furthermore, the file-sharing node, based on the stored file content corresponding to the downloaded file and the proof π response of the corresponding file content, responds to the first challenge to generate a proof phase response and an execution phase response, including:

[0017] Obtain the proof π of the corresponding file content stored in the file sharer node, or calculate the proof π of the corresponding file content;

[0018] Calculate the response σ during the proof phase P =hash(id) s ||content||π||ch); where id s The unique identifier of the file sharer node is represented by , and ...

[0019] Calculate the execution phase response val←(σ) P ||vk||π||id s ); where vk represents the private key of the file sharer node.

[0020] Furthermore, the calculation of the proof π of the corresponding file content includes:

[0021] Based on the private key ek of the file sharer node and the unique identifier id of the file sharer node. s Given the difficulty coefficient t and the corresponding file content, calculate the proof π of the corresponding file content.

[0022] Furthermore, the process involves dividing the execution phase response into n fragments and expanding the n fragments into N fragments to generate and broadcast response fragments. include:

[0023] The execution phase response is divided into n fragments;

[0024] Using an error-correcting code scheme, the n-block fragments are expanded into N-block fragments;

[0025] The N blocks are used as leaf nodes to construct a Merkle tree, and the representation of the leaf nodes is used as the response block. Where val represents the response fragment. The tag for the generation phase, id s The file sharer node is represented by a unique identifier, h represents the root node of the Merkle tree, and s represents the unique identifier of the file sharer node. j Let b represent the j-th leaf node. j Indicates from leaf node s j The path to the root node h, sign val The digital signature representing the file-sharing node;

[0026] Broadcast response fragments

[0027] Furthermore, each node, upon receiving a response fragment... Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. include:

[0028] Verify digital signature sign val ;

[0029] The digital signature val If correct, check path b j From leaf node s j The path to the root node h;

[0030] In the path b jFrom leaf node s j Given the path to the root node h, generate a message. Here, `echo` represents the marker for the response fragmentation phase.

[0031] Furthermore, each node is based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P The proof of the correctness of π includes:

[0032] Obtain the public key pk of the file sharer node;

[0033] Based on the message Restore the execution phase response to obtain the proof phase response σ. P And the proof π;

[0034] Based on the public key corresponding to the node, the proof π, and the file content, calculate the correctness result of the proof π;

[0035] Based on the random string ch, the file content, the proof π, and the public key of the file sharer node, the proof phase response σ′ is obtained. P And based on the proof phase response σ′ P With the proof phase response σ P The consistency of the proof phase response σ is obtained. P The correctness of the result.

[0036] Furthermore, the authenticity of the downloaded file is determined based on the correctness verification results of each node, including:

[0037] If the correctness verification result is correct, the corresponding asynchronous binary Byzantine protocol binary bits of each node are set to the number p; if the correctness verification result is incorrect, the corresponding asynchronous binary Byzantine protocol binary bits are set to the number q.

[0038] Each node receives the corresponding asynchronous binary Byzantine protocol bits from other nodes to generate a matrix containing only the numbers p and q;

[0039] Each node checks the number of numbers p in the matrix, and sets all elements in the matrix to the number p if the number m of numbers p is not less than the number n, and sets all elements in the matrix to the number q if the number m of numbers p is less than the number n.

[0040] The number l of matrices in which all elements in all nodes are numbers p is counted, and the downloaded file is determined to be genuine if the number l is not less than the number n; the downloaded file is determined to be fake if the number l is less than the number n.

[0041] A file authenticity verification system for a blockchain-based file sharing system, wherein n out of N nodes in the blockchain are honest nodes, characterized by comprising:

[0042] In the case that the node is a file downloader node, it is used for:

[0043] Based on the file content of the downloaded file and the random string 'ch' generated by the file downloader, the first challenge was issued to the entire network; upon receiving the response fragments... Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification.

[0044] Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification.

[0045] Each node receives the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification.

[0046] Based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π;

[0047] Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained;

[0048] In the case that the node is a file sharer node, it is used for:

[0049] Based on the stored corresponding file content of the downloaded file and the proof π response to the first challenge, a proof phase response σ is generated. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. And based on the corresponding file content and the random string ech, a second challenge is issued to the entire network; where i represents the node number in the blockchain, j represents the shard number, and the information in the execution phase response includes: the proof phase response σ P And prove π;

[0050] Based on the stored corresponding file content of the downloaded file and the proof π response of the corresponding file content to the second challenge, a proof phase response σ is generated. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments.

[0051] Upon receiving the response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification.

[0052] Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification.

[0053] Based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π;

[0054] Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained;

[0055] When the node is neither a file downloader node nor a file sharer node, it is used for:

[0056] Upon receiving the response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification.

[0057] Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification.

[0058] Based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π;

[0059] Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained.

[0060] Compared with the prior art, the present invention has the following advantages:

[0061] 1. This invention provides a file authenticity verification protocol for a blockchain-based file sharing system, which combines file content with the verification process, solving the problem that existing consensus protocols cannot verify file authenticity.

[0062] 2. The present invention provides a file authenticity verification protocol for a blockchain-based file sharing system, which uses a reconstructed verifiable delay function to improve the verification efficiency of the protocol and reduce resource consumption in the verification process. Attached Figure Description

[0063] Figure 1 This is a diagram of the challenge-response protocol based on VDF of the present invention.

[0064] Figure 2 This is a flowchart of the method of the present invention.

[0065] Figure 3 This is a flowchart of the process of directly performing the file consistency verification execution phase.

[0066] Figure 4 This is a flowchart illustrating the process of performing file consistency verification after responding to the challenge.

[0067] Figure 5 It is an ABA matrix diagram. Detailed Implementation

[0068] The technical solutions in the embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely specific embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] The file authenticity verification method of the file sharing system of the present invention is based on associating identity and file content with VDF and constructing a challenge-response interactive protocol according to the VDF algorithm.

[0070] 1. Associate identity and file content with VDF.

[0071] To verify the authenticity of a file, the file owner's identity and the file content are required as input to VDF. This protocol consists of three phases: Setup, Eval, and Verify. In the Setup phase, initialization variables are generated. In the Eval phase, the user's identity and file content are associated with the VDF process to generate a proof result. In the Verify phase, the proof result is verified for correctness. The specific steps are as follows:

[0072] (1) Setup(λ,t)→(pp)=(ek,pk). λ is the security parameter, t is the difficulty coefficient, and pp is a public parameter containing the ek private key and the pk public key.

[0073] (2) Eval(ek,x,id) → (π), where x represents the file content or file hash value, and id represents the identity of the file sharer. Eval uses x as input to generate the proof file π. The Eval algorithm is time-consuming and difficult to accelerate with parallel computing.

[0074] (3) Execute Verify(pk,x,id,π) → {Accept,Reject}. The Verify algorithm uses x,id,π as input and outputs either accept or reject. The Verify algorithm is more efficient than the Eval algorithm.

[0075] 2. Construct a challenge-response interactive protocol based on the VDF algorithm.

[0076] To verify file sharers, it's necessary to construct a challenge-response protocol based on VDF. File sharers use this protocol to verify each other's authenticity, confirming that a file has been stored for a certain period. The protocol consists of three phases: initialization, proof, and verification. The two parties are the prover (P) and the verifier (V). P can be considered a file sharer, providing proof of file storage and authenticity; V acts as the file sharer verifying P. The process of the VDF-based challenge-response protocol is as follows: Figure 1 As shown.

[0077] (1) Initialization phase:

[0078] P generates identity information ID based on pk. P id P =hash(pk), then P is based on the file sharer's identity information id. P Generate a VDF proof of π using the file content. The difficulty of generating the proof of π can be adjusted by changing the value of t.

[0079] π←〈Eval init (ek,id P ,t,content)〉

[0080] In this phase, P runs the VDF algorithm to generate the proof document. The VDF algorithm requires running specified steps in sequence and is difficult to accelerate through parallel computation; this phase consumes significant computational and time resources. π will serve as input for the proof phase; therefore, P should continuously store π locally, awaiting a rapid response to the challenge.

[0081] (2) Proof stage:

[0082] When the prover P receives the challenge ch, it executes the following algorithm to generate the proof phase response σ. P :

[0083] (σ P )←〈hash(id P ||content||π||ch)〉

[0084] Proof P will (σ P The initialization process (pk, π) is sent to the verifier V. Since P cannot obtain the challenge value ch in advance, he must run the proof phase after receiving the challenge value ch. This process is efficient if the prover P actually saves the proof file. Otherwise, the prover P must rerun the initialization phase to generate the proof file; therefore, the prover P prefers to continuously save the proof file rather than dynamically generate it. As long as the proof file is continuously saved, the prover P can make the correct response to the verifier V with a smaller computational cost. Continuously saving the proof file should be less costly than using computational resources to regenerate the evidence data.

[0085] (3) Verification phase:

[0086] Verifier V possesses the same file as prover P. When verifier V receives (σP, pk, π), verifier V will recalculate the hash value based on the values ​​of pk, f, π, and ch, and then compare it with the received σP. P The values ​​are compared. Then, verifier V verifies the correctness of π. Verifier V outputs an accept or reject based on the result of the two verifications. Here, vk represents the public key of verifier V.

[0087] Verify(vk,f,hash(vk),π)

[0088] assert(σ P ==σ′ P ←assh(hash(pk)||f||π||ch))

[0089] Based on the above-mentioned association of identity and file content with VDF and the construction of a challenge-response interactive protocol according to the VDF algorithm, the file authenticity verification method of the file sharing system of this invention can verify file authenticity provided that more than 2 / 3 of the nodes are honest. In a blockchain-based file sharing scenario, multiple nodes will participate in file authenticity verification, which will form a network composed of N designated nodes (with different well-known identities (P0 to P...)). N-1 Nodes generate proof documents using saved files. By using these proof documents as input, it is proven that the files have been saved for a period of time, and that the authenticity of the files (i.e., the file is indeed what the downloader needs) can be ensured, provided that more than 2 / 3 of the nodes are honest. All verification processes are independent of a central server and do not disclose any private information about the file content. This protocol is suitable for consortium blockchain deployments, where file consistency verification can be submitted by any node, but the node responsible for executing the protocol is fixed.

[0090] File consistency verification combines VDF with the Honey Badger BFT Reliable Broadcast (RBC) algorithm, using storage resources as credentials to prove file consistency. File consistency verification consists of five phases: challenge, challenge response, execution, response, and confirmation. Each node needs to execute these phases.

[0091] Specifically, such as Figure 2 As shown, the present invention includes the following steps:

[0092] (1) Challenge Phase

[0093] Before verifying the authenticity of a file, all nodes need to generate proof documents using the VDF algorithm. This step consumes time and computational resources. Nodes prefer to continuously store these proof documents and await challenges. The file downloader generates a random string ch and broadcasts m to the entire network. chal information.

[0094] (m chal )←〈〈"challange",id d ,file_metadata,ch〉,signc hal >

[0095] "challange" is the marker for this stage, id d `ch` is the unique identifier of the file downloader, `file_metadata` contains file information, and `sign` is the digital signature of the request. When a node receives the `ch` value, it will simultaneously execute the response challenge phase. The process of directly performing the file consistency verification execution phase is as follows: Figure 3 As shown, the process of performing file consistency verification after responding to the challenge is as follows: Figure 4 As shown.

[0096] (2) Response to the challenge phase

[0097] When the file sharer receives message m chal Then, the node first verifies the digital signature of the message. If the verification passes, it runs the VDF proof phase and generates a response m based on the challenge value ch. val (This phase is the same as the execution phase below). Then, the node generates the re-challenge value ech based on ch, and then generates the output m of the response challenge phase. echo-ch The purpose of this phase is to allow each other node to generate a random re-challenge value (ech) to challenge all nodes in the network, and for other nodes to generate a response based on the received random re-challenge value (ech). (Without this phase, there would only be challenges from file downloaders to all nodes in the network, lacking challenges between other nodes.)

[0098] ech = hash(ch||id) d ||id f )

[0099] (m echo-ch )←〈〈"echo-ch",id s ,ech〉,sign echo-ch >

[0100] Where m echo-ch This is the marker for this stage, id s This is a unique identifier for the file sharer. After this phase is completed, the node sends m to other nodes. echo-ch .

[0101] (3) Execution phase

[0102] When the node receives m chal or m echo-ch At that time, the node runs the proof phase of the VDF to generate the response m. val .

[0103] The node is based on the file sharer's identity ID. s The content of the file (the file downloader broadcasts the m) chal (Contains information from the file), prove π, ch or ech generate the proof stage response σ. P Then according to σ P ,vk,π,id s Generate the execution phase response val.

[0104] (σ P =hash(id)s ||content||π||(ch or ech))

[0105] (val)←(σ P ||vk||π||id s )

[0106] The node divides `val` into `Nf` blocks (where `f` is the maximum number of malicious nodes, less than `N / 3`), then uses an error-correcting coding scheme to expand them into `N` blocks (i.e., the entire message can be recovered as long as `Nf` blocks are received), and uses these blocks as leaf nodes to construct a Merkle tree. Let `h` represent the root node of this Merkle tree. Send to node N j Constructing fragmented responses during the execution phase. And send it to each node N j This indicates that the message is a response to ch or ech.

[0107]

[0108] Among them, b j Indicates from leaf node s j The path to the root node h.

[0109] (4) Response Phase

[0110] When received At that time, the node needs to verify the digital signature and check b j Indeed, it starts from the leaf node s j The path to the root node h. When all validations pass, the node constructs a... The message is sent to other nodes.

[0111]

[0112] (5) Confirmation stage

[0113] When the node receives When a message is sent, the node verifies the corresponding Merkle path and signature value. If the verification passes, the node constructs... The message is sent to other nodes.

[0114]

[0115] When the node receives a match When sending a message, he can use the corresponding m val The message is used to recover the original val message. Then, the node can perform a verification phase to verify σ. PThe correctness of π is verified. If the verification passes, the corresponding Asynchronous Binary Byzantine Agreement (ABA) binary bit will be set to 1; otherwise, it will be set to 0.

[0116] After completing the above steps, each node will receive feedback on the corresponding challenge from other nodes and generate a 0-1 matrix, such as... Figure 5 As shown in the diagram. The x-axis represents the message sender, and the y-axis represents the message receiver. A value of 1 indicates successful verification, while 0 indicates otherwise. Next, each node executes the ABA protocol, checking if the number of 1s in each node's matrix is ​​greater than 2*N / 3. If it is, all elements are set to 1. Finally, each node will have the same matrix, proving that these nodes retained the same file. If more than 2 / 3 of the nodes are honest, it can be ensured that the shared file is authentic (i.e., exactly what the file downloader wanted).

[0117] In summary, this invention associates a Verifiable Delay Function (VDF) with file content and reconstructs it into a challenge-response interaction protocol, making it better suited for file-sharing systems. The reconstructed Verifiable Delay Function is combined with Reliable Broadcast (RBC) in a Byzantine Fault-Tolerant protocol to verify file authenticity. Provided that more than two-thirds of the participants are honest, this protocol can ensure the authenticity of shared files. Furthermore, the verification process does not reveal the true content of the file and does not rely on any trusted third party. Theoretical analysis results show that the VDF-based challenge-response interaction protocol has low computational complexity in the verification phase. Moreover, this protocol can verify file authenticity with high efficiency.

[0118] Although specific implementation processes and example drawings of the present invention have been disclosed for illustrative purposes to aid in understanding and implementing the invention, those skilled in the art will understand that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the illustrated implementation processes and example drawings.

Claims

1. A method for verifying the authenticity of files in a blockchain-based file-sharing system, wherein n out of N nodes in the blockchain are honest nodes, characterized in that... The method includes: The file downloader node issues its first challenge to the entire network based on the file content of the downloaded file and the random string ch generated by the file downloader. The file-sharing node responds to the first challenge based on the stored file content corresponding to the downloaded file and the proof π of that file content, in order to generate a proof phase response σ. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. And based on the corresponding file content and the random string ech, a second challenge is issued to the entire network; where i represents the node number in the blockchain, j represents the shard number, and the information in the execution phase response includes: the proof phase response σ P And prove π; The file-sharing node generates a proof phase response σ based on the stored corresponding file content of the downloaded file and the proof π of that corresponding file content in response to the second challenge. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. Each node receives a response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. Each node receives the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification. Each node is based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π; Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained.

2. The method as described in claim 1, characterized in that, The number of honest nodes n ≥ 2N / 3.

3. The method as described in claim 1, characterized in that, The file-sharing node responds to the first challenge based on the stored file content corresponding to the downloaded file and the proof π of the corresponding file content, to generate a proof phase response and an execution phase response, including: Obtain the proof π of the corresponding file content stored in the file sharer node, or calculate the proof π of the corresponding file content; Calculate the response σ during the proof phase P =hash(id) s ||content||π||ch); where id s The unique identifier of the file sharer node is represented by , and ... Calculate the execution phase response val←(σ) P ||vk||π||id s ); where vk represents the public key of the file sharing node.

4. The method as described in claim 3, characterized in that, The proof π for calculating the content of the corresponding file includes: Based on the private key ek of the file sharer node and the unique identifier id of the file sharer node. s Given the difficulty coefficient t and the corresponding file content, calculate the proof π of the corresponding file content.

5. The method as described in claim 1, characterized in that, The process involves dividing the execution phase response into n fragments and expanding those n fragments into N fragments to generate and broadcast response fragments. include: The execution phase response is divided into n fragments; Using an error-correcting code scheme, the n-block fragments are expanded into N-block fragments; The N blocks are used as leaf nodes to construct a Merkle tree, and the representation of the leaf nodes is used as the response block. Where val represents the response fragment. The tag for the generation phase, id s The file sharer node is represented by a unique identifier, h represents the root node of the Merkle tree, and s represents the unique identifier of the file sharer node. j Let b represent the j-th leaf node. j Indicates from leaf node s j The path to the root node h, sign val The digital signature representing the file-sharing node; Broadcast response fragments 6. The method as described in claim 5, characterized in that, Each node receives a response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. include: Verify digital signature sign val ; The digital signature val If correct, check path b j From leaf node s j The path to the root node h; In the path b j From leaf node s j Given the path to the root node h, generate a message. Here, `echo` represents the marker for the response fragmentation phase.

7. The method as described in claim 1, characterized in that, Each node is based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P The proof of the correctness of π includes: Obtain the public key pk of the file sharer node; Based on the message Restore the execution phase response to obtain the proof phase response σ. P And the proof of π; Based on the public key corresponding to the node, the proof π, and the file content, calculate the correctness result of the proof π; Based on the random string ch, the file content, the proof π, and the public key of the file sharer node, the proof phase response σ′ is obtained. P And based on the proof phase response σ′ P With the proof phase response σ P The consistency of the proof phase response σ is obtained. P The correctness of the result.

8. The method as described in claim 1, characterized in that, The authenticity of the downloaded file is determined based on the correctness verification results of each node, including: If the correctness verification result is correct, the corresponding asynchronous binary Byzantine protocol binary bits of each node are set to the number p; if the correctness verification result is incorrect, the corresponding asynchronous binary Byzantine protocol binary bits are set to the number q. Each node receives the corresponding asynchronous binary Byzantine protocol bits from other nodes to generate a matrix containing only the numbers p and q; Each node checks the number of numbers p in the matrix, and sets all elements in the matrix to the number p if the number m of numbers p is not less than the number n, and sets all elements in the matrix to the number q if the number m of numbers p is less than the number n. The number l of matrices in which all elements in all nodes are numbers p is counted, and the downloaded file is determined to be genuine if the number l is not less than the number n; the downloaded file is determined to be fake if the number l is less than the number n.

9. A file authenticity verification system for a blockchain-based file sharing system, wherein n out of N nodes in the blockchain are honest nodes, characterized in that... include: When the node is a file downloader node, it is used for: Based on the file content of the downloaded file and the random string 'ch' generated by the file downloader, the first challenge was issued to the entire network; upon receiving the response fragments... Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification. Each node receives the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification. Based on the message Resume the execution phase response and, in conjunction with the document content, verify the proof phase response σ. P And to prove the correctness of π; Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained; In the case that the node is a file sharer node, it is used for: Based on the stored corresponding file content of the downloaded file and the proof π response of the corresponding file content to the first challenge, a proof phase response σ is generated. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. And based on the corresponding file content and the random string ech, a second challenge is issued to the entire network; where i represents the node number in the blockchain, j represents the shard number, and the information in the execution phase response includes: the proof phase response σ P And prove π; Based on the stored corresponding file content of the downloaded file and the proof π response of the corresponding file content to the second challenge, a proof phase response σ is generated. P In conjunction with the execution phase response, response fragments are generated and broadcast by dividing the execution phase response into n fragments and expanding the n fragments into N fragments. Upon receiving the response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification. Based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π; Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained; When the node is neither a file downloader node nor a file sharer node, it is used for: Upon receiving the response fragment Or response fragmentation At that time, for the response fragments Or response fragmentation Perform verification, and generate and broadcast a message upon successful verification. Upon receiving the message At that time, regarding the message Perform verification, and generate and broadcast a message upon successful verification. Based on the message Restore the execution phase response and, in conjunction with the file content, verify the proof phase response σ. P And the proof of the correctness of π; Based on the correctness verification results of each node, the authenticity of the downloaded file is obtained.

Citation Information

Patent Citations

  • CPOR model-based cloud data position public verification method and system

    CN111859412A

  • Systems and methods providing specialized proof of confidential knowledge

    US20220038285A1