Method and system for remote and fast verification of software integrity based on consortium chain
Patent Information
- Application Number
- CN202311624142.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-11-30
AI Technical Summary
目前的技术存在验证过程不安全,软件正确哈希值获取困难,验证效率低等缺点
[0046] During the verification process, access to the consortium blockchain system should be avoided as much as possible to reduce the load on the consortium blockchain. Implementation results show that downloading from an external storage system is significantly faster than querying transactions on the consortium blockchain. Therefore, this invention, through the above technical solution, achieves efficient, secure, and comprehensive remote verification of software integrity.
Smart Images

Figure CN117633726B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software security technology, and relates to software integrity verification technology, and in particular to a method and system for remote rapid verification of software integrity based on consortium blockchain. Background Technology
[0002] Software integrity verification technologies. Digital signatures are one such technology. Software publishers sign their applications upon release, and the system verifies the signature before successful installation. For example, Windows requires driver signature authentication; if the signature fails, the driver cannot function correctly. However, this mechanism requires a security center to independently collect public keys for verification, and vendors have not formed a unified mechanism. Furthermore, this mechanism lacks verification of installed software files. After installation, multiple dynamic link library files are released, and these files also require verification before the software runs. Dpkg package managers also have verification functions, capable of verifying the integrity of installed software files, but their hash lists are stored locally, making them vulnerable to tampering. Therefore, this method primarily verifies that software files have not been corrupted during network transmission, rather than preventing malicious tampering. Trusted computing modules, such as IMA, measure the integrity of software files and verify signatures stored on the local system. However, this method's integrity status is based on a single moment in the system's operation, making it impossible for system administrators to determine the system's integrity at that specific time.
[0003] Integrity measurement technology. Integrity measurement is part of trusted computing. Taking Linux's Integrity Measurement Architecture (IMA) as an example, it dynamically measures the integrity of open software files, forming a measurement list. Remote measurement technology, through trusted computing signatures, sends the system's software file measurement list to a remote machine while ensuring the integrity of the measurement list. This mechanism guarantees that the measurement list has not been tampered with during transmission or before sending. Integrity measurement technology provides measurement values for software files, but lacks the correct integrity hash value of the file. Therefore, users need to manually collect the authoritative integrity hash value of the file and compare it with the measurement value to obtain the verification result.
[0004] Consortium blockchain technology is a type of blockchain technology where each participant has a defined identity, and identity verification is performed through a PKI mechanism. Taking Hyperledger Fabric as an example, transactions generated in a consortium blockchain require signatures to verify identity, necessitating valid signatures from all participants in the system. A database is implemented within the consortium blockchain to store relevant data; in Hyperledger Fabric, this might be Goleveldb or Couchdb. Smart contracts are implemented within the consortium blockchain to handle read and write logic. Smart contracts in a consortium blockchain are Turing-complete, capable of implementing various logic codes, identity verification, and multiple security mechanisms. Therefore, consortium blockchain technology is particularly suitable for multi-party collaboration scenarios, facilitating identity recognition and related management. However, consortium blockchain technology has relatively poor performance; its transaction throughput remains a bottleneck for business applications, and its storage costs are also too high. Therefore, when there are many participants, consortium blockchain technology needs to overcome performance bottlenecks and achieve a lightweight mechanism. Current technologies suffer from drawbacks such as insecure verification processes, difficulty in obtaining correct software hash values, and low verification efficiency. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a method and system for remote rapid verification of software integrity based on a consortium blockchain. The consortium blockchain serves as the root of trust for the entire software system, establishing a chain of evidence. High-cost and high-management components, such as the software version list and software file hash value list, are stored on external devices while ensuring their integrity.
[0006] The consortium blockchain in this invention is primarily related to the trusted chain in trusted computing. A trusted chain typically has a root of trust, the security of which is generally guaranteed by a hardware trusted chip. Based on the root of trust, trust is established at each level, ultimately building a trusted chain to ensure the trusted state of the entire system. In the entire system, the root of trust is the most crucial, guaranteeing the overall trusted state. This invention uses the consortium blockchain as the root of trust for the entire system, establishing a chain of evidence.
[0007] This invention provides a remote rapid verification method for software integrity based on a consortium blockchain. The method involves measuring the integrity of the developed software (software to be verified), generating and publishing a list of software file hash values, determining the address lookup method, storing the address lookup method and hash values in a version list, and updating the hash values of the version list in the consortium blockchain. The remote rapid verification method includes the following steps:
[0008] 1) Obtain the name and version number of the software to be verified. The correct hash value of the software to be verified has been released.
[0009] 2) Read the measurement logs of the remote software to be verified, obtain the measurement values of the software to be verified, and ensure the correctness of the measurement logs through trusted signatures and verification mechanisms;
[0010] 3) If a corresponding evidence chain cache exists locally, read the local evidence chain cache and verify the correctness of the evidence chain starting from the query transaction. The verification method of this invention is step-by-step verification, verifying the correctness of the version list through the signature mechanism of the consortium blockchain. The version list contains the addressing method and hash value of the software file hash value list, used to verify the integrity of the software file hash value list; if the consortium blockchain signature mechanism passes the verification, and the hash value of the software file hash value list is recalculated and matches the hash value in the version list, then the verification passes and proceeds to step 6); otherwise, it fails and proceeds to step 4).
[0011] 4) Read the cache of the remote server and verify it.
[0012] If the remote server has a cached evidence chain, then perform verification using the same method as step 3. If the verification passes, proceed to step 6; otherwise, proceed to step 5.
[0013] 5) Log in to the consortium blockchain as a validator, query the software version list address and hash value, access and verify level by level to form a chain of evidence, and obtain the integrity hash value of the software list.
[0014] 6) Use a hash value comparison verification method to compare the verification software's metric value and obtain the verification result. In the previous steps, we have obtained the metric value of the software to be verified and the list of integrity hash values published by the publisher. If the two match, the verification passes; if they do not match, the verification fails.
[0015] In practical implementation, this invention realizes a remote rapid verification system for software integrity based on consortium blockchain, which includes three subsystems: an external storage system, a consortium blockchain system, and a measurement verification system.
[0016] The first subsystem is the external storage system, which stores the software version list and the software integrity hash value list; it is the specific storage system.
[0017] After installation, software generates multiple binary files, which should remain undisturbed during software startup and operation. Once a version of the software is developed, the publisher measures the software files (dynamic link libraries and other executable files), creating a list of hash values for that version's files. The publisher can then release this list. The new version's hash value list information is added to the software version list, including at least the method for finding the hash values and their integrity hash values.
[0018] In one possible implementation, the software file hash list includes the identifiers and hash values of all immutable files in the software. For compatibility reasons, file identifiers can use the default absolute paths of the files during installation. The version list stores the address of the software file hash list for that version, along with its integrity hash value.
[0019] In an external storage system, the security of the software file hash value list can be ensured by using the hash value of the software file hash value list in the version list, guaranteeing that the obtained software file hash value list has not been tampered with.
[0020] The second subsystem is the consortium blockchain system, used for access control. Members of the consortium blockchain system include software validators and publishers, each with different permissions. The consortium blockchain system stores the addresses and hash values of the software version list, ensuring the correctness of the content stored in the external storage system through a hierarchical verification method.
[0021] Consortium blockchain systems possess characteristics such as multi-party collaboration, identity authentication, and tamper resistance, serving as the root of trust for rapid verification systems. In a consortium blockchain system, new user joining requires the consent of all existing members and the assignment of an identity identifier. In this invention, the users of the consortium blockchain are both software publishers and validators. Software publishers need to write software-related information into the consortium blockchain, including at least the addressing method for the version list and the integrity hash value of the version list. Validators need to read software information but cannot write to it. A consortium blockchain system should at least include the ability to identify software publishers, manage permissions, and store software-related information.
[0022] Typically, transactions in a consortium blockchain system require signatures from multiple members, and data such as blocks need to be stored by multiple nodes. This results in relatively low transaction throughput in consortium blockchain systems, manifested in write and query capabilities in this invention, making it difficult to meet the simultaneous use of a large number of users. Furthermore, excessive storage success rates necessitate avoiding writing too much information and performing too many operations in the consortium blockchain system in potential implementations.
[0023] In one possible implementation, a consortium blockchain system possesses the capabilities for identity authentication, access control, and writing and reading version list information. Identity authentication is implemented using the consortium blockchain's own Public Key Infrastructure (PKI). Chaincode is implemented within the consortium blockchain, using the system's API (Application Programming Interface) to authenticate the identity of the transaction initiator. Access control is implemented based on identity authentication, granting software publishers read and write access to their own software information and read access to the software information of other publishers. Validators can only read software information. The consortium blockchain system also needs storage capabilities to store software-related information.
[0024] On the other hand, the consortium blockchain system and the external storage system form a chain of evidence. This is the idea behind trusted computing. The consortium blockchain system stores the addresses and hash values of a list of software versions, ensuring the integrity of the version list. The version list stores the addresses and hash values of a list of file hash values, ensuring its integrity as well. In this chain of evidence, the consortium blockchain serves as the root of trust.
[0025] In one possible implementation, a query transaction on the consortium blockchain retrieves the addresses and hash values of the version list, and the correctness of the query transaction is guaranteed by the consortium blockchain's signature mechanism. Once the version list is verified, it can be used to find the corresponding list of file hash values for each version and verify its completeness.
[0026] The third subsystem is the measurement and verification system, used to verify the integrity of the software. This system obtains the measurement value of the software to be verified, i.e., the current hash value of the software to be verified, through remote measurement technology; it obtains the correct hash value of the software to be verified by querying the cache or consortium blockchain. This hash value is published by the publisher, which can guarantee its correctness; and the result is obtained by comparison and verification.
[0027] This system includes metrics acquisition, software file hash value list acquisition, and comparison verification. Metric acquisition can be achieved through a trusted metrics module, obtaining the metrics of the software to be verified from a remote machine. The software file hash value list can be obtained from the cache or by querying the consortium blockchain. The acquisition process is the process of forming a chain of evidence. In this process, the root of trust is the query transaction. The correctness of the query transaction is verified through the consortium blockchain. The version list is obtained through the query transaction, and the correct file hash value list of the software to be verified is obtained from the version list. This hash value list is published by the software publisher and has undergone the verification process of this invention, and can be considered correct.
[0028] In one possible implementation, the measurement module can obtain the measurement value from a remote machine through IMA (Metrics Module under Linux) and ACS (Remote Measurement Acquisition). The verifier inputs the name and version of the software to be verified, retrieves the cached evidence chain from the local cache or the remote server, and verifies the correctness of the evidence chain starting from the query transaction. After obtaining the list of software file hash values, it is compared with the measurement value to obtain the comparison result.
[0029] The following describes the specific use of this invention through the entire process of the publisher's publication and the verifier's verification.
[0030] The following process applies to software publishers.
[0031] Step 1: After the software development is completed, the software publisher measures the integrity of the software files, generates a list of software file hash values, publishes the list, and determines the address and other retrieval methods.
[0032] Step 2: Update the version list, adding the search method and hash value.
[0033] Both of these steps are completed in an external storage system, without going through the authentication and storage of the consortium blockchain, which enables efficient retrieval of the software file hash value list.
[0034] Step 3: Update the version list information in the consortium blockchain, including the hash value of the version list, etc.
[0035] This step requires permission identification and verification by other nodes in the consortium blockchain, which is relatively slow. However, it is the only step in the process of publishing this invention that needs to be written to the consortium blockchain, which can greatly reduce the load on the consortium blockchain system.
[0036] The verification process for the verifier consists of the following steps.
[0037] Step 1: The verifier needs to verify the name and version number of the software.
[0038] Step 2: The verifier reads the remote measurement logs to obtain the measurement values of the target software.
[0039] The measurement values are mainly obtained through trusted modules, and the correctness of the measurement logs is ensured through the signature and verification mechanisms of trusted modules.
[0040] Step 3: The verifier reads the local evidence chain cache and verifies it.
[0041] If the software evidence chain to be verified exists locally, verification is performed, that is, the correctness of the evidence chain is verified starting from the query transaction. If the verification passes, proceed to step 6; otherwise, proceed to step 4.
[0042] Step 4: Verify the reading of the remote server's cache and perform verification.
[0043] If the remote server has a cached evidence chain of the software to be verified, then verification is performed. If the verification passes, proceed to step 6; otherwise, proceed to step 5.
[0044] Step 5: Log in to the consortium blockchain as a validator, query the software version list address and hash value, access and verify level by level to form a chain of evidence, and obtain the integrity hash value of the software list.
[0045] Step 6: Compare the verification software's metrics to obtain the verification results.
[0046] During the verification process, access to the consortium blockchain system should be avoided as much as possible to reduce the load on the consortium blockchain. Implementation results show that downloading from an external storage system is significantly faster than querying transactions on the consortium blockchain. Therefore, this invention, through the above technical solution, achieves efficient, secure, and comprehensive remote verification of software integrity. Attached Figure Description
[0047] Figure 1 This is an overall structural block diagram of the remote rapid verification system for software integrity based on consortium blockchain provided by the present invention; this diagram illustrates the principle design of the three subsystems and their specific interrelationships.
[0048] Figure 2 This is a flowchart of the software publisher's publishing process in an embodiment of the present invention; this diagram shows the process of the software publisher publishing the software hash value list, that is, the modification of the consortium blockchain system and the external storage system.
[0049] Figure 3 This is a flowchart of the verification process of the verifier in an embodiment of the present invention. This diagram shows the process by which the software verifier verifies the integrity of the software, obtains and verifies the evidence chain from local and remote caches, compares it with the metric value, and obtains the result.
[0050] Figure 4 This is a block diagram of the evidence chain structure in an embodiment of the present invention; this diagram illustrates the structure of the evidence chain, a key concept of the present invention, and represents the hierarchical trust relationship of the evidence chain. Detailed Implementation
[0051] To better illustrate the content, features, and advantages of this invention, specific examples are provided below. The specific embodiments include specific techniques and represent one, not all, implementations of this invention. All implementations undertaken by those skilled in the art without inventive effort fall within the scope of this invention.
[0052] The consortium blockchain is used as the root of trust for the software system to establish a chain of evidence; the list of software versions with high storage and management costs, along with the list of software file hash values, are stored on external devices, and their integrity is guaranteed.
[0053] Perform integrity measurement on the completed software to be verified, generate and publish a list of software file hash values, and determine the address finding method; store the addressing method and hash value in the version list; update the hash value of the version list in the consortium blockchain;
[0054] The remote rapid verification method includes the following steps:
[0055] 1) Obtain the name and version number of the software to be verified; the correct hash value of the software to be verified has been published;
[0056] 2) Read the measurement logs of the remote software to be verified, obtain the measurement values of the software to be verified, and ensure the correctness of the measurement logs through trusted signatures and verification mechanisms;
[0057] 3) When a corresponding evidence chain cache exists locally, read the local evidence chain cache and verify the correctness of the evidence chain starting from the query transaction. The verification method is step-by-step verification, as follows: The query transaction in the evidence chain contains the signatures of the consortium blockchain participants, and the correctness of the query transaction is verified through the consortium blockchain's signature mechanism; the address and hash value of the software version list are obtained from the query transaction, and the correctness of the version list is verified; the version list contains the addressing method and hash value of the software file hash value list, which is used to verify the completeness of the software file hash value list; if the consortium blockchain signature mechanism passes the signature verification, and the hash value of the recalculated software file hash value list is consistent with the hash value in the version list, then the verification is passed and proceeds to step 6).
[0058] 4) Read and verify the cache of the remote server;
[0059] When the remote server has a cached evidence chain, a step-by-step verification method is used for verification, and the verification method is the same as in step 3); if the verification passes, proceed to step 6);
[0060] 5) Log in to the consortium blockchain as a validator, query the software version list address and hash value, access and verify level by level to form a chain of evidence, and obtain the integrity hash value of the software list;
[0061] 6) Use a hash value comparison verification method to compare the verification software's measurement value to obtain the verification result; if the two match, the verification is passed.
[0062] Through the above steps, remote and rapid verification of software integrity based on consortium blockchain can be achieved for the software to be verified.
[0063] In practice, the publishing process includes:
[0064] Step 1: Measure and generate a list of hash values for the software files. Its main structure is as follows.
[0065] [[file1, file_hash1]...[file n file_hash n ]]
[0066] file n It is the path to the software file, file_hash n This is the hash value of the software file.
[0067] In a specific implementation plan, as shown in Table 1, JSON format can be used. The advantage of JSON format is that it can quickly parse a list of hash values. The specific implementation of external storage is not limited; in this example, it is an FTP server, and it is published externally as an anonymous service.
[0068] In this implementation, the file identifier uses the default installation absolute path, primarily for compatibility reasons. Other implementations may employ different methods for identifier implementation. An example of a software file's hash value is shown below.
[0069] Table 1. Software File Hash Value Data Structure
[0070] docType "software" path " / lib / systemd / system / whoopsieservice" hash "b89cf2aef550921bfb18e03b28359e4e61ff736f" version "0.1" company "wk" owner "Admin5@0rg1MSP" time "2023-01-12 04:05:35"
[0071] The owner field in the table is the certificate index in the consortium blockchain. This field is also included in the software information data structure of the consortium blockchain and is used for permission management.
[0072] Step 2: Update the version list, storing the software hash value list address and hash value for each specific version in the version list. The format is as follows.
[0073] [[version1,hash_address1,hash1]…[version n hash_address n hash n ]]
[0074] version n It refers to the software version, hash_address. n It is the address of the list of hash values for this version of the software files. n It is the hash value of the list of hash values for this version of the software files.
[0075] In this implementation example, the version list is also implemented in JSON format, and the external storage system uses an anonymous FTP service. The version list includes a method for searching the software file hash list; in this implementation example, it uses the FTP server address and the hash values of the software file list.
[0076] Step 3: Update the software information in the consortium blockchain, including the hash value of the version list, etc. The software information format is as follows: (name, version_address, version_hash, owner)
[0077] `name` is the name of the software, `version_address` is the address of the software version list, `version_hash` is the hash value of the software version list, and `owner` is the owner of the software.
[0078] In this implementation example, the consortium blockchain used is Hyperledger Fabric. In this consortium blockchain, chaincode implements access control, authentication, and read / write operations. When a participant initiates a transaction request, they need to sign it and attach their own certificate. The chaincode reads the participant's certificate to verify their identity. Access control is implemented based on authentication; the software information includes an owner field, which identifies the software publisher. Only the software publisher has the right to write to or delete the software.
[0079] In this implementation example, in addition to the aforementioned access control mechanism, other security mechanisms are implemented. These include time limits for software publishers to release software information only at regular intervals; and an arbitration mechanism that includes judging files with duplicate names and allowing members of the consortium blockchain to vote on deleting spam software information.
[0080] In this consortium blockchain, the database used is either goleveldb or couchdb, which is a key-value pair database. This meets the database storage requirements of this implementation scheme.
[0081] In this implementation example, the test environment used is a single-machine Ubuntu 18.04 environment, where network latency can be ignored. Under these conditions, 26 software information entries can be written per second. Write performance will decrease under network latency and with a large number of participants. Therefore, in other embodiments of this invention, the write operations of the consortium blockchain should be appropriately reduced. Under the same environment, 1000 software information entries can be read per second. Therefore, the read performance of the consortium blockchain can be guaranteed in other embodiments.
[0082] In other implementations, chaincode can implement additional security measures, such as fine-grained access control, resulting in a more robust system.
[0083] The verifier's verification process is as follows.
[0084] Validators must first join the consortium blockchain system before they can perform read operations. In this example, Hyperledger Fabric has the concept of organizations, with members within each organization. In this embodiment, the validator belongs to an organization, and all members of that organization only have read permissions, not modification permissions.
[0085] Step 1: The verifier enters the name and version number of the software to be verified, as well as the remote machine to be verified.
[0086] The software to be verified is usually a critical piece of software in the entire network system, or an important piece of software that is used when the system boots up.
[0087] Step 2: Obtain the list of metrics.
[0088] In this implementation, the measurement technology used is the Trusted Computing Module's IMA, i.e., the integrity measurement architecture under Linux. The remote transmission scheme used is ACS. Table 2 shows the specific format of the measurement list, including the integrity hash values of the software files. These are the measurement values used in this implementation.
[0089] The table below is an example of a list of metrics.
[0090] Table 2 Example of IMA metric list
[0091] / bin / sh 98f93f667e06a64dfbde726d36cc72e2ac71fc23 / lib / x86_64-linux-gnu / ld-2.27.so 424b92cd21b47e50ac358049c9f5c79ec003ea36 / etc / ld.so.cache dc70afeb225170d1c590e4e1cbc40ed93a521e0f / lib / x86_64-linux-gnu / libc-2.27.so afdca9d2292763efb1dc84e3b7abc2b3b4cf46e1 / conf / arch.conf 65030975e1f3887efd00fbb568f00409b7c256d0 / conf / initramfs.conf c98acd18b58fe7c5d850e7c4a8bd3d8ac25f373c / scripts / functions 9b32d140559485c20aaf39d93406afbabd791367
[0092] ACS is responsible for transmitting the target machine's metrics to the local machine. Its principle is to use the PCR10 register to verify the correctness of the metric list. During IMA measurement, the hash value of each metric file is concatenated with the hash value of the PCR10 register, and the hash value is recalculated and rewritten into the PCR10 register. Therefore, the PCR10 register represents the integrity status of the target machine. ACS ensures the correctness of the PCR10 register transmission through a trusted computing module. The value of the PCR10 register is reconstructed using the metric list, and the two are compared to determine the integrity of the metric list.
[0093] Step 3: Query the local evidence chain cache.
[0094] If a local evidence chain cache exists, it can be verified. For the Hyperledger Fabric consortium blockchain used in this example, there are endorsing nodes that sign each transaction. The validity of a transaction is guaranteed by the signatures of the endorsing nodes. Users can verify query transactions to ensure their integrity. A query transaction includes the query content, namely the addresses and hash values of the version list. Verify the version list in the local evidence chain. If verification is successful, the addresses and hash values of the corresponding software file hash value list can be obtained. Verify the software file list in the local evidence chain. If verification is successful, the correct software hash value list has been obtained, and you can proceed to step 6. If there is no local evidence chain or verification fails, proceed to step 4.
[0095] Step 4: Query the evidence chain cache on the remote server.
[0096] The cache is retrieved from the remote server, and the verification method is as shown in step three. In this implementation example, the remote server is a publicly accessible host. If the remote server does not have a cache, it queries the consortium blockchain system to obtain the address of the version list, accesses it step by step to form an evidence chain, and then caches it. It should be noted that since the remote server is widely used by the verifiers and its cache is very comprehensive, it is usually not necessary to access the consortium blockchain system. The consortium blockchain is only queried if the evidence chain does not exist or the server has been maliciously tampered with. If the server is inaccessible or under attack, proceed to step 5. In this example, if three failed verification evidence chains are returned, the server is considered to be under attack. When verification fails, the server is notified to re-form the evidence chain, cache it, and return it.
[0097] Step 5: Form your own chain of evidence.
[0098] Validators independently log into the consortium blockchain system to query the software, including the addresses and hash values of the version list. They then obtain the version list and the addresses and hash values of the corresponding software file hash values for each version. They download the corresponding software file hash value list and verify it. This process forms a chain of evidence, which is then cached.
[0099] Step 6: Compare and verify the results.
[0100] The obtained metric values are compared with the list of software file hash values to obtain the final metric result. In this embodiment, the verification result for each file needs to be returned.
[0101] The following table shows the results of this example.
[0102] Table 3 Validation Results
[0103] 2023-03-09 23:20:14 0 False / init 2023-03-09 23:20:14 1 True / bin / sh 2023-03-09 23:20:14 2 True / lib / x86 64-linuxgnu / ld-2.27.so 2023-03-09 23:20:14 3 True / etc / ldso.cache 2023-03-09 23:20:14 4 True / lib / x86 64-inux-gnu / libc-2.27.so 2023-03-09 23:20:14 5 True / conf / arch.conf
[0104] This example verifies the integrity of a Linux system. The table above shows the results. False indicates that the verification failed, and True indicates that the verification succeeded. You can see the files that were successfully verified and the files that failed.
[0105] Through experiments, this example demonstrates that, while fulfilling specific functionalities, it can improve throughput, the maximum number of storage software programs, enhance query and publishing speeds, and reduce storage costs.
Claims
1. A method for rapid remote verification of software integrity based on a consortium blockchain, characterized in that, Perform integrity measurement on the completed software to be verified, generate and publish a list of software file hash values, and determine the addressing method; store the addressing method and hash value in the version list; Update the hash value of the version list in the consortium blockchain; establish a chain of evidence by using the consortium blockchain as the root of trust for the entire system; store the version list and software file hash value list, which have high storage and management costs, on external devices and ensure their integrity. The remote rapid verification method includes the following steps: 1) Obtain the name and version number of the software to be verified; 2) Read the measurement logs of the remote software to be verified, obtain the measurement values of the software to be verified, and ensure the correctness of the measurement logs through trusted signatures and verification mechanisms; 3) When a corresponding evidence chain cache exists locally, read the local evidence chain cache and verify the correctness of the evidence chain starting from the query transaction; The verification method is a step-by-step verification, including: The query transaction in the evidence chain contains the signatures of the consortium blockchain participants, and the correctness of the query transaction is verified through the consortium blockchain's signature mechanism. Retrieve the addresses and hash values of the software version list from the query transactions, and verify the correctness of the version list; The version list contains the addressing method and hash value of the software file hash value list, which is used to verify the integrity of the software file hash value list; if the consortium blockchain signature mechanism passes the verification and the hash value of the recalculated software file hash value list is consistent with the hash value in the version list, then the verification is passed and proceeds to step 6); 4) Read and verify the cache of the remote server; When the remote server has a cached evidence chain, a step-by-step verification method is used for verification; if the verification passes, proceed to step 6); 5) Log in to the consortium blockchain as a validator, query the software version list address and hash value, access and verify level by level to form a chain of evidence, and obtain the integrity hash value of the software list; 6) Use a hash value comparison verification method to compare the verification software's measurement value to obtain the verification result; if the two match, the verification is passed. Through the above steps, remote and rapid verification of software integrity based on consortium blockchain can be achieved for the software to be verified.
2. The method for remote rapid verification of software integrity based on consortium blockchain as described in claim 1, characterized in that, The release process includes: Step 1: Perform integrity measurement to generate a list of software file hash values; the structure uses JSON format, represented as follows: [[file1,file_hash1]…[file n ,file_hash n ]] Among them, file n It is the path to the software file, file_hash n This is the hash value of the software file; Step 2: Update the version list by storing the software hash value list address and hash value for each specific version in the version list; the format is: [[version1,hash_address1,hash1]…[version n hash_address n ,hash n ]]; where version n It refers to the software version, hash_address. n It is the address of the list of hash values for this version of the software files. n It is the hash value of the list of hash values for this version of the software files; Step 3: Update the software information in the consortium blockchain, including the hash values of the version list; the software information format is: (name,version_address,version_hash,owner) Where name is the name of the software, version_address is the address of the software version list, version_hash is the hash value of the software version list, and owner is the owner of the software.
3. The method for remote rapid verification of software integrity based on consortium blockchain as described in claim 2, characterized in that, The version list in step 2 is implemented in JSON format, and the external storage system uses the anonymous FTP service. The version list includes the method for finding the software file hash value list, i.e., the address of the FTP server, as well as the hash value of the software file list.
4. The method for remote rapid verification of software integrity based on consortium blockchain as described in claim 2, characterized in that, The consortium blockchain in step 3 specifically uses Hyperledger Fabric; in the consortium blockchain, chaincode implements permission management, identity authentication, and read / write operations; when a participant initiates a transaction request, it signs the request and attaches its own certificate. The chaincode reads the participant's certificate to complete the participant's identity verification; the owner field included in the software information identifies the software publisher, and only the software publisher can write or delete the software.
5. The method for remote rapid verification of software integrity based on consortium blockchain as described in claim 1, characterized in that, In step 3), the measurement is specifically performed using the Linux Integrity Measurement Module (IMA); the remote transmission uses the Remote Measurement Value Acquisition ACS method; the ACS transmits the measurement value from the target machine to the local machine and verifies the correctness of the measurement list using registers; during the IMA measurement process, the hash value of each measurement file and the hash value of the register are concatenated, the hash value is calculated again, and the result is rewritten into the register; the value of the register is reconstructed using the measurement list, and the integrity of the measurement list is determined by comparing the two.
6. The method for remote rapid verification of software integrity based on consortium blockchain as described in claim 5, characterized in that, The register specifically uses the PCR10 register.
7. A system employing the remote rapid verification method for software integrity based on consortium blockchain as described in claim 1, characterized in that, The system comprises the following subsystems: an external storage system, a consortium blockchain system, and a metric verification system; among which: The external storage system is a specific storage system used to store the software version list and the software file hash value list; it adds the software file hash value list information of the new version to the software version list, including at least the search method and integrity hash value of the software file hash value list; based on the hash value of the software file hash value list in the version list, it ensures the security of the software file hash value list and guarantees that the obtained software file hash value list has not been tampered with. The consortium blockchain system and the external storage system form a chain of evidence; As the root of trust in the chain of evidence, the consortium blockchain system features multi-party collaboration, identity authentication, and tamper-resistance. It is used for access control, including at least the identification of software publishers, access management, and storage of software-related information. A step-by-step verification method ensures the correctness of content stored in the external storage system. Users of the consortium blockchain are both software publishers and verifiers. Software publishers write software-related information into the consortium blockchain, including at least the addressing method of the version list and the integrity hash value of the version list. Verifiers can only read information that cannot be written to the software. The measurement and verification system is used to verify the integrity of software. It obtains the measurement value of the software to be verified, i.e., the hash value of the software to be verified, through remote measurement technology. It obtains the correct hash value of the software to be verified by querying the cache or consortium blockchain. The hash value is published by the publisher to ensure its correctness. The verification result is obtained by comparison and verification.
8. The system as claimed in claim 7, characterized in that, The software file hash value list in the external storage system includes the identifiers and hash values of all tamper-proof files of the software; the file identifiers use the default absolute paths of the files during installation; the version list stores the address of the software file hash value list for that version and its integrity hash value.
9. The system as claimed in claim 8, characterized in that, The consortium blockchain system includes identity authentication, access control, and writing and reading of version list information. Identity authentication adopts the public key infrastructure (PKI) mechanism of the consortium blockchain. Chaincode is implemented in the consortium blockchain to read the identity of the transaction initiator, including querying and writing transactions. Access control is implemented based on identity authentication. The address and hash value of the software version list are stored in the consortium blockchain system to ensure the integrity of the version list.
10. The system as claimed in claim 9, characterized in that, The measurement verification system includes measurement value acquisition, software file hash value list acquisition, and comparison verification. Specifically, measurement value acquisition is achieved by obtaining the measurement value of the software to be verified from a remote machine through a trusted measurement module. The software file hash value list can be obtained from the cache or by querying the consortium blockchain. The acquisition process is the process of forming a chain of evidence.