A method for checking integrity and a related device

Through the Huffman-Merkle tree method, weights are distinguished according to file frequency, and the integrity check in the cloud computing environment is optimized, which solves the problem of inefficiency of data integrity protection in cloud computing and achieves efficient data integrity assurance. .

CN114169014BActive Publication Date: 2024-09-17Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111519393.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-09-17
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In a cloud computing environment, the integrity protection of tenant data faces huge challenges, especially due to issues such as the untrustworthiness of cloud service providers and virtual machine escape. Existing integrity verification methods occupy a large amount of computing resources and are difficult to efficiently protect data. Integrity.

Method used

The Huffman-Merkle tree integrity verification method is used to determine the weight according to the verification frequency of the file to be verified, and generate integrity verification information, including the tenant private key signature of the hash tree root node and related sub-nodes. , optimize the verification path and reduce the requirements on user computing power and communication bandwidth.

Benefits of technology

It effectively accelerates the integrity verification process, optimizes the verification path of hot files, reduces the requirements for user computing power and communication bandwidth for large file integrity verification, and improves the efficiency of data integrity protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114169014B
    Figure CN114169014B
Patent Text Reader

Abstract

The present application discloses an integrity verification method. A plurality of files to be verified are obtained; according to the verification frequencies of the plurality of files to be verified, the weights of the plurality of files to be verified are determined, wherein the weights of the files to be verified with a high verification frequency are greater than the weights of the files to be verified with a low verification frequency; according to the plurality of files to be verified and the weights of the plurality of files to be verified, integrity verification information corresponding to the plurality of files to be verified is generated, wherein the integrity verification information includes the root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, the child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key; the first hash tree is a hash tree constructed according to the plurality of files to be verified, and the distance between the child nodes corresponding to the files to be verified with a high weight in the first hash tree and the first root node is less than the distance between the child nodes corresponding to the files to be verified with a low weight and the first root node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer security, and in particular to an integrity verification method and related devices. Background Art

[0002] When users or enterprises outsource their data to cloud computing service providers, or entrust cloud computing service providers to run their applications, cloud computing service providers obtain priority access to the data or applications. Cloud system tenants generally use encryption to ensure the security of private data stored on cloud servers. With the development of encryption technology and access control technology, reliable confidentiality can be provided for tenants' private data. However, due to various risks such as internal personnel management failure, hacker attacks or server system failures that lead to the failure of security mechanisms, cloud service providers do not have sufficient evidence to convince users that their data has not been maliciously modified. In particular, all data of tenant virtual machines is stored in the cloud, and there are often problems such as virtual machine escape and virtual machines being attacked by illegal users outside the system. This poses a huge challenge to the integrity protection of tenant data in the system. In a cloud environment, the security of tenant data is usually assumed to be untrustworthy, and tenant virtual machines can only establish trust through online interaction with cloud servers. Due to the openness and dynamism of cloud computing, trust is difficult to establish, making the integrity and security of tenants' dynamic data a problem.

[0003] The commonly used integrity verification method is as follows: In the cloud system, before verifying the integrity of a certain data, it is necessary to verify the integrity of all other data in turn. Therefore, a large amount of computing resources are required, which places high demands on the computing power of cloud devices. Summary of the invention

[0004] The first aspect of the present application provides an integrity verification method, comprising:

[0005] Get multiple files to be verified;

[0006] Determining weights of the multiple files to be verified according to the verification frequencies of the multiple files to be verified, wherein the weights of the files to be verified with a high verification frequency are greater than the weights of the files to be verified with a low verification frequency;

[0007] Generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified, wherein the integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key;

[0008] The first hash tree is a hash tree constructed according to the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node;

[0009] The child node related to the file to be verified in the first hash tree stores the hash value of the file to be verified.

[0010] A second aspect of the present application provides an integrity verification device, comprising:

[0011] A transceiver module, used for obtaining multiple files to be verified;

[0012] A processing module, configured to determine weights of the plurality of files to be verified according to verification frequencies of the plurality of files to be verified, wherein the weight of the file to be verified with a high verification frequency is greater than the weight of the file to be verified with a low verification frequency;

[0013] The processing module is further used to generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified, wherein the integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key;

[0014] The first hash tree is a hash tree constructed according to the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node;

[0015] The child node related to the file to be verified in the first hash tree stores the hash value of the file to be verified.

[0016] In a third aspect, the present application provides an integrity verification device, which may include one or more processors, memories, and communication interfaces.

[0017] The processor, memory and communication interface are connected via a bus.

[0018] The memory is used to store program instructions, and the processor calls the program instructions stored in the memory to execute the steps in the integrity verification method of the first aspect above.

[0019] In a fourth aspect, the present application further provides a computer device, comprising a processor, which, when executing a computer program stored in a memory, is used to implement the integrity verification method provided in the first aspect of an embodiment of the present invention.

[0020] In a fifth aspect, the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the integrity verification method provided in the first aspect of the embodiment of the present invention.

[0021] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0022] In the embodiment of the present application, the file popularity is differentiated to accelerate the integrity verification process. The method uses the Huffman-Merkle tree integrity verification method for the file to be verified, determines the verification weight according to the verification frequency of the file to be verified, effectively optimizes and shortens the verification path of hot files, and effectively reduces the requirements of large file integrity verification on user computing power and communication bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1a This is a schematic diagram of the structure of the B+ hash tree;

[0024] Figure 1b This is a schematic diagram of the Huffman hash tree structure;

[0025] Figure 2a A schematic diagram of a framework of an integrity verification system involved in an embodiment of the present application;

[0026] Figure 2b A schematic diagram of an embodiment of an integrity verification method proposed in an embodiment of the present application;

[0027] Figure 3 A schematic diagram of an embodiment of an integrity verification method proposed in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of an embodiment of an integrity verification device provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of the structure of an integrity verification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.

[0032] First, some concepts involved in the embodiments of the present application are introduced:

[0033] (1) The B+ hash tree is a B+ tree built based on the characteristics of the hash tree. Unlike the B+ tree, each node not only has a keyword for search and a pointer to a child node, but also has a value obtained by hashing the hash values ​​of the child nodes.

[0034] Definition 1 (B+ tree node): A B+ tree node contains the keyword sequence number used for searching, the node hash value and a pointer to the child node.

[0035] Definition 2 (node ​​hash value): Each node stores a node value NodeHash and several child node values ​​ChildHash. The node value of this node is obtained by linking and hashing all the contained ChlidHash values.

[0036]

[0037] Specific as Figure 1a shown. Figure 1a This is a schematic diagram of the structure of the B+ hash tree.

[0038] Definition 3 (Certification Path and Auxiliary Information): Define the certification path i The set of nodes on the path from node i to the root node is called the authentication path set. The set of Nodehash values ​​of the sibling nodes of all nodes on the authentication path is called auxiliary authentication information, denoted by Ω i For example, in Figure 1, the authentication path set path8 and auxiliary authentication information set Ω8 of node v8 are: path8 = {v8, v1} Ω8 = {v2, v3, v5, v6, v7}. v3 is a cache node, so v 15 The authentication path set path15 and the auxiliary authentication information set Ω 15 For:path 15 = {v 15},Ω 15 = {v 12 ,v 13 ,v 14}.

[0039] (2) Huffman hash tree structure.

[0040] For the virtual machine system of tenants (the tenants in the embodiments of this application can be regarded as virtual machine users), the integrity verification frequency of different files is different. I have designed a weighted binary hash tree, the Huffman hash tree structure (HHT). The corresponding HHT is generated according to the weights set by the tenants for different files. The leaf node stores the hash value of the file, and the value of the non-leaf node is calculated by Hash (Left||Right) of its child nodes. The larger the weight, the closer it is to the root node, such as Figure 1b As shown, Figure 1b The diagram is a Huffman hash tree structure diagram. The tenant sets the weight of files in the / boot, / etc, and / usr folders to be higher than that in the / home folder. In the Huffman data structure, files in the / boot, / etc, and / usr folders are closer to the root node than files in the / home folder when verifying files, which reduces the amount of calculation.

[0041] Next, see Figure 2a , Figure 2aThe framework diagram of an integrity verification system involved in an embodiment of the present application. The integrity verification system includes: a key management center, which is responsible for key management and distribution. A cloud server, which is used to store user data and provide users with rentable cloud services, such as providing data access services to users. A cloud tenant virtual machine (or tenant virtual machine), which dynamically accesses the data of the cloud server by interacting with an encryption agent and a cloud server, and the dynamic access includes but is not limited to: reading data, writing data, or modifying data.

[0042] See also Figure 2b , Figure 2b This is a schematic diagram of an embodiment of an integrity verification method proposed in an embodiment of the present application. An integrity verification method proposed in an embodiment of the present application includes:

[0043] 201. Obtain multiple files to be verified.

[0044] Before step 201, the key management center uses a key generation algorithm to calculate the tenant public key and the group private key. The tenant in the embodiment of the present application refers to a user who has obtained legal authorization or purchased cloud services, and the tenant can be understood as a virtual machine.

[0045] Specifically, is a multiplicative cyclic group of order large prime number p, and g is The key management center randomly selects a generator Calculate PK = g msk , the public parameter is PK and the system master private key is MSK. The key management center generates the tenant private key sk and the tenant public key according to the tenant's user id and sends them to the corresponding cloud tenant virtual machine.

[0046] The cloud tenant virtual machine obtains multiple files to be verified, and the files to be verified can be understood as hot files of the cloud server or the cloud tenant virtual machine, for example: files accessed by the cloud tenant virtual machine in the cloud server.

[0047] 202. Determine weights of the multiple files to be verified according to verification frequencies of the multiple files to be verified.

[0048] In step 202, the cloud tenant virtual machine determines the weights of the multiple files to be verified according to the verification frequencies of the multiple files to be verified, which can be understood as the access frequencies of the multiple files to be verified. The weights of the files to be verified with high verification frequencies are high, and the weights of the files to be verified with low verification frequencies are low.

[0049] For example, a cloud tenant VM considers the weight of files in the / boot, / etc, and / usr folders to be higher than the weight of files in the / home folder.

[0050] It is understandable that the weight of the file to be verified can be set by the user (ie, the cloud tenant virtual machine), and the embodiment of the present application does not limit this.

[0051] 203. Generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified.

[0052] In step 203, the cloud tenant virtual machine generates integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified. The specific method is as follows:

[0053] The cloud tenant virtual machine calculates a hash tree (the hash tree is, for example, HHT) including integrity verification information (the integrity verification information is also called integrity measurement value) based on multiple files to be verified and the weights of multiple files to be verified. The hash tree is referred to as the first hash tree in the embodiment of the present application. The data stored in the leaf nodes of the first hash tree is the hash value of the file to be verified, and the internal nodes of the first hash tree are generated by hash operations according to the rules of the Merkle hash tree. The root node of the first hash tree is signed with the tenant's private key. The signed root node of the first hash tree is: sig sk (Nodehash rootnode )=H(Nodehash rootnode ) sk .

[0054] Furthermore, the first hash tree is a hash tree constructed based on the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node. The child nodes related to the files to be verified in the first hash tree store the hash values ​​of the corresponding files to be verified. In other words, the leaf nodes closer to the root node store the hash values ​​of the files to be verified with higher verification frequency (or access frequency).

[0055] The integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the file to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key.

[0056] Furthermore, after the cloud tenant virtual machine generates the first hash tree, the cloud tenant virtual machine sends the first hash tree, the first root node of the first hash tree, and the file to be verified to the cloud server, which saves and maintains the above data.

[0057] 204. Receive an update request for the first hash tree.

[0058] Steps 204-207 are optional steps, and the cloud tenant virtual machine can update the first hash tree according to the file to be verified. The details are as follows:

[0059] When the file to be verified changes (including but not limited to adding, deleting or modifying the file to be verified), the cloud tenant virtual machine sends an update request to the cloud server. Correspondingly, the cloud server receives the update request for the first hash tree. The cloud server generates auxiliary authentication information according to the update request (assuming that the auxiliary authentication information is: Ω i ) as evidence (let the evidence be pro, pro = {Ω i ,sig sk (Nodehash rootnode )}) replies to the cloud tenant virtual machine. The cloud tenant virtual machine verifies whether the path of the first hash tree in the cloud server is correct based on the auxiliary authentication information and the hash value of the file to be verified. The specific verification process is as follows; If the verification passes, the integrity of the file to be verified is not destroyed and the path of the first hash tree is correct.

[0060] The update request of the first hash tree indicates to perform one or more of the following operations on the first hash tree: adding a child node, deleting a child node, or modifying a child node. There are different operations for different schemes, which are described below respectively:

[0061] 1. When the update request of the first hash tree indicates to perform a new child node operation on the first hash tree, the cloud tenant virtual machine sends the update request of the first hash tree to the cloud server. Then, the cloud server determines the file location with the same weight as the newly added file to be verified according to the update request, and returns the file location and auxiliary authentication information to the cloud tenant virtual machine. The cloud tenant virtual machine calculates the new root node of the first hash tree according to the hash value of the newly added file to be verified and the auxiliary authentication information, and signs the new root node. Then, the cloud tenant virtual machine uploads the signed new root node to the cloud server.

[0062] 2. When the update request of the first hash tree indicates to perform a child node deletion operation on the first hash tree, in order to avoid a large number of operations generated when the cloud tenant virtual machine and the cloud server generate a new first hash tree, the child node corresponding to the update request may not be deleted. Optionally, the next time the file to be verified needs to be updated or deleted, the cloud tenant virtual machine sends an update request to the cloud server, and recalculates a new hash tree according to the update request.

[0063] When the update request of the first hash tree indicates to modify the child node of the first hash tree, the process proceeds to steps 205-207, which are described in detail below.

[0064] 205. Determine the second file to be verified corresponding to the child node to be modified according to the update request.

[0065] In step 205, the cloud tenant virtual machine sends an update request for the first hash tree to the cloud server, and the update request indicates to perform an operation of adding a child node to the first hash tree. Then, the cloud server determines the second file to be verified corresponding to the child node to be updated according to the update request. The cloud server generates auxiliary authentication information according to the update request and replies to the cloud tenant virtual machine as evidence.

[0066] 206. Generate a hash value corresponding to the second file to be verified according to the second file to be verified, and verify whether the authentication path of the sub-node to be modified is correct.

[0067] In step 206, the cloud tenant virtual machine verifies whether the path of the second file to be verified corresponding to the first hash tree in the cloud server is correct based on the auxiliary authentication information and the hash value of the file to be verified. Specifically, the cloud tenant virtual machine generates a hash value corresponding to the second file to be verified based on the second file to be verified, and the auxiliary authentication information from the cloud server, and verifies whether the authentication path of the sub-node to be modified corresponding to the second file to be verified is correct. If correct, proceed to step 207.

[0068] 207. If correct, the second root node is calculated based on the authentication path of the child node to be updated and the hash value corresponding to the second file to be verified, and the root node signature information obtained by signing the second root node with the tenant private key.

[0069] In step 207, if the authentication path of the child node to be modified is verified to be correct, the cloud tenant virtual machine calculates the new root node of the first hash tree according to the hash value of the second file to be verified and the auxiliary authentication information. The new root node is called the second root node. Then the cloud tenant virtual machine signs the second root node using the tenant private key to obtain the root node signature information. After calculating the above information, the cloud tenant virtual machine sends the above information to the cloud server.

[0070] In the embodiment of the present application, the file popularity is differentiated to accelerate the integrity verification process. The method uses the Huffman-Merkle tree integrity verification method for the file to be verified, determines the verification weight according to the verification frequency of the file to be verified, effectively optimizes and shortens the verification path of hot files, and effectively reduces the requirements of large file integrity verification on user computing power and communication bandwidth.

[0071] Based on the above examples, please refer to Figure 3 , Figure 3 This is a schematic diagram of an embodiment of an integrity verification method proposed in an embodiment of the present application. The integrity verification method proposed in an embodiment of the present application also includes:

[0072] 301. Receive an integrity check request.

[0073] In step 301, after the cloud tenant virtual machine establishes a first hash tree according to a plurality of files to be verified, the cloud tenant virtual machine sends the plurality of files to be verified and integrity verification information corresponding to the plurality of files to be verified to the cloud server.

[0074] Specifically, the cloud tenant virtual machine requests to verify the first file to be verified, so the cloud tenant virtual machine generates an integrity verification request according to the first file to be verified, and then sends the integrity verification request to the cloud server. Correspondingly, the cloud server receives the integrity verification request.

[0075] 302. Determine, according to the first file to be verified, an authentication path of the first file to be verified in the first hash tree.

[0076] In step 302, the cloud server determines the child node corresponding to the first file to be verified in the first hash tree according to the integrity check request. Then, an authentication path (the authentication path is also called auxiliary authentication information) is generated according to the child node. The authentication path can be understood as the authentication path of the first file to be verified in the first hash tree. The authentication path of the first file to be verified in the first hash tree points to the first child node, and the first child node is one of the child nodes of the first hash tree.

[0077] The cloud server returns the authentication path of the first file to be verified in the first hash tree to the cloud tenant virtual machine. Correspondingly, the cloud tenant virtual machine receives the authentication path of the first file to be verified in the first hash tree.

[0078] 303. Determine the integrity of the first file to be verified based on the hash value stored in the first child node and the hash value generated based on the first file to be verified.

[0079] In step 303, the cloud tenant virtual machine obtains the hash value stored in the first child node according to the authentication path of the first file to be verified in the first hash tree. The cloud tenant virtual machine generates a hash value based on the first file to be verified. Then, the cloud tenant virtual machine verifies whether the two hash values ​​are consistent. If they are consistent, the integrity of the first file to be verified is not destroyed; if they are inconsistent, the integrity of the first file to be verified is destroyed.

[0080] The integrity verification method in this embodiment is introduced above. The integrity verification device provided by the embodiment of this application is introduced below based on the above integrity verification method. Figure 4 As shown, Figure 4 A schematic diagram of an embodiment of an integrity verification device provided in an embodiment of the present application, an embodiment of the integrity verification device 400 includes:

[0081] The transceiver module 401 is used to obtain multiple files to be verified;

[0082] The processing module 402 is used to determine the weights of the multiple files to be verified according to the verification frequencies of the multiple files to be verified, wherein the weight of the file to be verified with a high verification frequency is greater than the weight of the file to be verified with a low verification frequency;

[0083] The processing module 402 is further used to generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified, wherein the integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key;

[0084] The first hash tree is a hash tree constructed according to the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node;

[0085] The child node related to the file to be verified in the first hash tree stores the hash value of the file to be verified.

[0086] In a possible implementation, the transceiver module 401 is further used to receive an integrity check request, where the integrity check request is used to request to check the first file to be checked;

[0087] The processing module 402 is further configured to determine, according to the first file to be verified, an authentication path of the first file to be verified in the first hash tree, wherein the authentication path of the first file to be verified in the first hash tree points to a first child node, and the first child node is one of the child nodes of the first hash tree;

[0088] The processing module 402 is further configured to determine the integrity of the first file to be verified according to the hash value stored in the first child node and the hash value generated according to the first file to be verified.

[0089] In a possible implementation, the transceiver module 401 is further used to receive an update request for the first hash tree, where the update request indicates performing one or more of the following operations on the first hash tree: adding a child node, deleting a child node, or modifying a child node.

[0090] In a possible implementation, the processing module 402 is further configured not to delete the child node of the first hash tree.

[0091] In a possible implementation, the processing module 402 is further configured to determine, according to the update request, a second file to be verified corresponding to the child node to be modified;

[0092] The processing module 402 is further used to generate a hash value corresponding to the second file to be verified according to the second file to be verified, and verify whether the authentication path of the sub-node to be modified is correct;

[0093] The processing module 402 is also used to calculate the second root node and the root node signature information obtained by signing the second root node with the tenant private key based on the authentication path of the sub-node to be modified and the hash value corresponding to the second file to be verified, if correct.

[0094] Figure 5 A schematic diagram of the structure of an integrity verification device provided in an embodiment of the present application. The integrity verification device 500 includes a processor 501, a memory 502, and an input / output (I / O) interface 503. The memory 502 may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 501. A portion of the memory 502 may also include a non-volatile random access memory (NVRAM).

[0095] The processor 501 controls the operation of the integrity verification device 500, and the processor 501 can also be called a CPU. The memory 502 can include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A part of the memory 502 can also include a non-volatile random access memory (NVRAM). In a specific application, the various components of the integrity verification device 500 are coupled together through a bus system 504, wherein the bus system 504 includes a data bus, a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are marked as bus systems 504 in the figure.

[0096] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0098] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0099] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0100] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0102] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for integrity verification, characterized in that: include: Get multiple files to be verified; Determining weights of the multiple files to be verified according to the verification frequencies of the multiple files to be verified, wherein the weights of the files to be verified with a high verification frequency are greater than the weights of the files to be verified with a low verification frequency; Generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified, wherein the integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key; The first hash tree is a hash tree constructed according to the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node; The child node related to the file to be verified in the first hash tree stores the hash value of the file to be verified.

2. The method according to claim 1, characterized in that The method further comprises: Receiving an integrity check request, wherein the integrity check request is used to request checking of a first file to be checked; Determine, according to the first file to be verified, an authentication path of the first file to be verified in the first hash tree, wherein the authentication path of the first file to be verified in the first hash tree points to a first child node, and the first child node is one of the child nodes of the first hash tree; The integrity of the first file to be verified is determined based on the hash value stored in the first child node and the hash value generated based on the first file to be verified.

3. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: An update request for the first hash tree is received, where the update request indicates to perform one or more of the following operations on the first hash tree: adding a child node, deleting a child node, or modifying a child node.

4. The method according to claim 3, characterized in that When the update request indicates to delete a child node of the first hash tree, the method further includes: The child nodes of the first hash tree are not deleted.

5. The method according to claim 3, characterized in that: When the update request indicates to modify the child node of the first hash tree, the method further includes: Determine, according to the update request, a second file to be verified corresponding to the child node to be modified; Generate a hash value corresponding to the second file to be verified according to the second file to be verified, and verify whether the authentication path of the sub-node to be modified is correct; If correct, the second root node is calculated based on the authentication path of the sub-node to be modified and the hash value corresponding to the second file to be verified, and the root node signature information obtained by signing the second root node with the tenant private key.

6. An integrity verification device, characterized in that: include: A transceiver module, used for obtaining multiple files to be verified; A processing module, configured to determine weights of the plurality of files to be verified according to verification frequencies of the plurality of files to be verified, wherein the weight of the file to be verified with a high verification frequency is greater than the weight of the file to be verified with a low verification frequency; The processing module is further used to generate integrity verification information corresponding to the multiple files to be verified according to the multiple files to be verified and the weights of the multiple files to be verified, wherein the integrity verification information includes root node signature information obtained by signing the first root node of the first hash tree with the tenant private key, child nodes related to the files to be verified in the first hash tree, and the tenant public key corresponding to the tenant private key; The first hash tree is a hash tree constructed according to the multiple files to be verified, and the distance between the child nodes corresponding to the files to be verified with high weights in the first hash tree and the first root node is smaller than the distance between the child nodes corresponding to the files to be verified with low weights and the first root node; The child node related to the file to be verified in the first hash tree stores the hash value of the file to be verified.

7. The integrity verification device according to claim 6, characterized in that: The transceiver module is further used to receive an integrity check request, where the integrity check request is used to request to check the first file to be checked; The processing module is further used to determine, according to the first file to be verified, an authentication path of the first file to be verified in the first hash tree, the authentication path of the first file to be verified in the first hash tree points to a first child node, and the first child node is one of the child nodes of the first hash tree; The processing module is further used to determine the integrity of the first file to be verified based on the hash value stored in the first child node and the hash value generated based on the first file to be verified.

8. The integrity verification device according to any one of claims 6 to 7, characterized in that: The transceiver module is further used to receive an update request for the first hash tree, where the update request indicates to perform one or more of the following operations on the first hash tree: adding a child node, deleting a child node, or modifying a child node.

9. The integrity verification device according to claim 8, characterized in that: The processing module is also used for not deleting the child node of the first hash tree.

10. The integrity verification device according to claim 8, characterized in that: The processing module is further used to determine the second file to be verified corresponding to the child node to be modified according to the update request; The processing module is further used to generate a hash value corresponding to the second file to be verified according to the second file to be verified, and verify whether the authentication path of the sub-node to be modified is correct; The processing module is also used to calculate the second root node and the root node signature information obtained by signing the second root node with the tenant private key based on the authentication path of the child node to be modified and the hash value corresponding to the second file to be verified, if correct.

Citation Information

Patent Citations

  • Data integrity authentication information generation method and device as well as data integrity authentication method and device

    CN102413313A

  • Safe transmission method for data of Internet of Things under wireless poor network environment

    CN104113395A

  • Big data stream verification method and system

    CN112637203A

  • Integrity verification method and device, terminal equipment and verification server

    CN112989430A

  • A data obfuscation system, method, and computer implementation of data obfuscation for secret databases

    WO2009139650A1