Method and device for processing security key and electronic device

By using the startup program to read and lock the security key on the system chip, the key protection problems caused by TEE dependency and hardware design complexity are solved, and a low-cost and secure key protection solution is realized, ensuring that The security of the key is not affected by TEE software vulnerabilities.

CN114785512BActive Publication Date: 2024-11-19FUZHOU ROCKCHIP SEMICON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210204353.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2024-11-19
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

In existing system chips, the protection method of security keys stored in one-time programmable memory depends on the security of the trusted execution environment TEE, which poses a potential risk of security vulnerabilities, or requires complex hardware design to implement OTP keys. Reading modules leads to increased costs.

Method used

By starting the program to read the security key from a one-time programmable memory and write it to the register, the hardware encryption and decryption module reads the key from the register in response to the use of the security key instruction, and sets the key access to the locked state , ensure that only the hardware encryption and decryption module can access the key, avoiding the CPU from directly touching the key.

Benefits of technology

A method of protecting secure keys at low cost without relying on TEE environments is implemented, avoiding the risk of key leakage and reducing hardware design complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114785512B_ABST
    Figure CN114785512B_ABST
Patent Text Reader

Abstract

The present application relates to the field of chip security technology, and in particular to a method and device for processing security keys and an electronic device. The method for processing security keys comprises: in response to a power-on startup instruction, reading a security key from a one-time programmable memory through a startup program, and writing the security key into a register; and in response to a use security key instruction, causing a hardware encryption and decryption module to read the security key from the register. In this process, the CPU cannot access the security key, thereby ensuring the security of the security key and preventing the security key from being leaked due to a TEE software security vulnerability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip security technology, and in particular to a method and device for processing security keys and an electronic device. Background Art

[0002] In existing system-on-chip (SoC), there are mainly two methods for protecting security keys stored in a one-time programmable (OTP) memory.

[0003] One is to protect it based on the trusted execution environment (TEE) implemented by ARM TrustZone. The security key can only be accessed by the secure IP in the TEE, which includes the secure central processing unit (CPU) and the secure hardware encryption and decryption module. When using the security key, it is necessary to read the security key from the OTP to the encryption and decryption module through the secure CPU, and then start the encryption and decryption module to encrypt and decrypt the data. This method relies on the security of the trusted execution environment TEE. As the complexity of the TEE increases, it may bring potential security vulnerabilities, and the security key is at risk of being accessed by malware and leaked. More and more customers hope that the security of the security key does not rely on the TEE.

[0004] Another way to protect the key is to design a complex hardware OTP key reading module. When using a security key, the security CPU configures the OTP key reading hardware module, reads the key into the encryption and decryption module, and then starts the encryption and decryption module to encrypt and decrypt the data. In this method, the security CPU does not directly contact the key and does not rely on the security of the TEE, thus preventing the risk of key leakage. However, this method requires complex hardware design to implement the OTP key reading module to protect and control the key security in the OTP, which will increase the cost a lot. Summary of the invention

[0005] The present application provides a method and apparatus for processing security keys and an electronic device, which can protect security keys at a low cost in hardware without relying on TEE.

[0006] In a first aspect, a method for processing a security key is provided, the method comprising: in response to a power-on startup instruction, reading a security key from a one-time programmable memory through a startup program, and writing the security key into a register; and in response to a use security key instruction, causing a hardware encryption / decryption module to read the security key from the register.

[0007] In some embodiments, after writing the security key to the register, the method further includes: setting access to the security key in the one-time programmable memory to a locked state through the boot program; and setting access to the security key in the register to a locked state through the boot program.

[0008] In some embodiments, the method further includes: determining whether a random access memory or a cache memory associated with the security key is used through the boot program; and if the random access memory or the cache memory is used, clearing the contents of the random access memory or the cache memory.

[0009] In some embodiments, the method further includes: loading firmware through the boot program and executing the firmware program.

[0010] In some embodiments, enabling the hardware encryption / decryption module to read the security key from the register includes: configuring the hardware encryption / decryption module so that the hardware encryption / decryption module directly reads the security key from the register.

[0011] In some embodiments, reading the security key from the one-time programmable memory through the boot program includes: reading out the security key stored in the one-time programmable memory through the boot program before the JTAG debugger is turned on.

[0012] In some embodiments, the method further includes: enabling the hardware encryption and decryption device to perform encryption and decryption operations using the security key.

[0013] In a second aspect, a device for processing a security key is provided. The device includes: a one-time programmable memory configured to store a security key; a hardware encryption and decryption module configured to perform encryption and decryption processing using the security key; a processing module configured to: in response to a power-on startup instruction, read the security key from the one-time programmable memory and write the security key into a register; and in response to a use security key instruction, enable the hardware encryption and decryption module to read the security key from the register.

[0014] In some embodiments, the processing module is further configured to, after writing the security key into the register: set access to the security key in the one-time programmable memory to a locked state; and set access to the security key in the register to a locked state.

[0015] In some embodiments, the processing module is configured to: configure the hardware encryption and decryption module so that the hardware encryption and decryption module directly reads the security key from the register.

[0016] In some embodiments, the device further includes: the register is set as a normally powered register.

[0017] In some embodiments, the processing module is further configured to: enable the hardware encryption and decryption module to read encryption and decryption data from a random access memory or a cache memory in response to the power-on startup instruction; and clear the contents in the random access memory or the cache memory.

[0018] In some embodiments, the apparatus further comprises: a boot memory configured to store a boot program, wherein the processing module is configured to run the boot program in response to the power-on boot instruction so as to perform a process.

[0019] In a third aspect, an electronic device is provided, comprising: a memory configured to store an instruction set; and a processor configured to execute the instruction set to perform the above-mentioned method for processing a security key.

[0020] According to an embodiment of the present disclosure, in a method for processing a security key, in response to a power-on startup instruction, a security key is read from a one-time programmable memory through a startup program, and the security key is written into a register. This step utilizes the security characteristics of the execution link of the startup program stage to achieve protection of the security key. Then, in response to the use of the security key instruction, the hardware encryption and decryption module reads the security key from the register. This step does not require the design of a complex hardware OTP key reading module to read the security key, and achieves protection of the security key at a low cost. In this process, the CPU cannot access the security key, thereby ensuring the security of the security key and preventing the security key from being leaked due to a TEE software security vulnerability.

[0021] Furthermore, after the security key is written into the register, the access to the security key in the one-time programmable memory is set to a locked state through the startup program; after being set to the locked state, the security key in the one-time programmable memory can no longer be read by the central processing unit, and the locked state can no longer be cleared by the central processing unit. Only a power-on reset can clear the locked state, thereby ensuring that the security key in the one-time programmable memory can no longer be accessed by subsequent software.

[0022] In addition, the startup program sets the access to the security key in the register to a locked state. After the locked state is set, the security key in the permanent power register can no longer be read by the central processing unit, and the locked state can no longer be cleared by the central processing unit. Only a power-on reset can clear the locked state, ensuring that the security key in the permanent power register can no longer be accessed by subsequent software. At this time, only the hardware encryption and decryption module can access the security key in the permanent power register.

[0023] The above-mentioned records related to the invention content are only an overview of the technical solution of the present application. In order to enable ordinary technicians in the field to more clearly understand the technical solution of the present application, and then implement it according to the text of the specification and the contents recorded in the drawings, and to make the above-mentioned purpose and other purposes, features and advantages of the present application easier to understand, the following is an explanation in combination with the specific implementation mode and drawings of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features and effects of the specific implementation methods of the present application and other related contents, and cannot be considered as limiting the present application. In the accompanying drawings of the specification:

[0025] Figure 1 is a flowchart illustrating a method of processing a security key according to an embodiment of the present disclosure;

[0026] Figure 2 is a flowchart illustrating a method of processing a security key according to an embodiment of the present disclosure;

[0027] Figure 3 is a flowchart illustrating a method of processing a security key according to an embodiment of the present disclosure;

[0028] Figure 4 is a block diagram illustrating an apparatus for processing a security key according to an embodiment of the present disclosure;

[0029] Figure 5 is a module schematic diagram showing an apparatus for processing security keys according to an embodiment of the present disclosure;

[0030] Figure 6 is a block diagram illustrating an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0032] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.

[0033] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.

[0034] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.

[0035] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.

[0036] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.

[0037] In this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.

[0038] As mentioned in the background technology, one of the existing technical means is to rely on the security of the trusted execution environment TEE. As the complexity of TEE increases, it may bring potential security vulnerabilities, and the security key is at risk of being accessed by malware and leaked. Another method is to require complex hardware design to implement the OTP key reading module to protect and control the key security in the OTP, which will increase the cost a lot. This application designs a method combining software and hardware to achieve low-cost protection of security keys.

[0039] The core technical idea of ​​this application is: borrowing the security brought by the security environment in which the startup program itself runs, reading the security key and writing it into the register through the startup program, and then using this register as a transit to provide the corresponding security key to the hardware encryption and decryption module. During the whole method process, it does not rely on the TEE environment, and does not require complex hardware design and implementation, and can achieve low-cost protection of security keys. The startup program of this application is the BootRom program (startup code) on the Soc chip.

[0040] Specific implementations according to embodiments of the present disclosure will be described in detail hereinafter with reference to exemplary embodiments and in conjunction with the accompanying drawings.

[0041] First, some of the terms involved in this application are explained as follows:

[0042] OTP is a type of memory, which means One-Time Programmable; once the program is burned into it, it cannot be changed or erased again.

[0043] EFUSE is a one-time programmable memory.

[0044] The one-time programmable memory in this embodiment includes but is not limited to: OTP and EFUSE.

[0045] The BootRom program is the startup code integrated into the operating system.

[0046] Figure 1 is a flow chart showing a method for processing a security key according to an embodiment of the present disclosure. Figure 1 As shown, the method for processing security keys includes the following steps S101 to S104.

[0047] In step S101, in response to the power-on startup instruction, the security key is read from the one-time programmable memory through the startup program. In actual operation, after the Soc chip is powered on, the CPU will first execute the BootRom program solidified on the Soc chip. The BootRom program is executed in a secure environment.

[0048] In step S102, the security key is written into the register. In the present embodiment, the register is preferably a normally powered register, and the normally powered register mainly refers to a register that remains powered even in a low power state. The reason for choosing the normally powered register is mainly to solve the problem that the data is still there after waking up from sleep mode. In order to achieve low power consumption during standby mode, only a few components will normally be left to remain powered, and the security key needs to be stored in such a component register. Compared with the prior art of directly storing the security key in the encryption and decryption module, it requires the encryption and decryption module to remain powered, and this design will increase the cost and power consumption. The present application utilizes the register in the chip that originally maintains the normal power supply to store the security key, so it does not bring additional cost and power consumption increase.

[0049] In addition, in this embodiment, before the Joint Test Group (JTAG) debugger is turned on, the BootRom program needs to read the security key from the OTP through the CPU and write the security key into the constant power register. Because JTAG is a debugging method, if the maskrom code stores the security key after completing the JTAG initialization, there is a possible situation: the security key is obtained from the CPU through the JTAG method, which reduces the security of the security key.

[0050] In step S103, in response to the use of the security key instruction, the hardware encryption and decryption module reads the security key from the register. After the BootRom loads the firmware to execute the firmware program, when the software in the TEE needs to use the security key to encrypt and decrypt data, the hardware encryption and decryption module is configured through the CPU. The hardware encryption and decryption module reads the security key from the register in the master control mode. The data is encrypted and decrypted according to the security key. In the prior art, the original master control mode is for the CPU to control the reading, but the present application changes it to the encryption and decryption module to control the reading, bypassing the risk that the CPU can be held hostage. Therefore, in this process, the CPU cannot access the security key, thereby ensuring the security of the key and preventing the key from being leaked due to TEE software security vulnerabilities.

[0051] Figure 2A flow chart of a method for processing a security key according to an embodiment of the present disclosure is shown. In this embodiment, step S203 is also included between step S202 (i.e., step S102) and step S204 (i.e., step S103): setting the access to the security key in the one-time programmable memory to a locked state through the startup program; and setting the access to the security key in the register to a locked state through the startup program. After setting the security key in the one-time programmable memory to a locked state, the security key in the one-time programmable memory can no longer be read by the central processing unit, and the locked state can no longer be cleared by the central processing unit. Only a power-on reset can clear the locked state, ensuring that the security key in the one-time programmable memory can no longer be accessed by subsequent software.

[0052] After setting the security key in the constant power register to the locked state, the security key in the constant power register can no longer be read by the CPU, and the locked state can no longer be cleared by the CPU. Only power-on reset can clear the locked state, ensuring that the security key in the constant power register can no longer be accessed by subsequent software. At this time, only the hardware encryption and decryption module can access the security key in the constant power register.

[0053] Steps S201 to S202 are the same as steps S101 to S102, and step S204 is the same as step S103, so they are not described repeatedly.

[0054] Figure 3 A flowchart of a method for processing a security key according to an embodiment of the present disclosure is shown. In this embodiment, after the boot program sets the access to the security key in the one-time programmable memory to a locked state; and the boot program sets the access to the security key in the register to a locked state, the method further includes step S304: determining whether a random access memory or a cache memory associated with the security key is used by the boot program; and if the random access memory or the cache memory is used, clearing the contents of the random access memory or the cache memory.

[0055] Steps S301 to S303 are the same as steps S201 to S203, and step S305 is the same as step S204, and will not be described repeatedly here.

[0056] It should be noted that, by using the boot program, the access to the security key in the one-time programmable memory is set to a locked state; and by using the boot program, the access to the security key in the register is set to a locked state, or the contents in the random access memory or the cache memory are cleared. These steps need to be performed before the JTAG debugger is turned on to prevent the JTAG from accessing the security key through debugging.

[0057] Figure 4 4 is a block diagram showing an apparatus 400 for processing security keys according to an embodiment of the present disclosure. The apparatus 400 includes: a processing module 401, a one-time programmable memory 402, and a hardware encryption / decryption module 403. The one-time programmable memory 402 is configured to store security keys. The hardware encryption / decryption module 403 is configured to perform encryption / decryption processing using the security keys. The processing module 401 is configured to: in response to a power-on startup instruction, read the security key from the one-time programmable memory 402, and write the security key into a register; and in response to a use security key instruction, enable the hardware encryption / decryption module 403 to read the security key from the register.

[0058] In some embodiments, the device 400 also includes the register. The register is set to a normally powered register. The reason for choosing the normally powered register is mainly to solve the problem that the data is still there after waking up from sleep mode. In order to achieve low power consumption during standby mode, only a few components will normally be left to maintain power supply, and the security key needs to be stored in such a component register. Compared with the prior art of directly storing the security key in the encryption and decryption module, it requires the encryption and decryption module to maintain normal power supply, and this design will increase the cost and power consumption. The present application utilizes the register in the chip that originally maintains normal power supply to store the security key, so it does not bring additional cost and power consumption increase.

[0059] In some embodiments, the processing module 401 is configured to: configure the hardware encryption and decryption module 403 so that the hardware encryption and decryption module 403 directly reads the security key from the register. In actual operation, after the device 400 is powered on, the processing module 401 will first execute the BootRom program solidified on the Soc chip. The BootRom program is executed in a secure environment. After the BootRom loads the firmware to execute the firmware program, when the software in the TEE needs to use the security key to encrypt and decrypt data, the hardware encryption and decryption module 403 is configured through the processing module 401. The hardware encryption and decryption module 403 reads the security key from the register in the master control mode. The hardware encryption and decryption module 403 performs encryption and decryption operations on the data according to the security key. In the prior art, the original master control mode is that the processing module 401 controls the reading, and the present application changes it to the encryption and decryption module to control the reading, bypassing the risk that the processing module 401 can be held hostage. Therefore, in this process, the processing module 401 cannot access the security key, thereby ensuring the security of the key and will not leak the key due to TEE software security vulnerabilities.

[0060] In some embodiments, the processing module 401 is further configured to, after writing the security key into the register: set access to the security key in the one-time programmable memory 402 to a locked state; and set access to the security key in the register to a locked state.

[0061] After setting the security key in the one-time programmable memory 402 to a locked state, the security key in the one-time programmable memory 402 can no longer be read by the central processing unit, and the locked state cannot be cleared by the central processing unit. Only a power-on reset can clear the locked state, ensuring that the security key in the one-time programmable memory 402 can no longer be accessed by subsequent software.

[0062] After the security key in the permanent power register is set to the locked state, the security key in the permanent power register can no longer be read by the central processing unit, and the locked state can no longer be cleared by the central processing unit. Only a power-on reset can clear the locked state, ensuring that the security key in the permanent power register can no longer be accessed by subsequent software. At this time, only the hardware encryption and decryption module 403 can access the security key in the permanent power register.

[0063] In some embodiments, the processing module 401 is further configured to: enable the hardware encryption and decryption module 403 to read encryption and decryption data from a random access memory or a cache memory in response to the power-on startup instruction; and clear the contents in the random access memory or the cache memory.

[0064] In some embodiments, the device 400 further includes a boot memory. The boot memory is configured to store a boot program, wherein the processing module 401 is configured to run the boot program in response to the power-on boot instruction to perform processing. It should be noted that the boot program is used to set the access to the security key in the one-time programmable memory 402 to a locked state; and the boot program is used to set the access to the security key in the register to a locked state, or to clear the contents in the random access memory or the cache memory. These steps all need to be performed before the JTAG debugger is turned on to prevent JTAG from accessing the security key through debugging.

[0065] In some embodiments, the device 400 may be a SoC and include a CPU. In this case, the CPU may include a processing module 401. In other embodiments, the device 400 may be a CPU.

[0066] The above device 400 can read the security key without involving a complex hardware OTP key reading module, thereby realizing the protection of the security key at a low cost. And the processing module 401 cannot access the security key, thereby ensuring the security of the security key and preventing the security key from being leaked due to a TEE software security vulnerability.

[0067] Figure 5 is a schematic diagram of a module of an apparatus for processing a security key according to an embodiment of the present disclosure. Figure 5 As shown, the key is first read from OTP / EFUSE through BootRom, and the key is written to the constant power register. Subsequently, the OTPLock flag is set, and the constant power register Lock flag is set. When necessary, the hardware encryption and decryption module reads the key from the constant power register, and finally uses the key to perform encryption and decryption operations. In addition, the encryption and decryption data from the external RAM is read through the hardware encryption and decryption module. The hardware encryption and decryption module uses the key to perform encryption and decryption operations on the encryption and decryption data.

[0068] In some embodiments, Figure 5 The device shown is a SoC chip. In some embodiments, the SoC chip may include a CPU or a processing module for performing various processes.

[0069] Figure 6 1 is a schematic diagram showing a module of an electronic device 600 according to an embodiment of the present disclosure. The electronic device 600 includes but is not limited to: a network device, an embedded device, a programmable device, an intelligent mobile terminal, etc. In actual product presentation, it can be presented as a chip or an independent hardware module, wherein the chip can be set in the target terminal device.

[0070] like Figure 6As shown, the electronic device 600 includes a memory 601 and a processor 602. The memory 601 is configured to store an instruction set. The processor 602 is configured to perform the following actions: in response to a power-on startup instruction, read a security key from a one-time programmable memory through a startup program, and write the security key into a register; and in response to a use security key instruction, enable a hardware encryption and decryption module to read the security key from the register.

[0071] In response to the power-on startup instruction, the startup program reads the security key from the one-time programmable memory and writes the security key into the register. This step utilizes the security characteristics of the execution link in the startup program stage to protect the security key. Then, in response to the use of the security key instruction, the hardware encryption and decryption module reads the security key from the register. This step does not require the design of a complex hardware OTP key reading module to read the security key, and protects the security key at a low cost. In this process, the CPU cannot access the security key, thereby ensuring the security of the security key and preventing the security key from being leaked due to TEE software security vulnerabilities.

[0072] In some embodiments, the instruction set may include various actions in the method for processing a security key described above. The processor 602 is configured to perform various actions in the method for processing a security key described above.

[0073] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.

Claims

1. A method for processing a security key, characterized in that: include: In response to a power-on startup instruction, before the JTAG debugger is turned on, a security key is read from a one-time programmable memory through a startup program, and the security key is written into a register; Setting access to the security key in the one-time programmable memory to a locked state by the boot program until the locked state is cleared only by a power-on reset; Setting access to the security key in the register to a locked state by the boot program until the locked state is cleared only by a power-on reset; as well as In response to the use security key instruction, the hardware encryption and decryption module is configured so that the hardware encryption and decryption module directly reads the security key from the register in a master control mode.

2. The method according to claim 1, characterized in that Also includes: determining whether a random access memory or a cache memory associated with the security key is used by the boot procedure; as well as If the random access memory or the cache memory is used, the content in the random access memory or the cache memory is cleared.

3. The method according to claim 1, characterized in that: Also includes: The firmware is loaded and executed through the boot program.

4. The method according to any one of claims 1 to 3, characterized in that Also includes: The hardware encryption / decryption module is enabled to perform encryption / decryption operations using the security key.

5. A device for processing a security key, characterized in that: include: a one-time programmable memory configured to store a security key; A hardware encryption and decryption module, configured to perform encryption and decryption processing using the security key; The processing module is configured as follows: In response to a power-on startup instruction, before the JTAG debugger is turned on, the security key is read from the one-time programmable memory through a startup program, and the security key is written into a register; Setting access to the security key in the one-time programmable memory to a locked state by the boot program until the locked state is cleared only by a power-on reset; Setting access to the security key in the register to a locked state by the boot program until the locked state is cleared only by a power-on reset; as well as In response to the use security key instruction, the hardware encryption / decryption module is configured so that the hardware encryption / decryption module directly reads the security key from the register in a master control mode.

6. The device according to claim 5, characterized in that Also includes: The register is set as a normally powered register.

7. The device according to claim 5, characterized in that The processing module is further configured to: In response to the power-on startup instruction, the hardware encryption and decryption module reads encryption and decryption data from a random access memory or a cache memory; and Clear the contents of the random access memory or the cache memory.

8. The device according to any one of claims 5 to 7, characterized in that Also includes: a boot memory configured to store the boot program, The processing module is configured to run the startup program in response to the power-on startup instruction so as to perform processing.

9. An electronic device, characterized in that: include: a memory configured to store an instruction set; as well as A processor configured to execute the instruction set to perform the method according to any one of claims 1 to 4.