A new method for data integrity verification

By constructing the Merkle binary tree on the user side and storing node values ​​on the cloud server, the problem of inefficiency of traditional data integrity verification methods is solved, and fast and efficient data integrity verification and data verification are achieved.

CN115758477BActive Publication Date: 2025-04-18HAINAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211447775.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-04-18
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

Traditional data integrity verification methods are inefficient, occupy a large amount of data bandwidth, and cannot accurately detect data tampering nodes. As the amount of file data increases, the complexity of hash management increases, which consumes cloud server computing power.

Method used

Using Merkle binary tree structure and non-collision hash function, data integrity verification is achieved through global parameter generation, construction of Merkle binary tree and data integrity verification process. This method constructs a Merkle binary tree on the user side, and the cloud server stores node values. When verifying, only the path node values ​​need to be transmitted to reduce the traffic and calculation amount.

Benefits of technology

It realizes fast and efficient data integrity verification, reduces traffic volume and cloud server computing volume, ensures the correctness and immutability of data verification, and adapts to the situation of data surge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115758477B_ABST
    Figure CN115758477B_ABST
Patent Text Reader

Abstract

The present invention provides a novel data integrity verification method. The system used by the method includes a cloud server and at least one user terminal; the method includes a global parameter generation process, a Merkle binary tree construction process, and a data integrity verification process. The present invention has less communication overhead than the existing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to the field of data security technology, and in particular to a novel data integrity verification method. Background technology:

[0002] As the development of Internet information technology has penetrated into all aspects of people's lives and the era of big data has arrived, the connection between users has become closer, and the resulting user-side data has surged. However, in recent years, mobile storage technology has not made proportional progress, and local terminal devices on the user side can no longer meet basic storage needs. At the same time, due to the volatility of data in the storage unit of current mobile storage devices (the solid-state hard drive itself has design defects, and long-term power failure leads to data loss), the need for important data backup has become increasingly prominent. In order to face the above problems, cloud storage products have emerged. Users upload local data to cloud servers to save local storage resources. However, user-side business data is usually placed in cloud servers, which may be tampered with by dishonest cloud servers. Users may want to monitor their data and detect whether unauthorized attackers have tampered with the database and whether the cloud server has lost the original data.

[0003] Data integrity is an important attribute of many existing software systems, and it is particularly important in cloud computing. In traditional data integrity verification methods, the user needs to save the hash value of each file data, and then formulate a hash table containing the hash values ​​of all stored file data, and store the hash table in a local trusted environment. When it is necessary to update the cloud storage file, the file hash value corresponding to the hash table in the trusted environment needs to be updated synchronously. When it is necessary to verify the integrity of the file data in the cloud storage, the file data in the cloud storage needs to be transmitted to the local terminal of the user, and the transmitted data needs to be hashed and matched with the original hash value in the hash table. The matching result is used to determine whether the data integrity is damaged.

[0004] The above-mentioned traditional data integrity verification method calculates the hash value of each file and saves the hash value through the local credit mechanism. There are the following shortcomings: 1. Each verification of file data requires the file data stored in the cloud to be transmitted to the local terminal for matching, which requires a large amount of local data bandwidth and cannot accurately detect which specific node has a problem. 2. As the amount of file data gradually increases, the number of hash values ​​that need to be saved in the local credit mechanism increases proportionally, but the complexity and difficulty of managing hash value data increases inversely. 3. The solution is too complicated and consumes the computing power of the cloud server to calculate the verification data.

[0005] Since the above three key issues have not been well resolved, the traditional data integrity verification is inefficient, resulting in data integrity technology not being widely used in practice.

[0006] Therefore, it is necessary to study an efficient and easy-to-manage data integrity method for cloud storage data, which can not only efficiently complete the data integrity verification request, but also ensure the correctness and non-tamperability of the data verification results. At the same time, it can ensure that the surge in file data will not affect the efficiency of data integrity verification on the user side. This is of great significance to the management of user-side data. Summary of the invention:

[0007] To solve the above problems, the present invention provides a novel data integrity verification method. The system used by the method includes a cloud server and at least one user terminal; the method includes a global parameter generation process, a Merkle binary tree construction process, and a data integrity verification process;

[0008] The global parameter generation process, that is, the cloud server selects a non-collision hash function h(·) and publishes it to the user end as a global parameter;

[0009] In the process of constructing the Merkle binary tree, each node of the Merkle binary tree is assigned a value;

[0010] The data integrity verification process is to construct a path from the root node of the Merkle binary tree to the nearest parent node of the data to be verified from top to bottom, and the path only includes the nearest parent node of the data to be verified in the Merkle binary tree, the parent node of the nearest parent node, and all the parent nodes pushed up; the process iteratively calculates the values ​​of all nodes on the path until the value of the nearest parent node of the data to be verified is calculated, and compares the value of the parent node with the data of the same node obtained in the process of constructing the Merkle binary tree. If they are the same, it proves that the data is complete, otherwise it proves that it has been tampered with.

[0011] Furthermore, the process of constructing a Merkle binary tree includes a second-layer assignment step, a first-layer assignment step, and third-layer to t-layer assignment steps;

[0012] The second layer assignment steps are as follows: the cloud server generates two random numbers r 1 ,r 2 , assigned to the second-level nodes in the Merkle binary tree structure; where r 1 →h 0 , r 2 →h 1 , and h 0 and h 1 The value is sent to the user end;

[0013] The first-level assignment steps are as follows: the user generates a private key mk locally as a parameter of the non-collision hash function h(·), and the result of the calculation is assigned to the root node in the Merkle binary tree structure. The assignment formula is:

[0014] root φ =h(mk,h 0 ,h 1 );

[0015] The specific steps of assigning values ​​from the third layer to the t layer are:

[0016] The user end calculates the values ​​of the nodes from the third level to the t level of the binary tree locally:

[0017]

[0018] k represents the key value of the corresponding node in the Merkle binary tree: k∈{{0,1} 2 ,{0,1} 3 ,…,{0,1} t-1}; Represents the parent node key value of k, Represents the node value of the Merkle binary tree with key value k at the i-th level, and t is the number of levels of the Merkle binary tree.

[0019] Furthermore, in the first layer assignment step, the user end saves the value of the root node.

[0020] Furthermore, the user uploads all node values ​​and data of the entire Merkle binary tree except the root node to the cloud server for storage.

[0021] Furthermore, when a user downloads a piece of data to verify whether the data has been tampered with, the data integrity verification process specifically includes the following steps:

[0022] S31: Assume that the data to be verified is m k , the cloud server stores the two data h in the second layer of the Merkle binary tree 0 and h 1 The value is sent to the user end;

[0023] S32: The user end verifies h using the non-collision hash function h(·) 0 and h 1 Whether the value has been tampered with, if h 0 and h 1 If the value has not been tampered with, proceed to step S33, otherwise the verification fails;

[0024] The formula for verification using the non-collision hash function h(·) is

[0025] rootφ =h(mk,h 0 ,h 1 )

[0026] If the above equation holds, then it proves that h 0 and h 1 The value has not been tampered with;

[0027] S33: The user end from h 0 or 1 Start by constructing a path from the root node to the branch layer from top to bottom; this path only includes data m k The corresponding nearest parent node, the parent node of the parent node, and all parent nodes above it, iteratively calculate the values ​​of all nodes on the path;

[0028] The iterative calculation formula is as follows:

[0029]

[0030] S34: The data m calculated in S33 is k The data of the nearest parent node is compared with the data of the node obtained in the process of constructing the Merkle binary tree. If they are the same, it can be proved that the data m k The data is complete and has not been tampered with, otherwise the verification fails, m k Has been tampered with.

[0031] Furthermore, the method also includes a process of uploading data by the user end, that is, the user end sends an instruction to send the data m to the cloud server, and at the same time calculates the value of the nearest parent node of the data m in the Merkle binary tree and uploads it together with the data m.

[0032] Furthermore, the method also includes a process of updating data on the user side, that is, the user side sends a data update instruction, replaces the data at the corresponding position in the cloud server with the new data, and recalculates the value of the nearest parent node of the new data in the Merkle binary tree and uploads it together with the new data.

[0033] Furthermore, the method also includes a process of the user end downloading data, that is, the user end sends a data download instruction, and the cloud server returns the data at the corresponding position and the value of the nearest parent node of the data in the Merkle binary tree to the user end.

[0034] The beneficial effects of the present invention are:

[0035] The present invention proposes a reliable cloud data integrity verification scheme that reduces the amount of communication. A special Merkle binary tree data structure is introduced to implement integrity verification of cloud data. And when some data changes frequently, updating the Merkle binary tree is also very efficient. The main effects are as follows:

[0036] 1. The local user end can quickly and efficiently verify the data integrity of the data stored on the cloud server, reducing the communication volume during the verification process, while reducing the computing power of the cloud server, and realizing the tamper-proof of the data required for verification, eliminating the possibility that users cannot verify when the data stored on the cloud server is lost or changed.

[0037] 2. By using encryption technology based on a special Merkle tree, when users need to verify whether certain data has been tampered with, they only need to complete the verification with smaller communication and computing overhead.

[0038] 3. During the data upload or update stage, the user only needs to send the data and the value of the parent node corresponding to the data to the cloud server, and the update work will be completed by the cloud server. Description of the drawings:

[0039] Figure 1 This is the system model diagram for the application of this method.

[0040] Figure 2 This is a diagram showing the relationship between the Merkle binary tree and data key values.

[0041] Figure 3 This is a structural diagram of the special Merkle binary tree described in this application. Specific implementation method:

[0042] The following combination Figure 1-3 The specific embodiments of the present invention are described in detail. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0043] The design concept of the present invention is: based on the data structure of a special binary tree improved from the existing Merkle binary tree, any data node is calculated in a top-down manner. In addition, a new integrity check method is introduced to perform integrity verification by uniformly processing database records and Merkle binary tree nodes. The present invention has less communication overhead than the existing method.

[0044] like Figure 1 As shown, the system used in the present invention includes a cloud server and at least one client. The client has absolute ownership of the data, and uploads, updates, reads and verifies the integrity of the data. The data is required to be stored in a designated location of the cloud server.

[0045] Before describing the present invention, the Merkle binary tree data structure is described first.

[0046] The key value of the root node of the Merkle binary tree is defined as φ. The left child node of each node in the Merkle binary tree (including the root node φ) is the key value of its parent node plus a 0, and the right child node is the key value of its parent node plus a 1, until a certain layer t. In this embodiment, t=257 is used as an example. The number of leaf nodes at the bottom layer covered by the Merkle binary tree is 2. 257-1 ≈1.1579208923732×10 77 Here, the bottom leaf node of the Merkle binary tree is used to represent the key-value encoding of the data, and the other nodes are used as the key-value encoding of the Merkle binary tree. For general cloud servers, 2 257-1 A key-value code is enough to mark (number) all stored data. Of course, the t value can be set as needed.

[0047] It should be noted that the first layer described in this application is the root node, the second layer is the layer where the two branches of the root node are located, the third layer is the layer where the four branches of the second layer are located, the fourth layer is the layer where the eight branches of the third layer are located, and so on. The top-down method refers to the direction from the root node to the branch layer.

[0048] The following is an explanation of this method:

[0049] like Figure 2 As shown, this method mainly includes three processes, namely, the process of constructing global parameter generation, the process of Merkle binary tree, and the process of data integrity verification. Each process is described below.

[0050] (I) Global parameter generation process

[0051] The cloud server selects a non-collision hash function h(·) and publishes it to all clients as a global parameter.

[0052] (II) The process of constructing a Merkle binary tree

[0053] The process uses two random numbers generated by the cloud server, a private key generated by the user, and a non-collision hash function h(·) to assign values ​​to each node of the Merkle binary tree. More specifically, the process includes the second-layer assignment step, the first-layer assignment step, and the third to t-layer assignment steps.

[0054] The second layer assignment steps:

[0055] The cloud server generates two random numbers r 1 ,r 2, assigned to the second-level nodes in the Merkle binary tree structure. 1 →h 0 , r 2 →h 1 , and h 0 and h 1 The value is sent to the client.

[0056] The first layer assignment steps:

[0057] The client generates a private key mk locally to prevent the data from being forged by the cloud data. It is used as the parameter of the non-collision hash function h(·). The result of the calculation is assigned to the root node in the Merkle binary tree structure: root φ =h(mk,h 0 ,h 1 ), the user side only saves the value of the root node root φ ;

[0058] The steps of assigning values ​​from the third layer to the t layer are:

[0059] The user end locally calculates the values ​​of each node from the third layer to the t layer of the Merkle binary tree:

[0060]

[0061] Here k represents the key value in the Merkle binary tree: k∈{{0,1} 2 ,{0,1} 3 ,…,{0,1} t-1}; Represents the parent node key value of k, represents the node value of the Merkle binary tree with the key value k at the i-th layer, and t is the number of layers of the Merkle binary tree. t is set according to the amount of data that the user needs to store and the storage capacity of the cloud server.

[0062] Furthermore, this process also includes a step in which the user uploads all node values ​​and data of the entire Merkle binary tree except the root node to the cloud server for storage.

[0063] (III) Data integrity verification process

[0064] The innovation of this process is to construct a path from the root node of the Merkle binary tree to the nearest parent node of the data to be verified. This path only includes the parent node of the Merkle binary tree for the data to be verified m. kThe nearest parent node, the parent node of the parent node, and so on. The process iteratively calculates the values ​​of all nodes on the path until the value of the node closest to the data to be verified is calculated. If it is compared with the data of the same node obtained in the process of constructing the Merkle binary tree, if they are the same, it proves that the data is complete, otherwise it proves that it has been tampered with.

[0065] When the client requests access to the downloaded data m k The integrity verification process includes the following steps:

[0066] S31: The cloud server sends the second layer data h of the Merkle binary tree 0 and h 1 The value is sent to the client.

[0067] S32: The user end verifies h using the non-collision hash function h(·) 0 and h 1 Whether the value has been tampered with, if not, the verification is successful and step S33 is performed, otherwise the verification fails.

[0068] The formula for verification using the non-collision hash function h(·) is

[0069] root φ =h(mk,h 0 ,h 1 )

[0070] That is, the user uses the private key mk, h 0 and h 1 As the parameter of the non-collision hash function h(·), we calculate whether it is equal to the value of the root node saved in the process of constructing the Merkle binary tree. If so, it means that h 0 and h 1 If the value has not been tampered with, proceed to step S33; otherwise, the verification fails and the next step is not performed;

[0071] S33: The user end from h 0 or 1 Start by constructing from top to bottom the parent node k∈{0,1} closest to the data to be verified t A path that only includes the data m in the Merkle binary tree k The parent node, the parent node of the parent node, and all parent nodes above it, calculate the values ​​of all nodes on the path;

[0072] The calculation formula is as follows:

[0073]

[0074] The above calculation process is to iterate back along a main trunk from the Merkle binary tree point to calculate the parent node closest to the data to be verified. Since the root node data is always in the hands of the user, the cloud server assumes that tampering with any node value can be verified and detected. If it can be proved that the data m k is complete and has not been tampered with. Otherwise, the verification fails and m k Has been tampered with.

[0075] Other nodes in the Merkle binary tree that are not located in the above path do not need to be calculated. The above calculation method is to generate child nodes from the root to the leaf, and then generate the parent node closest to the data to be verified from the root along the main trunk path for verification.

[0076] S34: The data m calculated in S33 is k The data of the nearest node is compared with the data of the same node obtained in the process of constructing the Merkle binary tree. If they are the same, it can be proved that the data m k The data is complete and has not been tampered with. Otherwise, the verification fails. k has been tampered with.

[0077] The data of the same node obtained in the Merkle binary tree process is sent from the cloud server to the user end.

[0078] Preferably, during the iterative calculation process, intermediate results are not saved to save user-side storage resources.

[0079] The above process reduces the amount of communication, reduces the amount of cloud server computing, and accurately locates the wrong data node while ensuring security and preventing malicious tampering. At the same time, when the stored data changes, the cloud server does not need to change the data required for verification in large quantities. The calculation of user verification results is fast and efficient.

[0080] Furthermore, it also includes the process of uploading data, updating data, and downloading data.

[0081] (IV) Process of uploading data

[0082] The user sends a command to send data m to cloud location k, and at the same time calculates the value of the parent node corresponding to data m in the Merkle binary tree and uploads it together with data m. This operation is performed when the cloud data is just opened.

[0083] (V) Process of updating data

[0084] The user sends a data update instruction to replace the data at cloud location k with data m′, and at the same time recalculates the value of the parent node corresponding to data m′ in the Merkle binary tree and uploads it together with data m′.

[0085] (II) Data download process

[0086] The client sends a data download instruction, and the cloud server returns the data at cloud location k and the value of the parent node corresponding to the data in the Merkle binary tree to the client.

Claims

1. A new data integrity verification method, characterized in that: The system used by the method includes a cloud server and at least one user terminal; the method includes a global parameter generation process, a Merkle binary tree construction process, and a data integrity verification process; The global parameter generation process, that is, the cloud server selects a non-collision hash function h(·) and publishes it to the user end as a global parameter; In the process of constructing the Merkle binary tree, each node of the Merkle binary tree is assigned a value; The data integrity verification process is to construct a path from the root node to the branch node layer from top to bottom starting from the Merkle binary tree root node, and the path only includes the parent node closest to the data to be verified, the parent node of the closest parent node, and all the parent nodes pushed up in the Merkle binary tree; the process iteratively calculates the values ​​of all nodes on the path until the value of the closest parent node of the data to be verified is calculated, and compares the value of the closest parent node with the data of the same node obtained in the Merkle binary tree construction process. If they are the same, it proves that the data is complete, otherwise it proves that it has been tampered with; The process of constructing a Merkle binary tree includes the second-layer assignment step, the first-layer assignment step, and the third to t-th layer assignment steps; The second-layer assignment steps are as follows: the cloud server generates two random numbers r1 and r2, and assigns them to the second-layer nodes in the Merkle binary tree structure; where r1→h0, r2→h1, and sends the values ​​of h0 and h1 to the user end; The first-level assignment steps are as follows: the user generates a private key mk locally as a parameter of the non-collision hash function h(·), and the result of the calculation is assigned to the root node in the Merkle binary tree structure. The assignment formula is: root φ =h(mk,h0,h1); The specific steps of assigning values ​​from the third layer to the t layer are: The user end locally calculates the values ​​of the nodes from the third layer to the t layer of the Merkle binary tree: k represents the key value of the corresponding node in the Merkle binary tree: k∈{{0,1} 2 ,{0,1} 3 ,…,{0,1} t-1 }; Represents the parent node key value of k, Represents the node value of the Merkle binary tree with the key value k at the i-th layer, t is the number of layers of the Merkle binary tree; m k To store data.

2. The novel data integrity verification method as claimed in claim 1, characterized in that: In the first level assignment step, the client saves the value of the root node.

3. The novel data integrity verification method as claimed in claim 1, characterized in that: The data integrity verification process specifically includes the following steps: S31: Assume that the data to be verified is m k , the cloud server sends the values ​​of the two data h0 and h1 in the second layer of the Merkle binary tree to the user end; S32: The user end uses the non-collision hash function h(·) to verify whether the values ​​of h0 and h1 have been tampered with. If the values ​​of h0 and h1 have not been tampered with, proceed to step S33, otherwise the verification fails; The formula for verification using the non-collision hash function h(·) is root φ =h(mk,h0,h1) If the above formula is true, it proves that the values ​​of h0 and h1 have not been tampered with; S33: The user terminal starts from h0 or h1 and constructs a path from the root node layer to the branch node layer from top to bottom; the path only includes data m k The corresponding nearest parent node, the parent node of the parent node, and all parent nodes above it, iteratively calculate the values ​​of all nodes on the path; The iterative calculation formula is as follows: S34: The data m calculated in S33 is k The data of the nearest parent node is compared with the data of the nearest parent node obtained in the process of constructing the Merkle binary tree. If they are the same, it can be proved that the data m k The data is complete and has not been tampered with, otherwise the verification fails, m k Has been tampered with.

4. The novel data integrity verification method according to any one of claims 1 to 3, characterized in that: The method also includes a process of uploading data by the user end, that is, the user end sends an instruction to send the data m to the cloud server, and at the same time calculates the value of the nearest parent node of the data m in the Merkle binary tree and uploads it together with the data m.

5. The novel data integrity verification method according to any one of claims 1 to 3, characterized in that: The method also includes a process of updating data on the user side, that is, the user side sends a data update instruction, replaces the data at the corresponding position in the cloud server with the new data, and recalculates the value of the nearest parent node of the new data in the Merkle binary tree and uploads it together with the new data.

6. The novel data integrity verification method according to any one of claims 1 to 3, characterized in that: The method also includes a process of the user end downloading data, that is, the user end sends a data download instruction, and the cloud server returns the data at the corresponding position and the value of the nearest parent node of the data in the Merkle binary tree to the user end.

Citation Information

Patent Citations

  • Merkle tree structure-based space inquiring integrity verification method

    CN104750784A

  • Secure location service scope query outsourcing method capable of implementing privacy protection

    CN106899937A