Trusted execution environment isolation method and device, electronic equipment and storage medium
The isolated environment of a trusted execution environment is constructed through hardware isolation technology, and the key derivation function is used to generate and rotate dynamic keys, which solves the problem that the trusted execution environment in the existing technology is prone to vulnerabilities when dealing with complex attacks, and improves the security and attack resistance of the operating system.
Patent Information
- Application Number
- CN202411872697.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-25
AI Technical Summary
The existing trusted execution environment is prone to vulnerabilities when dealing with complex attacks, affecting the reliability and attack resistance of the operating system.
Dividing hardware resources through hardware isolation technology, building an isolated environment between the secure world and the ordinary world, using key derivation functions to generate dynamic keys, and key rotation is carried out when needed to enhance the security of dynamic keys.
Through the isolation of hardware resources and the rotation of dynamic keys, the possibility of vulnerabilities in trusted execution environments when dealing with complex attacks is reduced, and the reliability and attack resistance of the operating system are improved.
Smart Images

Figure CN119885172A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a trusted execution environment isolation method, device, electronic device and storage medium. Background Art
[0002] Dianhong IoT Operating System is an operating system designed to improve the security of various devices and data in the power Internet of Things. The research content covers four major aspects: terminal equipment security, communication security, data security and access security.
[0003] It should be noted that Trusted execution environment (TEE) isolation technology is an important technology in the operating system, but the current solutions are prone to vulnerabilities when dealing with complex attacks, which affects the reliability and anti-attack capabilities of the operating system and needs to be urgently resolved. Summary of the invention
[0004] The embodiments of the present invention provide a trusted execution environment isolation method, device, electronic device and storage medium, which solve the problem that the trusted execution environment is prone to vulnerabilities when responding to complex attacks.
[0005] According to one aspect of the present invention, a trusted execution environment isolation method is provided, which may include:
[0006] Using hardware isolation technology, an isolated environment of secure world and normal world is constructed by dividing hardware resources, where the secure world corresponds to the trusted execution environment;
[0007] For a boot process corresponding to the trusted execution environment, during the boot process, a first dynamic key is generated using a key derivation function based on hardware resources allocated to the secure world;
[0008] In response to the dynamic key rotation instruction, a second dynamic key is generated using a key derivation function, and the first dynamic key is rotated based on the second dynamic key.
[0009] According to another aspect of the present invention, a trusted execution environment isolation device is provided, which may include:
[0010] An isolation environment construction module can be used to utilize hardware isolation technology to construct an isolation environment of a secure world and a normal world by dividing hardware resources, wherein the secure world corresponds to a trusted execution environment;
[0011] A first dynamic key generation module may be used to generate a first dynamic key during a boot process corresponding to a trusted execution environment by using a key derivation function based on hardware resources allocated to the secure world;
[0012] The first dynamic key rotation module can be used to generate a second dynamic key using a key derivation function in response to a dynamic key rotation instruction, and rotate the first dynamic key based on the second dynamic key.
[0013] According to another aspect of the present invention, there is provided an electronic device, which may include:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the trusted execution environment isolation method provided by any embodiment of the present invention is implemented when the at least one processor executes the computer program.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a processor to implement the trusted execution environment isolation method provided by any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention utilizes hardware isolation technology to construct an isolated environment of a secure world and a normal world by dividing hardware resources. The secure world corresponds to a trusted execution environment, thereby realizing the isolation process of the trusted execution environment; then, for the startup process corresponding to the trusted execution environment, during the startup process, a key derivation function based on the hardware resources divided to the secure world is used to generate a first dynamic key, thereby realizing the matching between the generated first dynamic key and the secure world, that is, the trusted execution environment; in response to the dynamic key rotation instruction, a second dynamic key is generated by using a key derivation function, and then the first dynamic key is rotated based on the second dynamic key, thereby enhancing the security of the dynamic key. The above technical solution isolates the trusted execution environment by dividing hardware resources, generates a first dynamic key matching the trusted execution environment, and rotates the first dynamic key when necessary, thereby enhancing the security of the dynamic key applied in the trusted execution environment. The dynamic key is an important protective measure against complex attacks, thereby reducing the possibility of vulnerabilities in the trusted execution environment when dealing with complex attacks.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a trusted execution environment isolation method provided according to an embodiment of the present invention;
[0022] Figure 2 is a flowchart of another trusted execution environment isolation method provided according to an embodiment of the present invention;
[0023] Figure 3 is a flowchart of another trusted execution environment isolation method provided according to an embodiment of the present invention;
[0024] Figure 4 is a structural block diagram of a trusted execution environment isolation device provided according to an embodiment of the present invention;
[0025] Figure 5 It is a structural schematic diagram of an electronic device that implements the trusted execution environment isolation method of an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1It is a flow chart of a trusted execution environment isolation method provided in an embodiment of the present invention. This embodiment is applicable to the case of trusted execution environment isolation. The method can be executed by a trusted execution environment isolation device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware. The device can be integrated on an electronic device, and the electronic device can be various user terminals or servers.
[0029] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0030] S110. Using hardware isolation technology, an isolation environment of a secure world and a normal world is constructed by dividing hardware resources, wherein the secure world corresponds to a trusted execution environment.
[0031] Among them, hardware isolation technology, such as open source TrustZone, is used to construct an isolated environment of the secure world and the ordinary world by dividing hardware resources. Among them, the secure world corresponds to the trusted execution environment, which can be understood as building a trusted space for computing. The trusted space exists independently of the operating system and is a trusted isolation environment. Data is only calculated in the trusted isolation environment (i.e., the secure environment), and its security is guaranteed by spatial isolation; the ordinary world corresponds to the Rich Execution Environment (REE).
[0032] S120. For a startup process corresponding to the trusted execution environment, during the startup process, a first dynamic key is generated using a key derivation function based on hardware resources allocated to the secure world.
[0033] Among them, for the startup process corresponding to the trusted execution environment, for example, it can be the startup process of the operating system or electronic device corresponding to the trusted execution environment. In the startup process, a key derivation function based on hardware resources can be obtained, and the hardware resources can especially be hardware resources allocated to the secure world among all hardware resources. Then, the key derivation function is used to generate a first dynamic key, and in particular, the first dynamic key can be generated in real time. In an embodiment of the present invention, optionally, in addition to using the key derivation function, a first dynamic key of a corresponding type, such as a symmetric key or an asymmetric key, etc., can also be generated using security requirements to meet the needs of different security scenarios.
[0034] On this basis, optionally, secure storage technology can be used, such as hardware encrypted storage (such as a security chip) or an encrypted file system, to securely store the generated first dynamic key, thereby ensuring that the first dynamic key will not be accessed, stolen or tampered with without authorization during the storage process. Even if the operating system is attacked, the first dynamic key can be effectively protected.
[0035] Optionally, in order to prevent the dynamic key from being lost or damaged, a dynamic key backup mechanism can be established, that is, the dynamic key is backed up regularly and the backup is stored in a safe location. In this way, the dynamic key can be restored through the backup when necessary to ensure the normal operation of the operating system.
[0036] S130. In response to the dynamic key rotation instruction, generate a second dynamic key using a key derivation function, and rotate the first dynamic key based on the second dynamic key.
[0037] Among them, the dynamic key rotation instruction can be understood as an instruction to rotate the first dynamic key of the current application. The instruction can be triggered periodically or according to a preset event, etc. This can be set according to actual needs and is not specifically limited here.
[0038] In response to the dynamic key rotation instruction, a second dynamic key is generated using a key derivation function, and then the currently applied first dynamic key is rotated based on the second dynamic key, that is, a new dynamic key is generated and replaces the old dynamic key, thereby reducing the risk of dynamic key leakage.
[0039] On this basis, optionally, during the dynamic key rotation process, it is necessary to ensure a smooth transition between the old and new dynamic keys as much as possible to ensure the continuous availability of the operating system.
[0040] The technical solution of the embodiment of the present invention utilizes hardware isolation technology to construct an isolated environment of a secure world and a normal world by dividing hardware resources. The secure world corresponds to a trusted execution environment, thereby realizing the isolation process of the trusted execution environment; then, for the startup process corresponding to the trusted execution environment, during the startup process, a key derivation function based on the hardware resources divided to the secure world is used to generate a first dynamic key, thereby realizing the matching between the generated first dynamic key and the secure world, that is, the trusted execution environment; in response to the dynamic key rotation instruction, a second dynamic key is generated by using a key derivation function, and then the first dynamic key is rotated based on the second dynamic key, thereby enhancing the security of the dynamic key. The above technical solution isolates the trusted execution environment by dividing hardware resources, generates a first dynamic key matching the trusted execution environment, and rotates the first dynamic key when necessary, thereby enhancing the security of the dynamic key applied in the trusted execution environment. The dynamic key is an important protective measure against complex attacks, thereby reducing the possibility of vulnerabilities in the trusted execution environment when dealing with complex attacks.
[0041] An optional technical solution, after using hardware isolation technology to construct an isolated environment of a secure world and a normal world by dividing hardware resources, the above trusted execution environment isolation method also includes:
[0042] In response to the isolation control instruction, at least one of the memory isolation, interrupt isolation and instruction set isolation between the secure world and the ordinary world is controlled to ensure isolation and independence between the secure world and the ordinary world.
[0043] The isolation control instruction can be understood as an instruction to control at least one of the memory isolation, interrupt isolation, and instruction set isolation corresponding to the isolation environment. In response to the instruction, at least one of the memory isolation, interrupt isolation, and instruction set isolation between the secure world and the ordinary world is controlled to ensure isolation and independence between the secure world and the ordinary world.
[0044] The above technical solution can accurately control the isolation boundary between the secure world and the ordinary world to prevent the two from interfering with each other, thereby ensuring the independence and security of the operating system.
[0045] Figure 2It is a flowchart of another trusted execution environment isolation method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, after generating the first dynamic key using a key derivation function based on hardware resources allocated to the secure world, it may also include: in response to a usage event for the first dynamic key, determining first information of the user of the first dynamic key and second information corresponding to a plurality of pre-set authorization objects; determining whether the plurality of authorization objects include the user object based on the first information and each second information; if yes, sending the first dynamic key to the user object so that the user object performs security operations in the secure world based on the received first dynamic key. Among them, the explanations of terms that are the same as or corresponding to the above-mentioned embodiments are not repeated here.
[0046] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0047] S210. Using hardware isolation technology, an isolation environment of a secure world and a normal world is constructed by dividing hardware resources, wherein the secure world corresponds to a trusted execution environment.
[0048] S220. For a startup process corresponding to the trusted execution environment, during the startup process, a first dynamic key is generated using a key derivation function based on hardware resources allocated to the secure world.
[0049] S230. In response to a usage event for the first dynamic key, determine first information of a usage object of the first dynamic key and second information corresponding to a plurality of preset authorization objects.
[0050] The usage event may be understood as an event triggered by the usage object for using the first dynamic key.
[0051] The use object can be understood as an object that is expected to use the first dynamic key. In the embodiment of the present invention, the object can be, for example, a component or / and a process, which depends on the actual situation and is not specifically limited here. The first information can be understood as relevant information of the use object.
[0052] The authorized object can be understood as an object that has been authorized to use the first dynamic key, and there are usually multiple such objects. Each authorized object corresponds to its own second information.
[0053] In response to the usage event, first information and a plurality of second information are determined.
[0054] S240. Determine whether the plurality of authorization objects include a usage object according to the first information and each piece of second information.
[0055] Among them, according to the first information and each second information, it can be determined whether each authorization object includes a usage object.
[0056] S250. In the case of yes, the first dynamic key is sent to the user object, so that the user object performs a security operation in the secure world based on the received first dynamic key.
[0057] If each authorized object includes a user object, which means that the user object can use the first dynamic key, the first dynamic key is sent to the user object so that the user object performs security operations in the secure world based on the received first dynamic key.
[0058] S260. In response to the dynamic key rotation instruction, generate a second dynamic key using a key derivation function, and rotate the first dynamic key based on the second dynamic key.
[0059] The technical solution of the embodiment of the present invention strictly controls and authorizes the users of the first dynamic key, and only authorized users can use the first dynamic key to perform security operations. That is, through the access control mechanism, the use scope and authority of the first dynamic key can be limited to prevent abuse, thereby further enhancing the security of the first dynamic key.
[0060] In an optional technical solution, after sending the first dynamic key to the user object, the trusted execution environment isolation method further includes:
[0061] Monitoring the usage of the first dynamic key by the user;
[0062] In the case where the usage method may cause the first dynamic key to be tampered with, the user is restricted from continuing to use the first dynamic key and an alarm is issued.
[0063] The above technical solution further enhances the security of the first dynamic key by monitoring the usage of the first dynamic key by the user and restricting the user from continuing to use the first dynamic key when it is determined that the usage will cause the first dynamic key to be tampered with.
[0064] Figure 3It is a flow chart of another trusted execution environment isolation method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the above-mentioned trusted execution environment isolation method also includes: building a distributed ledger based on blockchain technology, and recording the startup process based on the distributed ledger; verifying the integrity of each component started during the startup process, and comparing the verification results with the records in the distributed ledger to determine whether there are unauthorized abnormal situations in the startup process; if so, an alarm is issued. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0065] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0066] S310. Using hardware isolation technology, an isolation environment of a secure world and a normal world is constructed by dividing hardware resources, wherein the secure world corresponds to a trusted execution environment.
[0067] S320. For a startup process corresponding to the trusted execution environment, during the startup process, a first dynamic key is generated using a key derivation function based on hardware resources allocated to the secure world.
[0068] S330. Build a distributed ledger based on blockchain technology and record the startup process based on the distributed ledger.
[0069] Among them, a distributed ledger is built based on blockchain technology, so that the startup process can be recorded based on the distributed ledger. Specifically, various events and status information in the startup process can be recorded, such as the timestamp of the startup phase, the executed code hash and verification results, etc., so as to ensure that each node can independently record and verify the log, prevent the log from being tampered with or forged, and ensure the authenticity and integrity of the log.
[0070] S340. Perform integrity verification on each component started during the startup process, and determine whether there are any unauthorized abnormal situations during the startup process by comparing the verification results with the records in the distributed ledger.
[0071] Among them, the integrity of each component started during the startup process is verified. Exemplarily, for each component started during the startup process, by calculating and comparing the hash value of the component, it is determined whether the component has been tampered with during the startup process, thereby achieving integrity verification of the component.
[0072] On this basis, by further comparing the verification results with the records related to the startup process in the distributed ledger, it can be determined whether there are any unauthorized abnormal situations in the startup process.
[0073] S350. If yes, issue an alarm.
[0074] Among them, if there is an abnormal situation, an alarm will be issued in time to ensure the safety of the startup process.
[0075] S360. In response to the dynamic key rotation instruction, generate a second dynamic key using a key derivation function, and rotate the first dynamic key based on the second dynamic key.
[0076] The technical solution of the embodiment of the present invention can effectively detect whether there are unauthorized abnormal situations in the startup process by applying a distributed ledger to record the startup process and comparing the record results with the integrity verification results of each component started during the startup process, thereby ensuring the security of the startup process.
[0077] An optional technical solution, after the startup process is recorded based on the distributed ledger, the above-mentioned trusted execution environment isolation method also includes:
[0078] In response to an audit instruction for a distributed ledger, a target record to be audited among all records is determined, and the target record is displayed, so as to determine whether there is a security problem in the startup process by analyzing the target record.
[0079] The above technical solution, by auditing the distributed ledger, achieves further judgment on security issues during the startup process, thereby further ensuring the security of the startup process.
[0080] In order to better understand the above-mentioned various technical solutions and related technical solutions as a whole, the following is an exemplary description with reference to specific examples. For example, the specific implementation process is as follows:
[0081] S1: Build a trust chain. Build a trust chain from hardware resources to software resources to lay the initial trust foundation for the operating system. The specific implementation is as follows:
[0082] Generate various types of dynamic keys according to different security requirements. In terms of dynamic key management, the generated dynamic keys can be effectively stored, distributed, updated, and revoked to ensure the security and availability of dynamic keys. Here, a refined dynamic key management mechanism is used to prevent dynamic key leakage, thereby providing a solid foundation for the encryption security of the entire operating system.
[0083] Verify the integrity of hardware and software components, and ensure that components have not been modified without permission during operation by calculating and comparing hash values, thereby ensuring the integrity of the operating system. Advanced hash algorithms and verification mechanisms are used here to monitor the operating status of hardware and software components in real time. Once an abnormality is found, measures are taken immediately to effectively prevent tampering and ensure the stable operation of the operating system.
[0084] Provide high-quality random numbers for encryption and security operations to prevent attackers from cracking system security by predicting random numbers. For example, random numbers are generated using physical noise or preset algorithms. The randomness is strong and unpredictable, providing a reliable source of random numbers for encryption algorithms, greatly increasing the difficulty for attackers to crack the operating system.
[0085] S2: Create an isolated environment. With the help of TrustZone hardware isolation technology, an isolated environment is built between the secure world and the ordinary world to protect security operations and sensitive data. The specific implementation is as follows:
[0086] Safely store sensitive data such as dynamic keys, certificates, and security configurations to prevent them from being stolen or tampered with in a secure environment, providing basic support for operating system security. Perform security operations such as encryption, decryption, and identity authentication in a secure world to ensure the security and stability of the operating system.
[0087] Manage and control the isolation mechanism between the secure world and the normal world, such as memory isolation, interrupt isolation, and instruction set isolation, to ensure the isolation and independence between the two worlds.
[0088] Monitor and audit security operations in the security world, detect abnormal behaviors and security vulnerabilities, issue alerts and take corresponding security measures, and stay vigilant at all times. Here, security operations can be monitored and audited in detail, and once an abnormality is found, an alert will be issued immediately to protect the security of the operating system.
[0089] Provides a secure interface for external applications and operating systems to interact with the trusted execution environment. A secure interaction channel is provided here to ensure that external applications and operating systems can exchange data and perform operations with the trusted execution environment under the premise of security.
[0090] S3: Boot program integrity verification. Through a multi-level verification algorithm, the integrity of the process from the boot program to the operating system kernel is verified step by step. The specific implementation is as follows:
[0091] Start the initial boot process of the operating system, load the subsequent boot phase and the operating system kernel-related code, and perform basic verification on the loaded code to ensure its integrity.
[0092] According to the preset verification strategy and algorithm, the integrity of the code loaded at different stages is verified, such as by calculating the hash value of the code and comparing it with the pre-stored hash value to determine whether the code has been modified.
[0093] Measure various parts of the bootloader and operating system kernel, record their initial hash values and other integrity indicators, and then compare the current measurement values with the initial values in the subsequent verification process to detect whether modifications have occurred.
[0094] On this basis, corresponding measures can be taken if the code is found to be modified during the verification process, such as stopping the operating system startup, issuing an alarm, or starting a backup boot mechanism, to ensure the security of the operating system.
[0095] S4: Dynamic key management. The dynamic key derivation function based on hardware resources and secure storage technology are used to realize the generation, rotation and protection of dynamic keys during the startup process. The specific implementation is as follows:
[0096] The dynamic key derivation function using hardware resources can generate new dynamic keys in real time during the startup process according to the preset algorithm and seed information to meet the needs of different security scenarios.
[0097] Use secure storage technology, such as hardware encrypted storage or encrypted file system, to securely store the generated dynamic keys to ensure that the dynamic keys will not be accessed, stolen or tampered with without authorization during the storage process. Even if the operating system is attacked, the dynamic keys can be effectively protected.
[0098] The dynamic key rotation instruction is triggered regularly or according to preset events to rotate the used dynamic keys. By generating new dynamic keys and replacing old dynamic keys, the risk of dynamic key leakage is reduced. In addition, during the rotation process, a smooth transition between the new and old dynamic keys must be ensured to ensure the continuous availability of the operating system and avoid operating system unavailability.
[0099] The use of dynamic keys is strictly controlled and authorized. Only authorized components or processes can use dynamic keys for security operations such as encryption and decryption. The access control mechanism is used to limit the scope and permissions of dynamic keys, which can effectively prevent the abuse of dynamic keys.
[0100] Real-time monitoring of the status of dynamic keys, such as validity period, number of uses, and whether they have been tampered with, etc. Once an abnormality is found in the dynamic key, an alarm can be issued in time and corresponding measures can be taken, such as regenerating the dynamic key or limiting the use of the dynamic key, to ensure the security of the dynamic key.
[0101] In order to prevent the dynamic key from being lost or damaged, a dynamic key backup mechanism is established, that is, the dynamic key is backed up regularly and the backup is stored in a safe place. In this way, the dynamic key can be restored through the backup when necessary to ensure the normal operation of the operating system.
[0102] S5: Power equipment identity authentication and verification. Combine the physical unclonable function and the device unique identifier to determine the unique identity authentication of the power equipment. The specific implementation is as follows:
[0103] The unique identification is generated by using tiny physical differences in the chip manufacturing process. The Physical Unclonable Functions (PUF) response of each power device is unique and difficult to copy or predict. It generates power device-specific fingerprints by responding to input stimuli (such as power supply noise and temperature changes). These fingerprints remain unchanged throughout the life cycle of the power device, providing a unique physical identification for the power device.
[0104] Each power device is assigned a unique digital and string identifier, which can be the serial number of the power device, the Media Access Control (MAC) address, or other unique identifier determined during the manufacturing or configuration process of the power device. This identifier is combined with the fingerprint generated by the PUF to form the unique identity of the power device.
[0105] When the power equipment is started and authenticated, the fingerprint and unique identifier of the power equipment generated by PUF can be compared with the identity information of the pre-authorized power equipment, and encryption algorithms and verification protocols can be used to ensure that the identity information of the power equipment matches the stored identity information, thereby preventing the cloning of power equipment or counterfeit attacks from gaining access rights by disguising as authorized power equipment.
[0106] As the use and life cycle of the power device changes, the identity binding information of the power device can be updated and managed. For example, when some hardware components of the power device are replaced or a security audit is required, the update operation of these identity information can be processed while ensuring the security of the update process.
[0107] By adopting hardware encryption technology, the fingerprint generated by PUF, the unique identifier of the power equipment and the related binding verification information are securely stored to prevent these sensitive information from being accessed and stolen without authorization.
[0108] S6: Audit and verification of the startup process. Design a distributed ledger recording system based on blockchain technology, and cooperate with the remote proof protocol to realize remote verification of the startup process. The specific implementation is as follows:
[0109] A distributed ledger is built based on blockchain technology to record various events and status information during the startup process, ensuring that each node can independently record and verify logs, thereby preventing the logs from being tampered with or forged, and ensuring the authenticity and integrity of the logs.
[0110] A set of protocols and processes for interacting with a remote verifier can be defined. During the startup process, the power equipment provides its own startup-related information and proof to the remote verifier through the protocol, which may include a secure identity authentication mechanism to ensure that only authorized power equipment and verifiers can interact to prevent attacks and impersonation.
[0111] In addition, the integrity of each stage of the startup process can be verified by comparing it with the records in the distributed ledger to check whether there are unauthorized modifications or abnormalities. For example, key components and codes can be signed and verified using technologies such as hash algorithms to ensure their integrity.
[0112] It can provide an audit function for distributed ledgers, allowing administrators and security personnel to query, analyze and trace the records of the startup process in order to promptly discover and deal with security issues. On this basis, audit rules and permissions can be set to limit access to and operations on records.
[0113] The above examples can effectively protect security operations and sensitive data, and greatly enhance the operating system's ability to resist tampering and attacks, providing crucial security protection for the power Internet of Things.
[0114] Figure 4 This is a structural block diagram of a trusted execution environment isolation device provided in an embodiment of the present invention, and the device is used to execute the trusted execution environment isolation method provided in any of the above embodiments. The device and the trusted execution environment isolation method of the above embodiments belong to the same inventive concept. For details not fully described in the embodiment of the trusted execution environment isolation device, please refer to the embodiment of the above trusted execution environment isolation method. Figure 4 The device may specifically include: an isolation environment construction module 410, a first dynamic key generation module 420, and a first dynamic key rotation module 430.
[0115] An isolation environment construction module 410 is used to construct an isolation environment of a secure world and a common world by dividing hardware resources using hardware isolation technology, wherein the secure world corresponds to a trusted execution environment;
[0116] A first dynamic key generation module 420 is used to generate a first dynamic key during a boot process corresponding to a trusted execution environment by using a key derivation function based on hardware resources allocated to the secure world;
[0117] The first dynamic key rotation module 430 is configured to generate a second dynamic key using a key derivation function in response to a dynamic key rotation instruction, and rotate the first dynamic key based on the second dynamic key.
[0118] Optionally, the above-mentioned trusted execution environment isolation device may further include:
[0119] A second information determination module is used to determine, after generating the first dynamic key by using the key derivation function based on the hardware resources allocated to the secure world, first information of a user of the first dynamic key and second information corresponding to a plurality of preset authorization objects in response to a use event for the first dynamic key;
[0120] A usage object determination module, used to determine whether the plurality of authorization objects include the usage object according to the first information and each second information;
[0121] The first dynamic key sending module is used to send the first dynamic key to the user object in the case of yes, so that the user object performs a security operation in the secure world based on the received first dynamic key.
[0122] On this basis, optionally, the trusted execution environment isolation device may further include:
[0123] A usage monitoring module, for monitoring the usage of the first dynamic key by the user after the first dynamic key is sent to the user;
[0124] The first alarm module can be used to restrict the user from continuing to use the first dynamic key and issue an alarm when the usage method may cause the first dynamic key to be tampered with.
[0125] Optionally, the above-mentioned trusted execution environment isolation device may further include:
[0126] The isolation control module is used to control at least one of the memory isolation, interrupt isolation and instruction set isolation between the secure world and the ordinary world in response to the isolation control instruction after building an isolation environment of the secure world and the ordinary world by dividing hardware resources using hardware isolation technology, so as to ensure isolation and independence between the secure world and the ordinary world.
[0127] Optionally, the above-mentioned trusted execution environment isolation device may further include:
[0128] The startup process recording module is used to build a distributed ledger based on blockchain technology and record the startup process based on the distributed ledger;
[0129] The abnormal situation judgment module is used to verify the integrity of each component started during the startup process, and to determine whether there are unauthorized abnormal situations during the startup process by comparing the verification results with the records in the distributed ledger;
[0130] The second alarm module is used for giving an alarm if yes.
[0131] On this basis, optionally, the trusted execution environment isolation device may further include:
[0132] The security problem judgment module is used to determine the target records to be audited among all records based on the distributed ledger record startup process, respond to the audit instructions for the distributed ledger, and display the target records, so as to determine whether there are security problems in the startup process by analyzing the target records.
[0133] Alternatively, the abnormal situation judgment module may include:
[0134] The integrity verification unit is used to determine whether the component has been tampered with during the startup process by calculating and comparing the hash value of each component started during the startup process, so as to realize the integrity verification of the component.
[0135] The trusted execution environment isolation device provided by the embodiment of the present invention uses the hardware isolation technology to construct an isolation environment of a secure world and a common world by dividing hardware resources through an isolation environment construction module, and the secure world corresponds to the trusted execution environment, thereby realizing the isolation process of the trusted execution environment; then, through the first dynamic key generation module, for the startup process corresponding to the trusted execution environment, during the startup process, a key derivation function based on the hardware resources divided to the secure world is used to generate a first dynamic key, thereby realizing the matching between the generated first dynamic key and the secure world, that is, the trusted execution environment; through the first dynamic key rotation module, in response to the dynamic key rotation instruction, a second dynamic key can be generated by using the key derivation function, and then the first dynamic key is rotated based on the second dynamic key, thereby enhancing the security of the dynamic key. The above device isolates the trusted execution environment by dividing hardware resources, generates a first dynamic key matching the trusted execution environment, and performs a rotation operation of the first dynamic key when necessary, thereby enhancing the security of the dynamic key applied in the trusted execution environment, and the dynamic key is an important protective measure for the trusted execution environment when dealing with complex attacks, thereby reducing the possibility of vulnerabilities in the trusted execution environment when dealing with complex attacks.
[0136] The trusted execution environment isolation device provided in the embodiment of the present invention can execute the trusted execution environment isolation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0137] It is worth noting that in the above-mentioned embodiment of the trusted execution environment isolation device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0138] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0139] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0140] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0141] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a trusted execution environment isolation method.
[0142] In some embodiments, the trusted execution environment isolation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the trusted execution environment isolation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the trusted execution environment isolation method in any other appropriate manner (e.g., by means of firmware).
[0143] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0145] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0146] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0147] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0148] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0149] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0150] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A trusted execution environment isolation method, characterized in that: include: Using hardware isolation technology, an isolation environment of a secure world and a normal world is constructed by dividing hardware resources, wherein the secure world corresponds to a trusted execution environment; For a boot process corresponding to the trusted execution environment, during the boot process, generating a first dynamic key using a key derivation function based on the hardware resources partitioned to the secure world; In response to the dynamic key rotation instruction, a second dynamic key is generated using the key derivation function, and the first dynamic key is rotated based on the second dynamic key.
2. The method according to claim 1, characterized in that After generating the first dynamic key by using the key derivation function based on the hardware resources allocated to the secure world, the method further includes: In response to a usage event for the first dynamic key, determining first information of a user of the first dynamic key and second information corresponding to a plurality of preset authorization objects respectively; determining, according to the first information and each of the second information, whether the plurality of authorized objects include the user object; If yes, the first dynamic key is sent to the user object, so that the user object performs a security operation in the secure world based on the received first dynamic key.
3. The method according to claim 2, characterized in that After sending the first dynamic key to the user object, the method further includes: Monitoring the usage of the first dynamic key by the user object; In the case that the usage mode may cause the first dynamic key to be tampered, the user is restricted from continuing to use the first dynamic key and an alarm is issued.
4. The method according to claim 1, characterized in that After using the hardware isolation technology to construct an isolation environment of the secure world and the ordinary world by dividing hardware resources, the following steps are also included: In response to the isolation control instruction, at least one of the memory isolation, interrupt isolation and instruction set isolation between the secure world and the ordinary world is controlled so that the secure world and the ordinary world have isolation and independence.
5. The method according to claim 1, characterized in that Also includes: Building a distributed ledger based on blockchain technology, and recording the startup process based on the distributed ledger; Performing integrity verification on each component started during the startup process, and comparing the verification results with the records in the distributed ledger to determine whether there are any unauthorized abnormalities in the startup process; If so, an alarm is issued.
6. The method according to claim 5, characterized in that After recording the startup process based on the distributed ledger, the method further includes: In response to an audit instruction for the distributed ledger, a target record to be audited among all the records is determined, and the target record is displayed, so as to determine whether there is a security problem in the startup process by analyzing the target record.
7. The method according to claim 5, characterized in that The integrity verification of each component started during the startup process includes: For each component started during the startup process, by calculating and comparing the hash value of the component, it is determined whether the component has been tampered with during the startup process, so as to implement integrity verification of the component.
8. A trusted execution environment isolation device, characterized in that: include: An isolation environment construction module, used to construct an isolation environment of a secure world and a common world by dividing hardware resources using hardware isolation technology, wherein the secure world corresponds to a trusted execution environment; A first dynamic key generation module is configured to generate a first dynamic key in a boot process corresponding to the trusted execution environment by using a key derivation function based on the hardware resources allocated to the secure world during the boot process; The first dynamic key rotation module is used to generate a second dynamic key using the key derivation function in response to a dynamic key rotation instruction, and rotate the first dynamic key based on the second dynamic key.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the trusted execution environment isolation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the trusted execution environment isolation method as described in any one of claims 1-7 when executed.