Silicon-based trust root-based integrated data chip encryption solidification method and system
By sub-data splitting and hashing of the silicon-based root of trust data hardening method, combined with state counters and completion tag management, the power failure reset problem in the silicon-based root of trust data hardening process is solved, improving security and reliability, reducing the waste rate of hardening slots, and saving chip space.
Patent Information
- Application Number
- CN202611666082.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-27
- Publication Date
- 2026-11-24
AI Technical Summary
In the existing technology for data solidification of silicon-based root of trust, there is uncertainty in the semi-programmed state of the solidified slot due to power failure and reset, which makes it impossible to reuse securely. Furthermore, the multi-copy management mechanism leads to a high waste rate of solidified slots, increasing the chip area requirement.
By splitting the data to be solidified into sub-data and generating session anchors and expected hash values, setting status counters and completion tags, performing dual verification and tag management, we ensure that the data is written in order and the progress is recorded, avoiding the overwriting of half-written slots after a power outage, and persistently recording the progress using a completion bitmap.
It improves the security and reliability of silicon-based root of trust under abnormal power failure scenarios, prevents data from being truncated or out of order, reduces the waste rate of the solidification slots, and saves chip space.
Smart Images

Figure CN123158665A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of silicon-based root of trust encryption and hardening technology, specifically to an integrated data chip encryption and hardening method and system based on silicon-based root of trust. Background Technology
[0002] Silicon-based root trusts typically use one-time programmable memory (IPM) to store critical data such as root keys, device identities, configuration parameters, and firmware digests. This type of memory physically only supports unidirectional writing; programmed cells cannot be erased or rolled back, thus requiring extremely high reliability and security during the writing process. Traditional storage methods often write sequentially at fixed addresses, lacking atomicity protection and persistent progress tracking. If a power outage, reset, or fault injection occurs during writing, the memory cell being programmed may be in a semi-programmed state, its physical state uncertain. This makes it impossible to securely reuse the memory and makes it difficult to determine whether valid data has been written to the slot.
[0003] In existing technologies, traditional multi-replica tagging methods typically pre-allocate multiple fixed-size physical replicas for the same configuration item. Each replica contains a set of consecutive firmware slots, and valid tags are used to identify available replicas to enable multiple writes and tolerate power loss risks. However, this multi-replica mechanism relies on coarse-grained whole-replica management: if a replica experiences a power loss and reset during writing, the system either performs breakpoint resumption, reducing chip security, or classifies the entire replica group as corrupted and discards it, resulting in the sacrifice of unused slots. This significantly increases the discard rate of firmware slots, especially in power loss scenarios requiring multiple retries. Since firmware slots are non-volatile storage resources, an increased discard rate means more physical slots are needed to support the same number of firmware writes, thus increasing chip area requirements and hindering chip miniaturization.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide an integrated data chip encryption and solidification method and system based on silicon-based root of trust, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The method for encryption and hardening of integrated data chips based on silicon-based root of trust includes the following steps: S1: The initial data to be solidified is split into several groups of sub-data. Based on each group of sub-data and its corresponding sequence index, hash obfuscation is performed to obtain the session anchor, the expected hash value of each group of sub-data and the data digest. Then, the total number of sequence numbers of the sub-data, the session anchor and all expected hash values are concatenated and encrypted to obtain the encrypted master data. The encrypted master data and the sub-data are sent together to the silicon-based root of trust. S2: The silicon-based root of trust decrypts the encrypted master data to obtain the total number of sequence numbers of the sub-data, the session anchor point and all expected hash values. It then identifies the writable slots and starting addresses in the one-time programmable memory and sets a status counter for each slot to achieve one-to-one matching with the sub-data. S3: The count value of the status counter is compared with the sequence index of the sub-data to be written to perform the first verification of the data. If the first verification is passed, the sub-data, the count value and the session anchor are hashed and obfuscated to obtain the binding hash value of the sub-data. Then, it is compared with the corresponding expected hash value to perform the second verification. The sub-data that passes the second verification is written to the corresponding solidification slot for encryption and solidification. S4: Set a binary completion tag for each curing slot, and construct a completion bitmap of the silicon-based root of trust based on all completion tags. When a writable curing slot is cured, synchronously update the completion tag, completion bitmap and status counter of the next curing slot. S5: If the silicon-based root of trust does not experience a power failure reset during the encryption and solidification process, repeat steps S3~S4 until all sub-data is solidified. If the silicon-based root of trust experiences a power failure reset during the encryption and solidification process, determine whether the silicon-based root of trust has completed the encryption and solidification process before the power failure reset based on the completion bitmap of the silicon-based root of trust. S6: If the silicon-based root of trust has completed the encryption and hardening process before the power-off reset, the subsequent steps will not be executed. If the silicon-based root of trust has not completed the encryption and hardening process before the power-off reset, steps S2 to S5 will be executed again until all sub-data is hardened.
[0007] Preferably, the data digest is obtained by concatenating the sub-data with the sequence index and then calculating it using a hash algorithm; the session anchor is obtained by concatenating the total number of sequence numbers of the sub-data with all data digests and then calculating it using a hash authentication code algorithm; the expected hash value is obtained by concatenating the data digest of the corresponding sub-data with the session anchor and then calculating it using a hash algorithm; and the encrypted master data is encrypted using a pattern encryption algorithm.
[0008] Preferably, the working logic for identifying the writable hardened slots in the one-time programmable memory is as follows: A binary valid tag is set for each curing slot. A tag value of 1 indicates that the curing slot is writable, and a tag value of 0 indicates that the curing slot is not writable. When no sub-data is written in the curing slot, the tag value of the valid tag at that position is initially 1. When the curing slot is ready to write sub-data, the tag value of the valid tag at that position is flipped to 0.
[0009] Preferably, the mode encryption algorithm adopts the AES-256-GCM encryption algorithm with authentication, and the hash authentication code algorithm adopts the HMAC-SHA-256 algorithm.
[0010] Preferably, during the encryption and solidification process, after sub-data is written to a certain writable solidification slot, the count value of the state counter of that solidification slot is incremented by 1 and used as the count value of the state counter of the next solidification slot. The count value of the state counter of the first writable solidification slot is initially 1, and the count values of the state counters of the other writable solidification slots are initially empty.
[0011] Preferably, the verification logic in step S3 is as follows: The count value of the status counter of the solidification slot is compared with the sequence index of the sub-data to be written. If and only if the two are equal, the sequence number of the sub-data to be written is considered to be correct, and the verification passes once. After one verification, the sub-data is concatenated with the count value and the intermediate parameter is calculated using a hash algorithm. Then, the intermediate parameter is concatenated with the session anchor and the binding hash value is calculated using a hash algorithm. The binding hash value is compared with the corresponding expected hash value. If and only if the two are equal, the sub-data content to be written is considered correct and the secondary verification passes.
[0012] Preferably, the completion bitmap is a set of tag values for completion tags of all curing slots, and the tag value of the completion tag is initially 0 when no sub-data is written in the curing slot, and the tag value is flipped to 1 after sub-data is written in the curing slot.
[0013] Preferably, when the silicon-based root of trust experiences a power failure and reset, the continuity of the completion bitmap is checked. If and only if there are continuous and uninterrupted tag values 1, and the number of tag values 1 is equal to the total number of sub-data sequence numbers, the silicon-based root of trust is considered to have completed the encryption and solidification process before the power failure and reset.
[0014] An integrated data chip encryption and hardening system based on a silicon-based root of trust, wherein the encryption and hardening system is used to execute the above-mentioned encryption and hardening method, specifically including: The data encryption module is used to split the initial data to be solidified into several groups of sub-data, perform hash obfuscation based on each group of sub-data and its corresponding sequence index to obtain the session anchor, the expected hash value of each group of sub-data and the data digest, and then concatenate the total number of sequence numbers of the sub-data, the session anchor and all expected hash values to encrypt the encrypted master data, and send the encrypted master data and sub-data together to the silicon-based root of trust. The data decryption module is used to control the silicon-based root of trust to decrypt the encrypted master data, obtain the total number of sequence numbers of the sub-data, the session anchor point and all expected hash values, and then use the multi-copy effective tag method to identify the writable fixed slots and starting addresses in the one-time programmable memory, and set a status counter for each fixed slot to achieve one-to-one matching with the sub-data. The data verification module is used to compare the count value of the status counter with the sequence index of the sub-data to be written to perform the first verification of the data. If the first verification is passed, the sub-data, the count value and the session anchor are hashed and obfuscated to obtain the binding hash value of the sub-data. Then, it is compared with the corresponding expected hash value to perform the second verification. The sub-data that passes the second verification is written to the corresponding solidification slot for encryption and solidification. The data update module is used to set a binary completion label for each curing slot and construct a completion bitmap of silicon-based root of trust based on all completion labels. When a writable curing slot is cured, the completion label, completion bitmap and status counter of the next curing slot are updated synchronously. The power failure detection module is used to repeat steps S3 to S4 until all sub-data is cured when the silicon-based root of trust does not experience a power failure reset during the encryption and curing process. When the silicon-based root of trust experiences a power failure reset during the encryption and curing process, the module determines whether the silicon-based root of trust has completed the encryption and curing process before the power failure reset based on the completion bitmap of the silicon-based root of trust. The state reset module is used to prevent subsequent steps from being executed when the silicon-based root of trust has completed the encryption and solidification process before power failure and reset, and to re-execute steps S2 to S5 when the silicon-based root of trust has not completed the encryption and solidification process before power failure and reset, until all sub-data is solidified.
[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention binds sub-data with sequence indexes and generates session anchors and expected hash values, performing both temporal and cryptographic dual verification before writing to ensure that sub-data is written in order and its content is not tampered with. Furthermore, by setting valid tags and completion tags for each solidified slot, the slot is locked during the writing process, preventing secondary overwriting of partially written slots after a power outage. A completion bitmap is used to persistently record the solidification progress, allowing the first clean slot to be located and the complete solidification process to restart after a power outage reset simply by scanning the tags. Finally, the correspondence between a status counter and a sequence index ensures consistent order during rewriting. This not only effectively prevents the risk of data being truncated, spliced, or replayed out of order, but also eliminates the need for complex mapping tables or volatile storage to record progress, thus greatly improving the security and reliability of silicon-based root of trust in abnormal power outage scenarios. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a schematic diagram of the module structure of the encryption and solidification system in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0019] Example: Please see Figure 1 The present invention provides a technical solution: The method for encryption and hardening of integrated data chips based on silicon-based root of trust includes the following steps: S1: Initial data to be solidified Divide into several sub-data groups, and represent as ,in Indicates the ordinal index of the sub-data. The total number of sequence numbers of the sub-data is represented. Based on each group of sub-data and its corresponding sequence number index, hash obfuscation is performed to obtain the session anchor, the expected hash value of each group of sub-data and the data digest. Then, the total number of sequence numbers of the sub-data, the session anchor and all expected hash values are concatenated and encrypted to obtain the encrypted master data. The encrypted master data and the sub-data are sent together to the silicon-based root of trust.
[0020] The data digest is calculated by concatenating sub-data with sequence indexes and then using a hash algorithm, that is: In the formula Indicates the first Data summary of each sub-data, This represents the standard SHA-256 hash algorithm. This represents the byte concatenation operator.
[0021] This step is equivalent to the first level of hash nesting, which binds data to time sequence to ensure that the order of sub-data cannot be changed.
[0022] The session anchor is calculated by concatenating the total number of sub-data items with all data digests and then applying a hash authentication code algorithm, i.e.: In the formula Indicates the session anchor point. This indicates a hash authentication code algorithm based on the standard SHA-256. This represents the first key.
[0023] This step is equivalent to a second layer of hash nesting. Its purpose is to solidify the total number of sequence numbers of all sub-data, all data digests, and the first key into an immutable global fingerprint. Any minor alteration to a single sub-data item will destroy this global fingerprint of the session anchor, thereby causing all subsequent expected hash values to become invalid.
[0024] The expected hash value is calculated by concatenating the data digest of the corresponding sub-data with the session anchor and then using a hash algorithm, that is: In the formula Indicates the first The expected hash value of each sub-data.
[0025] This step is equivalent to a third level of hash nesting, which serves to feed the session anchor back to each sub-data.
[0026] The encrypted master data is encrypted using a pattern encryption algorithm, which means that the total number of sequence numbers of the sub-data is first calculated. Conversation anchors and all expected hash values The data is combined into a plaintext block, then encrypted using the second key using AES-256-GCM to obtain the final encrypted master data, i.e.: In the formula Indicates encrypted master data, This indicates an AES-256-GCM encryption algorithm with authentication. This represents the second key. The first and second keys used in the two computations can be different keys, or two different subkeys can be derived from the hardware root key of the silicon-based root of trust using a standard one-way function combined with different context labels. In practical use, AES-256-GCM uses a unique initialization vector generated by a hardware random number generator (or monotonic counter) within the silicon-based root of trust for each encryption, under the same second key. This initialization vector is sent to the silicon-based root of trust along with the encrypted master data. During decryption, the freshness of the initialization vector is first verified, and the HMAC input of the session anchor is incorporated, ensuring that different fixed sessions using the same initialization data generate different encrypted master data, preventing replay of complete old sessions.
[0027] S2: The silicon-based root of trust decrypts the encrypted master data to obtain the total number of sequence numbers of the sub-data, the session anchor point and all expected hash values. It then identifies the writable slots and starting addresses in the one-time programmable memory and sets a status counter for each slot to achieve one-to-one matching with the sub-data.
[0028] The working logic for identifying the writable hardened slots in a one-time programmable memory is as follows: A binary valid tag is set for each curing slot. A tag value of 1 indicates that the curing slot is writable, and a tag value of 0 indicates that the curing slot is not writable. When no sub-data is written in the curing slot, the tag value of the valid tag at that position is initially 1. When the curing slot is ready to write sub-data, the tag value of the valid tag at that position is flipped to 0.
[0029] The valid tag acts as a hardware write mutex. The moment sub-data is about to be written, the hardened slot is logically set to "unwritable." This ensures the slot remains isolated during normal operation or in the event of a power outage, preventing the risk of overwriting the slot after a subsequent power failure. Since there's an objective timing interval between the writing of the two sets of sub-data, logically, the update should occur at the "ready to write" node. However, in practice, the update should occur after the previous hardened slot's sub-data is written. These are simply different descriptions of the same node and are essentially the same. In other words, it's equivalent to pre-setting the valid tag of the next hardened slot to zero. The starting address addressing method also doesn't require maintaining a complex bad block mapping table like traditional technologies, nor does it rely on silicon-based root-of-trust RAM to record "where it was last written to." By scanning the status of the valid tag, the physical address of the first clean, writable hardened slot can be located within a very short number of clock cycles.
[0030] During the encryption and solidification process, after sub-data is written to a certain writable solidification slot, the count value of the state counter of that solidification slot is incremented by 1 and used as the count value of the state counter of the next solidification slot. The count value of the state counter of the first writable solidification slot is initially 1, and the count values of the state counters of the other writable solidification slots are initially empty.
[0031] The status counter is implemented by a volatile register of a silicon-based root of trust. It is only persistently recorded by non-volatile valid tags and completion tags, and is not used to persistently record the curing progress. After power failure and reset, the first clean and writable curing slot with a valid tag of 1 is located by scanning the valid tags of each slot, and its status counter is initialized to 1. After that, the counter of the next slot is incremented by 1 after each slot is cured.
[0032] For example, in this embodiment, it is assumed that there are 8 curing slots, which need to be written sequentially. The four sub-data items are initially written to the first curing slot, and then the third sub-data item is written next. At this time, the status counter of the 4th curing slot is empty. If power is cut off at this time, the valid tags of the 8 curing slots will be represented as 00011111 respectively. After reset, the first 3 curing slots are unwritable. Therefore, the first clean and writable curing slot is the 4th slot, and the corresponding status counter is initialized to 1. Start rewriting sequentially; if it's the 3rd sub-data... Power is turned off only after the writing is complete. Therefore, the valid tag for the 8 hardened slots can be represented as 00001111, making the 5th hardened slot the first clean and writable slot. This is equivalent to sacrificing one hardened slot as a safety redundancy, eliminating the timing uncertainty of whether the "power outage" event occurs before or after the "state update." This not only allows for rapid initialization of the first writable hardened slot after a power outage reset but also ensures the purity of the first writable hardened slot found after a power outage restart. This ensures that the state counter's count value and the sub-data sequence index are theoretically consistent during the rewriting process.
[0033] In other words, during a normal encryption and hardening process, the count value of the state counter of the hardening slot should be the same as the sequence index of the sub-data to be written. This method is equivalent to a cascaded design, which constructs a unidirectional irreversible state pipeline in the control logic of the discrete hardening slots. It not only realizes a one-to-one mapping between the hardening slots and the sub-data, but also ensures at the hardware level that the sub-data can only be written one by one according to the sequence index, avoiding the risk of out-of-order writing and skipping steps.
[0034] S3: The count value of the status counter is compared with the sequence index of the sub-data to be written to perform the first verification of the data. If the first verification is passed, the sub-data, the count value and the session anchor are hashed and obfuscated to obtain the binding hash value of the sub-data. Then, it is compared with the corresponding expected hash value to perform the second verification. The sub-data that passes the second verification is written to the corresponding solidification slot for encryption and solidification.
[0035] The verification logic in step S3 is as follows: The count value of the status counter of the solidification slot is compared with the sequence index of the sub-data to be written. If and only if the two are equal, the sequence number of the sub-data to be written is considered to be correct, and the verification passes once. After one verification, the sub-data is concatenated with the count value and a hash algorithm is used to calculate the intermediate parameter. Then, the intermediate parameter is concatenated with the session anchor and a hash algorithm is used to calculate the binding hash value, i.e.: In the formula Indicates the first The binding hash value of a writable, solidified slot. Indicates the first The count value of the state counter for each writable curing slot, with the subscript... This indicates the index of the writable curing slot. Under ideal conditions, it's understandable that... , , The three parameters should all be equal in value. For example, the actual physical meaning is "the count value of the status counter of the 4th writable curing slot is 4, and the 4th sub-data is written". The same applies to the curing slots with other serial numbers.
[0036] The binding hash value is compared with the corresponding expected hash value if and only if they are equal. The system considers the sub-data content to be written to be correct, and the second verification passes.
[0037] In this step, the first verification is equivalent to a timing check, quickly checking for any disordered sub-data order in a very small number of clock cycles to prevent bus replay attacks. The second verification is equivalent to a cryptographic check; only if the timing check passes will the cryptographic engine be activated for further verification. This hierarchical verification logic not only protects sub-data but also significantly reduces invalid calculations and improves system speed.
[0038] S4: Set a binary completion label for each curing slot and construct a completion bitmap of the silicon-based root of trust based on all completion labels. When a writable curing slot is cured, synchronously update the completion label, the completion bitmap and the status counter of the next curing slot.
[0039] The completion bitmap is a collection of tag values for completion tags across all curing slots. When no sub-data is written to a curing slot, the initial tag value is 0; after sub-data is written, the tag value flips to 1. Furthermore, the completion bitmap does not require independent storage; it is assembled from the completion tags of each curing slot in slot address order during scanning. Therefore, only the atomicity of flipping a single completion tag from 0 to 1 needs to be guaranteed, and there are no additional consistency updates between the bitmap and the tags.
[0040] It can be seen that the completion label and the valid label have certain similarities, but the physical meanings they represent are different. Logically speaking, a solidified slot that has been solidified must be unwritable, but an unwritable solidified slot is not necessarily solidified. If the valid label is used directly to determine whether the corresponding sub-data of the solidified slot has been solidified, there will be logical confusion. Therefore, a completion label needs to be constructed for separate identification, and the update time nodes are also different.
[0041] For any solidification slot, if its valid label is 1 and its completion label is 0, it means that it is a clean and writable solidification slot; if its valid label is 0 and its completion label is 0, it means that it is a solidification slot that was interrupted during the writing process; if its valid label is 0 and its completion label is 1, it means that it is a solidification slot that has been completely written with sub-data.
[0042] The effective tag and the completion tag together constitute a dual-track binary tag system, which can accurately subdivide the life cycle of a solidified slot into three irreversible hardware states. This not only provides a more accurate state expression for silicon-based root of trust, but also provides accurate support for subsequent power-off reset judgment.
[0043] S5: If the silicon-based root of trust does not experience a power outage and reset during the encryption and curing process, repeat steps S3 to S4 until all sub-data is cured. If the silicon-based root of trust experiences a power outage and reset during the encryption and curing process, determine whether the silicon-based root of trust has completed the encryption and curing process before the power outage and reset based on the completion bitmap of the silicon-based root of trust.
[0044] When the silicon-based root of trust experiences a power outage and reset, a continuity check is performed on the completion bitmap. The silicon-based root of trust is considered to have completed the encryption and solidification process before the power outage and reset if and only if there are consecutive, uninterrupted tag values of 1, and the number of tag values of 1 equals the total number of sub-data sequence numbers. In subsequent use, only the first and last addresses of these consecutive solidified slots need to be used as the starting address for reading data.
[0045] S6: If the silicon-based root of trust has completed the encryption and hardening process before the power-off reset, the subsequent steps will not be executed. If the silicon-based root of trust has not completed the encryption and hardening process before the power-off reset, steps S2 to S5 will be executed again until all sub-data is hardened. As mentioned above, after a power-off reset, it is not a "resumable interruption," but rather a clean, writable hardening slot is found, and all sub-data is written sequentially from the beginning. This not only ensures the integrity of the entire data writing process, preventing attackers from exploiting power outages to truncate and splice sessions, but also significantly saves chip space on the silicon-based root of trust, avoiding the waste of cutting off fixed partition copies indiscriminately.
[0046] Please see Figure 2 The present invention also provides an integrated data chip encryption and hardening system based on silicon-based root of trust, for performing the above-mentioned encryption and hardening method, specifically including: a data encryption module, a data decryption module, a data verification module, a data update module, a power failure detection module, and a status reset module.
[0047] The data encryption module is used to split the initial data to be solidified into several groups of sub-data, perform hash obfuscation based on each group of sub-data and its corresponding sequence index, and obtain the session anchor, the expected hash value of each group of sub-data and the data digest. Then, the total number of sequence numbers of the sub-data, the session anchor and all expected hash values are concatenated and encrypted to obtain the encrypted master data. The encrypted master data and the sub-data are sent together to the silicon-based root of trust. The data decryption module is used to control the silicon-based root of trust to decrypt the encrypted master data, obtain the total number of sequence numbers of the sub-data, the session anchor point and all expected hash values, and then use the multi-copy effective tag method to identify the writable fixed slots and starting addresses in the one-time programmable memory, and set a status counter for each fixed slot to achieve one-to-one matching with the sub-data. The data verification module is used to compare the count value of the status counter with the sequence index of the sub-data to be written to perform the first verification of the data. If the first verification is passed, the sub-data, the count value and the session anchor are hashed and obfuscated to obtain the binding hash value of the sub-data. Then, it is compared with the corresponding expected hash value to perform the second verification. The sub-data that passes the second verification is written to the corresponding solidification slot for encryption and solidification. The data update module is used to set a binary completion label for each curing slot and construct a completion bitmap of the silicon-based root of trust based on all completion labels. When a writable curing slot is cured, the completion label, completion bitmap and status counter of the next curing slot are updated synchronously. The power failure detection module is used to repeat steps S3~S4 until all sub-data is cured when the silicon-based trust root does not experience a power failure reset during the encryption and curing process. When the silicon-based trust root experiences a power failure reset during the encryption and curing process, it determines whether the silicon-based trust root has completed the encryption and curing process before the power failure reset based on the completion bitmap of the silicon-based trust root. The status reset module is used to prevent subsequent steps from being executed when the silicon-based root of trust has completed the encryption and hardening process before the power-off reset. When the silicon-based root of trust has not completed the encryption and hardening process before the power-off reset, steps S2 to S5 are re-executed until all sub-data is hardened.
[0048] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0049] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0050] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0051] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for integrated data chip encryption hardening based on silicon-based root of trust, characterized in that, The specific steps include: S1: split the initial data to be solidified into several groups of sub-data, perform hash confusion based on each group of sub-data and its corresponding serial number index, obtain a session anchor point, an expected hash value of each group of sub-data and a data digest, concatenate the total number of serial numbers of sub-data, the session anchor point and all expected hash values, encrypt the concatenated data to obtain encrypted main data, and send the encrypted main data and the sub-data to the silicon-based root of trust together; S2: the silicon-based root of trust decrypts the encrypted main data to obtain the total number of serial numbers of sub-data, the session anchor point and all expected hash values, identifies the writable solidification slots and the starting address in the one-time programmable memory, and sets a state counter for each solidification slot to achieve one-to-one matching with the sub-data; S3: compare the count value of the state counter with the serial number index of the sub-data to be written to perform a one-time verification of the data, perform hash confusion on the sub-data, the count value and the session anchor point on the premise of passing the one-time verification, obtain a bound hash value of the sub-data, compare it with the corresponding expected hash value to perform a two-time verification, and write the sub-data that passes the two-time verification to the corresponding solidification slot for encryption and solidification; S4: set a binary completion degree label for each solidification slot, and construct a completion degree bitmap of the silicon-based root of trust according to all the completion degree labels, and when a writable solidification slot is completed, the completion degree label, the completion degree bitmap and the state counter of the next solidification slot are updated synchronously; S5: if the silicon-based root of trust does not appear power-off reset during the encryption and solidification process, steps S3-S4 are repeatedly executed until all the sub-data are solidified, and if the silicon-based root of trust appears power-off reset during the encryption and solidification process, it is judged according to the completion degree bitmap of the silicon-based root of trust whether the silicon-based root of trust has completed the encryption and solidification process before the power-off reset; S6: if the silicon-based root of trust has completed the encryption and solidification process before the power-off reset, subsequent steps are not performed, and if the silicon-based root of trust has not completed the encryption and solidification process before the power-off reset, steps S2-S5 are re-executed until all the sub-data are solidified.
2. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 1, wherein: The data digest is calculated by concatenating the sub-data and the serial number index through a hash algorithm, the session anchor point is calculated by concatenating the total number of serial numbers of sub-data and all data digests through a hash authentication code algorithm, the expected hash value is calculated by concatenating the data digest of the corresponding sub-data and the session anchor point through a hash algorithm, and the encrypted main data is encrypted by a mode encryption algorithm.
3. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 2, wherein: The mode encryption algorithm uses an AES-256-GCM encryption algorithm with identity authentication, and the hash authentication code algorithm uses an HMAC-SHA-256 algorithm.
4. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 1, wherein: The working logic for identifying the writable solidification slots in the one-time programmable memory is as follows: A binary valid label is set for each solidification slot, the label value of 1 indicates that the solidification slot is writable, the label value of 0 indicates that the solidification slot is not writable, and when no sub-data is written in the solidification slot, the label value of the valid label at the bit is initially 1, and when the solidification slot is prepared to write sub-data, the label value of the valid label at the bit is flipped to 0.
5. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 1, wherein: During the encryption and solidification process, after sub-data is written to a certain writable solidification slot, the count value of the state counter of that solidification slot is incremented by 1 and used as the count value of the state counter of the next solidification slot. The count value of the state counter of the first writable solidification slot is initially 1, and the count values of the state counters of the other writable solidification slots are initially empty.
6. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 5, wherein: The verification logic in step S3 is as follows: The count value of the status counter of the solidification slot is compared with the sequence index of the sub-data to be written. If and only if the two are equal, the sequence number of the sub-data to be written is considered to be correct, and the verification passes once. After one verification, the sub-data is concatenated with the count value and the intermediate parameter is calculated using a hash algorithm. Then, the intermediate parameter is concatenated with the session anchor and the binding hash value is calculated using a hash algorithm. The binding hash value is compared with the corresponding expected hash value. If and only if the two are equal, the sub-data content to be written is considered correct and the secondary verification passes.
7. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 1, wherein: The completion bitmap is a set of tag values for completion tags of all curing slots. When no sub-data is written in the curing slot, the tag value of the completion tag is initially 0. After sub-data is written in the curing slot, the tag value is flipped to 1.
8. The silicon-based root-of-trust based integrated data chip encryption hardening method of claim 7, wherein: When the silicon-based root of trust experiences a power failure and reset, the continuity of the completion bitmap is checked. If and only if there are continuous and uninterrupted tag values of 1, and the number of tag values of 1 is equal to the total number of sub-data sequence numbers, it is considered that the silicon-based root of trust has completed the encryption and solidification process before the power failure and reset.
9. A silicon-based root-of-trust based integrated data chip encryption hardening system, characterized by: The encryption and hardening system is used to perform the encryption and hardening method as described in any one of claims 1-8, specifically including: The data encryption module is used to split the initial data to be solidified into several groups of sub-data, perform hash obfuscation based on each group of sub-data and its corresponding sequence index to obtain the session anchor, the expected hash value of each group of sub-data and the data digest, and then concatenate the total number of sequence numbers of the sub-data, the session anchor and all expected hash values to encrypt the encrypted master data, and send the encrypted master data and sub-data together to the silicon-based root of trust. The data decryption module is used to control the silicon-based root of trust to decrypt the encrypted master data, obtain the total number of sequence numbers of the sub-data, the session anchor point and all expected hash values, and then use the multi-copy effective tag method to identify the writable fixed slots and starting addresses in the one-time programmable memory, and set a status counter for each fixed slot to achieve one-to-one matching with the sub-data. The data verification module is used to compare the count value of the status counter with the sequence index of the sub-data to be written to perform the first verification of the data. If the first verification is passed, the sub-data, the count value and the session anchor are hashed and obfuscated to obtain the binding hash value of the sub-data. Then, it is compared with the corresponding expected hash value to perform the second verification. The sub-data that passes the second verification is written to the corresponding solidification slot for encryption and solidification. The data update module is used to set a binary completion label for each curing slot and construct a completion bitmap of silicon-based root of trust based on all completion labels. When a writable curing slot is cured, the completion label, completion bitmap and status counter of the next curing slot are updated synchronously. The power failure detection module is used to repeat steps S3 to S4 until all sub-data is cured when the silicon-based root of trust does not experience a power failure reset during the encryption and curing process. When the silicon-based root of trust experiences a power failure reset during the encryption and curing process, the module determines whether the silicon-based root of trust has completed the encryption and curing process before the power failure reset based on the completion bitmap of the silicon-based root of trust. The state reset module is used to prevent subsequent steps from being executed when the silicon-based root of trust has completed the encryption and solidification process before power failure and reset, and to re-execute steps S2 to S5 when the silicon-based root of trust has not completed the encryption and solidification process before power failure and reset, until all sub-data is solidified.
