A trusted enhancement system for embedded operating system based on trusted TCM

CN117234982BActive Publication Date: 2026-09-22NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210632234.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2026-09-22
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

[0003]本发明的目的在于针对目前嵌入式设备存在的计算能力薄弱、处理调度性能低的问题,提供针对嵌入式设备操作系统安全性的基于国密算法TCM的可信链流程检测机制,能够安全、迅速、高效地针对操作系统进行安全性检测,并区分不同用户权限给予相应安全性功能

Benefits of technology

[0033](1)通过实现涉密IP核模块、非涉密IP核模块、国密算法实现可信密码模块、串口通信模块、ROM-PCR值存储模块以及处理调度模块来保证eTCM作为物理可信基的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117234982B_ABST
    Figure CN117234982B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on trusted TCM's embedded operating system trusted enhancement system.Through realizing secret IP core module, non-secret IP core module, country secret algorithm implementation trusted password module, serial communication module, ROM-PCR value storage module and processing scheduling module to ensure the security of eTCM as physical trusted base.At the same time, the design and modification of the trusted chain of the operating system startup process are realized, and the X-Loader, Bootloader, U-Boot and Kernel files are modified to realize the integrity PCR value detection of the startup file, and the hierarchical management submits the control right through the security detection to ensure the integrity of the operating system file.In addition, different users are detected for different permissions of secret information, and the docker container isolation feature is used to ensure the corresponding file usage permission of different users to prevent cross-border operation, so that the security detection of embedded device is more secure, rapid and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security technology, specifically a trusted enhancement mechanism for embedded operating systems based on Trusted TCM. Background Technology

[0002] Embedded systems are developing rapidly and have gradually entered more fields, increasingly impacting people's lives. However, they still face significant security risks: weak computing power and slow processing speed. Currently, traditional security measures for embedded devices mainly rely on post-incident response and manual handling, which are insufficient to guarantee device security and processing accuracy. Therefore, this paper addresses some of the security issues faced by embedded platforms by implementing a trusted security encryption module (eTCM, or embedded device trusted computing module) as hardware support. It uses the national cryptographic algorithms SM3 hash and SM4 block encryption to ensure the security of classified information processing, while simultaneously completing information exchange between the physical trusted base eTCM and the embedded device according to the UART serial communication protocol. Currently, traditional operating system security measures mainly focus on post-boot boundary handling, such as strong passwords, external firewalls, and routers. These measures are not very effective in protecting against unauthorized tampering with the operating system kernel. Therefore, by employing Trusted Chain technology and using eTCM as the physical trusted base, integrity checks are performed on critical operating system boot files. Booting is then performed after hierarchical verification, which effectively detects whether the system has been tampered with. At the same time, the classified and non-classified access IP cores implemented within eTCM can adopt different security protection measures for users with different access levels. Combined with virtual layer container isolation technology, this effectively protects the security of classified information. Summary of the Invention

[0003] The purpose of this invention is to address the problems of weak computing power and low processing and scheduling performance in current embedded devices by providing a trusted chain process detection mechanism based on the national cryptographic algorithm TCM for embedded device operating system security. This mechanism can perform security detection on the operating system securely, quickly, and efficiently, and provide corresponding security functions based on different user permissions.

[0004] The technical solution to achieve the purpose of this invention is: a trusted enhancement system for an embedded operating system based on Trusted TCM, the system including an eTCM module for processing classified information based on TCM, an operating system file integrity measurement module, and a virtual domain management module;

[0005] The eTCM module for processing classified information based on TCM is used for information confidentiality verification and encryption based on eTCM.

[0006] The operating system file integrity measurement module, with eTCM as its core, starts with the BIOS boot program, i.e., the X-loader program, which acts as the root of trust to verify the integrity of each level of boot file. After passing the integrity check, it then hands over CPU control.

[0007] The virtual domain management module is used to complete the virtualization isolation layer and the separation of user permissions.

[0008] Furthermore, the eTCM module for processing classified information based on TCM includes a classified IP core module, a non-classified IP core module, and an ID processing module;

[0009] The ID processing module is used to read the stored and input operating system user ID, and to compare and process the user ID hash value;

[0010] The classified IP core module includes: a first RS232 serial communication module for enabling information interaction between the eTCM and the embedded device; a first ROM-PCR value storage module for storing the hash value of the classified document to be detected; and a trusted cryptographic module implementing the national cryptographic algorithm for encrypting classified information. The classified information is transmitted to the eTCM device through the first RS232 serial communication module. The eTCM calls the trusted cryptographic module implementing the national cryptographic algorithm to hash the classified value. The transmission result is transmitted as input to the first ROM-PCR value storage module. The first ROM-PCR value storage module performs matching verification to verify whether the calculated PCR value is consistent with the previously stored PCR value, thus processing the hash verification of the classified information.

[0011] The non-classified IP core module includes a second RS232 serial communication module and a second ROM-PCR value storage module, which are used to issue an access violation warning to unauthorized users who have passed ID verification, thereby preventing encryption operations of classified information; wherein the second RS232 serial communication module is used to realize information interaction between eTCM and embedded device; the second ROM-PCR value storage module is used to store the hash value of non-classified files.

[0012] Furthermore, the virtual domain management module includes a virtual TCM module, a Docker container, and an eTCM interface. The Docker container stores critical content detection scripts, including user information, critical container environment files, and critical application files. The eTCM interface is used to call the TCM-based eTCM module for processing classified information, providing a physical layer eTCM call interface for the virtual layer. The virtual TCM module implements MD5 hashing, the national standard elliptic curve block cipher algorithm SM2, the hash algorithm SM3, and the block cipher algorithm SM4 based on the OpenSSL standard library. It includes a key management module, a cryptographic engine module, and a physical TCM call interface. The key management module generates random personal private keys. The cryptographic engine module hashes classified information to obtain PCR values. The physical TCM call interface is used to utilize the eTCM functional modules.

[0013] Furthermore, the operating system file integrity measurement module includes modifications to X-loader, U-Boot, Kernel, and configuration files.

[0014] Furthermore, the first RS232 serial communication module and the second RS232 serial communication module implement a Universal Asynchronous Receiver / Transmitter (UART) to enable information exchange between the eTCM and the embedded device.

[0015] Furthermore, before encrypting classified information, the ID information of the transmitted classified information is first matched and verified. The matching process is as follows:

[0016] The eTCM chip hashes and encrypts the user ID information, then matches it with information in the ID information hash repository. If no matching field is found in the ID information hash repository, the TCM enters the non-classified IP core module; if a matching field is found in the ID information hash repository, the TCM enters the classified IP core module.

[0017] Furthermore, the encryption processing of classified information is divided into two categories, A and B. Category A is for users with classified information permissions to encrypt information, while Category B is for users with ordinary permissions to encrypt information.

[0018] (1) The process by which a user with classified access encrypts information is as follows:

[0019] eTCM enters the classified IP core module; the classified information is input as the cryptographic engine module and hashed to obtain the PCR value; if the input PCR value does not have a corresponding match in the first ROM-PCR value storage module, the system prevents the serial transmission of the calculated PCR information back to the embedded device; if the input PCR value has a corresponding match in the first ROM-PCR value storage module, the PCR values ​​are merged and sent back to the embedded device.

[0020] (2) The process of encrypting information by a user with ordinary privileges is as follows:

[0021] When eTCM enters a non-classified IP core module, an out-of-bounds warning is issued, and the system prevents encryption of classified information, indicating that the encryption verification of classified information by eTCM has failed.

[0022] Furthermore, the system performs integrity checks in two categories, A and B. Category A is for booting an untampered operating system, and Category B is for booting an operating system that has been tampered with.

[0023] (1) The process of booting an untampered operating system is as follows:

[0024] The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader file data to be tested after being hashed by MD5; after transmission, the eTCM hash is performed and compared with the locally stored PCR value; if the corresponding PCR value is matched, the result is sent to the embedded device, and the CPU control is handed over to the next stage X-loader; X-loader, U-Boot and Kernel perform the same test according to the same process. If all pass the integrity test, the operating system is started and the virtual layer user terminal is entered;

[0025] (2) The process of booting a tampered operating system is as follows:

[0026] The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader's file data to be tested, hashed by MD5; after transmission, the data is hashed by eTCM and compared with the locally stored PCR value; if no matching PCR value is found, the result is sent to the embedded device, preventing the operating system from starting; if a matching PCR value is found, CPU control is transferred to the X-loader; the X-loader, U-Boot, and Kernel perform the same checks, and if the integrity check fails, the operating system startup is stopped.

[0027] Furthermore, the virtual domain management is divided into two categories, A and B. Category A is for users with confidentiality permissions to encrypt information, and Category B is for users with ordinary permissions to encrypt information.

[0028] (1) The process of managing virtual domains for users with classified access is as follows:

[0029] The script file for starting the container is invoked; the script file calls the eTCM interface to perform hash matching on critical files in the container and critical files in the application; if the matching verification passes, the container is started securely; if the verification fails, the file to be detected has been tampered with, and the container is refused to start.

[0030] (2) The process of managing a virtual domain for users with ordinary privileges is as follows:

[0031] The Docker container is started directly without performing integrity checks on the Docker container or critical application files.

[0032] Compared with the prior art, the significant advantages of this invention are:

[0033] (1) The security of eTCM as a physical trusted base is ensured by implementing a classified IP core module, a non-classified IP core module, a trusted cryptographic module based on national cryptographic algorithms, a serial communication module, a ROM-PCR value storage module, and a processing and scheduling module.

[0034] (2) Implement the design modification of the trusted chain of the operating system boot process, modify the X-Loader, Bootloader, U-Boot and Kernel files, implement the PCR value detection of the boot file integrity, and transfer control through security detection in hierarchical management to ensure the integrity of the operating system files.

[0035] (3) Different permissions are used to detect confidential information for different users. The isolation feature of Docker containers is used to ensure that the corresponding file access permissions of different users are protected to prevent out-of-bounds operations, making the security detection of embedded devices safer, faster and more efficient.

[0036] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the eTCM principle structure for processing classified information based on TCM designed in this invention.

[0038] Figure 2 This is a flowchart of the operating system file integrity measurement design of this invention.

[0039] Figure 3 This is a flowchart of the virtual domain management workflow designed in this invention.

[0040] Figure 4 This is a prototype diagram of the embedded operating system trust enhancement designed in this invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0042] It should be noted that if the embodiments of the present invention involve descriptions such as "first" and "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0043] This invention provides a trusted enhancement system for an embedded operating system based on Trusted TCM, the system comprising an eTCM module for processing classified information based on TCM, an operating system file integrity measurement module, and a virtual domain management module;

[0044] The eTCM module for processing classified information based on TCM is used for information confidentiality verification and encryption based on eTCM.

[0045] The operating system file integrity measurement module, with eTCM as its core, starts with the BIOS boot program, i.e., the X-loader program, which acts as the root of trust to verify the integrity of each level of boot file. After passing the integrity check, it then hands over CPU control.

[0046] The virtual domain management module is used to complete the virtualization isolation layer and the separation of user permissions.

[0047] Furthermore, in one embodiment, the eTCM module for processing classified information based on TCM includes a classified IP core module, a non-classified IP core module, and an ID processing module;

[0048] The ID processing module is used to read the stored and input operating system user ID, and to compare and process the user ID hash value;

[0049] The classified IP core module includes: a first RS232 serial communication module for enabling information interaction between the eTCM and the embedded device; a first ROM-PCR value storage module for storing the hash value of the classified document to be detected; and a trusted cryptographic module implementing the national cryptographic algorithm for encrypting classified information. The classified information is transmitted to the eTCM device through the first RS232 serial communication module. The eTCM calls the trusted cryptographic module implementing the national cryptographic algorithm to hash the classified value. The transmission result is transmitted as input to the first ROM-PCR value storage module. The first ROM-PCR value storage module performs matching verification to verify whether the calculated PCR value is consistent with the previously stored PCR value, thus processing the hash verification of the classified information.

[0050] Here, the national cryptographic algorithm implementation trusted cryptographic module implements the national cryptographic hash encryption algorithm SM3 and the block cipher algorithm SM4. It receives the hash value of the file to be tested from the serial communication as the encryption input. First, it uses the 256-bit hash value of the SM3 hash algorithm, and then divides it into 256-128 bits and 127-0 bits respectively for SM4 block encryption to obtain the result. The obtained result is then transmitted to the ROM-PCR value storage module for matching and verification.

[0051] The non-classified IP core module includes a second RS232 serial communication module and a second ROM-PCR value storage module, which are used to issue an access violation warning to unauthorized users who have passed ID verification, thereby preventing encryption operations of classified information; wherein the second RS232 serial communication module is used to realize information interaction between eTCM and embedded device; the second ROM-PCR value storage module is used to store the hash value of non-classified files.

[0052] Furthermore, in one embodiment, the virtual domain management module includes a virtual TCM module, a Docker container, and an eTCM interface; the Docker container is used to store critical content detection scripts, including user information, critical files of the container environment, and critical files of the application; the eTCM interface is used to call the TCM-based eTCM module for processing classified information, providing a physical layer eTCM call interface for the virtual layer; the virtual TCM module is used to implement MD5 hash, SM2 elliptic curve block cipher, SM3 hash, and SM4 block cipher based on the OpenSSL standard library, and includes: a key management module, a cryptographic engine module, and a physical TCM call interface.

[0053] Furthermore, in one embodiment, the operating system file integrity measurement module includes modifications to X-loader, U-Boot, Kernel, and configuration files.

[0054] Furthermore, in one embodiment, the first RS232 serial communication module and the second RS232 serial communication module implement a Universal Asynchronous Receiver / Transmitter (UART) to enable information exchange between the eTCM and the embedded device, including a counter, a parallel-to-serial shift register, a baud rate timer (counter), etc.

[0055] Furthermore, in one embodiment, before encrypting the classified information, the ID information of the transmitted classified information is first matched and verified. The matching process is as follows:

[0056] The eTCM chip hashes and encrypts the user ID information, then matches it with information in the ID information hash repository. If no matching field is found in the ID information hash repository, the TCM enters the non-classified IP core module; if a matching field is found in the ID information hash repository, the TCM enters the classified IP core module.

[0057] Furthermore, in one embodiment, the encryption processing of classified information is divided into two categories, A and B, where category A is for users with classified information permissions to encrypt information, and category B is for users with ordinary permissions to encrypt information.

[0058] (1) The process by which a user with classified access encrypts information is as follows:

[0059] eTCM enters the classified IP core module; the classified information is input as the cryptographic engine module and hashed to obtain the PCR value; if the input PCR value does not have a corresponding match in the first ROM-PCR value storage module, the system prevents the serial transmission of the calculated PCR information back to the embedded device; if the input PCR value has a corresponding match in the first ROM-PCR value storage module, the PCR values ​​are merged and sent back to the embedded device.

[0060] (2) The process of encrypting information by a user with ordinary privileges is as follows:

[0061] When eTCM enters a non-classified IP core module, an out-of-bounds warning is issued, and the system prevents encryption of classified information, indicating that the encryption verification of classified information by eTCM has failed.

[0062] Furthermore, in one embodiment, the system performs integrity checks in two categories, A and B. Category A is the boot of an untampered operating system, and Category B is the boot of a tampered operating system.

[0063] (1) The process of booting an untampered operating system is as follows:

[0064] The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader file data to be tested after being hashed by MD5; after transmission, the eTCM hash is performed and compared with the locally stored PCR value; if the corresponding PCR value is matched, the result is sent to the embedded device, and the CPU control is handed over to the next stage X-loader; X-loader, U-Boot and Kernel perform the same test according to the same process. If all pass the integrity test, the operating system is started and the virtual layer user terminal is entered;

[0065] (2) The process of booting a tampered operating system is as follows:

[0066] The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader's file data to be tested, hashed by MD5; after transmission, the data is hashed by eTCM and compared with the locally stored PCR value; if no matching PCR value is found, the result is sent to the embedded device, preventing the operating system from starting; if a matching PCR value is found, CPU control is transferred to the X-loader; the X-loader, U-Boot, and Kernel perform the same checks, and if the integrity check fails, the operating system startup is stopped.

[0067] Furthermore, in one embodiment, the virtual domain management is divided into two categories, A and B. Category A is for users with confidentiality permissions to encrypt information, and Category B is for users with ordinary permissions to encrypt information.

[0068] (1) The process of managing virtual domains for users with classified access is as follows:

[0069] The script file for starting the container is invoked; the script file calls the eTCM interface to perform hash matching on critical files in the container and critical files in the application; if the matching verification passes, the container is started securely; if the verification fails, the file to be detected has been tampered with, and the container is refused to start.

[0070] (2) The process of managing a virtual domain for users with ordinary privileges is as follows:

[0071] The Docker container is started directly without performing integrity checks on the Docker container or critical application files.

[0072] The working principle of the present invention will be further explained in detail below.

[0073] When using the eTCM of this invention for information confidentiality verification and encryption, there are two types:

[0074] (a) The first type of process for encrypting and verifying eTCM classified information:

[0075] When the first type of user performs encrypted verification of classified information, the system first collects the user's ID information. The TCM chip hashes and encrypts the user's ID information and matches it with the information in the ID information hash repository. If no matching field is found in the ID information hash repository, the TCM enters the non-classified IP core module, issues an over-limit warning, prevents the encryption of classified information, and lights up the corresponding error LED red light, indicating that the encryption of classified information by eTCM has failed.

[0076] (ii) The second type of process for encrypting and verifying eTCM classified information:

[0077] When a second type of user performs encrypted verification of classified information, the system first collects the user's ID information. The TCM chip hashes and encrypts the user ID information, then matches it with information in the ID information hash repository. If a matching field is found in the ID information hash repository, the TCM inputs the information to the classified IP core module. In the classified module, the incoming classified information is used as input to the cryptographic engine module, undergoing SM3 hashing and SM4 block encryption to obtain two sets of 128-bit PCR values. These two sets of 128-bit PCR values ​​are then input to the ROM-PCR value storage module for matching. If neither of the two input PCR values ​​is in the ROM-PCR value storage module... If a matching value is found, the confidential information verified in this test does not match the stored information, indicating that the confidential information has been tampered with. The system will prevent the serial transmission of the calculated PCR information back to the embedded device and will illuminate the corresponding red LED indicating confidential information tampering, providing an error message. If the two sets of PCR values ​​have a matching value in the ROM-PCR value storage module, the confidential information verified in this test matches the stored information, indicating that the confidential information remains intact. At this time, the two sets of PCR values ​​are merged into a 256-bit value and input into the serial communication module, sent back to the embedded device, and the corresponding green LED indicating completion of verification illuminates, indicating that the encryption verification of the confidential information is complete.

[0078] like Figure 2 As shown, the operating system file integrity measurement process implemented by this invention includes a trusted chain design modification scheme.

[0079] The proposed Trusted Chain design and modification scheme uses the TCM (Trusted Management Machine) as its core, starting with the BIOS bootloader. The X-loader program acts as the root of trust, verifying the integrity of each boot file level. After integrity checks, CPU control is then transferred, creating a trusted operating environment through this hierarchical verification and trust mechanism. This requires modifications to the operating system's boot loading components.

[0080] The modified operating system boot loading components include X-loader, U-Boot, Kernel, and configuration files; the initialization sequence of the embedded system is ROM (code storage), X-loader, U-Boot, Kernel, etc.

[0081] The integrity detection process has been modified as follows, and is divided into two types:

[0082] (a) The first type of operating system integrity detection process:

[0083] The eTCM and embedded device are powered on. Then, the ROM executes, checking if the device's serial port is open. If open, it sends the file data to be tested to the X-loader. This file data needs to be MD5 hashed on the embedded device first. After transmission, it is hashed using eTCM and compared with the locally stored PCR value. If a matching PCR value is found, the corresponding green LED is displayed, and the result is sent to the embedded device. CPU control is then transferred to the X-loader, which performs the same process to detect the U-Boot file, merging it with the PCR value detected by the X-loader, and transmitting it to the eTCM for hash matching. If a matching PCR value is found, the green LED is displayed. Similarly, integrity checks are performed on the U-Boot and Kernel files, and the LEDs both display green. If the integrity check passes, the operating system starts, and the user enters the virtual layer.

[0084] (ii) The second type of operating system integrity detection process:

[0085] The eTCM and embedded device are powered on. Then, the ROM executes, checking if the device's serial port is open. If open, it sends the X-loader's test file data, which must first be MD5 hashed on the embedded device. After transmission, it performs an eTCM hash and compares it with the locally stored PCR value. If no match is found, the corresponding LED red light is displayed, and the result is sent to the embedded device. If the embedded device receives an error message, it indicates that the X-loader file has been tampered with, preventing the operating system from booting and providing an error message. If a match is found, the corresponding LED green light is displayed, and CPU control is transferred to the X-loader. The X-loader performs the same process on the U-Boot file, merging it with the X-loader's detected PCR value and transmitting it for eTCM hash matching. If no match is found, the corresponding LED red light is displayed, and the result is sent to the embedded device. If the embedded device receives an error message, it indicates that the U-Boot file has been tampered with, preventing the operating system from booting and providing an error message. Similarly, integrity checks are performed on the U-Boot and Kernel files; the LED displays red, indicating failure to pass the integrity check, and the operating system boot is stopped.

[0086] like Figure 3 As shown, this invention implements a virtual domain management solution.

[0087] The virtual domain management solution includes a virtual TCM, Docker containers, and an eTCM interface to achieve virtualization isolation layers and user permission separation.

[0088] The Docker container contains user information, key container environment files, and key application files.

[0089] The eTCM interface is a virtual layer interface that uses the physical layer eTCM call interface.

[0090] The virtual TCM consists of three main modules: a key management module, a cryptographic engine module, and a physical TCM calling interface. The basic cryptographic algorithms of TCM are implemented through the OpenSSL standard library: elliptic curve public key cryptography algorithm SM2, hash encryption algorithm SM3, block cipher algorithm SM4, and hash algorithm MD5.

[0091] There are two types of virtual domain management:

[0092] (a) The first category of virtual domain management process:

[0093] By calling the script file that starts the container, the system collects the user's ID information. vTCM, or virtual TCM, hashes and encrypts the user ID information and matches it with information in the ID information hash repository. If no matching field is found in the ID information hash repository, the system confirms that the user is a user with ordinary privileges and directly starts the Docker container for him / her without performing integrity checks on the Docker container.

[0094] (ii) The second type of virtual domain management process:

[0095] By calling the script file that starts the container, the system collects the user's ID information. vTCM hashes and encrypts the user ID information and matches it with information in the ID information hash repository. If a matching field is found in the ID information hash repository, the system confirms that the user has confidential permissions. The script file calls the eTCM interface, and for critical files such as / etc / fstab, / etc / inittab, and / bin / bash, as well as critical application files sent from the container, it calls the password engine module to perform hash encryption and finally group them, comparing them with the stored standard values. If the verification is successful, the green LED lights up, and the container starts securely; if the verification fails, the red LED lights up, and an error message is given, indicating that the file to be checked has been tampered with.

[0096] like Figure 4 The figure shows a prototype of the embedded operating system trust enhancement implemented in this invention.

[0097] The embedded operating system trust enhancement prototype includes operating system trust enhancement technology and virtualization resource isolation technology. Through integration and fusion, it realizes an embedded operating system trust enhancement mechanism based on Trusted TCM.

[0098] The overall process of implementing the trusted enhancement mechanism for the embedded operating system based on Trusted TCM includes operating system integrity detection and virtual domain management. The detection is carried out according to the above process. If the LED light remains green after the operating system starts, the trusted operating system startup is complete.

[0099] In other illegal situations, the LED will light up red and display an error message.

[0100] This invention accelerates the information processing capabilities of embedded devices through a hardware TCM module, uses eTCM as a physical trusted base to handle the confidential processing of critical files in the operating system's trusted chain, and leverages the isolation characteristics of Docker containers and the encryption capabilities of eTCM to achieve secure management of user information in virtual domains, thus realizing the management of different user information and trusted booting of the operating system. This invention can quickly, efficiently, and securely achieve trusted booting of embedded operating systems and user permission isolation detection.

[0101] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention without departing from its spirit and scope should be included within the protection scope of the present invention.

Claims

1. A trusted enhancement system for an embedded operating system based on a trusted TCM, characterized in that, The system includes an eTCM module for processing classified information based on TCM, an operating system file integrity measurement module, and a virtual domain management module; The eTCM module for processing classified information based on TCM is used for information confidentiality verification and encryption based on eTCM. The operating system file integrity measurement module, with eTCM as its core, starts with the BIOS boot program, i.e., the X-loader program, which acts as the root of trust to verify the integrity of each level of boot file. After passing the integrity check, it then hands over CPU control. The virtual domain management module is used to complete the virtualization isolation layer and the separation of user permissions; The eTCM module for processing classified information based on TCM includes a classified IP core module, a non-classified IP core module, and an ID processing module; The ID processing module is used to read the stored and input operating system user ID, and to compare and process the user ID hash value; The classified IP core module includes: a first RS232 serial communication module for enabling information interaction between the eTCM and the embedded device; a first ROM-PCR value storage module for storing the hash value of the classified document to be detected; and a trusted cryptographic module implementing the national cryptographic algorithm for encrypting classified information. The classified information is transmitted to the eTCM device through the first RS232 serial communication module. The eTCM calls the trusted cryptographic module implementing the national cryptographic algorithm to hash the classified value. The transmission result is transmitted as input to the first ROM-PCR value storage module. The first ROM-PCR value storage module performs matching verification to verify whether the calculated PCR value is consistent with the previously stored PCR value, thus processing the hash verification of the classified information. The non-classified IP core module includes a second RS232 serial communication module and a second ROM-PCR value storage module, which are used to issue an access violation warning to unauthorized users who have passed ID verification, thereby preventing encryption operations of classified information; wherein the second RS232 serial communication module is used to realize information interaction between eTCM and embedded device; the second ROM-PCR value storage module is used to store the hash value of non-classified files.

2. The embedded operating system trust enhancement system based on Trusted TCM according to claim 1, characterized in that, The virtual domain management module includes a virtual TCM module, a Docker container, and an eTCM interface. The Docker container stores critical content detection scripts, including user information, critical container environment files, and critical application files. The eTCM interface calls the TCM-based eTCM module for processing classified information, providing a physical layer eTCM call interface for the virtual layer. The virtual TCM module implements MD5 hashing, the national standard elliptic curve block cipher algorithm SM2, the hash algorithm SM3, and the block cipher algorithm SM4 based on the OpenSSL standard library. It includes a key management module, a cryptographic engine module, and a physical TCM call interface. The key management module generates random personal private keys. The cryptographic engine module hashes classified information to obtain PCR values. The physical TCM call interface is used to utilize the eTCM functional modules.

3. The embedded operating system trust enhancement system based on Trusted TCM according to claim 2, characterized in that, The operating system file integrity measurement module includes modifications to X-loader, U-Boot, Kernel, and configuration files.

4. The embedded operating system trust enhancement system based on Trusted TCM according to claim 3, characterized in that, The first RS232 serial communication module and the second RS232 serial communication module implement a Universal Asynchronous Receiver / Transmitter (UART) to enable information exchange between the eTCM and the embedded device.

5. The embedded operating system trust enhancement system based on Trusted TCM according to claim 4, characterized in that, Before encrypting classified information, the ID information of the transmitted classified information is first matched and verified. The matching process is as follows: The eTCM chip hashes and encrypts the user ID information, then matches it with information in the ID information hash repository. If no matching field is found in the ID information hash repository, the TCM enters the non-classified IP core module. If a matching field is found in the ID information hash repository, TCM enters the classified IP core module.

6. The embedded operating system trust enhancement system based on Trusted TCM according to claim 5, characterized in that, The encryption processing of classified information is divided into two categories, A and B. Category A is for users with classified information permissions to encrypt information, while Category B is for users with ordinary permissions to encrypt information. (1) The process by which a user with classified access encrypts information is as follows: eTCM enters the classified IP core module; the classified information is input as the cryptographic engine module and hashed to obtain the PCR value; if the input PCR value does not have a corresponding match in the first ROM-PCR value storage module, the system prevents the serial transmission of the calculated PCR information back to the embedded device. If the incoming PCR value has a corresponding match in the first ROM-PCR value storage module, the PCR values ​​are merged and sent back to the embedded device; (2) The process of encrypting information by a user with ordinary privileges is as follows: When eTCM enters a non-classified IP core module, an out-of-bounds warning is issued, and the system prevents encryption of classified information, indicating that the encryption verification of classified information by eTCM has failed.

7. The embedded operating system trust enhancement system based on Trusted TCM according to claim 6, characterized in that, The system performs integrity checks in two categories, A and B. Category A is for booting an untampered operating system, and Category B is for booting an operating system that has been tampered with. (1) The process of booting an untampered operating system is as follows: The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader file data to be tested after being hashed by MD5; after transmission, the eTCM hash is performed and compared with the locally stored PCR value; if the corresponding PCR value is matched, the result is sent to the embedded device, and the CPU control is handed over to the next stage X-loader; X-loader, U-Boot and Kernel perform the same test according to the same process. If all pass the integrity test, the operating system is started and the virtual layer user terminal is entered; (2) The process of booting a tampered operating system is as follows: The eTCM and embedded device are powered on; then the ROM executes and sends the X-loader's file data to be tested, hashed by MD5; after transmission, the data is hashed by eTCM and compared with the locally stored PCR value; if no matching PCR value is found, the result is sent to the embedded device, preventing the operating system from starting; if a matching PCR value is found, CPU control is transferred to the X-loader; the X-loader, U-Boot, and Kernel perform the same checks, and if the integrity check fails, the operating system startup is stopped.

8. The embedded operating system trust enhancement system based on Trusted TCM according to claim 7, characterized in that, The virtual domain management is divided into two categories, A and B. Category A is for users with confidentiality permissions to encrypt information, while Category B is for users with ordinary permissions to encrypt information. (1) The process of managing virtual domains for users with classified access is as follows: The system collects the user's ID information by calling the script file that starts the container; the script file calls the eTCM interface to perform hash matching on the container's key files and the application's key files; if the matching verification passes, the container starts securely. If the verification fails, the file to be tested has been tampered with, and the container will be refused to start. (2) The process of managing a virtual domain for users with ordinary privileges is as follows: The Docker container is started directly without performing integrity checks on the Docker container or critical application files.

Citation Information

Patent Citations

  • A UEFI trusted support system and its control method

    CN102279914A

  • Trusted starting method of embedded equipment based on embedded trusted computing module

    CN105608385A