A key management method and a storage device

By decomposing the authentication key into spatial, temporal, and functional fragments and storing them in different storage partitions, combined with a multi-dimensional verification mechanism and dynamic risk assessment, the single point of failure and scalability issues of the RPMB key storage scheme are resolved, achieving secure and controllable data access and flexible key management.

CN120956418BActive Publication Date: 2026-03-24BIWIN STORAGE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing RPMB key storage solutions suffer from single point of failure risk, poor scalability, and vulnerability to physical attacks. Furthermore, the key management process is susceptible to replay attack vulnerabilities.

Method used

Different preset classification strategies are used to decompose the authentication key into different types of key fragments and store them in corresponding storage partitions. The distributed storage mechanism eliminates the risk of single point of failure and ensures the legitimacy of the data access through a multi-dimensional verification mechanism. The key is dynamically updated to adapt to the needs of different application scenarios.

Benefits of technology

It improves the security of key storage and the flexibility of management. Through a multi-dimensional protection system and dynamic risk assessment mechanism, it enhances the ability to resist new types of attacks and reduces the probability of keys being brute-forced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956418B_ABST
    Figure CN120956418B_ABST
Patent Text Reader

Abstract

The application discloses a key management method and a storage device, and belongs to the field of storage security. The method comprises the following steps: deriving different types of key fragments from an authentication key according to different preset classification strategies, and storing the different types of key fragments in different storage partitions corresponding to the preset classification strategies; receiving a data access request, wherein the data access request comprises data index information; reading and verifying the legitimacy of candidate key fragments matched with the data index information from the different storage partitions based on different preset classification strategies, and determining the candidate key fragments passing the verification as valid key fragments; and aggregating the different types of valid key fragments to generate the authentication key, and obtaining target access data of the data access request through the authentication key. The application can effectively improve the security of key storage and the flexibility of key management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of storage security, in particular to a key management method and a storage device. BACKGROUND

[0002] In the field of mobile devices, Internet of Things terminals and embedded systems, in order to protect the integrity and confidentiality of critical data, the RPMB (Replay Protected Memory Block) technology has been widely used. RPMB implements identity authentication on read and write operations of a storage area, and introduces a counting mechanism to resist replay attacks, thereby providing important security protection for sensitive data.

[0003] However, the existing RPMB scheme still has significant defects in key storage and management. The current common RPMB key storage scheme mostly adopts static partition configuration, that is, a fixed size of secure storage area is pre-divided when the device is shipped. This method has the following disadvantages: first, there is a single point of failure risk: the keys are stored centrally in a single static partition, and an attacker only needs to break through the protection of this partition to obtain all the key materials; second, poor scalability and flexibility: fixed size storage partitions are difficult to support dynamic key derivation or multi-key rotation requirements, and cannot adapt to increasingly complex application scenarios and security requirements. Moreover, RPMB keys are usually fixed in hardware security areas, and such methods have a certain isolation, but are still vulnerable to physical attacks, including but not limited to fault injection, side channel analysis and other means, and attackers can extract or destroy key materials. Once the key is leaked due to physical attack, the entire RPMB security mechanism relying on the key will face the risk of complete failure.

[0004] Although the RPMB mechanism itself is designed with anti-replay function, in the case of key management loopholes or key leakage, an attacker may still exploit potential defects in the logical or implementation level of the replay protection mechanism, combined with the stolen key, to initiate a replay attack, resulting in unauthorized data writing to the protected area or illegal reading of critical data, which seriously damages the security state of the system. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a key management method and a storage device which can effectively improve the security of key storage and the flexibility of key management.

[0006] To solve the above technical problems, one technical solution adopted by the present application is:

[0007] A key management method, comprising:

[0008] Different types of key fragments are derived from the authentication key according to different preset classification strategies, and the different types of key fragments are respectively stored in different storage partitions corresponding to the preset classification strategies;

[0009] A data access request is received, and the data access request includes data index information;

[0010] Based on different preset classification strategies, the legitimacy of candidate key fragments matched with the data index information is respectively verified from the different storage partitions, and the candidate key fragments that pass the verification are determined as valid key fragments;

[0011] The valid key fragments of different types are aggregated to generate the authentication key, and target access data of the data access request is obtained through the authentication key.

[0012] To solve the above technical problems, another technical solution adopted by the present application is:

[0013] A storage device includes a storage chip and a control chip, the storage chip stores a computer program, and the computer program is executed by the control chip to implement each step of the above key management method.

[0014] The beneficial effects of the present application are as follows: first, the authentication key is decomposed into different types of key fragments by using different preset classification strategies, and the different types of key fragments are stored in corresponding storage partitions, thereby eliminating the risk of single point failure through a distributed storage mechanism and adapting to the dynamic needs of different application scenarios. In the data access stage, a multi-dimensional verification mechanism is triggered by data index information, candidate key fragments are matched from different storage partitions and legitimacy verification is performed, so that only valid key fragments that meet the verification of different preset classification strategies can participate in key reconstruction. Finally, the authentication key is restored by aggregating the valid key fragments, and secure and controllable data access is achieved. Different preset classification strategies form a multi-dimensional protection system, which not only improves the security of key storage, but also increases the flexibility of key management. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 A flowchart of a key management method of an embodiment of the present application;

[0016] Figure 2 A key derivation and aggregation schematic diagram of an embodiment of the present application;

[0017] Figure 3 A structural schematic diagram of a storage device of an embodiment of the present application;

[0018] LABEL EXPLANATION:

[0019] 100, storage device; 101, storage chip; 102, control chip. DETAILED DESCRIPTION

[0020] To make the technical contents of the present application, the purposes achieved and the effects clear, the following will be described in detail in combination with the embodiments and the accompanying drawings.

[0021] The embodiments of the present application provide a key management method, comprising:

[0022] Different types of key fragments are derived from the authentication key according to different preset classification strategies, and the different types of key fragments are respectively stored in different storage partitions corresponding to the preset classification strategies;

[0023] A data access request is received, and the data access request comprises data index information;

[0024] Based on different preset classification strategies, the legitimacy of candidate key fragments matched with the data index information is respectively verified from the different storage partitions, and the candidate key fragments that pass the verification are determined as valid key fragments;

[0025] The valid key fragments of different types are aggregated to generate the authentication key, and target access data of the data access request is obtained through the authentication key.

[0026] From the above description, first, the authentication key is decomposed into different types of key fragments by using different preset classification strategies, and the different types of key fragments are stored in corresponding storage partitions. Through the distributed storage mechanism, the single point failure risk is eliminated, and the dynamic needs of different application scenarios are adapted. In the data access stage, a multi-dimensional verification mechanism is triggered by data index information, candidate key fragments are matched from different storage partitions, and legitimacy verification is performed, so that only valid key fragments that meet the verification of different preset classification strategies can participate in key reconstruction. Finally, the authentication key is restored by aggregating the valid key fragments, and secure and controllable data access is realized. Different preset classification strategies form a multi-dimensional protection system, which not only improves the security of key storage, but also increases the flexibility of key management.

[0027] Further, it further comprises:

[0028] The current risk index of the system is calculated according to the read-write request frequency, the number of illegal write attempts and the system state of the system, and the risk threshold is calculated according to the historical risk index of the system before the current risk index;

[0029] When the current risk index is greater than the risk threshold, the authentication key is updated, and the step of deriving different types of key fragments from the authentication key according to different preset classification strategies is performed.

[0030] From the above description, by introducing a dynamic risk assessment mechanism, the system can perceive the change of the security environment in real time and actively update the key. The current risk index is calculated based on multiple dimensions such as read-write request frequency, number of illegal write attempts, and system state, and the risk threshold is dynamically generated in combination with historical risk data, so that the key update decision reflects both the immediate threat situation and the long-term security trend. When the risk index exceeds the threshold, the authentication key update process is triggered, the key material is actively rotated, and the long-term penetration of the attacker using the leaked key is effectively blocked. This risk-adaptive key management method not only improves the system's resistance to new attacks, but also reduces the probability of brute force cracking of the key through periodic key update, and the participation of historical risk index in the calculation ensures the scientificity of the threshold setting, avoiding excessive key update caused by temporary risk fluctuations.

[0031] Further, the preset classification strategy includes a space division strategy related to an application data type, a time division strategy related to a key storage time, and a function division strategy related to a key function attribute;

[0032] The key fragments include space fragments corresponding to the space division strategy, time fragments corresponding to the time division strategy, and function fragments corresponding to the function division strategy;

[0033] Deriving different types of key fragments from the authentication key according to different preset classification strategies, and storing the different types of key fragments in different storage partitions corresponding to the preset classification strategies includes:

[0034] According to the space division strategy, space fragments of different application data types are derived from the authentication key, and the space fragments are stored in a first storage partition corresponding to the space division strategy;

[0035] According to the time division strategy, time fragments of different key storage times are derived from the authentication key, and the time fragments are stored in a second storage partition corresponding to the time division strategy;

[0036] According to the function division strategy, function fragments of different key function attributes are derived from the authentication key, and the function fragments are stored in a third storage partition corresponding to the function division strategy.

[0037] As can be known from the above description, in the spatial dimension, the spatial shards are derived according to the application data types and stored in independent partitions, realizing physical isolation of the data types; in the time dimension, the dynamic storage mechanism of the time shards makes the key materials time-sensitive, supporting key rotation and life cycle management; in the function dimension, the functional shards are derived based on the function attributes, ensuring the permission isolation of different function keys. The key shard storage in the three dimensions forms a multi-dimensional protection system, the spatial shards solve the access control problem of data classification storage, the time shards cope with the time-sensitive management requirement of the keys, and the functional shards realize the accurate division of the permission granularity, and the three work together to not only decentralize the single-point risk of the traditional centralized storage, but also provide an extensible architecture foundation for dynamic key management. By decomposing the authentication keys into three types of shards with different security attributes and storing them in different physical partitions, an attacker cannot obtain the complete key by breaking through a single partition, and the combination mechanism of the three types of shards can flexibly adapt to the security requirements of different application scenarios.

[0038] Further, the data access request further includes an application signature of a target application initiating the data access request;

[0039] Before reading and verifying the legality of the candidate key shards matched with the data index information from the different storage partitions based on different preset classification strategies respectively, further comprising:

[0040] Verifying the legality of the target application based on the application signature;

[0041] If the target application is legal, reading and verifying the legality of the candidate key shards matched with the data index information from the different storage partitions based on different preset classification strategies respectively;

[0042] If the target application is not legal, rejecting to respond to the data access request.

[0043] As can be known from the above description, the application signature of the target application is included in the data access request, so that the system can trace the request source. Based on the legality verification of the application signature, the key shard access permission is bound to the trusted application, and only the legal application can trigger the subsequent key shard verification process. This mechanism effectively blocks the key access path of illegal applications, and even if an attacker forges data index information, the application identity verification link cannot be bypassed. The processing mode of directly rejecting the response when the verification fails avoids the risk of probing the key storage partition by invalid requests. By pre-verification of the legality of the application, the access control of the key shards is extended from pure key verification to application layer identity authentication, forming a multi-dimensional security protection system.

[0044] Further, the data index information includes a target data type, a current access time, and a target function attribute;

[0045] reading and verifying the legality of the candidate key shard matching the data index information from the different storage partitions based on different preset classification strategies respectively includes:

[0046] finding a first sub-partition in the first storage partition that stores the candidate space shard of the target data type, and verifying the access authority of the data access request in the first sub-partition based on the space division strategy, if the access authority is verified, determining that the candidate space shard is legal;

[0047] finding a candidate time shard closest to the current access time in the second storage partition, and verifying the validity of the candidate time shard based on the time division strategy, if the validity is verified, determining that the candidate time shard is legal;

[0048] finding a candidate function shard corresponding to the target function attribute in the third storage partition, and verifying the matching of the candidate function shard and the target function attribute based on the function division strategy, if the matching is verified, determining that the candidate function shard is legal.

[0049] From the above description, it can be known that the data index information is decomposed into three dimensions of target data type, current access time and target function attribute, which correspond to the verification conditions of space, time and function shards respectively. In the space dimension, the access control of application data type is realized by limiting the access authority of the first sub-partition, avoiding the risk of cross-partition key access; in the time dimension, the validity verification is performed on the candidate time shard closest to the current access time, ensuring the time validity of the key shard; in the function dimension, the binding relationship between the key shard and the key function is strengthened through the function attribute matching verification. This multi-dimensional verification mechanism not only realizes the dynamic combination verification of the key shard, but also effectively resists the illegal extraction or replay attack of the key shard through the triple protection of space isolation, time window limitation and function binding.

[0050] Further, the first storage partition is located in a hardware encryption module;

[0051] storing the space shard in a first storage partition corresponding to the space division strategy includes:

[0052] dividing the first storage partition into a plurality of first sub-partitions according to application data types, and storing the space shard in the corresponding first sub-partition according to the application data type of the space shard.

[0053] It can be known from the above description that the first storage partition is located in the hardware encryption module and is isolated from the external environment, thereby ensuring the storage security of the first storage partition. The first storage partition is sub-partitioned according to the application data types, so that spatial fragments of different data types are stored in corresponding first sub-partitions in isolation, which not only realizes the physical dispersed storage of key fragments to eliminate single-point failures, but also strengthens access control through storage isolation in the data type dimension. The operation of directional storage according to the application data types of the spatial fragments can support multiple applications to access different spatial keys at the same time and improve the key access efficiency.

[0054] Further, the second storage partition is located in a trusted execution environment;

[0055] storing the time fragments in a second storage partition corresponding to the time division strategy includes:

[0056] The second storage partition is divided into a plurality of second sub-partitions according to different time dimensions, and the time fragments are dynamically stored in corresponding second sub-partitions according to a time interval between a real-time time and a storage time of the time fragments.

[0057] It can be known from the above description that the second storage partition is arranged in the trusted execution environment, and a physical attack protection barrier for the time fragments is formed by using the hardware-level isolation feature, thereby effectively resisting attack means such as fault injection and side channel analysis against the key storage medium. By dividing the second sub-partitions according to different time dimensions, independent storage spaces are established for key fragments of different time efficiencies, thereby avoiding management confusion caused by mixed storage of fragments with large time span differences. The storage position of the fragments is dynamically adjusted according to the time interval between the real-time time and the storage time, thereby realizing a mechanism in which the key fragments are automatically migrated with the change of time efficiency, which not only guarantees the quick access efficiency of recent high-frequency use fragments, but also strengthens the protection strength of historical keys by periodically migrating expired fragments to specific sub-partitions.

[0058] Further, the third storage partition is located in a one-time programmable memory bound with a chip fingerprint;

[0059] storing the function fragments in a third storage partition corresponding to the function division strategy includes:

[0060] In the third storage partition, function index information is created, after the function fragments are stored in the third storage partition, the function attributes and index marks of the function fragments are written into the function index information.

[0061] As can be known from the above description, by setting the third storage partition in the chip fingerprint bound one-time programmable memory (OTP), the physical non-rewritable characteristic of the OTP memory is used to block tampering attempts of the attacker on the function slice, and the chip fingerprint binding mechanism ensures that the storage medium is strongly associated with the physical carrier, thereby improving the anti-physical attack capability from the hardware level. The function index information is created when the storage function slice is created, and the function attribute and index mark are written, thereby constructing the logical mapping relationship between the function slice and the storage medium, which not only facilitates the subsequent verification stage to quickly locate the target slice, but also ensures that the function slice is not illegally replaced through the integrity check of the index information. The operation of jointly writing the function attribute and the index mark realizes the double binding of the function slice metadata and the storage medium, prevents the cloned device from calling the function index information, and makes any illegal extraction or modification behavior on the function slice be detected and found by destroying the integrity of the index information.

[0062] Further, verifying the access permission of the data access request in the first sub-partition based on the space division strategy comprises:

[0063] Obtaining the identity of the target application requesting to access the first sub-partition from the data access request, and detecting whether the target application is located in the access whitelist of the first sub-partition according to the identity.

[0064] As can be known from the above description, when verifying the access permission based on the space division strategy, first, the identity of the target application is extracted from the data access request, and the identity serves as the only credential for the legality of the application; then, whether the application has the permission to access the storage sub-partition is dynamically determined by comparing the identity with the pre-set access whitelist of the first sub-partition. Among them, the space division strategy divides the storage area into multiple isolated sub-partitions according to the application data type, and each sub-partition only allows a specific type of application to access, and the access whitelist mechanism further limits the specific application instance that can access the sub-partition. This double verification mechanism not only avoids the risk that the traditional single storage partition is concentratedly broken through by the attacker, but also prevents unauthorized applications from illegally reading the key slice through the whitelist dynamic filtering mechanism, thereby simultaneously improving the access security of the key slice in the space dimension and the application identity dimension.

[0065] Further, verifying the validity of the candidate time slice based on the time division strategy comprises:

[0066] Obtaining the time interval between the access time and the storage time of the candidate time slice, and judging whether the candidate time slice is located within the valid period according to the time interval.

[0067] From the above description, first, by acquiring the time interval of the access time and the key fragment storage time, the life cycle state of the key fragment is quantified, the time attribute of the key fragment can be accurately captured, and an objective basis is provided for subsequent validity judgment; then, according to the time interval, it is judged whether it is within the effective period, and the dynamic invalidation control of the key fragment is realized through the preset effective period threshold, which not only avoids the key leakage risk caused by long-term storage, but also actively intercepts illegal access requests based on expired key fragments. The storage time interval of the time slice is verified, so that the system can dynamically adjust the available state of the key fragment according to the real-time access demand, effectively solve the problem of rigid key time effectiveness management in the static storage scheme, and at the same time, through the active verification mechanism of the time dimension, block the path of the attacker launching a replay attack by using historical key fragments.

[0068] Further, according to the function index information, it is verified whether the candidate function fragment matches the target function attribute, if yes, the physical chip fingerprint is acquired, and it is compared whether the physical chip fingerprint is consistent with the chip fingerprint of the third storage partition, if consistent, it is determined that the candidate function fragment matches.

[0069] From the above description, according to the function index information, it is verified whether the candidate function fragment matches the target function attribute, which ensures that the function fragment is adapted to the requested function and ensures the correctness of subsequent key reconstruction. At the same time, the physical chip fingerprint of the current device is acquired, which is derived from the unique identification feature of the hardware layer; and it is compared with the chip fingerprint pre-written in the third storage partition. This verification mechanism ensures that the physical carrier of the stored function fragment is not replaced or tampered with, thereby resisting key stealing behavior implemented through physical attack means (such as chip replacement and cloning). By binding the chip fingerprint with the storage partition, not only can illegal physical access to the storage medium be detected, but also the attacker can be prevented from obtaining valid key fragments by forging the storage environment, thereby guaranteeing the non-replicability and integrity of the function fragment storage medium from the hardware layer.

[0070] Another embodiment of the application provides a storage device including a storage chip and a control chip, wherein the storage chip stores a computer program, and the computer program is executed by the control chip to realize each step of the key management method.

[0071] From the above description, first, different preset classification strategies are used to decompose the authentication key into different types of key fragments, and different types of key fragments are stored in corresponding storage partitions. Through the dispersed storage mechanism, the single point failure risk is eliminated, and the dynamic needs of different application scenarios are adapted. In the data access stage, through the data index information, a multi-dimensional verification mechanism is triggered, and the candidate key fragments are matched from different storage partitions and subjected to legality verification, so that only the effective key fragments that meet the verification of different preset classification strategies can participate in the key reconstruction. Finally, the authentication key is restored by aggregating the effective key fragments, and secure and controllable data access is realized. Different preset classification strategies form a multi-dimensional protection system, which not only improves the security of key storage, but also increases the flexibility of key management.

[0072] The above-mentioned key management method and storage device of the application can be applied to the key storage management scene of RPMB. The authentication key (Authentication Key) of RPMB is a 32B size, one-time write type data, mainly stored in a one-time programmable authentication key register. This register cannot be overwritten, erased or read. When processing commands, the RPMB engine in the eMMC controller will use the authentication key stored in it to calculate and verify the MAC, so as to realize the authentication of the identity of the access subject and the integrity protection of the data. Similarly, in order to access the key and update the derived new key, the engine and the hardware encryption module need to be adapted, and a secure storage area needs to be designed in advance to save the new key. The traditional RPMB key storage scheme usually adopts static partition storage, that is, a fixed size of a secure area (such as eMMC RPMB partition) is pre-divided. This storage method has the following problems: high single point failure risk: the attacker can obtain all the keys by breaking through the single layer of protection, and poor storage expansion: fixed partition is difficult to meet the dynamic key derivation demand.

[0073] Based on the above problems, the key management method and storage device provided by the application can effectively improve the security of key storage and the flexibility of key management. The following will be described through specific embodiments:

[0074] Please refer to Figure 1 and Figure 2 , the embodiment one of the application is:

[0075] As shown in Figure 1 , a key management method specifically includes steps S10-S40.

[0076] S10, different types of key fragments are derived from the authentication key according to different preset classification strategies, and different types of key fragments are respectively stored in different storage partitions corresponding to the preset classification strategies.

[0077] Among them, the preset classification strategy refers to the set of strategies that define the mapping relationship between key fragmentation generation rules and storage locations. Specifically, the preset classification strategy includes space partitioning strategy related to application data type, time partitioning strategy related to key storage time, and function partitioning strategy related to key functional attributes.

[0078] Key fragmentation refers to the generation of sub-key units from the authentication key using cryptographic algorithms. Specifically, it can be implemented using key derivation algorithms. Each fragment, stored separately, cannot reconstruct the complete authentication key. Specifically, key fragmentation includes spatial fragmentation corresponding to spatial partitioning strategies, temporal fragmentation corresponding to temporal partitioning strategies, and functional fragmentation corresponding to functional partitioning strategies.

[0079] Storage partitions refer to storage areas with independent access control mechanisms and physical protection features. Specifically, storage partitions can be hardware security modules, trusted execution environments, or one-time programmable memories, reducing the possibility of coordinated attacks through differentiated storage media.

[0080] In the key derivation stage of this invention, the authentication key is decomposed into three types of fragments. During spatial fragment generation, the authentication key can be hashed according to the application data type tag to generate independent spatial fragments; for example, a payment-specific fragment can be generated for payment applications. During time fragment generation, the authentication key can be time-series encrypted with the current timestamp to generate time-sensitive fragments, such as fragments with a validity period of 24 hours. Functional fragment generation uses a functional attribute encoding algorithm to divide the authentication key into encrypted fragments for different functional modules, such as data encryption fragments and identity authentication fragments. In the storage stage, spatial fragments are written to independent sub-partitions of the hardware encryption module, with each sub-partition having an access whitelist; time fragments are stored in dynamic partitions within a trusted execution environment, automatically migrating their storage location according to time intervals; and functional fragments are stored in a one-time programmable memory and bound to a physical chip fingerprint.

[0081] like Figure 2 As shown, specifically, step S10 includes steps S110-S130.

[0082] S110. Based on the space partitioning strategy, space fragments of different application data types are derived from the authentication key, and the space fragments are stored in the first storage partition corresponding to the space partitioning strategy.

[0083] The space partitioning strategy includes a fragmentation rule that logically divides the key according to the application data type. This can be implemented using a data type label matching algorithm, generating a unique fragmentation identifier for each application data type. The first storage partition is located within the hardware encryption module, isolated from the external environment, and offers a high level of security.

[0084] In step S110, storing the spatial slice in the first storage partition corresponding to the spatial division strategy includes step S1101.

[0085] S1101, dividing the first storage partition into a plurality of first sub-partitions according to the application data type, and storing the spatial slice in the corresponding first sub-partition according to the application data type of the spatial slice.

[0086] In a specific application scenario, the RPMB in the smart watch stores sensitive information such as user biometric data, payment transaction data, device access control data, and device communication data. At this time, the first storage partition of the RPMB is divided into a system firmware sub-partition, a payment sub-partition, a social sub-partition, and a sports health sub-partition based on the four application data types (such as system firmware, payment application, social application, and sports health application) defined by the spatial division strategy. The system firmware sub-partition is used to store system-level spatial slices, the payment sub-partition is used to store spatial slices related to payment applications, the social sub-partition is used to store spatial slices for message transmission, and the sports health sub-partition is used to store spatial slices for human biometric data. That is, each sub-partition corresponds to an application type, and each application type is allocated with independent storage space. In this way, it can support multiple applications to access the RPMB area at the same time, improve storage efficiency, and enhance data security.

[0087] S120, deriving time slices of different key storage times from the authentication key according to a time division strategy, and storing the time slices in a second storage partition corresponding to the time division strategy.

[0088] The time division strategy includes a slice rule for dynamically adjusting the slice storage location according to the key storage time, which can be implemented using a timestamp rotation algorithm. Through periodic update of the slice storage location, time management of the key is achieved. The second storage partition is located in a trusted execution environment (such as TEE).

[0089] Specifically, in step S120, storing the time slice in the second storage partition corresponding to the time division strategy includes step S1201.

[0090] S1201, dividing the second storage partition into a plurality of second sub-partitions according to different time dimensions, and dynamically storing the time slice in the corresponding second sub-partition according to the time interval between the real-time time and the storage time of the time slice.

[0091] In a specific application scenario, according to the use cycle and security requirements of the key, the second storage partition of the RPMB is divided into a current sub-partition and a historical sub-partition based on a time dimension (such as month, quarter, or year) defined by a time division strategy. For example, if the time dimension defined by the time division strategy is quarter, the second storage partition of the RPMB is divided into a current quarter sub-partition and a past quarter sub-partition. A quarter clock is configured in the device, and when the number of days accumulates to 90 days, the TEE automatically marks the time slice with a storage time interval exceeding 90 days as a "past quarter time slice", and then migrates the past quarter time slice to the past quarter sub-partition according to a preset rule by tracking the use time of the key slice, while writing the newly generated current quarter time slice to the current quarter sub-partition of the RPMB. In this way, by regularly cleaning up expired keys and performing isolated storage, the risk of key leakage due to long-term use can be effectively reduced, thereby improving data security.

[0092] S130, deriving different key function attributes of the authentication key according to a function division strategy, and storing the function slices in a third storage partition corresponding to the function division strategy.

[0093] The function division strategy includes a slicing rule for slicing and isolating the key according to the function attribute of the key in the system, and can be implemented by using a function attribute coding algorithm to assign a unique function identification code to different function slices. The third storage partition is located in a one-time programmable memory bound to the chip fingerprint. The one-time programmable memory has uniqueness and non-tamperability.

[0094] Specifically, in step S130, storing the function slices in the third storage partition corresponding to the function division strategy includes step S1301.

[0095] S1301, creating function index information in the third storage partition, and writing the function attribute and index mark of the function slice into the function index information after storing the function slice in the third storage partition.

[0096] In a specific application scenario, the authentication key is derived into different function slices according to the function attribute (such as encryption function, signature function, and authentication function) defined by the function division strategy, and function index information is created in the third storage partition of the RPMB, and the function slices are classified and stored and managed according to the function attribute of the different function slices. In this way, fine-grained management of the key is realized, ensuring that each function slice can adapt to different security attributes and access control, improving storage efficiency, and enhancing data security.

[0097] Based on the above steps S110-S130, if the authentication key is to be obtained, three independent security areas must be simultaneously attacked to recombine the authentication key. The three independent security areas are managed in coordination with each other, effectively improving the security of key storage, avoiding the risk that a malicious user only needs to break through a single layer of protection to obtain all the keys, and improving the storage security. At the same time, dynamic division storage is adopted between different independent security areas, avoiding the problems existing in static partitioning in dealing with dynamic derivation requirements, and improving the storage scalability.

[0098] S20, receiving a data access request, the data access request including data index information. The data index information includes target data type, current access time and target function attribute.

[0099] In a specific application scenario, when a user performs a payment operation or message interaction using a smart watch, a data access request is triggered, thereby triggering the authentication key recombination process of the following steps S30-S40.

[0100] The data access request further includes an application signature of a target application initiating the data access request.

[0101] Before step S30, steps S310-S303 are further included.

[0102] S301, verifying the legality of the target application based on the application signature.

[0103] The application signature refers to a digital certificate or hash value used to identify the source of the application program, which can be implemented based on a non-symmetric encryption algorithm. The legality and integrity of the application program can be confirmed by verifying the signature. Legality verification refers to the process of authenticating the identity of the application through a pre-set white list or certificate chain verification mechanism. The digital certificate issued by the certificate authority can be used to implement this as a precondition for key fragment calling, which can prevent unauthorized applications from initiating key operation requests.

[0104] S302, if the target application is legal, then based on different preset classification strategies, candidate key fragments matching the data index information are read from different storage partitions and verified for legality.

[0105] S303, if the target application is not legal, then the data access request is rejected.

[0106] In a specific application scenario, when the system receives a data access request containing an application signature, the signature is first extracted and compared with a pre-stored trusted signature library. For example, the trusted signature library can store application certificate information certified by a device manufacturer or a security agency. If the signature verification fails, the system immediately terminates the subsequent key fragment reading process, preventing illegal applications from triggering key operations. Only when the signature passes the verification, the system allows access to key fragments in different storage partitions according to data index information. This phased processing mechanism separates application layer authentication from key layer fragment verification, reducing the risk of illegal key fragment invocation and resource waste caused by invalid requests.

[0107] S30, based on different preset classification strategies, respectively reading and verifying the legality of candidate key fragments matching the data index information from different storage partitions, and determining the candidate key fragments that pass the verification as valid key fragments.

[0108] Step S30 is to first read candidate key fragments matching the data index information from different storage partitions, then verify the legality of the candidate key fragments read from different storage partitions based on different preset classification strategies, and finally determine the candidate key fragments that pass the verification as valid key fragments.

[0109] Specifically, step S30 includes steps S310-S320.

[0110] S310, find a first sub-partition in the first storage partition that stores a candidate spatial fragment of the target data type, and verify the access authority of the data access request in the first sub-partition based on a spatial division strategy. If the access authority is available, the candidate spatial fragment is determined to be legal.

[0111] In step S310, verifying the access authority of the data access request in the first sub-partition based on the spatial division strategy includes step S3101.

[0112] S3101, obtain the identity of the target application requesting to access the first sub-partition from the data access request, and detect whether the target application is located in the access whitelist of the first sub-partition according to the identity. If yes, the target application is determined to have access authority.

[0113] The spatial division strategy further includes a storage strategy for logically partitioning key fragments according to application data types. Specifically, a hash algorithm can be used to map key fragments of different data types to corresponding first sub-partitions, achieving physical isolation storage of key fragments.

[0114] S320, find a candidate time slice closest to the current access time in the second storage partition, and verify the validity of the candidate time slice based on the time division strategy, and if valid, determine that the candidate time slice is legal.

[0115] In step S320, verifying the validity of the candidate time slice based on the time division strategy includes step S3201.

[0116] S3201, obtain a time interval between the access time and the storage time of the candidate time slice, and determine whether the candidate time slice is within the valid period according to the time interval, and if so, determine that the candidate time slice is valid.

[0117] The time division strategy further includes a storage strategy for dynamically migrating the storage partition of the key slice based on the time dimension, and specifically, a sliding time window algorithm can be used to calculate the time interval between the candidate time slice and the current access time, and through this strategy, the key slice is ensured to be stored in the corresponding time partition.

[0118] In some embodiments, if the candidate time slice is not within the valid period, a key update process is directly triggered to generate a new authentication key, and the above step S10 is returned to execute.

[0119] S330, find a candidate function slice corresponding to the target function attribute in the third storage partition, and verify the matching of the candidate function slice and the target function attribute based on the function division strategy, and if matched, determine that the candidate function slice is legal.

[0120] In step S330, verifying the matching of the candidate function slice and the target function attribute based on the function division strategy includes step S3301.

[0121] S3301, check whether the candidate function slice matches the target function attribute according to the function index information, and if so, obtain the physical chip fingerprint, compare the physical chip fingerprint with the chip fingerprint of the third storage partition, and if consistent, determine that the candidate function slice matches.

[0122] The time division strategy further includes a storage strategy for matching verification of the key function attribute, and specifically, attribute-based encryption technology can be used to generate function index information, and through this strategy, the precise correspondence between the function slice and the operation demand is realized.

[0123] In a specific application scenario, when a data access request containing a target data type is received, the system first locates a first sub-partition corresponding to the target data type in a hardware encryption module (HSM), reads a space shard in the first sub-partition, and checks whether the identity of the target application initiating the data access request exists in the access whitelist of the first sub-partition, for example, a payment application can only access a payment sub-partition, if yes, the space shard corresponding to the target data type is obtained. Secondly, the storage time interval of the time shard is obtained in the trusted execution environment (TEE), and it is checked whether the storage time interval of the time shard is less than the preset period of days or whether the risk score is less than the preset threshold, if yes, it is determined that the time shard is within the valid period, and the time shard is obtained. Finally, the function shard is read in the one-time programmable memory (OTP), the target function attribute in the data access request is checked through the function index information to verify whether the function attribute of the obtained function shard matches, and at the same time, it is verified whether the chip fingerprint bound by the OTP is consistent with the physical chip fingerprint of the device hardware, if matching and consistent, the function shard is obtained.

[0124] S40, different types of valid key shards are aggregated to generate an authentication key, and the target access data of the data access request is obtained through the authentication key.

[0125] In some embodiments, aggregating different types of valid key shards to generate an authentication key is specifically: in the trusted execution environment, the space shard, the time shard and the function shard verified by the legality are aggregated into a complete authentication key through a key derivation algorithm (HKDF), and the key plaintext only exists temporarily in the trusted execution environment during the aggregation process and is cleared immediately after use. The aggregation calculation formula can be specifically represented as: AuthKey=Key_Space⊕Key_Time⊕Key_Func, wherein AuthKey represents the authentication key obtained by aggregation, Key_Space represents the legal space shard, Key_Time represents the legal time shard, Key_Func represents the legal function shard, and ⊕ represents aggregation calculation.

[0126] Embodiment two of the application is:

[0127] A key management method, which is different from embodiment one in that it further includes steps S50-S60.

[0128] S50, calculate the current risk index of the system according to the read-write request frequency, the number of illegal write attempts and the system state of the system, and calculate the risk threshold according to the historical risk index of the system before the current risk index.

[0129] The read-write request frequency of the system refers to the number of data read-write operations received by the system per unit time, which can be realized by using a counter to count the number of requests in real time, and is used to reflect the current business load and potential security pressure of the system. The number of illegal write attempts refers to the number of write attempts by unauthorized entities detected, which can be realized by monitoring system logs or interception records of security modules, and is used to quantify the activity level of attack behavior. The system state includes hardware resource occupancy, running process state or security module working state, which can be realized by checking the Boot state and firmware version hash value, and is used to evaluate the overall running health of the system.

[0130] S60, updating the authentication key when the current risk index is greater than the risk threshold, and performing step S10.

[0131] The current risk index refers to the real-time security risk evaluation value calculated based on the above parameters by weighting, which can be dynamically evaluated by linear weighting or machine learning model, and is used to comprehensively judge the security threat level faced by the system. The historical risk index refers to the record set of system risk index in the past period of time, which can be realized by using time series database to store historical data, and is used to analyze risk trend and establish dynamic threshold benchmark. The risk threshold refers to the security risk threshold dynamically adjusted according to the historical risk index, which can be calculated by using sliding window statistics or adaptive algorithm, and is used as the basis for judging the trigger of key update operation.

[0132] It should be noted that when the authentication key update is completed, the old authentication key is still available during this time, and the new and old keys exist at the same time. The key version management is performed to record the update history of each key. When updating the key, the key version number is incremented. The system is configured to use only the latest version of the key when performing operations.

[0133] In a specific application scenario, the read-write request frequency of the system is specifically the read-write request frequency after standardization processing, to obtain a quantitative value between 0 and 1. The standardization processing is specifically:

[0134] ;

[0135] Wherein, norm_rw represents the read-write request frequency after standardization processing, read_write_freq represents the read-write request frequency, and MAX_RE_FREQUENCY represents the maximum read-write request frequency allowed by the system.

[0136] In a specific application scenario, the number of illegal write attempts of the system is specifically the number of illegal write attempts after standardization processing, to obtain a quantitative value between 0 and 1. The standardization processing is specifically:

[0137] ;

[0138] wherein norm_illegal_w represents the normalized illegal write attempt number, illegal_writes represents the illegal write attempt number, and MAX_ILLEGAL_ATTEMPTS represents the maximum tolerated illegal write attempt number of the system.

[0139] In a specific application scenario, the system state is normalized by the Boot state and the firmware version hash value to obtain a quantitative value between 0 and 1. The normalization is specifically as follows:

[0140] ;

[0141] wherein system_score represents the normalized system state.

[0142] In a specific application scenario, the current risk index of the system is calculated according to the read-write request frequency, the illegal write attempt number, and the system state of the system, specifically as follows:

[0143] ThreatScore = norm_rw x w r + norm_illegal x w i + (1 - system_score) x w s x 100.

[0144] wherein ThreatScore represents the current risk index, w r norm_rw represents the weight value of the read-write request frequency, w i norm_illegal represents the weight value of the illegal write attempt number, w s and system_score represents the weight value of the system state. In the embodiment, norm_rw = 0.4, norm_illegal = 0.4, and system_score = 0.2. w r w i w s

[0145] In a specific application scenario, the risk threshold is calculated according to the historical risk indexes of the system before the current risk index, specifically as follows:

[0146] ;

[0147] wherein RiskThreshold represents the risk threshold, ​​​average value of historical risk index, standard deviation of historical risk index, sensitivity coefficient (default value is 0.2), TS min lower limit value of current risk index (default value is 30), TS max upper limit value of current risk index (default value is 80).

[0148] In the system initialization phase or when the historical risk index data is insufficient, and the default values of the risk threshold are set as:

[0149] ;

[0150] ;

[0151] wherein, represents the initial average value, represents the initial standard deviation.

[0152] In some embodiments, the authentication key is updated when the time decay index of the system is less than a time threshold, and the above step S10 is performed. Wherein, the time decay index , represents the decay rate constant, the larger the decay rate constant is, the faster the decay is, represents the time interval elapsed from the last update of the key to the current time. The time threshold T t is 0.2 by default. In this way, the key update mechanism can be triggered when the current risk index is greater than the risk threshold or the time decay index of the system is less than the time threshold.

[0153] In some embodiments, other related data such as random numbers, time stamps, device identifiers, etc. may also be used in the process of deriving the key update. Accuracy checks need to be performed on these data to ensure that they meet the expected format and range. For example, check whether the random number has sufficient randomness, whether the time stamp is within a reasonable range, whether the device identifier matches the actual device, etc. to prevent problems in key update derivation due to incorrect or malicious data input.

[0154] Further, due to the dynamic updating mechanism of the authentication key, the host no longer has the previous fixed authentication key, and thus needs to interact with the device for the authentication key. The host and the device interact with each other for the authentication key in the following manner: the host and the device negotiate a shared key based on a pre-defined signature key pair through a digitally signed Diffie-Hellman key exchange protocol; then, a session key for subsequent secure communication is derived from the shared key by using a key derivation function; and finally, a secure channel is established based on the session key to perform encrypted transmission and updating of the authentication key.

[0155] In a specific application scenario, the method for the host and the device to interact with each other for the authentication key includes steps a-g.

[0156] Step a: parameter negotiation and initialization.

[0157] The host and the device negotiate or jointly adopt a set of pre-defined Diffie-Hellman parameters, including a large prime number p and a primitive root g. This step ensures that the subsequent calculations are based on the same mathematical foundation.

[0158] Step b: key pair generation.

[0159] The device generates its temporary Diffie-Hellman key pair: a private key a_dh is randomly generated, and a corresponding public key A_dh=g^(a_dh)modp is calculated.

[0160] The host generates its temporary Diffie-Hellman key pair: a private key b_dh is randomly generated, and a corresponding public key B_dh=g^(b_dh)modp is calculated.

[0161] Step c: public key signing.

[0162] In order to resist man-in-the-middle attacks and achieve identity authentication, the generated Diffie-Hellman public keys are digitally signed by using a pre-defined, asymmetric signature key pair.

[0163] The device uses its device signature private key priv_dev_sign to sign the public key A_dh, obtaining a signature value Sig_A=sign(A_dh,priv_dev_sign).

[0164] The host uses its host signature private key priv_host_sign to sign the public key B_dh, obtaining a signature value Sig_B=sign(B_dh,priv_host_sign).

[0165] Step d: exchange and verify signed public keys.

[0166] The device sends the signed public key data set (A_dh, Sig_A) to the host.

[0167] Upon receiving, the host verifies the validity of the signature Sig_A for A_dh using the pre-acquired device signing public key pub_dev_sign. If the verification fails, the process is immediately aborted.

[0168] The host sends the signed public key data set (B_dh, Sig_B) to the device.

[0169] Upon receiving, the device verifies the validity of the signature Sig_B for B_dh using the pre-acquired host signing public key pub_host_sign. If the verification fails, the process is immediately aborted.

[0170] Step e: Calculate the shared secret.

[0171] If both signature verifications are successful, both parties can calculate the same shared secret S.

[0172] The device calculates: S_device = (B_dh)^(a_dh) mod p.

[0173] The host calculates: S_host = (A_dh)^(b_dh) mod p.

[0174] According to the principle of the Diffie-Hellman key exchange protocol, mathematically S_device = S_host. Both parties determine this value as the shared secret S.

[0175] Step f: Derive session keys.

[0176] The host and the device use a pre-agreed key derivation function (KDF), such as the HMAC-based key derivation function (HKDF), to expand and strengthen the shared secret S.

[0177] The inputs of the KDF include: the shared secret S as the initial key material (IKM); an optional salt value (salt) to increase the entropy source and resist rainbow table attacks; and an optional context information (info) to bind the derived key with a specific application context, achieving key separation.

[0178] By executing the KDF, both parties derive one or more session keys, such as including a key K_session_enc for encryption and a key K_session_mac for message authentication.

[0179] Step g, establishing secure communication and updating the key.

[0180] The host and the device use the derived session key (K_session_enc, K_session_mac) to establish a secure and authenticated communication channel according to a predetermined secure communication protocol (such as AEAD-based encryption). Through this secure channel, the host can securely transmit the new RPMB authentication key or related key update instructions to the device in an encrypted and authenticated manner. After receiving and verifying, the device can complete the secure update operation of the authentication key.

[0181] In this way, the source of the Diffie-Hellman public key is verified through digital signature, effectively resisting man-in-the-middle attacks, greatly improving the overall security of the Diffie-Hellman key exchange. Using a key derivation function (KDF) to process the shared secret can generate session keys with excellent cryptographic properties, enhancing the strength of the final key material. Secure key separation can be achieved, deriving multiple independent and differently used keys from one shared key, reducing the risk of single key leakage. And it can derive keys of different lengths as needed, adapt to various encryption algorithms and security protocols, and have good flexibility and adaptability.

[0182] Please refer to Figure 3 Embodiment three of the present application is:

[0183] A storage device 100 includes a storage chip 101 and a control chip 102, the storage chip 101 stores a computer program, the computer program is executed by the control chip 102 to realize each step in the key management method of one of the above-mentioned embodiment one or embodiment two.

[0184] In summary, the application provides a key management method and a storage device, which realizes the unity of key security and flexible management through multi-dimensional protection and dynamic update mechanism. Firstly, three types of preset classification strategies of space, time and function are adopted to decompose the authentication key into corresponding fragments and store them in different security level independent partitions such as hardware encryption module, trusted execution environment and OTP memory bound with chip fingerprint, thereby completely eliminating the single point failure risk of traditional centralized storage, and effectively resisting physical attacks, side channel analysis and illegal tampering through the combination of physical isolation and logical isolation. Secondly, the dynamic risk index based on real-time behavior and historical state calculation of the system is introduced to trigger active key rotation, so that the system has adaptive defense capability against persistent and new attacks. In the data access stage, multiple security mechanisms such as application signature verification, multi-dimensional key fragment legality verification and chip fingerprint comparison are used to ensure that only the legal application can aggregate and restore the authentication key under the condition of meeting the space-time and function constraints, thereby greatly improving the security threshold of the key reconstruction process. The method not only significantly enhances the resilience of the system against replay attacks, key leakage and unauthorized access, but also supports dynamic security management requirements in complex application scenarios through flexible policy configuration, and realizes the organic balance of security, efficiency and scalability.

[0185] In the above-described embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media and electronic devices can be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there can be another division manner in actual implementation, for example, a plurality of components or modules can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed components can be indirect coupling or communication connection through some interfaces, devices or components, and can be electrical, mechanical or other forms.

[0186] The components described as separate components may or may not be physically separate, and the components shown as components may or may not be physical modules, i.e., they can be located in one place or distributed on multiple network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the embodiments.

[0187] In addition, the functional modules in each embodiment of the application can be integrated into one processing module, or each component can exist physically, or two or more modules can be integrated into one module. The above integrated module can be realized in the form of hardware or in the form of a software functional module.

[0188] The integrated module, if implemented in the form of a software function module and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc.

[0189] It should be noted that, for the foregoing method embodiments, in order to facilitate description, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0190] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0191] The above only describes the embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent transformation or direct or indirect application in the related technical field based on the content of the specification and drawings of the present application is also included in the patent protection scope of the present application.

Claims

1. A key management method, characterized in that, include: Different types of key fragments are derived from the authentication key according to different preset classification strategies, and the different types of key fragments are stored in different storage partitions corresponding to the preset classification strategies. Receive a data access request, the data access request including data index information; Based on different preset classification strategies, the legality of candidate key fragments that match the data index information is read from different storage partitions and verified, and the candidate key fragments that pass the verification are determined as valid key fragments. The valid keys of different types are fragmented and aggregated to generate the authentication key, and the target access data of the data access request is obtained through the authentication key.

2. The key management method according to claim 1, characterized in that, Also includes: The current risk index of the system is calculated based on the system's read and write request frequency, the number of illegal write attempts, and the system status. The risk threshold is calculated based on the system's historical risk indices prior to the current risk index. When the current risk index is greater than the risk threshold, the authentication key is updated, and the step of deriving different types of key fragments from the authentication key according to different preset classification strategies is performed.

3. The key management method according to claim 1, characterized in that, The preset classification strategy includes a spatial partitioning strategy related to the application data type, a time partitioning strategy related to the key storage time, and a functional partitioning strategy related to the key functional attributes. The key fragmentation includes spatial fragmentation corresponding to the spatial partitioning strategy, time fragmentation corresponding to the time partitioning strategy, and functional fragmentation corresponding to the functional partitioning strategy; Different types of key fragments are derived from the authentication key according to different preset classification strategies, and the different types of key fragments are stored in different storage partitions corresponding to the preset classification strategies, including: Based on the space partitioning strategy, space fragments of different application data types are derived from the authentication key, and the space fragments are stored in the first storage partition corresponding to the space partitioning strategy. According to the time partitioning strategy, time slices with different key storage times are derived from the authentication key, and the time slices are stored in the second storage partition corresponding to the time partitioning strategy. Based on the functional partitioning strategy, functional fragments with different key functional attributes are derived from the authentication key, and the functional fragments are stored in a third storage partition corresponding to the functional partitioning strategy.

4. The key management method according to claim 1, characterized in that, The data access request also includes the application signature of the target application that initiated the data access request; Before reading and verifying the legality of candidate key fragments matching the data index information from different storage partitions based on different preset classification strategies, the process further includes: The legitimacy of the target application is verified based on the application signature; If the target application is legitimate, then based on different preset classification strategies, the legitimacy of candidate key fragments that match the data index information are read from and verified from different storage partitions. If the target application is illegitimate, the data access request will be refused.

5. A key management method according to claim 3, characterized in that, The data index information includes the target data type, current access time, and target functional attributes; Based on different preset classification strategies, the legality of candidate key fragments matching the data index information is read from different storage partitions and verified, including: In the first storage partition, find the first sub-partition that stores the candidate space fragment of the target data type, and verify the access permission of the data access request in the first sub-partition based on the space partitioning strategy. If the access permission is granted, the candidate space fragment is determined to be valid. In the second storage partition, find the candidate time slice that is closest to the current access time, and verify the validity of the candidate time slice based on the time partitioning strategy. If it is valid, then determine that the candidate time slice is legal. In the third storage partition, a candidate function fragment corresponding to the target function attribute is searched, and the matching between the candidate function fragment and the target function attribute is verified based on the function partitioning strategy. If they match, the candidate function fragment is determined to be valid.

6. The key management method according to claim 3, characterized in that, The first storage partition is located in the hardware encryption module; Storing the space fragments in a first storage partition corresponding to the space partitioning strategy includes: The first storage partition is divided into multiple first sub-partitions according to the application data type, and the space fragments are stored in the corresponding first sub-partitions according to the application data type of the space fragments.

7. The key management method according to claim 3, characterized in that, The second storage partition is located in a trusted execution environment; Storing the time slices in a second storage partition corresponding to the time partitioning strategy includes: The second storage partition is divided into multiple second sub-partitions according to different time dimensions, and the time slice is dynamically stored in the corresponding second sub-partition according to the time interval between the real time and the storage time of the time slice.

8. A key management method according to claim 5, characterized in that, The third storage partition is located in a one-time programmable memory that is bound to the chip fingerprint; Storing the functional fragments in a third storage partition corresponding to the functional partitioning strategy includes: In the third storage partition, functional index information is created. After storing the functional fragment in the third storage partition, the functional attributes and index tags of the functional fragment are written into the functional index information.

9. A key management method according to claim 5, characterized in that, Verifying the access permissions of the data access request in the first sub-partition based on the spatial partitioning strategy includes: The identity identifier of the target application requesting access to the first sub-partition is obtained from the data access request, and the target application is detected as being in the access whitelist of the first sub-partition based on the identity identifier. If so, it is determined that the target application has access rights.

10. A key management method according to claim 5, characterized in that, Verifying the effectiveness of the candidate time slices based on the time partitioning strategy includes: Obtain the time interval between the access time and the storage time of the candidate time segment, and determine whether the candidate time segment is within the validity period based on the time interval. If so, determine that the candidate time segment is valid.

11. A key management method according to claim 8, characterized in that, Verifying the matching between the candidate function fragments and the target function attributes based on the function partitioning strategy includes: According to the function index information, verify whether the candidate function segment matches the target function attribute. If so, obtain the physical chip fingerprint and compare whether the physical chip fingerprint is consistent with the chip fingerprint of the third storage partition. If they are consistent, determine that the candidate function segment matches.

12. A storage device comprising a storage chip and a control chip, wherein the storage chip stores a computer program, characterized in that, When the computer program is executed by the control chip, it implements the various steps of a key management method as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method for realizing access authority authentication, chip and terminal

    CN115906123A

  • Systems, devices and methods for protecting and exchanging electronic computer files

    US20190121989A1