Trust root generation method and device, chip and readable storage medium
By acquiring and storing random polarization direction information as a trust root in the target ferroelectric memory, the problem of low security of the trust root in the prior art is solved, and the secure and efficient generation and storage of the trust root is achieved.
Patent Information
- Application Number
- CN202411807703.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, the generation of trust roots is relatively safe and is easily leaked outside the system.
By obtaining the random polarization direction information of each storage unit after the production of the target ferroelectric memory is completed, and the sub-random polarization direction information of each storage unit in the target storage area is stored as a root of trust, it is stored inside the target storage area of the target ferroelectric memory.
The independent generation and storage of the trust root is realized, avoiding the trust root leaking outside the system, and improving the security of the trust root.
Smart Images

Figure CN119646907A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, chip, computer-readable storage medium and computer program product for generating a root of trust. Background Art
[0002] With the development of computer technology, a type of memory that uses the characteristics of ferroelectric materials to store data has emerged, namely ferroelectric memory. Compared with traditional flash memory or static random access memory (SRAM), ferroelectric memory has some unique advantages and applications. For example, ferroelectric memory is non-volatile, so even in the case of power failure, the data can still be retained, and ferroelectric memory has high durability and can have a high number of erase and write times. At the same time, ferroelectric memory also has the characteristics of low power consumption, and the power consumption during operation is lower than that of traditional memory, which is especially suitable for mobile devices and embedded systems. Therefore, ferroelectric memory can be used in technical fields such as embedded systems, consumer electronics, and industrial control.
[0003] At the same time, in order to ensure information security and ensure the confidentiality and integrity of data, it is usually necessary to store encrypted data in ferroelectric memory. Data encryption is usually achieved using keys, and the generation of keys depends on a confidential root of trust. In traditional technology, the way to generate a root of trust is usually to write the root key or related information from the outside. In this case, the root of trust will be leaked outside the system. It can be seen that the method for generating a root of trust provided in the prior art has a low security level. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, chip, computer-readable storage medium and computer program product for generating a root of trust that can improve the security level of the generated root of trust in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for generating a root of trust, comprising:
[0006] Obtain random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced;
[0007] A target storage area of the target ferroelectric memory is obtained, and sub-random polarization direction information corresponding to each storage unit in the target storage area is used as a trust root associated with the target ferroelectric memory.
[0008] In one embodiment, the target ferroelectric memory includes multiple storage areas; obtaining the target storage area of the target ferroelectric memory and using the sub-random polarization direction information corresponding to each storage unit in the target storage area as a trust root associated with the target ferroelectric memory includes: dividing a target storage area for storing the trust root and other storage areas except the target storage area from multiple storage areas of the target ferroelectric memory; testing the other storage areas, and after the testing of the other storage areas is completed, storing the sub-random polarization direction information in the other storage areas; testing the target storage area, and after the testing of the target storage area is completed, storing the sub-random polarization direction information stored in the other storage areas in the target storage area, and using the sub-random polarization direction information stored in the target storage area as the trust root associated with the target ferroelectric memory.
[0009] In one of the embodiments, after using the sub-random polarization direction information corresponding to each storage unit in the target storage area as the trust root associated with the target ferroelectric memory, it also includes: in response to a data storage request to store the target data in the target ferroelectric memory, obtaining the target data and the trust root associated with the target ferroelectric memory; generating an encryption storage key for the target data based on the trust root; encrypting the target data using the encryption storage key, and storing the encrypted target data in the target ferroelectric memory.
[0010] In one of the embodiments, the target ferroelectric memory is set in a chip; the generation of an encrypted storage key for the target data based on the root of trust includes: obtaining an RTL key and an OTP key stored in the chip; generating a root key of the chip based on the RTL key and the root of trust; and generating the encrypted storage key based on the root key and the OTP key.
[0011] In one of the embodiments, generating the root key of the chip according to the RTL key and the trusted root includes: inputting the RTL key and the trusted root into a pre-built first derivation function, performing encryption processing through the first derivation function, and generating the root key; generating the encrypted storage key according to the root key and the OTP key includes: inputting the root key and the OTP key into a pre-built second derivation function, performing encryption processing through the second derivation function, and generating the encrypted storage key.
[0012] In one of the embodiments, after storing the encrypted target data in the target ferroelectric memory, it also includes: in response to a data read request to read the target data from the target ferroelectric memory, obtaining the encrypted target data stored in the target ferroelectric memory and the encryption storage key; using the encryption storage key to decrypt the encrypted target data to obtain the target data.
[0013] In a second aspect, the present application also provides a trusted root generation device, comprising:
[0014] A polarization information acquisition module, used to obtain random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced;
[0015] The trust root acquisition module is used to acquire the target storage area of the target ferroelectric memory and use the sub-random polarization direction information corresponding to each storage unit in the target storage area as the trust root associated with the target ferroelectric memory.
[0016] In a third aspect, the present application further provides a chip, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the embodiments of the first aspect when executing the computer program.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.
[0018] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.
[0019] The above-mentioned root of trust generation method, device, chip, computer-readable storage medium and computer program product obtain the random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced; obtain the target storage area of the target ferroelectric memory, and use the sub-random polarization direction information corresponding to each storage unit in the target storage area as the root of trust associated with the target ferroelectric memory. In the root of trust generation method provided by the present application, the random polarization direction information corresponding to each storage unit can be obtained after the target ferroelectric memory is produced, and the target storage area can also be set for the target ferroelectric memory, so that the sub-random polarization direction information corresponding to each storage unit in the target storage area is used as the root of trust associated with the target ferroelectric memory. In this way, it can be ensured that the target ferroelectric memory can obtain an independent root of trust, and the root of trust can be stored inside the target storage area of the target ferroelectric memory without being leaked outside the system, so that the security of the generated root of trust can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A schematic diagram of a process for generating a root of trust in an embodiment;
[0022] Figure 2 A schematic diagram of a process of obtaining a root of trust associated with a target ferroelectric memory in one embodiment;
[0023] Figure 3 A schematic diagram of a process of storing encrypted target data into a target ferroelectric memory in one embodiment;
[0024] Figure 4 A flow chart of a method for generating a root of trust based on a ferroelectric memory in one embodiment;
[0025] Figure 5 A flow chart for deriving a cryptographic storage key for a root of trust in one embodiment;
[0026] Figure 6 is a structural block diagram of a trusted root generation device in one embodiment;
[0027] Figure 7 FIG. 4 is a diagram showing the internal structure of a chip in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0029] In one embodiment, Figure 1 As shown, a method for generating a root of trust is provided. This embodiment uses the method applied to a chip as an example. In this embodiment, the method includes the following steps:
[0030] Step S101, obtaining random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced.
[0031] Among them, the random polarization direction information refers to the initial polarization direction presented by the target ferroelectric memory after the production is completed, that is, it presents a random "0" or "1", and the target ferroelectric memory refers to the ferroelectric memory arranged inside the chip. In this embodiment, the ferroelectric memory has a polarization property and can change the polarization direction by applying different voltages, thereby representing different binary states, that is, "0" or "1".
[0032] Specifically, after the target ferroelectric memory is produced, the initial polarization directions of each storage unit of the target ferroelectric memory can be collected as random polarization direction information corresponding to each storage unit of the target ferroelectric memory.
[0033] Step S102, obtaining a target storage area of a target ferroelectric memory, and using sub-random polarization direction information corresponding to each storage unit in the target storage area as a root of trust associated with the target ferroelectric memory.
[0034] The target storage area is a storage area in the target ferroelectric memory used to store the root of trust, and the sub-random polarization direction information refers to the random polarization direction information corresponding to each storage unit in the target storage area.
[0035] Specifically, after obtaining the random polarization direction information corresponding to each storage unit of the target ferroelectric memory, the storage area of the target ferroelectric memory can be divided to divide the target storage area for storing the root of trust. Afterwards, the random polarization direction information stored in each storage unit in the target storage area, that is, the sub-random polarization direction information, can be used as the root of trust associated with the target ferroelectric memory, so that the root of trust can be bound to the target ferroelectric memory one by one, and can be stored inside the target ferroelectric memory without being leaked outside the chip system, to ensure the security of the generated root of trust.
[0036] In the above-mentioned trust root generation method, by obtaining the random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced; obtaining the target storage area of the target ferroelectric memory, and using the sub-random polarization direction information corresponding to each storage unit in the target storage area as the trust root associated with the target ferroelectric memory. In the trust root generation method provided by the present application, the random polarization direction information corresponding to each storage unit can be obtained after the target ferroelectric memory is produced, and the target storage area can also be set for the target ferroelectric memory, so that the sub-random polarization direction information corresponding to each storage unit in the target storage area is used as the trust root associated with the target ferroelectric memory. In this way, it can be ensured that the target ferroelectric memory can obtain an independent trust root, and the trust root can be stored inside the target storage area of the target ferroelectric memory without being leaked outside the system, so that the security of the generated trust root can be improved.
[0037] In one embodiment, the target ferroelectric memory includes a plurality of storage regions; Figure 2 As shown, step S102 may further include:
[0038] Step S201 : dividing a target storage area for storing a root of trust and other storage areas except the target storage area from a plurality of storage areas of a target ferroelectric memory.
[0039] Other storage areas refer to storage areas in the target ferroelectric memory other than the target storage area for storing the root of trust. In this embodiment, the target ferroelectric memory includes multiple storage areas, among which the target storage area can be used to store the root of trust. Therefore, a part of the multiple storage areas of the target ferroelectric memory can be divided out as the target storage area for storing the root of trust, and the storage area not used for storing the root of trust can be used as other storage areas.
[0040] Step S202, testing other storage areas, and after the testing of other storage areas is completed, storing the sub-random polarization direction information in other storage areas;
[0041] Step S203, testing the target storage area. After the target storage area is tested, the sub-random polarization direction information stored in other storage areas is stored in the target storage area, and the sub-random polarization direction information stored in the target storage area is used as a trust root associated with the target ferroelectric memory.
[0042] After the ferroelectric memory is produced, it is usually necessary to test the ferroelectric memory before it can be put into use to ensure the quality and performance of the chip. The testing process may include: functional testing for testing the function and logic of the ferroelectric memory, performance testing for testing the processing speed and durability of the ferroelectric memory, reliability testing for testing the temperature and environmental stability and radiation resistance of the ferroelectric memory, and fault analysis and electrical testing of the ferroelectric memory. In addition, during the testing process, the random polarization direction generated by each storage unit after the target ferroelectric memory is produced is usually erased. In order to ensure that the root of trust can be retained inside the target ferroelectric memory, the root of trust, that is, the sub-random polarization direction information stored in the target storage area of the target ferroelectric memory, needs to be backed up during the test.
[0043] Specifically, when conducting a test on the target ferroelectric memory, other storage areas that do not store the trust root can be tested first. After the tests on other storage areas are completed, since the target storage area has not been tested yet, the target storage area still stores the original sub-random polarization direction information. At this time, the sub-random polarization direction information stored in the target storage area can be stored in other storage areas that have completed the test to achieve a backup of the sub-random polarization direction information. For example, the sub-random polarization direction information stored in the target storage area can be copied and placed in other storage areas that have completed the test.
[0044] After that, the target storage area can be tested, and after the target storage area test is completed, the sub-random polarization direction information backed up in other storage areas can be stored in the target storage area again. For example, the sub-random polarization direction information stored in other storage areas can be copied back to the target storage area where the test is completed, and the sub-random polarization direction information stored in the target storage area can be used as the trust root associated with the target ferroelectric memory. In this way, after the target storage area is tested, the sub-random polarization direction information as the trust root can also be stored, so that the trust root can be saved inside the target ferroelectric memory without affecting the test.
[0045] In this embodiment, the target ferroelectric memory can be divided into multiple storage areas, so as to first complete the test of other storage areas except the target storage area storing the trust root, and store the sub-random polarization direction information stored in the target storage area into other storage areas after the test passes, and then complete the test of the target storage area, and after the test is completed, store the sub-random polarization direction information stored in other storage areas into the target storage area. Through the partition test, after the target storage area is tested, the sub-random polarization direction information as the trust root can be stored, so that the trust root can be saved inside the target ferroelectric memory without affecting the test, thereby further improving the stability and reliability of the trust root storage.
[0046] In addition, if Figure 3 As shown, after step S102, the following steps may also be included:
[0047] Step S301 , in response to a data storage request to store target data in a target ferroelectric memory, obtain the target data and a root of trust associated with the target ferroelectric memory.
[0048] A data storage request refers to a request for storing target data in a target ferroelectric memory, and the target data refers to the data to be stored. In this embodiment, when storing the target data in the target ferroelectric memory, the data storage request can be triggered first, and then the chip can respond to the above request. While obtaining the target data to be stored, it can also obtain the trust root stored in the target storage area from the target ferroelectric memory.
[0049] Step S302, generating an encryption storage key for target data according to the trust root;
[0050] Step S303, encrypting the target data using the encryption storage key, and storing the encrypted target data into the target ferroelectric memory.
[0051] The encryption storage key refers to the key used for encrypting and storing the target data. The key can be generated based on the trust root associated with the target ferroelectric memory. Since the trust root is bound to the target ferroelectric memory one by one, the encryption storage key used is also bound to the target ferroelectric memory one by one. Specifically, after obtaining the trust root associated with the target ferroelectric memory, the chip can also generate an encryption storage key for the target data based on the trust root, thereby encrypting the target data using the encryption storage key, and then storing the encrypted target data in the target ferroelectric memory. In this way, the encrypted data can be stored in the target ferroelectric memory, and the encryption storage key used in the encryption process is bound to the target ferroelectric memory one by one, so the security of data storage in the target ferroelectric memory can be further improved.
[0052] In this embodiment, when the target data is stored in the target ferroelectric memory, the associated trust root can also be obtained from the target ferroelectric memory, so as to generate an encryption storage key for the target data based on the trust root to encrypt the target data and store the encrypted target data. In this way, the encrypted data can be stored in the target ferroelectric memory, and the encryption storage key used in the encryption process is bound one-to-one to the target ferroelectric memory, thereby further improving the security of data storage in the target ferroelectric memory.
[0053] Further, the target ferroelectric memory is set in the chip; step S302 may further include: obtaining the RTL key and the OTP key stored in the chip; generating the root key of the chip according to the RTL key and the root of trust; generating the encrypted storage key according to the root key and the OTP key.
[0054] RTL refers to Register Transfer Level, which is an abstract level used for describing digital circuits. It focuses on data transmission between registers and related logical operations, rather than actual circuit implementation. This abstraction allows designers to think about the function and behavior of circuits at a higher level. RTL keys refer to the fact that in the early stages of chip design, designers can embed some key information, such as encryption keys, into the RTL code. And once the chip is manufactured, the RTL key becomes a part of the hardware that cannot be changed after tape-out. This feature ensures the security of the key because even if the chip is reverse engineered, attackers cannot easily change or delete these keys.
[0055] OTP refers to One Time Programmable Memory, which allows users to write data into this memory under certain conditions after manufacturing, but once written, the data cannot be modified or erased. This feature makes OTP important in fields such as information security and chip manufacturing. The OTP key refers to the key stored in the one-time programmable memory, which is usually written into the OTP memory after the chip is manufactured. Once written, the data cannot be changed or deleted, making the key stored in it very safe.
[0056] Specifically, when storing data, the chip can first obtain the pre-stored RTL key and OTP key from the chip, and then combine the RTL key and the trust root associated with the target ferroelectric memory to generate the chip's root key, and then further combine the root key and the OTP key to generate an encrypted storage key for encrypting the target data.
[0057] In this embodiment, the method for generating an encrypted storage key can be to first use the RTL key and the trusted root to generate the root key of the chip, and then use the root key and the OTP key to generate the final encrypted storage key, thereby realizing multiple encryption of the key and further improving the security of the encrypted storage key.
[0058] Furthermore, generating the root key of the chip according to the RTL key and the root of trust may further include: inputting the RTL key and the root of trust into a pre-built first derivation function, performing encryption processing through the first derivation function, and generating a root key; generating an encrypted storage key according to the root key and the OTP key may further include: inputting the root key and the OTP key into a pre-built second derivation function, performing encryption processing through the second derivation function, and generating an encrypted storage key.
[0059] The first derivation function is a function used to derive a root key. The first derivation function may be various key derivation functions KDF, for example, an SM4 function. In this embodiment, the root key may be generated by the first derivation function. Specifically, the chip may input the RTL key and the trust root into a pre-built first derivation function, and the first derivation function may encrypt the combination of the RTL key and the trust root to generate a root key.
[0060] The second derivation function is a function used to derive an encrypted storage key. Similar to the first derivation function, the second derivation function can also be various key derivation functions KDF, for example, it can also be an SM4 function. In this embodiment, the encrypted storage key can be generated by the second derivation function. Specifically, the chip can input the OTP key and the root key into a pre-built second derivation function, and the second derivation function encrypts the combination of the OTP key and the root key to generate an encrypted storage key.
[0061] In this embodiment, the root key can be generated by encrypting the combination of the RTL key and the trusted root through the first derivation function, and the encrypted storage key can be generated by encrypting the combination of the root key and the OTP key through the second derivation function. In this way, the security of the generated encrypted storage key can be further improved.
[0062] In addition, after step S303, it may also include: in response to a data read request to read the target data from the target ferroelectric memory, obtaining the encrypted target data stored in the target ferroelectric memory and the encryption storage key; using the encryption storage key to decrypt the encrypted target data to obtain the target data.
[0063] The data read request is a request for reading target data from the target ferroelectric memory. In this embodiment, since the target data is stored in the target ferroelectric memory in an encrypted form, in order to read the target data, the encrypted target data needs to be decrypted first, and the target data can be obtained after the decryption is completed. And since the encryption of the target data is realized by the encrypted storage key, the encrypted storage key can also be used for decryption during decryption.
[0064] Specifically, after the target data is encrypted and stored in the target ferroelectric memory, if a read request for the target data is received, the chip can respond to the request, first obtain the encrypted target data from the target ferroelectric memory, and obtain the encryption storage key used to encrypt the target data. After that, the encrypted target data can be decrypted using the encryption storage key to obtain the target data.
[0065] In this embodiment, when reading the target data, the encryption storage key can also be obtained first, and the encrypted target data stored in the target ferroelectric memory can be decrypted to obtain the target data. In this way, the security of the target data reading process can be ensured.
[0066] In one embodiment, a method for generating a root of trust based on a ferroelectric memory is also provided, wherein the ferroelectric memory FeRAM is a capacitor structure. After the process production is completed, each FeRAM unit will initially present a random polarization direction, that is, present a random "0" or "1". With the help of the process provided by the embodiment, these random values can be saved without affecting the test, and the system can use these values as the root of trust. The specific implementation process can be as follows Figure 4 As shown, the following steps are included:
[0067] Step 1: After the ferroelectric particles are produced, each unit cell presents a random polarization direction.
[0068] Step 2: Partition part of the ferroelectric area as the storage area of the root of trust.
[0069] Step 3: Partition the ferroelectric and prioritize areas outside the root of trust.
[0070] Step 4: Copy the storage area data of the root of trust to other areas that have been tested.
[0071] Step 5: After the test of the storage area of the root of trust is completed, copy the root of trust data that has been copied to other areas back to the root of trust storage area.
[0072] The above process, by designing corresponding partition testing and data replication mechanisms within the system, can ensure that the root of trust will not leak out of the system during the ferroelectric production cycle. In addition, if the ferroelectric is used as a separate storage particle / storage chip, it can provide a root of trust for the system module / solution; if the ferroelectric is used as SoC embedded storage, it can serve as the root of trust for the SoC.
[0073] The root of trust can be used to generate cryptographic storage keys, and the process can be as follows Figure 5 As shown, the encrypted storage key derived from the root of trust can be used to save sensitive information of the chip / module / system.
[0074] Step 1: Input the FeRAM trust root and the RTL key into the derivation function to generate the root key, where the derivation function can be any KDF, which is not specified here, for example, the SM4 function can be used.
[0075] Step 2: Input the root key and OTP key into the derivation function to generate an encrypted storage key. The OTP key here is the key value stored in the Memory. This Memory can be OTP or its body medium. Use this value and the root key to derive a key for a specific function, that is, it can be a key used for encrypted storage of sensitive information.
[0076] Step 3: Input the plaintext sensitive storage information and the encrypted storage key into the encryption and decryption algorithm. After obtaining the ciphertext sensitive storage information, it can be stored in the memory. When the information needs to be used, the plaintext is obtained by decryption.
[0077] Through this embodiment, in addition to the role of ferroelectric as a memory, it can also provide the ability to generate a root of trust through its own existing characteristics, that is, the random polarization direction after production is completed, which greatly reduces the cost and difficulty of key injection in the information security system. Since the root of trust can be based on the on-chip mechanism, it will never appear outside the system from beginning to end, which greatly improves its security and confidentiality. At the same time, when using the above-mentioned root of trust to generate an encrypted storage key, since the memory stores ciphertext information, the attacker cannot obtain valid information by slicing / scanning, or other means of directly reading the memory, and the FeRAM root of trust is different in each chip / system where the chip is located, so the root key of each chip / system is actually different, that is, the derived encrypted storage key is also one machine and one secret, so even if the attacker obtains the encrypted storage key of a chip through attack means, it is invalid for other chips. At the same time, the root of trust only appears inside the chip, and the root key is not directly stored, but derived each time it is used, which greatly reduces the risk of exposure of the root of trust and the root key.
[0078] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0079] Based on the same inventive concept, the embodiment of the present application also provides a trust root generation device for implementing the trust root generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more trust root generation device embodiments provided below can refer to the limitations of the trust root generation method above, and will not be repeated here.
[0080] In one embodiment, Figure 6 As shown, a trust root generation device is provided, including: a polarization information acquisition module 601 and a trust root acquisition module 602, wherein:
[0081] Polarization information acquisition module 601, used to obtain random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced;
[0082] The root of trust acquisition module 602 is used to acquire a target storage area of the target ferroelectric memory, and use the sub-random polarization direction information corresponding to each storage unit in the target storage area as the root of trust associated with the target ferroelectric memory.
[0083] In one embodiment, the target ferroelectric memory includes multiple storage areas; the trust root acquisition module 602 is further used to divide the target storage area for storing the trust root from the multiple storage areas of the target ferroelectric memory, and other storage areas except the target storage area; test the other storage areas, and after the test of the other storage areas is completed, store the sub-random polarization direction information in the other storage areas; test the target storage area, and after the test of the target storage area is completed, store the sub-random polarization direction information stored in the other storage areas in the target storage area, and use the sub-random polarization direction information stored in the target storage area as the trust root associated with the target ferroelectric memory.
[0084] In one embodiment, the root of trust generation device also includes: a target data storage module, which is used to respond to a data storage request to store the target data in the target ferroelectric memory, obtain the target data, and the root of trust associated with the target ferroelectric memory; generate an encryption storage key for the target data based on the root of trust; encrypt the target data using the encryption storage key, and store the encrypted target data in the target ferroelectric memory.
[0085] In one embodiment, the target ferroelectric memory is set in the chip; the target data storage module is further used to obtain the RTL key and the OTP key stored in the chip; based on the RTL key and the trusted root, the root key of the chip is generated; based on the root key and the OTP key, an encrypted storage key is generated.
[0086] In one embodiment, the target data storage module is further used to input the RTL key and the trusted root into a pre-built first derivation function, perform encryption processing through the first derivation function, and generate a root key; input the root key and the OTP key into a pre-built second derivation function, perform encryption processing through the second derivation function, and generate an encrypted storage key.
[0087] In one embodiment, the root of trust generation device also includes: a target data reading module, which is used to respond to a data reading request to read the target data from the target ferroelectric memory, obtain the encrypted target data stored in the target ferroelectric memory, and the encryption storage key; use the encryption storage key to decrypt the encrypted target data to obtain the target data.
[0088] Each module in the above-mentioned trust root generation device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the chip in the form of hardware, or can be stored in the memory in the chip in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0089] In an exemplary embodiment, a chip is provided, and its internal structure diagram can be as follows: Figure 7As shown. The chip includes a processor, a memory, an input / output interface and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the chip is used to provide computing and control capabilities. The memory of the chip includes a non-volatile storage medium and a ferroelectric memory. The non-volatile storage medium stores an operating system and a computer program. The ferroelectric memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the chip is used to exchange information between the processor and an external device. The communication interface of the chip is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a trust root generation method is implemented.
[0090] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the chip to which the solution of the present application is applied. The specific chip may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0091] In one embodiment, a chip is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0092] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0093] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0094] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0095] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0096] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0097] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a root of trust, characterized in that: The method comprises: Obtain random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced; A target storage area of the target ferroelectric memory is obtained, and sub-random polarization direction information corresponding to each storage unit in the target storage area is used as a trust root associated with the target ferroelectric memory.
2. The method according to claim 1, characterized in that The target ferroelectric memory includes a plurality of storage areas; the step of obtaining the target storage area of the target ferroelectric memory and using the sub-random polarization direction information corresponding to each storage unit in the target storage area as a trust root associated with the target ferroelectric memory includes: dividing a target storage area for storing the trust root and other storage areas except the target storage area from a plurality of storage areas of the target ferroelectric memory; Testing the other storage areas, and after the testing of the other storage areas is completed, storing the sub-random polarization direction information in the other storage areas; The target storage area is tested. After the test of the target storage area is completed, the sub-random polarization direction information stored in the other storage areas is stored in the target storage area, and the sub-random polarization direction information stored in the target storage area is used as a trust root associated with the target ferroelectric memory.
3. The method according to claim 1 or 2, characterized in that: After using the sub-random polarization direction information corresponding to each storage unit in the target storage area as the trust root associated with the target ferroelectric memory, the method further includes: In response to a data storage request to store target data in the target ferroelectric memory, obtaining the target data and a root of trust associated with the target ferroelectric memory; generating an encryption storage key for the target data according to the trust root; The target data is encrypted using the encryption storage key, and the encrypted target data is stored in the target ferroelectric memory.
4. The method according to claim 3, characterized in that The target ferroelectric memory is set in a chip; the generating an encryption storage key for the target data according to the root of trust includes: Obtaining the RTL key and the OTP key stored in the chip; Generate a root key of the chip according to the RTL key and the trusted root; The encrypted storage key is generated according to the root key and the OTP key.
5. The method according to claim 4, characterized in that The step of generating a root key of the chip according to the RTL key and the root of trust includes: Input the RTL key and the trusted root into a pre-built first derivation function, perform encryption processing through the first derivation function, and generate the root key; The step of generating the encrypted storage key according to the root key and the OTP key includes: The root key and the OTP key are input into a pre-built second derivation function, and encryption processing is performed through the second derivation function to generate the encrypted storage key.
6. The method according to claim 3, characterized in that After storing the encrypted target data into the target ferroelectric memory, the method further comprises: In response to a data read request for reading target data from the target ferroelectric memory, acquiring the encrypted target data stored in the target ferroelectric memory and the encryption storage key; The encrypted target data is decrypted using the encryption storage key to obtain the target data.
7. A trusted root generation device, characterized in that: The device comprises: A polarization information acquisition module, used to obtain random polarization direction information corresponding to each storage unit after the target ferroelectric memory is produced; The trust root acquisition module is used to acquire the target storage area of the target ferroelectric memory and use the sub-random polarization direction information corresponding to each storage unit in the target storage area as the trust root associated with the target ferroelectric memory.
8. A chip comprising a target ferroelectric memory and a processor, wherein the target ferroelectric memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
One-time password circuit based on ferroelectric memory
CN119989431A