A mobile terminal storage security verification method based on dynamic fragmentation and quantum-resistant cryptography
By combining dynamic sharding and quantum-resistant cryptography with hashing and Merkle trees, Dilithium and Kyber algorithms, the startup performance bottleneck and rigid verification strategy of mobile terminals under the threat of quantum computing are solved, achieving fast startup and quantum-resistant security.
Patent Information
- Application Number
- CN202611268151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-10
AI Technical Summary
Existing mobile terminal security frameworks suffer from startup performance bottlenecks and rigid verification strategies when facing quantum computing threats, making it difficult to simultaneously resist quantum attacks and achieve a lightweight, tamper-proof solution for rapid startup.
We employ dynamic sharding and quantum-resistant cryptography, using hashing and Merkle trees to achieve shard-level content consistency measurement, combining the Dilithium algorithm for quantum-resistant signature protection, and establishing a quantum-resistant secure channel through the Kyber algorithm to achieve hierarchical integrity verification.
It effectively resists quantum computing attacks, improves startup speed, reduces attack costs, ensures the integrity and reliability of the trust chain, and enhances user experience.
Smart Images

Figure CN123074728A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network and information security technology, and more specifically to a mobile terminal storage security verification method based on dynamic fragmentation and quantum-resistant cryptography. Background Technology
[0002] Mobile application security is a crucial component of cybersecurity. With breakthroughs in quantum computing technology, existing public-key cryptography systems based on the large integer factorization problem and the discrete logarithm problem face a serious threat from Shor's algorithm. Quantum computers can crack these algorithms in polynomial time, posing a threat to the security of mobile terminals in software distribution, policy configuration, and identity authentication.
[0003] In existing mobile terminal security frameworks, to ensure that applications (APPs) have not been tampered with, a full digital signature verification is typically performed upon software startup. However, modern mobile applications are increasingly large, containing massive amounts of binary code segments and resource files. Full verification mechanisms present two core challenges:
[0004] Startup performance bottleneck: Full signature verification involves a large amount of memory I / O reads and complex asymmetric encryption operations. When launching multiple apps on a smart terminal, the computational burden and storage read latency can lead to significant startup response delays.
[0005] Rigid verification strategies: Existing local verification methods mostly employ fixed offsets or static fragmentation strategies. Attackers use decompilation to verify programs, searching for hash functions and file read call patterns. They find hard-coded offsets (such as 0x1000, 0x5000) in the assembly code, confirm the verification location, and then inject malicious code only into non-verification areas, perfectly bypassing integrity verification. Fixed sampling schemes are extremely vulnerable to this method.
[0006] Therefore, proposing a lightweight anti-tampering scheme that can resist quantum attacks and achieve rapid startup through dynamic sampling strategies, in order to balance the security strength of mobile terminals and user experience, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] In view of the above problems, this invention is proposed to provide a mobile terminal storage security verification method based on dynamic sharding and quantum-resistant cryptography to overcome or at least partially solve the above problems. The method achieves shard-level content consistency measurement through hashing and Merkle trees, reduces the reading and computation overhead during the startup phase through a dynamic sampling strategy, provides quantum-resistant signature protection for the verification strategy package through Dilithium, and establishes a quantum-resistant secure channel through the Kyber algorithm to complete the secure distribution of the strategy package. Thus, it achieves lightweight storage security verification that balances anti-tampering capabilities, quantum-resistant security, and mobile terminal startup experience.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a mobile terminal storage security verification method based on dynamic fragmentation and quantum-resistant cryptography, comprising the following steps: Policy generation and signing steps: The software storage object to be protected is read through the unified management platform, and deterministic sharding, shard hash calculation, Merkle tree construction and root node hash value generation are performed to obtain verification policy data; the verification policy data is quantum-resistantly signed using the Dilithium private key to generate a policy package; the verification policy data includes the root node hash value, salt value set, sampling seed and sharding parameters; Policy security distribution steps: A quantum-resistant secure channel is established between the unified management platform and the mobile terminal using the Kyber algorithm, and the policy package is encrypted and transmitted using the negotiated session key; the mobile terminal decrypts the policy package and verifies the signature using the Dilithium public key. After successful verification, the policy package is stored in local storage; the local storage is used to store the policy package and the policy status and verification logs generated by the mobile terminal during the hierarchical integrity verification process; Hierarchical integrity verification steps: During the software startup phase, the mobile terminal performs fast startup path verification, dynamically calculates the sampling fragment position based on the current time window and sampling seed, and verifies the Merkle authentication path of the sampling fragment; during the background phase after software startup, asynchronous integrity verification is performed, the complete Merkle tree is reconstructed and compared with the hash value of the root node; and corresponding status updates or exception handling are performed according to the comparison results.
[0009] Furthermore, the specific process of performing deterministic sharding, shard hash calculation, Merkle tree construction, and root node hash value generation in the policy generation and signing steps to obtain the verification policy data includes: The software storage object is divided into multiple fixed-size fragments, and the last part that is less than one fragment is padded to obtain the fragment size of each fragment and the total number of fragments. A corresponding salt value is generated for each shard. The shard and its corresponding salt value are concatenated and a hash calculation is performed to obtain the hash value of the leaf node corresponding to each shard, expressed by the formula:
[0010] in, For the first The hash value of the leaf node corresponding to each shard. For the first Each segment, For the first The salinity of each segment For hash functions; The hash values of the leaf nodes are arranged in the order of the partitions to form the bottom layer of the Merkle tree; each layer takes the hash values of adjacent leaf nodes as a group and recursively calculates the hash value of the parent node of the previous layer from bottom to top until a unique root node hash value is generated. The verification strategy data is obtained, which includes the root node hash value, the salt value set corresponding to each shard, the sampling seed, and the shard parameters; the shard parameters include the shard size of each shard and the total number of shards; the sampling seed is randomly generated by the unified management platform based on the software storage object to be protected. The verification strategy data also includes the complete set of nodes in the Merkle tree. The set of nodes includes the hash values of the leaf nodes corresponding to each shard, as well as the hash values of the internal nodes generated layer by layer from bottom to top according to the Merkle tree construction rules. The hash values of the internal nodes include the hash value of the root node.
[0011] Furthermore, in the policy generation and signing step, the verification policy data is quantum-resistantly signed using a Dilithium private key to generate a policy package; specifically, this includes: The unified management and control platform encapsulates the verification strategy data into metadata to be signed. The unified management platform uses the Dilithium private key from a pre-generated Dilithium key pair to perform a signature operation on the metadata to be signed according to the Dilithium signature algorithm, generating a quantum-resistant signature value; the signature algorithm is as follows:
[0012] in, Represents a quantum-resistant signature value. This indicates a signature operation performed based on a specified digital signature algorithm. This refers to the Dilithium quantum-resistant digital signature algorithm. This represents a hash operation. This represents the Dilithium private key; The unified management platform will combine the metadata to be signed and the quantum-resistant signature value. Combine and encapsulate them into a strategy package.
[0013] Furthermore, in the policy security distribution step, a quantum-resistant secure channel is established between the unified management platform and the mobile terminal using the Kyber algorithm, and the policy packet is encrypted and transmitted using the negotiated session key; specifically including: A temporary Kyber key pair is generated through the mobile terminal, and the Kyber public key is sent to the unified management platform; The unified management platform uses the Kyber public key to invoke the Kyber.Encaps algorithm to generate a shared key. SS and ciphertext C and the ciphertext C Send to mobile device; The mobile terminal uses its local Kyber private key to invoke the Kyber.Decaps algorithm to recover the shared key. SS ; Both parties based on the shared key SS Derivation of session encryption key from session context parameters K Using the session encryption key K The policy packet is transmitted in encrypted form; Wherein, the session encryption key K The derivation process can be expressed by the following formula:
[0014] in, This represents the key derivation function. The session context parameters include at least the mobile terminal device identifier, the software storage object application identifier, the software version number, the policy number, the mobile terminal one-time random number, the unified management platform random number, the algorithm suite identifier, the policy type, and the session number.
[0015] Furthermore, in the policy secure distribution step, the mobile terminal decrypts the policy package and verifies the signature using the Dilithium public key. After successful verification, the policy package is stored locally. Specifically, this includes: The mobile terminal uses the session encryption key. K The received encryption policy packet is decrypted to recover the policy packet; The mobile terminal uses the Dilithium public key to verify the metadata to be signed and the quantum-resistant signature value according to the Dilithium signature verification algorithm. Perform signature verification calculation; If the signature verification result is successful, the mobile terminal writes the policy package to local storage and initializes the policy status, which includes the policy number, application identifier, software version number, policy trust mark, policy effective time and policy expiration time. If the signature verification result is unsuccessful, the mobile terminal discards the policy package, records the policy distribution failure event to the verification log, and reports the verification failure information to the unified management and control platform.
[0016] Furthermore, the specific process of the fast-start path verification in the hierarchical integrity verification step includes: The mobile terminal obtains the current reliable time and calculates the time window number based on preset time window parameters; Using a pseudo-random function, combined with the sampling seed, software identifier, version information and time window number, calculate the set of shard indices Positions that need to be verified for this startup. Read the corresponding shard data according to the shard index set Positions, calculate the local leaf node hash value, and extract the corresponding Merkle authentication path from the policy package; Calculate the local root hash based on the Merkle authentication path. If the local root hash matches the root node hash value in the policy package, the verification is deemed successful and the software startup is allowed.
[0017] Furthermore, in the hierarchical integrity verification step, the specific process of asynchronous integrity verification includes: After the software starts, it asynchronously reads all fragments of data from the software's storage objects in the background. The hash values of the leaf nodes of all segments are calculated using the salt set, and the local Merkle tree is reconstructed to obtain the hash value of the local root node. The local root node hash value is compared with the root node hash value in the policy package. If the comparison results are consistent, the asynchronous complete verification is determined to be successful, the latest asynchronous complete verification time and verification result in the policy status are updated, and the software is kept in normal operation. If the comparison results are inconsistent, the asynchronous complete verification is determined to be unsuccessful, and the abnormal linkage handling process is triggered.
[0018] Furthermore, it also includes a dynamic update mechanism for strategy packages, specifically including: When the software version is updated, the unified management and control platform simultaneously issues a policy package containing the new root node hash value, the new salt value set, and the new sampling seed; For applications that have not been updated for a long time, the unified management and control platform periodically issues new sampling seeds, keeping the root node hash value and salt value set unchanged, so as to change the dynamic sampling position; When a risk is detected, the unified management and control platform issues an emergency strategy package to increase the number of samples for rapid path verification or to force the triggering of asynchronous full verification.
[0019] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a mobile terminal storage security verification method based on dynamic fragmentation and quantum cryptography, which has the following beneficial effects: (1) Quantum-resistant security of software verification strategy data: This invention adopts a combination of post-quantum algorithms conforming to the NIST standard. Dilithium is used for server-side signing, Kyber is used for key negotiation, and the verification strategy package data is signed by Dilithium to generate a signature value. The terminal uses a pre-set server public key. Verification is crucial; any parameter tampering (such as replacing the root node hash value, modifying the salt value, or extending the validity period) will cause signature verification to fail, thus comprehensively defending against the threat of quantum computing attacks from both the signature authentication and key exchange stages.
[0020] (2) Hierarchical verification significantly improves startup speed: The two-level verification architecture decouples startup verification from full verification. Startup verification reads only k sample fragments, greatly reducing the amount of data read; full verification is executed asynchronously in the background, without affecting the user experience. Compared with the existing technology's scheme of fully reading the file and calculating the hash at startup, this invention transforms the verification operation from the startup full verification path to a hierarchical verification path, effectively solving the problem of long startup time for large-volume software.
[0021] (3) Dynamic sampling significantly increases attack costs: The sampling location is dynamically calculated by a pseudo-random function combined with a seed, the current time window, and the application identifier. The shard index is different each time verification is initiated. Attackers need to simultaneously meet multiple conditions, such as obtaining the TEE protection seed in real time, accurately predicting the pseudo-random function output, and completing multiple random tamperings within a very short verification window. The attack complexity increases from a single tampering at a fixed location to multiple random tamperings, and the actual attack success rate is significantly reduced. The control platform can also periodically issue new seeds to make the sampling location change periodically, further increasing the difficulty of long-term latent attacks.
[0022] (4) Complete and reliable trust chain: Strictly adhering to the principle of "sign first, verify later", all data in the policy package is protected by post-quantum signature. When the terminal receives the data for the first time, it is marked as trustworthy and stored in the secure area only after the signature is verified. All subsequent verification operations are performed based on the signed trustworthy parameters. The policy package also contains a complete set of Merkle tree nodes. Any forged node will be detected during path verification, ensuring the trustworthiness and integrity of the verification parameters throughout their entire lifecycle. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0024] Figure 1 This is a flowchart of a mobile terminal storage security verification method based on dynamic fragmentation and quantum cryptography provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the interaction between policy generation and secure distribution provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the interaction between mobile terminal hierarchical verification and policy update in an embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] This invention discloses a mobile terminal storage security verification method based on dynamic fragmentation and quantum-resistant cryptography, referring to... Figure 1 As shown, it includes the following steps: Policy generation and signing steps: The software storage object to be protected is read through the unified management platform, and deterministic sharding, shard hash calculation, Merkle tree construction and root node hash value generation are performed to obtain the verification policy data; the verification policy data is quantum-resistantly signed using the Dilithium private key to generate the policy package; the verification policy data includes the root node hash value, salt value set, sampling seed and sharding parameters; Policy security distribution steps: A quantum-resistant secure channel is established between the unified management platform and the mobile terminal using the Kyber algorithm, and the policy package is encrypted and transmitted using the negotiated session key; the mobile terminal decrypts the policy package and verifies the signature using the Dilithium public key. After successful verification, the policy package is stored in local storage; local storage is used to store the policy package and the policy status and verification logs generated by the mobile terminal during the execution of hierarchical integrity verification. Hierarchical integrity verification steps: During the software startup phase, the mobile terminal performs fast startup path verification, dynamically calculates the sampling fragment position based on the current time window and sampling seed, and verifies the Merkle authentication path of the sampling fragment; during the background phase after software startup, asynchronous integrity verification is performed, the complete Merkle tree is reconstructed and compared with the hash value of the root node; and corresponding status updates or exception handling are performed according to the comparison results.
[0027] In this embodiment, a bank has developed a financial payment app, hereinafter referred to as the "Payment App," which is deployed on a large number of Android mobile terminals. This Payment App carries user account information, transaction keys, and payment business logic. If maliciously tampered with (e.g., through code injection or resource replacement), it could lead to theft of funds or transaction fraud. The bank uses a unified management platform to generate and distribute storage security verification policies for the Payment App's APK installation package. Each time the mobile terminal launches the Payment App, it automatically performs integrity verification to ensure that the software has not been tampered with.
[0028] The implementation process specifically includes the following steps: 1. Strategy generation and signing steps.
[0029] In this embodiment, refer to Figure 2 As shown, perform security initialization and policy generation on the unified management platform; execute the following steps: 1.1 First, the software storage object to be protected is read. In this embodiment, it is the APK installation package of the payment app, thus obtaining its binary file stream M. Next, this embodiment divides the file stream M into... n If there are several fixed-size partitions, then the set of partitions is:
[0030] in, n Indicates the total number of fragments. i Indicates a sharded index. Indicates the first i Each segment, Indicates the first n Each fragment is 4KB-64KB in size. For portions less than one fragment at the end, a standard padding scheme is used, such as PKCS7 padding: calculate the number of bytes N to be padded, and set the value of each of the N bytes to 0xN (e.g., if 6 bytes are missing, fill with 6 x06 bytes). In this embodiment, padding is used to represent the number of bytes to be padded to the last fragment. 1.2 Shard Hash Calculation; This embodiment generates a corresponding salt value for each shard. salinity Generated using a secure random number generation mechanism by the unified management platform, and associated with the corresponding software version and fragment. The unified management platform will then... Each segment Its corresponding salinity After concatenation, SHA3-256 hash calculation is performed to obtain the first... The hash value of the leaf node corresponding to each shard The hash value of the leaf node is used as the leaf node of the Merkle tree, and the calculation formula is as follows:
[0031] in, For the first The hash value of the leaf node corresponding to each shard. For the first Each segment, For the first The salinity of each segment This is a hash function.
[0032] 1.3 Constructing a Merkle tree; In this embodiment, the hash values of the leaf nodes are arranged in the order of the shards to form the bottom layer of the Merkle tree; Each layer takes the hash values of adjacent leaf nodes as a group and recursively calculates the hash value of the parent node of the previous layer from bottom to top until a unique root node hash value Root is generated.
[0033] Starting from the bottom layer, i.e., layer 0, this embodiment groups two adjacent nodes together, each serving as the left child node. and right child node And according to the formula for calculating the hash value of the parent node:
[0034] Get the hash value of the parent node of the previous level. If the number of nodes in a certain layer is odd, the last node is copied once before participating in the parent node's hash value calculation, or a pre-set empty node is used to fill in the gaps. This processing rule is fixed in the strategy, and the same rule is used during terminal verification. After completing one round of calculation, the number of nodes in the current layer is approximately halved. The server continues to perform the same pairwise combination and hash calculation on the newly generated nodes in the next layer until only one node remains in a certain layer. The hash value of this unique node is the root hash value of the Merkle tree.
[0035] Meanwhile, the unified management platform stores the complete node set T of the Merkle tree according to hierarchy and node index. In this embodiment, the node set T includes the hash values of the leaf nodes corresponding to each shard, as well as the hash values of the internal nodes generated layer by layer from bottom to top according to the aforementioned Merkle tree construction rules, where the root node hash value Root belongs to the internal node hash values. The node set T is used by the mobile terminal to subsequently extract the corresponding Merkle authentication path based on the index of the shard to be verified and complete the shard integrity verification.
[0036] 1.4 In this embodiment, the unified management platform randomly generates a 256-bit random seed based on the software storage object to be protected. This seed will be used to dynamically calculate the sampling position locally on the terminal and is denoted as the sampling seed. The sampling seed is bound to the software version and is regenerated each time the version is updated.
[0037] In this embodiment, the root node hash value (Root), salt set, sampling seed, and sharding parameters together constitute the verification strategy data.
[0038] 1.5. Issue quantum-resistant signatures.
[0039] The unified management platform will include the root node hash value (Root), salt set (SaltSet), sampling seed (Seed), total number of shards (n), shard size (size), and policy validity period. The necessary software version information is packaged together to form metadata to be signed. Among them, SaltSet= , Indicates the first i The salt value corresponding to each slice Indicates the first n Each shard corresponds to a salt value, which is generated by the unified management platform during the shard hash calculation phase and establishes a one-to-one correspondence with the corresponding shard.
[0040] In this embodiment, the unified management platform uses the Dilithium private key from a pre-generated Dilithium key pair to perform a signature operation on the metadata to be signed according to the Dilithium signature algorithm, generating a quantum-resistant signature value. The signature algorithm is as follows:
[0041] in, Represents a quantum-resistant signature value. This indicates a signature operation performed based on a specified digital signature algorithm. This refers to the Dilithium quantum-resistant digital signature algorithm. This indicates a hash operation, used to perform hash calculations on the metadata to be signed. This represents the Dilithium private key.
[0042] Subsequently, the unified management platform in this embodiment will combine the metadata to be signed and the quantum-resistant signature value. Combine and encapsulate them into a strategy package.
[0043] The policy package also includes a complete set T of Merkle tree nodes. Node set T includes the hash values of the leaf nodes corresponding to each shard and the hash values of the internal nodes generated layer by layer according to the Merkle tree construction rules, including the root node hash value Root. In this embodiment, T is constrained for integrity by the signed and protected Root, eliminating the need to sign each node in T individually. If the authentication path node in T is tampered with, the root node hash value calculated by the mobile terminal based on the authentication path will be inconsistent with the signed and protected Root, thus enabling anomaly detection.
[0044] 2. Policy security distribution steps.
[0045] After the unified management platform in this embodiment generates the policy package, a quantum-resistant secure channel is established between the unified management platform S and the mobile terminal D using the Kyber algorithm. This channel protects the confidentiality, tamper-proof nature, and session-level replay protection of the verification policy package during network transmission. It should be noted that the Kyber algorithm is used to complete session key negotiation and key encapsulation, ensuring that the policy package transmission link still maintains key exchange security under quantum computing attack scenarios; Dilithium is used to sign the verification metadata in the policy package, ensuring the trustworthiness of the policy source and the immutability of the parameters. The two algorithms have different functional boundaries and are not interchangeable, together constituting a dual quantum-resistant protection mechanism in the policy security distribution phase.
[0046] 2.1 Policy Request and Session Context Establishment.
[0047] When mobile terminal D first installs the software to be protected, detects that the local policy package is missing, the policy package is about to expire, the software version changes, or receives a notification from the unified management and control platform requiring a policy update, mobile terminal D initiates a policy request to the unified management and control platform S.
[0048] When initiating this policy request, mobile terminal D uses a secure random number generation mechanism to generate a one-time random number for this policy distribution session. and get the current request timestamp. Mobile terminal D will store the following information: DeviceID (Mobile Terminal Device Identifier), AppID (Software Storage Object Application Identifier), Version (Software Version Number), PolicyID (Current Local Policy Number), a list of algorithm suites supported by the mobile terminal, and a request timestamp. and mobile terminal one-time random number The policy request is encapsulated and sent to the unified management platform S. Among these steps... It is not reused between different policy distribution sessions and is used to achieve random binding of the current policy request to the current session.
[0049] After receiving the policy request, the unified management platform S first checks whether the mobile terminal D has the permission to obtain the corresponding software verification policy, and then queries the corresponding root node hash value Root, salt set SaltSet, sampling seed Seed, sharding parameters, policy validity period, sampling quantity k, pseudo-random function identifier, time window parameters, Merkle tree construction rules, and Merkle tree node set T based on AppID and Version.
[0050] When it is determined that a policy distribution or update is required, the unified management platform S uses a secure random number generation mechanism to generate a unified management platform random number that is only used for this policy distribution session. A unique session ID (SessionID) is generated for this policy distribution session.
[0051] Based on the list of algorithm suites reported by the mobile terminal D, the cryptographic algorithms supported by the unified management platform itself, and the preset security policies, the unified management platform S selects the algorithm suite actually used in this session from the algorithm combinations supported by both parties, and generates a corresponding algorithm suite identifier, AlgorithmSuiteID. The algorithm suite identifier is used to identify the combination of key encapsulation algorithm, digital signature algorithm, key derivation function, hash algorithm, and symmetric encryption or authentication encryption algorithm used in this session.
[0052] Meanwhile, the unified management platform S determines the policy type (PolicyType) based on the triggering reason of this policy request and the content of the policy to be issued. The policy type includes at least one of the following: initial policy issuance type, software version update type, sampling seed rotation type, and risk response type.
[0053] If the local policy on the mobile terminal is already up-to-date and has not expired, the unified management platform S can return a policy status that does not need to be updated; if policy distribution or updates are required, the Kyber session key negotiation process will be initiated based on the aforementioned session context parameters.
[0054] 2.2 Kyber key encapsulation and shared key recovery.
[0055] Mobile terminal D generates a temporary Kyber key pair during this session, denoted as the public key. and private key This key pair is only used in the current policy distribution session and will not be reused after the policy is issued. Mobile terminal D will use the public key. The policy request is sent along with the data to the unified management platform S. S uses the public key sent by the mobile terminal. Use the Kyber.Encaps algorithm to generate Kyber ciphertext. And the shared key SS. Then, S will send the ciphertext... This is returned to mobile terminal D as part of the session key negotiation result. Mobile terminal D receives the ciphertext. Then, use the local temporary private key. The Kyber.Decaps algorithm is invoked to recover the shared key SS. Through the above process, S and D obtain the same shared key SS without directly transmitting the symmetric key. This shared key itself is not directly used in the encryption policy package, but rather serves as key derivation input to generate the symmetric key material required for subsequent encryption, authentication, and session binding.
[0056] 2.3 Session key derivation and context binding.
[0057] To prevent the same shared key from being reused across different uses, software versions, or other applications, in this embodiment, S and D each use the same key derivation function to derive the shared key SS, resulting in the session encryption key K. The key derivation process can be represented as follows:
[0058] Here, Context represents the session context parameters, which include at least the mobile terminal device identifier DeviceID, the software storage object application identifier AppID, the software version number Version, the policy number PolicyID, and a one-time random number from the mobile terminal. Unified management platform random number Algorithm suite identifier, policy type, and session ID.
[0059] This embodiment ensures that even if two sessions accidentally use the same software version and policy number, the derived session keys will not be the same by introducing the aforementioned context parameters. In a specific implementation, KDF can employ a key derivation function based on SHA3-256 or SHAKE. The derivation result can be further broken down into encryption keys. Integrity verification key Or the key materials required for the AEAD algorithm. If AES-256-GCM, SM4-GCM, or other algorithms with authentication encryption capabilities are used, then use... The policy package is encrypted, and the integrity of the ciphertext and additional authentication data is protected by an authentication tag.
[0060] 2.4. Encryption and authentication of policy packets during transmission.
[0061] The unified management platform S will distribute the policy packages. Input as plaintext. At least including Metadata and Dilithium signature value σAnd a Merkle tree node set T. The metadata includes the root node hash (Root), the salt set (SaltSet), the sampling seed (Seed), the total number of shards (n), the shard size (size), the padding bytes at the end of the shard (pad), and the policy expiration period. Software storage object application identifier AppID, software version number Version, number of samples k, pseudo-random function identifier This includes time window parameters, Merkle tree odd node handling rules, hash algorithm identifiers, and strategy numbers. This indicates the policy validity period, used to limit the effective time range within which the current policy package is allowed to be trusted and used by the mobile terminal. This represents the pseudo-random function identifier, used to identify the pseudo-random function used by the mobile terminal to calculate the dynamic sampling segment position during the fast startup path verification process. σ is used by the unified management and control platform. The signature value obtained by Dilithium signing the metadata. The unified management platform S uses the session encryption key. right Encryption is performed to generate the policy package ciphertext. And authentication tags. During encryption, DeviceID, AppID, Version, PolicyID, SessionID, , , Algorithm suite identifiers and other data are used as additional authentication data (AAD) in the authentication process, but they are not necessarily encrypted. This means that even if an attacker modifies the session context, software version number, or policy number, AEAD authentication will still fail.
[0062] The unified management platform S returns a policy distribution response to the mobile terminal D, which includes at least Kyber ciphertext. Unified management platform random number Session ID, Policy Packet Ciphertext The authentication tag, algorithm suite identifier (AlgorithmSuiteID), policy type (PolicyType), and necessary server response timestamps are required. After receiving the response, mobile terminal D derives the session encryption key from the aforementioned shared key SS. , for strategy package ciphertext The authentication and decryption are performed using the authentication tag. If authentication fails, mobile terminal D discards the response, must not write any data to the trusted policy storage area, and records the policy distribution failure event.
[0063] 2.5 Signature verification after decryption of the policy package.
[0064] In this embodiment, mobile terminal D successfully decrypted and obtained... Afterwards, instead of immediately marking it as a trusted policy, it first enters the policy package verification process. Mobile terminal D uses the pre-installed unified management platform Dilithium public key. Perform signature verification on the metadata and signature value σ. After successful signature verification, mobile terminal D continues to check the AppID, Version, PolicyID, Root, SaltSet, Seed, n, size, pad, k in the metadata. The hash algorithm identifier, PRF identifier, and Merkle tree construction rules must be complete and consistent. For example, mobile terminal D should confirm that the total number of fragments n corresponds to the software file size, fragment size size, and end padding pad; and confirm the policy validity period. Not expired; confirm that the software version in the policy is consistent with the local software version to be verified; confirm that the number of samples k is not greater than the total number of fragments n; confirm that the hash algorithm, PRF algorithm and tree construction rules belong to the algorithm suite supported by the terminal.
[0065] If Dilithium signature verification fails, or if the policy metadata does not match the local software object, mobile terminal D determines the policy package is untrusted, discards the decryption result, and prevents subsequent FP-level or DP-level verifications from being performed using the policy package according to local security policies. Only after both signature verification and consistency checks pass will mobile terminal D release the decryption package. Mark as a trusted policy.
[0066] 2.6 Trusted storage and status recording.
[0067] Mobile terminal D will pass the verification The policy is written to local storage. In this embodiment, local storage is used to store the policy package and the policy state and verification logs generated by the mobile terminal during the hierarchical integrity verification process. This local storage can be TEE secure storage, an encrypted file area protected by the system keystore, or a protected application private directory provided by the mobile operating system. Seed, policy trust status, policy number, validity period, and the most recent complete verification result should be preferentially stored in a higher-security storage area to prevent ordinary application processes from directly reading or modifying them. Mobile terminal D records the policy state (PolicyState) locally, which includes at least the policy number (PolicyID), software identifier (AppID), software version (Version), policy trust flag (TrustedFlag), policy effective time, policy expiration time, most recent FP-level verification result, most recent DP-level verification result, most recent policy update time, and exception handling status. Upon subsequent software startup, mobile terminal D can quickly determine whether the complete policy package verification process needs to be re-executed based on TrustedFlag and policy validity period.
[0068] 3. Steps for verifying hierarchical integrity.
[0069] After completing the reception, decryption, signature verification, and trusted storage of the policy packet, mobile terminal D performs hierarchical integrity verification according to the software lifecycle. (Refer to...) Figure 3 As shown, this tiered verification includes two levels: rapid startup path verification and background asynchronous full verification. Rapid startup path verification performs quick validation of randomly selected fragments before the app starts, reducing startup latency. Background asynchronous full verification performs a complete measurement of the entire software storage object after the app starts, compensating for the shortcomings of sampling verification which does not cover all fragments. The two levels of verification are not mutually exclusive, but rather form a continuous verification mechanism: rapid pre-start access, complete in-process review, and coordinated handling of anomalies.
[0070] 3.1 Verify the loading of triggering conditions and strategies.
[0071] When a user launches an app, the system detects that the app has been invoked, critical app components are dynamically loaded, or security policies require proactive verification of specified software objects, the system security module, application management module, or kernel interception module of mobile terminal D triggers an integrity verification process. Mobile terminal D first reads the corresponding trusted policy package from local storage based on the AppID and Version. and the policy state (PolicyState). If a trusted policy package does not exist locally, or the policy package has expired. If the software version specified in the policy is inconsistent with the local version of the software to be launched, then mobile terminal D must not directly allow the APP to launch, but should request the unified management platform S to issue the latest policy package. If the mobile terminal is offline and the local policy is still valid, then offline FP-level verification can continue to be performed using the local trusted policy.
[0072] When loading the policy, mobile terminal D checks whether TrustedFlag is valid and confirms that the policy package has been previously approved. Verification of the Dilithium signature σ. For first-time use, first startup after a policy update, loss of trusted state, or abnormal secure storage state, mobile terminal D should re-perform Dilithium signature verification. Only after successful signature verification can mobile terminal D continue to use the root node hash value Root, salt set SaltSet, sampling seed Seed, total number of shards n, shard size size, padding bytes at the end of the shard, sampling quantity k, and policy validity period. Pseudo-random function identifier Parameters such as time window parameters, Merkle tree construction rules, and Merkle tree node set T.
[0073] 3.2 Quick Start Path Verification.
[0074] Fast Startup Path Verification, also known as FP-level verification, is a step that occurs before the app can be allowed to start. Its goal is to read a small number of dynamic fragments in a short period of time and verify whether these fragments are consistent with the root protected by the server signature through the Merkle authentication path. This allows pre-startup access control to be completed without completely reading the entire software file.
[0075] 3.2.1 Perform a consistency check before startup.
[0076] Before calculating the sampling position, the mobile terminal D in this embodiment first performs a basic consistency check on the software object M to be verified. The check includes whether the file exists, whether the file path matches the installation record, whether the file length matches the n, size, and pad values in the policy, whether the software version number matches the Version value in the Metadata, whether there are any abnormal changes in file permissions, and whether the installation source complies with the local security policy. If the basic consistency check fails, the mobile terminal D directly determines that the verification has failed and does not need to proceed to the subsequent fragment reading process. If the basic consistency check passes, the dynamic sampling position calculation step is then initiated.
[0077] 3.2.2 Calculation of dynamic sampling position.
[0078] Mobile terminal D obtains the current trusted time It then calculates the time window number (WindowID) based on the TimeWindow parameter specified in the strategy package. The time window number can be represented as:
[0079] Subsequently, mobile terminal D uses Seed from the policy package as the key or input parameter for the pseudo-random function, and combines it with AppID, Version, WindowID, terminal local boot counter BootCounter, or session random number. Calculate the set of shard indices, Positions, that need to be verified during this startup. This process can be represented as:
[0080] in, k This represents the number of samples protected by the signature in the policy package. Mobile terminal D performs a modulo mapping on the PRF output, obtaining a value ranging from 0 to... n The sharding index is between 1 and 2. If the mapping result contains duplicate indices, the PRF output is expanded until a sharding index is obtained. k A set of unique shard indexes. This results in... Positions Instead of being hard-coded in the program, the sharding verification logic dynamically changes based on the Seed, software identifier, version information, time window, and startup session. This makes it difficult for attackers to predict the actual verification location on the next startup, even if they discover the sharding verification logic on the terminal through static reverse engineering. This mechanism is consistent with the previous design of "distributing Seeds from a unified management platform instead of fixing sharding locations," and does not alter the Merkle tree root, SaltSet, or sharding rules.
[0081] 3.2.3 Read fragments on demand Based on each fragment index pos in Positions, mobile terminal D calculates the read offset of that fragment in software file M in this embodiment:
[0082] For non-end-of-the-year fragments, mobile terminal D reads bytes of length size starting from offset to obtain the fragment. For the last fragment, if the actual remaining file length is less than size, the last fragment data used when the server constructed the Merkle tree is restored according to the padding and padding rules specified in the policy package, ensuring that the hash calculation of the leaf nodes on the terminal side is consistent with that on the server side.
[0083] 3.2.4 Calculation of leaf node hash value.
[0084] Mobile terminal D reads the salt value corresponding to the shard index pos from the trusted policy package. And calculate the local leaf node hash value according to the leaf node calculation rules fixed by the server during the strategy generation phase: =SHA3-256( || ) in, This indicates that the mobile terminal is targeting the shard index. The calculated hash value of the local leaf node; This indicates the salt value corresponding to the shard index pos, which is extracted by the mobile terminal from the SaltSet set of salt values in the trusted policy package that has been verified by Dilithium signatures; This indicates the shard data to be verified corresponding to the shard index pos, which is read by the mobile terminal from the local software storage object to be verified based on the shard index pos; pos represents the shard index dynamically sampled during this fast-start path verification process. Since both SaltSet and Root are contained in Metadata and protected by σ, attackers cannot replace the salt value or root hash without corrupting the signature verification result.
[0085] 3.2.5 Merkle Authentication Path Verification In this embodiment, the mobile terminal D extracts the hash values of sibling nodes on the path from the leaf node to the root node from the Merkle tree node set T in the policy package based on the fragmentation index pos, thus forming a Merkle authentication path. For each layer on the path, mobile terminal D calculates the parent node hash value according to the left and right positions of the current node in that layer, following the order specified by the server. If the current node is a left node, the calculation is: Parent = SHA3-256(Current||Sibling); if the current node is a right node, the calculation is: Parent = SHA3-256(Sibling||Current); where Parent represents the hash value of the parent node of the previous layer obtained by concatenating the current node and its sibling nodes in left-right order and performing SHA3-256 hash calculation; Current represents the hash value of the current node undergoing Merkle authentication path verification in the current layer, which is the hash value of the local leaf node corresponding to the shard to be verified in the first calculation, and is updated to the Parent obtained in the previous round in subsequent layer-by-layer calculations; Sibling represents the hash value of the sibling node corresponding to the current node in the same layer, which is extracted by the mobile terminal from the Merkle tree node set T in the policy package according to the shard index and the Merkle authentication path. If there are odd-numbered node copies or pre-set empty nodes to fill in a certain layer, mobile terminal D performs the same processing according to the tree construction rules protected by the signature in the policy package. Mobile terminal D calculates layer by layer, starting from the leaf node, until it obtains the locally computed root node. Mobile terminal D will Compare with the Root in the policy package Metadata. If they match, it means that the shard and its authentication path are consistent with the Merkle root when the unified management platform generates the policy; if they do not match, it means that there is an anomaly in the shard content, salt value, authentication path, or tree node set, and this FP-level verification fails.
[0086] 3.2.6 Determination of FP-level verification results.
[0087] Mobile terminal D performs leaf node hash calculation and Merkle path verification on all k shards in Positions. Only when all k shards... The FP-level verification is considered successful only when all data points match the root protected by the signature. After successful FP-level verification, mobile terminal D allows the app to proceed with the startup process and records the FP-level verification result, sampling location summary, policy number, and verification time in the local verification log. If any fragment verification fails, mobile terminal D should immediately prevent the app from starting and execute a handling policy based on the security level. Handling policies may include refusing loading, prompting the user to reinstall, isolating suspicious files, triggering a forced update, recording the security event, and reporting it to the unified management platform. To prevent attackers from deducing the complete sampling location from the logs, mobile terminal D may only record a summary of the sampling location or encrypted audit information, instead of outputting the entire fragment index in plaintext in the ordinary log.
[0088] 3.3. Backend asynchronous full verification.
[0089] Background asynchronous full verification, also known as DP-level verification, is performed after the app passes FP-level verification and starts. Its goal is to perform a complete measurement of all fragments of the software storage object M, detecting potential tampering in areas not covered by FP-level sampling. DP-level verification executes in the background with low priority and does not block the user's startup path.
[0090] 3.3.1 DP-level verification triggered.
[0091] In this embodiment, the mobile terminal D triggers DP-level verification after the APP starts successfully, when the device is idle, when the device is connected to a power source, when network conditions are good, when the system security module performs periodic inspections, or when the management platform issues a risk response command. For high-risk applications or applications that have recently experienced abnormal events, the unified management platform increases the frequency of DP-level verification through a policy update mechanism, or requires the terminal to perform a full verification immediately after the next startup. DP-level verification and FP-level verification use the same signed and protected Root, SaltSet, sharding parameters, and tree construction rules. The difference is that FP-level verification only verifies the dynamically selected k shards, while DP-level verification reads and calculates all n shards.
[0092] 3.3.2 Perform full fragment reading and leaf node reconstruction.
[0093] Mobile terminal D reads all the fragments starting from the beginning of software file M in fragment order. to For each shard Mobile terminal D reads the corresponding salt value. And calculate the local leaf node hash. : =SHA3-256( || ) For fragments ending in less than size, mobile terminal D performs padding according to the padding and padding rules in the policy package, consistent with the unified management platform. If abnormal changes are detected in file length, permissions, installation version, or file handle status during the reading process, mobile terminal D should terminate the current DP-level verification and restart it after the file status stabilizes, in order to avoid misjudging concurrent updates as malicious tampering.
[0094] 3.3.3 Local Merkle tree reconstruction.
[0095] Mobile terminal D is based on all the calculated leaf nodes The local Merkle tree is reconstructed from bottom to top according to the Merkle tree construction rules specified in the strategy package. For each level, mobile terminal D combines adjacent nodes in left-right order and calculates the parent node hash; if the number of nodes in a certain level is odd, the last node is copied or a preset empty node padding rule specified in the strategy package is used. Mobile terminal D repeats the above process until the root node of the complete local reconstruction is obtained. DP-level validation does not rely on the Merkle tree node set T in the policy package for computation. Instead of directly reconstructing the root node based on all locally read fragments and SaltSet, this allows for independent and complete measurement of local software objects. If further anomaly location is needed, the mobile terminal D in this embodiment can compare the locally reconstructed leaf nodes or intermediate nodes with the corresponding nodes in the policy package T, thereby narrowing down the scope of tampering.
[0096] 3.3.4 Root node comparison and integrity determination.
[0097] In this embodiment, the mobile terminal D will... Compare with the Root protected by the Dilithium signature in the policy package Metadata. If If the results are completely identical to the Root, it means that all fragments of the current local software file are consistent with the software objects generated by the server-side policy, and the DP-level verification passes. The mobile terminal D updates the most recent DP-level verification time and result in PolicyState and maintains the normal operation of the app. If the version is inconsistent with the Root version, it indicates that at least one fragment of the mobile terminal's local software object is inconsistent with the baseline version of the unified management platform. This anomaly may be caused by file tampering, version mismatch, unauthorized patching, malicious injection, or storage corruption. Mobile terminal D should determine the DP-level verification as failed and initiate the anomaly handling process.
[0098] Finally, regarding the strategy update mechanism.
[0099] To address security threats during long-term operation, this embodiment introduces a dynamic policy update mechanism; specifically including: (1) Version binding strategy: Each software version corresponds to a unique strategy package (including a unique Root, Salt set, and Seed). When the software is updated, the strategy package is updated synchronously.
[0100] (2) Regular seed rotation: For applications that are not updated for a long time, the unified management platform regularly (e.g., every 7 days) distributes new seeds, keeping the Root and Salt unchanged, so that the sampling position changes with the time period, increasing the difficulty for attackers to predict.
[0101] (3) Risk response mechanism: When the unified management and control platform detects a surge in attack activities against a certain application, it can urgently issue a new policy package to force the terminal to perform more intensive sampling on the next startup, such as increasing the k value or triggering full verification in advance.
[0102] (4) Offline verification support: The policy package contains a complete set T of all nodes in the Merkle tree. The mobile terminal can dynamically calculate the sampling location and complete the rapid verification based on the local time when offline, without the need for real-time network connection. After the offline policy expires, the policy needs to be updated online.
[0103] In this embodiment, the unified management platform reads the software storage object to be protected, performs deterministic sharding, shard hash calculation, Merkle tree construction, and root node hash value generation to obtain verification policy data. It also uses a Dilithium private key to generate a policy package by performing quantum-resistant signature on the verification policy data, and distributes the policy package through a secure channel established with the mobile terminal via the Kyber algorithm. The mobile terminal receives and verifies the policy package, performing hierarchical integrity verification. Fast path verification based on dynamic sampling is performed during the software startup phase, and asynchronous integrity verification is performed in the background phase. This invention achieves quantum-resistant integrity protection for local software storage objects on mobile terminals by providing lightweight storage security verification that balances tamper resistance, quantum-resistant security, and mobile terminal startup experience.
[0104] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0105] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A mobile terminal storage security verification method based on dynamic fragmentation and quantum-resistant cryptography, characterized in that, Includes the following steps: Policy generation and signing steps: The software storage object to be protected is read through the unified management platform, and deterministic sharding, shard hash calculation, Merkle tree construction and root node hash value generation are performed to obtain verification policy data; the verification policy data is quantum-resistantly signed using the Dilithium private key to generate a policy package; the verification policy data includes the root node hash value, salt value set, sampling seed and sharding parameters; Policy security distribution steps: A quantum-resistant secure channel is established between the unified management platform and the mobile terminal using the Kyber algorithm, and the policy package is encrypted and transmitted using the negotiated session key; the mobile terminal decrypts the policy package and verifies the signature using the Dilithium public key. After successful verification, the policy package is stored in local storage; the local storage is used to store the policy package and the policy status and verification logs generated by the mobile terminal during the hierarchical integrity verification process; Hierarchical integrity verification steps: During the software startup phase, the mobile terminal performs fast startup path verification, dynamically calculates the sampling fragment position based on the current time window and sampling seed, and verifies the Merkle authentication path of the sampling fragment; during the background phase after software startup, asynchronous integrity verification is performed, the complete Merkle tree is reconstructed and compared with the hash value of the root node; and corresponding status updates or exception handling are performed according to the comparison results.
2. The method as described in claim 1, characterized in that, The specific process of performing deterministic sharding, shard hash calculation, Merkle tree construction, and root node hash value generation to obtain the verification policy data in the policy generation and signing steps includes: The software storage object is divided into multiple fixed-size fragments, and the last part that is less than one fragment is padded to obtain the fragment size of each fragment and the total number of fragments. A unique salt value is generated for each shard. The shard and its corresponding salt value are concatenated and hashed to obtain the hash value of the leaf node for each shard, expressed by the formula: in, For the first The hash value of the leaf node corresponding to each shard. For the first Each segment, For the first The salinity of each segment For hash functions; The hash values of the leaf nodes are arranged in the order of the partitions to form the bottom layer of the Merkle tree; each layer takes the hash values of adjacent leaf nodes as a group and recursively calculates the hash value of the parent node of the previous layer from bottom to top until a unique root node hash value is generated. The verification strategy data is obtained, which includes the root node hash value, the salt value set corresponding to each shard, the sampling seed, and the shard parameters; the shard parameters include the shard size of each shard and the total number of shards; the sampling seed is randomly generated by the unified management platform based on the software storage object to be protected. The verification strategy data also includes the complete set of nodes in the Merkle tree. The set of nodes includes the hash values of the leaf nodes corresponding to each shard and the hash values of the internal nodes at each level generated from bottom to top according to the Merkle tree construction rules. The hash values of the internal nodes include the hash value of the root node.
3. The method as described in claim 2, characterized in that, In the policy generation and signing step, a quantum-resistant signature is performed on the verification policy data using a Dilithium private key to generate a policy package; specifically, this includes: The unified management and control platform encapsulates the verification strategy data into metadata to be signed. The unified management platform uses the Dilithium private key from a pre-generated Dilithium key pair to perform a signature operation on the metadata to be signed according to the Dilithium signature algorithm, generating a quantum-resistant signature value; the signature algorithm is as follows: in, Represents a quantum-resistant signature value. This indicates a signature operation performed based on a specified digital signature algorithm. This refers to the Dilithium quantum-resistant digital signature algorithm. This represents a hash operation. This represents the Dilithium private key; The unified management platform will combine the metadata to be signed and the quantum-resistant signature value. Combine and encapsulate them into a strategy package.
4. The method as described in claim 3, characterized in that, In the policy security distribution step, a quantum-resistant secure channel is established between the unified management platform and the mobile terminal using the Kyber algorithm, and the policy packet is encrypted and transmitted using the negotiated session key; specifically including: A temporary Kyber key pair is generated through the mobile terminal, and the Kyber public key is sent to the unified management platform; The unified management platform uses the Kyber public key to invoke the Kyber.Encaps algorithm to generate a shared key. SS and ciphertext C and the ciphertext C Send to mobile device; The mobile terminal uses its local Kyber private key to invoke the Kyber.Decaps algorithm to recover the shared key. SS ; Both parties based on the shared key SS Derivation of session encryption key from session context parameters K Using the session encryption key K The policy packet is transmitted in encrypted form; Wherein, the session encryption key K The derivation process can be expressed by the following formula: in, This represents the key derivation function. The session context parameters include at least the mobile terminal device identifier, the software storage object application identifier, the software version number, the policy number, the mobile terminal one-time random number, the unified management platform random number, the algorithm suite identifier, the policy type, and the session number.
5. The method as described in claim 4, characterized in that, In the policy security distribution step, the mobile terminal decrypts the policy package and verifies the signature using the Dilithium public key. After successful verification, the policy package is stored locally. Specifically, this includes: The mobile terminal uses the session encryption key. K The received encryption policy packet is decrypted to recover the policy packet; The mobile terminal uses the Dilithium public key to verify the metadata to be signed and the quantum-resistant signature value according to the Dilithium signature verification algorithm. Perform signature verification calculation; If the signature verification result is successful, the mobile terminal writes the policy package to local storage and initializes the policy status, which includes the policy number, application identifier, software version number, policy trust mark, policy effective time and policy expiration time. If the signature verification result is unsuccessful, the mobile terminal discards the policy package, records the policy distribution failure event to the verification log, and reports the verification failure information to the unified management and control platform.
6. The method as described in claim 5, characterized in that, The specific process of the fast-start path verification in the hierarchical integrity verification step includes: The mobile terminal obtains the current reliable time and calculates the time window number based on preset time window parameters; Using a pseudo-random function, combined with the sampling seed, software identifier, version information and time window number, calculate the set of shard indices Positions that need to be verified for this startup. Read the corresponding shard data according to the shard index set Positions, calculate the local leaf node hash value, and extract the corresponding Merkle authentication path from the policy package; Calculate the local root hash based on the Merkle authentication path. If the local root hash matches the root node hash value in the policy package, the verification is deemed successful and the software startup is allowed.
7. The method as described in claim 6, characterized in that, The specific process of asynchronous integrity verification in the hierarchical integrity verification step includes: After the software starts, it asynchronously reads all fragments of data from the software's storage objects in the background. The hash values of the leaf nodes of all segments are calculated using the salt set, and the local Merkle tree is reconstructed to obtain the hash value of the local root node. The local root node hash value is compared with the root node hash value in the policy package. If the comparison results are consistent, the asynchronous complete verification is determined to be successful, the latest asynchronous complete verification time and verification result in the policy status are updated, and the software is kept in normal operation. If the comparison results are inconsistent, the asynchronous complete verification is determined to be unsuccessful, and the abnormal linkage handling process is triggered.
8. The method according to any one of claims 1-7, characterized in that, It also includes a dynamic update mechanism for policy packages, specifically including: When the software version is updated, the unified management and control platform simultaneously issues a policy package containing the new root node hash value, the new salt value set, and the new sampling seed; For applications that have not been updated for a long time, the unified management and control platform periodically issues new sampling seeds, keeping the root node hash value and salt value set unchanged, so as to change the dynamic sampling position; When a risk is detected, the unified management and control platform issues an emergency strategy package to increase the number of samples for rapid path verification or to force the triggering of asynchronous full verification.
