A secure startup method and system for a trusted controller

By building a secure boot policy in U-Boot and utilizing trusted controller drivers and TPMs, the problem of insufficient security in the traditional U-Boot startup process is solved, and the trustworthiness and reliability of system startup are achieved.

CN119646793BActive Publication Date: 2025-08-19XIAN THERMAL POWER RES INST CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510187218.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-08-19
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

The traditional U-Boot startup process lacks flexibility and security, and is difficult to effectively resist attacks. The open source code may have vulnerabilities, resulting in system security threats.

Method used

Build a secure boot policy in U-Boot, perform signature verification and hash algorithm metric verification through trusted controller drivers, ensure the trustworthiness of startup images and key files, and utilize protected area storage policies such as TPM.

Benefits of technology

Enhance the security and reliability of the system startup process, prevent unauthorized startup, ensure that critical files have not been tampered with, provide flexible update mechanisms and detailed audit records, and improve the overall credibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646793B_ABST
    Figure CN119646793B_ABST
Patent Text Reader

Abstract

The present invention discloses a secure boot method and system for a trusted controller, belonging to the technical field of industrial control system security. The method configures a secure boot policy in U-Boot, and executes the secure boot policy during the trusted controller startup process through a trusted controller driver. When the trusted controller is started, a first-level security policy is used to verify the secure boot policy, and after the verification passes, corresponding security checks are performed according to the secure boot policy. After the trusted controller is started, the secure boot policy establishes a trusted chain based on trusted files, and measurement verification is performed on each trusted file in the trusted chain. When all trusted files pass verification, the trusted controller passes trusted verification. The secure boot method for a trusted controller improves system reliability through the establishment and verification of a trusted chain, flexible protected areas, and comprehensive trusted file verification, thereby providing comprehensive security protection for the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial control system security, and in particular to a secure startup method and system for a trusted controller. Background Art

[0002] With the advancement of information technology, computer system security has received increasing attention. The system boot process offers attackers an optimal opportunity to launch intrusion, making it crucial to ensure its security. Currently, the Universal Boot Loader (U-Boot) is a widely used open-source boot loader capable of booting a variety of operating systems and hardware platforms. However, the traditional U-Boot boot process lacks flexibility and security, particularly in boot policy configuration, which often only supports limited customization and security measures.

[0003] The traditional U-Boot boot process has shortcomings in verifying the boot image, lacking a strict verification mechanism or over-relying on hardware-level security measures such as the Trusted Platform Module (TPM). This reliance on a single security measure is ineffective in defending against various potential attacks in complex and volatile network environments. Once an attacker finds a vulnerability, they could successfully load unauthorized or malicious software, threatening the security of the entire system.

[0004] Furthermore, as open-source software, U-Boot's codebase is openly shared, but it may harbor known or unknown security vulnerabilities. Once discovered and exploited, these vulnerabilities could allow attackers to execute arbitrary code or even bypass system security restrictions, posing a serious security threat. Summary of the Invention

[0005] In response to the problems existing in the prior art, the present invention provides a secure boot method and system for a trusted controller. The method constructs a boot policy configuration in U-Boot, so that the secure boot policy can be configured in both the U-Boot stage and the operating system stage, thereby enhancing the overall security of the system.

[0006] The present invention is achieved through the following technical solutions:

[0007] In a first aspect, the present application provides a secure boot method for a trusted controller, comprising:

[0008] Configuring a secure boot policy in U-Boot; the secure boot policy includes the following steps: modifying a U-Boot configuration file; generating a signature key and a certificate; signing a boot image with the signature key; embedding the signature key and the certificate into U-Boot; and compiling the modified U-Boot source code using a cross-compilation toolchain;

[0009] A trusted controller driver is constructed in the U-Boot, and a secure boot strategy is executed during the trusted controller boot process through the trusted controller driver;

[0010] When the trusted controller starts, the first-level security policy is used to verify the secure boot policy. After the verification passes, the corresponding security checks are performed according to the secure boot policy. The steps for verifying the secure boot policy with the first-level security policy are as follows: generate a key pair; use the private key in the key pair to sign the U-Boot and kernel images; package the signature into the U-Boot environment; and verify the signature during the U-Boot startup process.

[0011] After the trusted controller is started, the secure boot policy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trusted verification.

[0012] Furthermore, configuring the secure boot policy in U-Boot specifically includes: constructing a boot policy configuration in U-Boot, and configuring the secure boot policy into U-Boot through the boot policy configuration.

[0013] Furthermore, the trusted controller driver executes the secure boot policy during the trusted controller startup process and stores the secure boot policy in a protected area.

[0014] Furthermore, the protected area is a trusted platform module.

[0015] Furthermore, a first-level security policy is used to verify the secure boot policy. When the verification fails, U-Boot refuses to boot and enters the recovery mode, recording an error log.

[0016] Furthermore, the secure boot strategy establishes a trusted chain based on the trusted file, including:

[0017] The secure boot strategy builds a trusted chain during the startup process of the trusted controller and uses a hash algorithm to perform measurement verification on the trusted file. The steps of the hash algorithm for measurement verification are as follows: determining the trusted file to be verified; selecting a hash algorithm; calculating the hash value of the trusted file; comparing the hash value with the preset hash value; and determining the measurement verification result based on the comparison result.

[0018] Furthermore, the trusted files include Linux kernel files, initramfs files, bootloader configuration files, and all files under the boot directory. Each trusted file is measured and verified, and the measurement value of the trusted file is compared with the benchmark value. When the measurement value is the same as the benchmark value, the trusted file is trusted; when the measurement value is different from the benchmark value, the trusted file is untrustworthy.

[0019] In a second aspect, the present application provides a trusted controller secure boot policy construction system, including:

[0020] A configuration module is used to configure a secure boot policy in U-Boot; the secure boot policy includes the following steps: modifying the U-Boot configuration file; generating a signature key and certificate; signing the boot image with the signature key; embedding the signature key and certificate into U-Boot; and compiling the modified U-Boot source code using a cross-compilation tool chain.

[0021] A driver module is used to build a trusted controller driver in the U-Boot, and execute a secure boot strategy during the trusted controller startup process through the trusted controller driver;

[0022] The verification module is used to verify the secure boot policy using the first-level security policy when the trusted controller is started. After the verification is passed, the corresponding security check is performed according to the secure boot policy. The steps of the first-level security policy verification of the secure boot policy are as follows: generate a key pair; use the private key in the key pair to sign the U-Boot and kernel images; package the signature into the U-Boot environment; and verify the signature during the U-Boot startup process.

[0023] The trusted module is used after the trusted controller is started. The secure boot strategy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trusted verification.

[0024] In a third aspect, the present application provides an electronic device, comprising:

[0025] memory for storing computer programs;

[0026] A processor is configured to implement the steps of the secure startup method of a trusted controller when executing the computer program.

[0027] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the secure startup method of the trusted controller are implemented.

[0028] Compared with the prior art, the present invention has the following beneficial technical effects:

[0029] This application provides a secure boot method for a trusted controller. By configuring and enforcing a secure boot policy in U-Boot, it ensures security from the very beginning of system startup. This prevents unauthorized or malicious system boot attempts. The secure boot policy itself is verified using a primary security policy (such as a boot password and signature verification). If the primary security policy verification fails, U-Boot refuses to boot and enters recovery mode, while also logging an error. This provides administrators with important insights for diagnosing and resolving issues, prevents system crashes due to configuration errors or security threats, and ensures the reliability and integrity of the secure boot policy itself. Furthermore, the secure boot policy establishes a trusted chain based on trusted files and performs measurement verification on each trusted file in the trusted chain. This ensures that the trusted files used during system startup have not been tampered with, thereby enhancing the overall trustworthiness of the system. By comparing the measurement values of trusted files with baseline values, any potential security threats can be promptly detected and prevented. This secure boot method for a trusted controller improves system reliability through enhanced security, trust chain establishment and verification, flexible protected areas, and comprehensive trusted file verification, providing comprehensive security assurance.

[0030] Furthermore, secure boot policies and related data are stored in protected areas (such as TPM), which further improves data security. Hardware security modules such as TPM provide additional physical and logical protection to prevent data from being accessed or tampered with without authorization.

[0031] Furthermore, this method not only verifies critical system files (such as the Linux kernel, initramfs file, and bootloader configuration file), but also verifies all files in the boot directory. This comprehensive verification strategy ensures the overall trustworthiness of the system boot environment.

[0032] The present application also proposes a secure boot system for a trusted controller, an electronic device, and a computer storage medium, all of which have all the advantages of the secure boot method for a trusted controller described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A flowchart of a secure startup method for a trusted controller provided by the present invention;

[0035] Figure 2 A structural diagram of a secure boot system of a trusted controller provided by the present invention. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0037] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0038] The core of a secure boot method for a trusted controller provided in this application is to store a secure boot policy in a trusted platform module of the trusted controller, establish a trusted chain based on trusted files during the system startup process, and perform measurement verification on each trusted file in the trusted chain, so that the secure boot policy can be executed in both the U-Boot stage and the operating system stage, thereby enhancing the overall security of the system.

[0039] See Figure 1 , a secure boot method for a trusted controller, comprising the following steps:

[0040] Step 1. Build a boot policy configuration in U-Boot and configure the secure boot policy into U-Boot through the boot policy configuration.

[0041] Configuring a secure boot policy in U-Boot can include the following steps:

[0042] a. Modify the U-Boot configuration file:

[0043] Open the U-Boot configuration file and add the following command to enable the secure boot policy:

[0044] #define CONFIG_SECURE_BOOT, where define is a preprocessing directive in C language, used to define macros.

[0045] b. Generate signing key and certificate:

[0046] Use the X.509 certificate generation tool to generate the signing key and certificate for booting the image.

[0047] c. Start the mirror:

[0048] Use the generated signing key to sign the kernel, U-Boot itself, or other boot images that require signing.

[0049] d. Embed the signing key and certificate into U-Boot:

[0050] Embed the signing key and certificate into U-Boot's firmware.

[0051] e. Compile U-Boot:

[0052] Use the cross-compilation toolchain to compile the modified U-Boot source code.

[0053] Step 2: Build a trusted controller driver in U-Boot. Use the trusted controller driver to execute the secure boot policy during the boot process and store the configured secure boot policy in a protected area, such as a TPM (Trusted Platform Module) or other security chip.

[0054] Step 3: Use the boot policy configuration to build a first-level security policy, such as the boot password and signature verification. When the trusted controller boots, U-Boot first reads and verifies the secure boot policy against the first-level security policy. It then performs the corresponding security checks and actions based on the first-level security policy. If the verification fails, U-Boot refuses to start the secure boot policy, enters recovery mode, and logs an error.

[0055] The steps for verifying the secure boot policy for the first-level security policy are as follows:

[0056] a. Generate a key pair: Use tools such as OpenSSL (an open-source encryption library and command-line tool, SSL, Secure Sockets Layer) to generate a pair of public and private keys.

[0057] b. Sign U-Boot and kernel images: Use the private key to sign the U-Boot and kernel images.

[0058] c. Package the signature into the U-Boot environment: Add the signature to the U-Boot environment variable.

[0059] d. Verify signature: Verify the signature of U-Boot and kernel image during the U-Boot boot process.

[0060] Step 4: After the trusted controller is started, the secure boot policy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trusted verification.

[0061] S4.1. The secure boot strategy is based on GRUB (GRand Unified Bootloader, a multi-operating system boot program), U-Boot, or bootloader, and builds a trust chain and performs measurement verification during the system startup process.

[0062] S4.2. Trusted files, including the Linux (operating system) kernel file, initramfs (initial RAM file system) file, bootloader configuration file, and all files in the boot directory, are measured and verified. The measurement values are expanded into the PCRs (Platform Configuration Registers) corresponding to the trusted platform module. The measurement values of the trusted files are compared with the baseline values. If the measurement values are the same as the baseline values, the trusted file is trusted. If the measurement values are different from the baseline values, the trusted file is untrusted.

[0063] Optionally, the secure boot strategy establishes a trusted chain based on a trusted file, including:

[0064] The secure boot strategy builds a trusted chain during the trusted controller boot process and uses a hash algorithm for measurement verification. The steps for hash algorithm measurement verification are as follows:

[0065] a. Determine the verification target: Identify the trusted files that require hash verification.

[0066] b. Select a hash algorithm: Select an appropriate hash algorithm, SHA-256 (Secure Hash Algorithm 256-bit).

[0067] c. Calculate hash value: Use the selected hash algorithm to perform hash calculation on the trusted file to obtain a hash value of fixed length.

[0068] d. Compare hash values: Compare the calculated hash value with the known or expected hash value.

[0069] e. Analyze and verify the results: Determine the integrity and authenticity of the trusted file based on the hash value comparison results.

[0070] f. Further inspection: If the verification result fails, further inspection can be carried out.

[0071] In S4.2, the measurement verification of trusted files is a key step in ensuring that the trusted files used during the system startup process have not been tampered with. The following example illustrates the measurement verification process of S4.2:

[0072] 1. The bootloader determines the list of trusted files that need to be measured and verified based on the secure boot policy. This includes the Linux kernel file, initramfs file, bootloader configuration file, and all files in the boot directory.

[0073] 2. The bootloader reads the contents of these trusted files from the specified storage location.

[0074] 3. Use a hash algorithm (such as SHA-256) to hash the content of each trusted file to generate a metric value (i.e., hash value).

[0075] 4. Compare the calculated measurement value with a pre-stored baseline value (stored in a secure location such as a TPM or a specific encrypted partition).

[0076] If the measurement value is the same as the baseline value, it means that the trusted file has not been tampered with since the last verification, and the trusted file is considered to be trusted.

[0077] If the measurement value is different from the baseline value, it means that the trusted file has been tampered with or damaged, and the file is marked as untrustworthy.

[0078] 5. For untrusted trusted files, the bootloader will execute predetermined security response measures. This may include stopping the boot process, falling back to safe mode, recording error logs, or notifying the administrator.

[0079] For verified trusted files, the bootloader extends their measurement values into the PCRs of the trusted platform module. This helps to continue to verify the integrity and trustworthiness of the system in subsequent stages.

[0080] 6. The bootloader should record the measurement values and verification status of all trusted files for subsequent auditing and troubleshooting. In addition, the bootloader can also report any security incidents or anomalies to the administrator.

[0081] Step 5. If you need to update the secure boot policy, you can dynamically update it through the boot policy configuration and store the new secure boot policy in a protected area.

[0082] Before downloading a new secure boot policy, the update source must be verified for legitimacy and authenticity. This can be accomplished through digital signatures, certificate verification, or a known secure channel. Once the update source is verified as authentic, the update package containing the new secure boot policy is downloaded. The download process should use a secure transmission protocol, such as HyperText Transfer Protocol over Secure Socket Layer (HTTLS), to prevent data interception or tampering during transmission. After the download is complete, the update package must be integrity verified to ensure it has not been tampered with. This is typically achieved by verifying the update package's hash value or digital signature. Before updating the new secure boot policy, back up the current secure boot policy. This facilitates quick recovery in the event of a problem during the update. After ensuring the update package is secure, update the new secure boot policy contained in it to the corresponding U-Boot configuration. This requires modifying U-Boot environment variables, configuration files, or directly updating the policy in the firmware. The updated secure boot policy should be stored in a protected area, such as a trusted platform module, secure storage chip, or encrypted partition, to prevent unauthorized access.

[0083] The secure boot method of the trusted controller has the following advantages:

[0084] 1. Enhanced system security: By building a secure boot policy into U-Boot and performing strict verification steps during the boot process (such as boot password and signature verification), unauthorized or malicious system boots are effectively prevented. Furthermore, hash verification of trusted files (such as the Linux kernel, initramfs files, and bootloader configuration files) ensures that these trusted files have not been tampered with during the boot process, thereby enhancing overall system security.

[0085] 2. Establishing a Trust Chain: The secure boot strategy is based on a trust chain. Starting from the initial boot phase, the trustworthiness of each trusted file is verified step by step to ensure the integrity and credibility of the entire boot process. By extending the measurement values of trusted files to the PCR of the Trusted Platform Module, a reliable basis is provided for subsequent verification and auditing.

[0086] 3. Flexible Update Mechanism: Supports dynamic updates of secure boot policies through configuration tools and stores new secure boot policies in protected areas (such as the TPM or a specific encrypted partition), enabling the system to flexibly respond to new security threats and vulnerabilities. Secure boot policies can be updated without downtime or redeployment of the entire system, improving system maintainability and responsiveness.

[0087] 4. Detailed auditing and logging: Records the measurement results and verification status of all files, providing rich data support for subsequent audits and troubleshooting. It can report any security incidents or anomalies to administrators, helping them to promptly identify and address potential security threats.

[0088] 5. High reliability and fault tolerance: During the verification process, if an untrusted file is found, the bootloader will execute a predetermined security response measure, such as stopping the boot process or falling back to safe mode, thereby avoiding the risk of system crash due to tampering with trusted files. This mechanism ensures high reliability and fault tolerance in the face of malicious attacks or accidental damage.

[0089] 6. This solution is not only applicable to U-Boot-based embedded systems, but can also be extended to other systems using GRUB, U-Boot, or bootloaders, showing wide applicability. Integration with TPM further enhances system security and reliability.

[0090] In summary, the secure boot method of the trusted controller provides comprehensive security protection for the system through strict verification steps, establishment of a trusted chain, flexible update mechanism, detailed auditing and logging, as well as high reliability and fault tolerance.

[0091] For corresponding reference, see Figure 2 , the present application also provides a secure boot system of a trusted controller, comprising:

[0092] A configuration module is used to configure a secure boot policy in U-Boot; the secure boot policy includes the following steps: modifying the U-Boot configuration file; generating a signature key and certificate; signing the boot image with the signature key; embedding the signature key and certificate into U-Boot; and compiling the modified U-Boot source code using a cross-compilation tool chain.

[0093] A driver module is used to build a trusted controller driver in the U-Boot, and execute a secure boot strategy during the trusted controller startup process through the trusted controller driver;

[0094] The verification module is used to verify the secure boot policy using the first-level security policy when the trusted controller is started. After the verification is passed, the corresponding security check is performed according to the secure boot policy. The steps of the first-level security policy verification of the secure boot policy are as follows: generate a key pair; use the private key in the key pair to sign the U-Boot and kernel images; package the signature into the U-Boot environment; and verify the signature during the U-Boot startup process.

[0095] The trusted module is used after the trusted controller is started. The secure boot strategy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trusted verification.

[0096] It should be noted that in the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of each module is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another device, or some features can be ignored or not executed. The modules described as separate components may or may not be physically separated. The components displayed as modules may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0097] In addition, the modules in the various embodiments of the present invention may be integrated into a single processing unit, each module may exist physically separately, or two or more modules may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0098] An electronic device provided in an embodiment of the present application includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of a secure startup method of a trusted controller described in any of the above embodiments are implemented.

[0099] Another electronic device provided in an embodiment of the present application may further include: an input port connected to the processor for transmitting multimodal data collected by an external acquisition device to the processor; a display unit connected to the processor for displaying the processing results of the processor to the outside world; and a communication module connected to the processor for enabling communication between the electronic device and the outside world. The display unit may be a display panel, a laser scanning display, etc. The communication method adopted by the communication module includes but is not limited to mobile high-definition link technology, universal serial bus, high-definition multimedia interface, wireless connection (including wireless fidelity technology, Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s). IEEE 802.11s is a standard developed by the IEEE (Institute of Electrical and Electronics Engineers) for wireless local area networks, specifically for supporting the construction and management of wireless mesh networks.

[0100] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of a secure startup method of a trusted controller as described in any of the above embodiments are implemented.

[0101] The computer-readable storage medium involved in this application includes random access memory, memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0102] For the description of the relevant parts of the trusted controller secure boot policy construction system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in the secure boot method for a trusted controller provided in the embodiments of the present application, and no further details are given here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0103] The above content is only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A secure boot method for a trusted controller, characterized in that: include: Configure secure boot policy in U-Boot; The secure boot strategy includes the following steps: modifying the U-Boot configuration file; Generate signing keys and certificates; Use the signature key to sign the boot image; embed the signature key and certificate into U-Boot; compile the modified U-Boot source code using the cross-compilation toolchain; The configuring of the secure boot policy in U-Boot specifically comprises: building a boot policy configuration in U-Boot, and configuring the secure boot policy into U-Boot through the boot policy configuration; A trusted controller driver is constructed in the U-Boot, and a secure boot strategy is executed during the trusted controller boot process through the trusted controller driver; When the trusted controller starts, the first-level security policy is used to verify the secure boot policy. After the verification is passed, the corresponding security check is performed according to the secure boot policy. The steps of the first-level security policy to verify the secure boot policy are as follows: generate a key pair; use the private key in the key pair to sign the U-Boot and kernel images; and package the signature into the U-Boot environment. Verify signature during U-Boot boot process; The trusted controller driver executes the secure boot policy during the trusted controller startup process and stores the secure boot policy in a protected area; After the trusted controller is started, the secure boot policy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trust verification. The secure boot strategy builds a trusted chain during the boot process of the trusted controller and uses a hash algorithm to measure and verify the trusted file. The steps of the hash algorithm for measurement verification are as follows: determining the trusted file to be verified; selecting a hash algorithm; calculating the hash value of the trusted file; comparing the hash value with the preset hash value; and determining the measurement verification result based on the comparison result. The trusted files include Linux kernel files, initramfs files, bootloader configuration files, and all files in the boot directory. Each trusted file is measured and verified, and the measurement value is expanded to the PCR corresponding to the trusted platform module. The measurement value of the trusted file is compared with the reference value. If the measurement value is the same as the reference value, the trusted file is trusted. If the measurement value is different from the reference value, the trusted file is untrusted. If the secure boot policy needs to be updated, it is dynamically updated through the boot policy configuration and the new secure boot policy is stored in a protected area.

2. A secure boot method for a trusted controller according to claim 1, characterized in that: The protected area is a trusted platform module.

3. The secure boot method of a trusted controller according to claim 1, characterized in that: The first-level security policy is used to verify the secure boot policy. When the verification fails, U-Boot refuses to boot and enters the recovery mode, recording the error log.

4. A system for executing the trusted controller secure boot method according to any one of claims 1 to 3, characterized in that: include: Configuration module, used to configure secure boot policy in U-Boot; The secure boot strategy includes the following steps: modifying the U-Boot configuration file; Generate a signature key and certificate; use the signature key to sign the boot image; embed the signature key and certificate into U-Boot; compile the modified U-Boot source code using the cross-compilation toolchain; A driver module is used to build a trusted controller driver in the U-Boot, and execute a secure boot strategy during the trusted controller startup process through the trusted controller driver; The verification module is used to verify the secure boot policy using the first-level security policy when the trusted controller is started. After the verification is passed, the corresponding security check is performed according to the secure boot policy. The steps of the first-level security policy verification of the secure boot policy are as follows: generate a key pair; use the private key in the key pair to sign the U-Boot and kernel images; and package the signature into the U-Boot environment. Verify signature during U-Boot boot process; The trusted module is used after the trusted controller is started. The secure boot strategy establishes a trusted chain based on the trusted files and performs measurement verification on each trusted file in the trusted chain. When all trusted files pass the verification, the trusted controller passes the trusted verification.

5. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of a secure startup method for a trusted controller as described in any one of claims 1 to 3 when executing the computer program.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the secure startup method of a trusted controller according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Secure starting method, device and equipment for embedded system and medium

    CN118821109A