A secure boot method, system, device, and storage medium for a chip.

By using the Secure Boot program in Flash to verify the chip's firmware certificate and application, the increased cost caused by the ROM BOOT program in the prior art is solved, achieving cost savings and improved boot speed, while also enhancing the chip's security and flexibility.

CN123114566APending Publication Date: 2026-11-17SHENZHEN XINGUODU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510582769.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, chip secure boot mechanisms rely on ROM BOOT programs, which increases chip design and usage costs and reduces market competitiveness.

Method used

The Secure Boot program in Flash replaces the ROM BOOT program. By obtaining the root public key in the locked area of ​​Flash, the firmware program certificate and application downloaded to the chip are verified. If the verification is successful, the firmware application is started.

Benefits of technology

This reduces the design and usage costs of the chip, enhances its market competitiveness, and speeds up boot time by reducing ROM storage space, while also improving the chip's security and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114566A_ABST
    Figure CN123114566A_ABST
Patent Text Reader

Abstract

This application discloses a secure boot method, system, apparatus, and storage medium for chips, aimed at reducing chip design and usage costs. The method includes: when the chip boots, obtaining a root public key embedded in a Secure Boot program, the Secure Boot program being stored in a locked area of ​​Flash memory; verifying the firmware certificate and firmware application downloaded to the chip using the root public key; and if both the firmware certificate and the firmware application are verified successfully, then starting the firmware application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of secure chip boot technology, and in particular to a secure chip boot method, system, device and storage medium. Background Technology

[0002] In today's highly information-driven era, chips are the core components of various electronic devices. To ensure the safe operation of chips, a secure boot mechanism is set up when the chip starts up. This secure boot mechanism can prevent unauthorized firmware from running on the chip, thereby protecting the data processed and the operations performed by the chip from malicious tampering.

[0003] Currently, common secure boot mechanisms for chips are primarily based on ROM boot programs. During the chip design phase, the ROM boot program is embedded in the chip's read-only memory (ROM). When the chip boots, the ROM boot program downloads the application vendor's fuse public key. Then, the ROM boot program uses this fuse public key to verify and boot the relevant firmware program from the chip application vendor, ensuring that only authorized and legitimate firmware can run on the chip, thereby guaranteeing the legitimacy of the entire boot chain.

[0004] However, the additional ROM storage space added during chip design increases the design and usage costs of the chip, reducing the market competitiveness of the chip product. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a secure boot method, system, device, and storage medium for chips, which can reduce the design and usage costs of chips.

[0006] The technical solution provided in this application is described below:

[0007] The first aspect of this application provides a secure boot method for a chip, including:

[0008] When the chip boots up, it obtains the root public key embedded in the Secure Boot program, which is stored in the locked area of ​​Flash.

[0009] Verify the firmware certificate and firmware application downloaded to the chip using the root public key;

[0010] If both the firmware certificate and the firmware application pass verification, the firmware application is launched.

[0011] Optionally, after obtaining the root public key embedded in the Secure Boot program and before verifying the firmware certificate and firmware application downloaded to the chip based on the root public key, the secure boot method further includes:

[0012] Determine if there is a download command from the host computer; if so, determine the firmware program certificate and firmware application to be downloaded based on the download command.

[0013] The root public key is used to verify the firmware certificate and the firmware application to be downloaded. If both verifications pass, the firmware certificate and the firmware application to be downloaded are downloaded to the Flash memory respectively.

[0014] Optionally, downloading the firmware certificate and the firmware application to be downloaded to the Flash memory respectively includes:

[0015] The firmware certificate and firmware application to be downloaded are downloaded through a preset communication interface and security protocol.

[0016] Optionally, downloading the firmware certificate and the firmware application to be downloaded to the Flash memory respectively includes:

[0017] The firmware certificate to be downloaded is stored in the certificate partition of the Flash memory;

[0018] The firmware program to be downloaded is stored in the program partition of the Flash memory.

[0019] Optionally, after verifying the firmware certificate to be downloaded and the firmware application to be downloaded using the root public key, the secure boot method further includes:

[0020] Reboot the chip and re-verify the legitimacy of the firmware program certificate and firmware application already downloaded to the chip.

[0021] Optionally, verifying the firmware certificate and firmware application downloaded to the chip based on the root public key includes:

[0022] Verify the firmware certificate downloaded to the chip using the root public key;

[0023] If the verification passes, the firmware application is then verified using the firmware certificate.

[0024] Optionally, verifying the firmware certificate downloaded to the chip based on the root public key includes:

[0025] Calculate the first hash value of the contents in the firmware certificate;

[0026] Calculate the second hash value of the signature value in the firmware certificate based on the root public key;

[0027] The first HASH value is compared with the second HASH value to obtain a comparison result, which is used to determine whether the firmware program certificate has been verified.

[0028] A second aspect of this application provides a secure boot system for a chip, comprising:

[0029] The acquisition unit is used to acquire the root public key embedded in the Secure Boot program when the chip starts up, wherein the Secure Boot program is stored in the locked area of ​​Flash.

[0030] The verification unit is used to verify the firmware program certificate and firmware application downloaded to the chip based on the root public key.

[0031] A startup unit is used to start the firmware application if both the firmware certificate and the firmware application are verified.

[0032] Optionally, the secure boot system further includes:

[0033] The judgment unit is used to determine whether there is a download instruction from the host computer. If so, it determines the firmware program certificate and firmware application to be downloaded based on the download instruction.

[0034] The download unit is used to verify the firmware certificate and the firmware application to be downloaded using the root public key. If both are verified, the firmware certificate and the firmware application to be downloaded are downloaded to the Flash memory respectively.

[0035] Optionally, the download unit includes:

[0036] The first download module is used to download the firmware certificate and the firmware application to be downloaded through a preset communication interface and security protocol.

[0037] Optionally, the download unit includes:

[0038] The second download module is used to store the firmware certificate to be downloaded into the certificate partition of the Flash.

[0039] The third download module is used to store the firmware program to be downloaded into the program partition of the Flash.

[0040] Optionally, the secure boot system further includes:

[0041] The restart unit is used to restart the chip and re-verify the legitimacy of the firmware program certificate and firmware application downloaded into the chip.

[0042] Optionally, the verification unit includes:

[0043] The first verification module is used to verify the firmware program certificate downloaded to the chip based on the root public key;

[0044] The second verification module is used to verify the firmware application through the firmware program certificate if the verification passes.

[0045] Optionally, the first verification module includes:

[0046] The first calculation submodule is used to calculate the first HASH value of the content in the firmware certificate;

[0047] The second calculation submodule is used to calculate the second HASH value of the signature value in the firmware certificate based on the root public key.

[0048] The comparison submodule is used to compare the first HASH value with the second HASH value to obtain a comparison result, which is used to determine whether the firmware program certificate has been verified.

[0049] A third aspect of this application provides a secure boot device for a chip, comprising:

[0050] Processor, memory, input / output units, and bus;

[0051] The processor is connected to the memory, the input / output unit, and the bus;

[0052] The memory stores a program, which the processor invokes to execute the first aspect and any optional secure boot method of the first aspect.

[0053] A fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, performs the secure boot method of the first aspect and any one of the first aspects.

[0054] As can be seen from the above technical solutions, this application has the following advantages:

[0055] This application obtains the root public key from the Secure Boot program in the Flash locked area when the chip boots up. Then, it verifies the firmware program certificate and firmware application downloaded to the chip using the root public key. If both are verified, the firmware program is started. Therefore, compared with the prior art, the Secure Boot program is stored in the Flash locked area, eliminating the need to increase ROM storage space, thereby saving the cost of designing and using ROM and improving the market competitiveness of the chip product. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a flowchart illustrating a secure boot method for a chip according to this application.

[0058] Figure 2 This is a flowchart illustrating a secure boot method for a chip according to this application, specifically a method for determining whether a download command from a host computer has been received.

[0059] Figure 3 This is a flowchart illustrating the verification of a fixed program certificate in a secure boot method for a chip according to this application.

[0060] Figure 4 This is a schematic diagram of a secure boot system for a chip according to this application;

[0061] Figure 5 This is a schematic diagram of a secure boot system for a chip according to this application;

[0062] Figure 6 This is a schematic diagram of a secure boot device for a chip according to this application. Detailed Implementation

[0063] Existing technologies rely on ROM BOOT programs for secure chip booting, which increases the ROM storage space required during chip design, raising design and usage costs and reducing the market competitiveness of chip products. To address this deficiency, this application proposes a secure chip booting method that uses a Secure Boot program stored in Flash memory to replace the ROM BOOT program for secure chip booting, thereby reducing chip design and usage costs.

[0064] It should be noted that the secure boot method for a chip provided in this application can be applied to terminals, systems, and servers. For ease of explanation, the following detailed description will focus on a system as the execution subject.

[0065] Please see Figure 1 This application provides an embodiment of a secure boot method for a chip, the embodiment including:

[0066] 101. When the chip starts up, it obtains the root public key embedded in the Secure Boot program, which is stored in the locked area of ​​Flash.

[0067] The locked area of ​​a Flash memory chip is a specific storage area within the Flash memory that is set to read-only or unmodifiable through hardware or software protection mechanisms. The contents of this area cannot be erased or rewritten during chip operation, ensuring the integrity and security of the stored code (such as the Secure Boot program) and keys (such as the root public key).

[0068] The Secure Boot code program is stored in a specific area of ​​the Flash memory (locked area) by using the existing memory protection unit (MPU) on the chip. After the chip starts Secure Boot, the Flash area is automatically locked to ensure that the code itself cannot be modified.

[0069] The root public key is pre-embedded in the Secure Boot program. The chip's control logic reads the root public key data from a specific storage area of ​​the Secure Boot program and loads it into the chip's memory for subsequent verification operations. The root public key is used to verify the legitimacy of firmware program certificates and firmware applications, and to verify firmware-related digital signatures. The root public key is non-updateable; it is either directly embedded in the Secure Boot program's binary code or stored in a specific protected area of ​​Flash (such as the OTP area). The Secure Boot area is locked via hardware fuses or MPU configuration to prevent subsequent modification.

[0070] The root public key is used during the chip boot phase to verify the firmware certificate (such as the vendor's firmware signing certificate) stored in the chip; and during the download phase (after receiving a download instruction from the host computer, indicating that an update download is needed), it is used to verify the legitimacy of the new firmware certificate sent by the host computer.

[0071] In this embodiment, after the chip is powered on, the Secure Boot code is first loaded and executed from the Secure Boot area of ​​the Flash memory.

[0072] 102. Verify the firmware certificate and firmware application downloaded to the chip using the root public key.

[0073] Firmware certificates and applications are stored in the non-Secure Boot area of ​​Flash (such as the manufacturer partition). The chip obtains the downloaded firmware certificates and firmware applications from the non-Secure Boot area of ​​Flash. The firmware certificate contains key data such as the firmware's digital signature, certificate issuer information, and validity period, while the firmware application is the program code that the chip actually runs.

[0074] The verification process begins by verifying the firmware certificate using the root public key. Specifically, this involves using the root public key obtained in step 101 to verify the digital signature in the firmware certificate. The digital signature is generated by encrypting key information of the firmware (such as hash values) using a private key, and the root public key is paired with the private key used to generate the digital signature. The verification process involves recalculating the hash value of the information in the firmware certificate, then decrypting the digital signature using the root public key to obtain the original hash value, and comparing the two hash values. If they match, it indicates that the firmware certificate is authentic, valid, and has not been tampered with.

[0075] In firmware application verification, specifically after the firmware certificate is verified, the chip calculates the actual hash value of the firmware application and compares it with the hash value of the firmware application contained in the firmware certificate. If they match, it indicates that the firmware application has not been tampered with during transmission or storage and is complete, reliable, and legitimate.

[0076] During the verification process, if both the firmware certificate and the firmware application pass verification, step 103 is executed; if either verification fails, the chip may enter an error handling state, such as stopping startup or issuing an alarm message, to prevent the running of untrusted firmware programs and ensure the security of the chip.

[0077] Specifically:

[0078] If only the firmware certificate fails verification, it indicates that it is illegitimate, meaning that the source of the firmware is untrustworthy and may be at risk of being tampered with or maliciously attacked. In this case, you can restart the chip, stop the boot process immediately, or enter the chip's built-in safe mode.

[0079] If only the firmware application fails verification, it indicates that the application's integrity is compromised, potentially leading to malfunction or even system damage. Therefore, the chip refuses to launch the application. Furthermore, if the chip supports firmware rollback, it will automatically roll back to the previous known stable firmware version when firmware application verification fails, ensuring continued normal operation.

[0080] 103. If both the firmware certificate and the firmware application pass verification, then start the firmware application.

[0081] Firmware application startup: After successful verification, the chip transfers control to the firmware application's entry point and begins executing its code. The firmware application is responsible for implementing various chip functions, such as data processing and communication control. At this point, the chip officially enters normal operating mode and can run according to the expected functional and performance requirements.

[0082] In this embodiment, the root public key is obtained from the Secure Boot program in Flash, and then the firmware program certificate and firmware application downloaded to the chip are verified using the root public key. If both are verified, the firmware program is started. The Secure Boot program is used to achieve secure boot of the chip. At the same time, the Secure Boot program is stored in Flash, which avoids increasing ROM storage space, thereby achieving the purpose of saving costs and improving product competitiveness.

[0083] After obtaining the root public key embedded in the Secure Boot program in step 101 above, and before verifying the downloaded firmware certificate and firmware application in the chip using the root public key in step 102, it is necessary to determine whether a download command has been received from the host computer. Please refer to [link to relevant documentation]. Figure 2 This application provides an embodiment of a secure boot method for a chip for determining whether a download command from a host computer has been received. This embodiment includes:

[0084] 201. Determine if there is a download command from the host computer. If so, determine the firmware certificate and firmware application to be downloaded based on the download command.

[0085] Once the chip initiates the Secure Boot process, the Secure Boot program enters a listening state, constantly monitoring for any input commands from the host computer. The host computer and the chip connect via specific communication interfaces, such as USB or SPI, which transmit data according to pre-defined communication protocols.

[0086] The Secure Boot program parses and identifies the received signals, checking whether they conform to the specific instruction format for entering the download process. For example, the instruction may contain specific command codes, checksums, and other information. If the received signal meets the conditions for entering the download process, the Secure Boot program determines that there is a download instruction from the host computer and then executes step 202.

[0087] The download instruction contains information about the firmware certificate and the firmware application to be downloaded, such as filename, version number, size, storage address, and other identifying information.

[0088] In this embodiment, if no download instruction is received from the host computer, it is determined that there is no need for an update. At this time, the Secure Boot program's listening service on the communication interface is turned off, the occupied resources are released, and the above step 102 is continued to verify the firmware program certificate and firmware application downloaded to the chip according to the root public key.

[0089] In addition, if the host computer is a remote server or cloud platform, the download command needs to be transmitted via Internet protocols (such as Wi-Fi, 4G / 5G, LoRaWAN). To ensure that the download command can reach the chip and be listened to by the Secure Boot program, it can wait for a certain period of time, such as 20 seconds or 30 seconds, after not receiving the download command from the host computer.

[0090] 202. Verify the firmware certificate and firmware application to be downloaded using the root public key. If both verifications pass, download the firmware certificate and firmware application to be downloaded to Flash respectively.

[0091] After determining the firmware certificate and firmware application to be downloaded according to step 201, the SecureBoot program verifies the firmware certificate and firmware application to be downloaded. After all verifications are successful, it is agreed to download them to Flash.

[0092] Before downloading, the Secure Boot program re-establishes a stable communication connection with the host computer to ensure reliable data transmission. The communication method can be USB, SPI, etc., depending on the connection configuration of the chip and the host computer.

[0093] If any verification fails, the Secure Boot program will terminate the download process and, in one possible way, send an error message to the host computer to notify it of the reason for the download failure.

[0094] In this embodiment, the firmware program certificate and firmware application can be updated and downloaded according to the download command of the host computer. The relevant functions required by the application manufacturer can be customized in Secure Boot, which facilitates subsequent development and customization and improves the flexibility of the chip.

[0095] In an optional embodiment, the firmware certificate and firmware application to be downloaded are downloaded through a preset communication interface and security protocol.

[0096] The preset communication interface can be a USB interface, SPI interface, UART interface, IC interface, etc., or it can be Wi-Fi, Bluetooth, etc. The specific one is not limited here, and the one that can be actually implemented shall prevail.

[0097] The default security protocol is customized by the manufacturer. For example, it may use firmware fragmentation for encrypted transmission, where the firmware is fragmented into fixed sizes (e.g., 1KB / fragment), each fragment is appended with a CRC32 checksum, and AES-GCM encryption is used with a session key, providing both encryption and integrity protection. The security protocol is mainly to ensure the integrity of data communication and mainly includes the following: header field, length field, message field, checksum field, and trailer field.

[0098] In another optional embodiment, regarding the specific download address of the firmware certificate to be downloaded and the firmware application to be downloaded, this embodiment stores the firmware certificate to be downloaded in the certificate partition of Flash; and stores the firmware application to be downloaded in the application partition of Flash.

[0099] The Flash memory is divided into a certificate partition and a program partition. The certificate partition stores the downloaded firmware program certificate, and the program partition stores the downloaded firmware application. Different programs are stored in different Flash areas. For example, SecureBoot is stored in Flash areas with addresses from 0x00000000 to 0x00008000, while applications are stored in Flash areas with addresses from 0x00008000 to 0x000FA000.

[0100] The size of the certificate partition is determined based on the size of the firmware certificate and the expected update frequency. For example, if the current firmware certificate size is 2KB, the certificate partition can be set to 4KB or 8KB to account for possible future expansion. Similarly, depending on the size of the firmware application, the application partition can be set to 128KB or 256KB, etc.

[0101] Setting the certificate partition to read-only or limited write attributes can prevent the certificate from being accidentally tampered with, improving system security. Write operations to the certificate partition are only permitted during firmware updates, following a specific security procedure.

[0102] The process of verifying the firmware certificate and firmware application downloaded to the chip using the root public key begins by verifying the firmware certificate downloaded to the chip using the root public key. If the verification passes, the firmware application is then verified using the firmware certificate. A detailed description of the root public key verification firmware certificate is as follows:

[0103] Please see Figure 3 This application provides an embodiment of verifying a fixed program certificate in a secure boot method for a chip, the embodiment including:

[0104] 301. Calculate the first hash value of the contents of the firmware certificate.

[0105] Firmware certificates are stored in a specific data structure containing various information, such as certificate issuer information, validity period, certificate holder information, and key data used for signature verification. Before calculating the hash value, the relevant verification content needs to be extracted from the certificate. For example, this might involve extracting all key fields from the certificate except for the digital signature.

[0106] The extracted certificate content is used as input and passed to the selected hash algorithm function. Taking SHA-256 as an example, the algorithm performs operations on the input data, including bitwise operations and logical operations, mapping the input data into a fixed-length (256-bit) hash value. The hash value can be regarded as a "digital fingerprint" of the certificate content, which has uniqueness and irreversibility. That is, different input data are almost impossible to generate the same hash value, and the original input data cannot be deduced from the hash value.

[0107] 302. Calculate the second hash value of the signature value in the firmware certificate based on the root public key.

[0108] The signature value in a firmware certificate is the result of digitally signing the certificate content. The signature value is stored in a specific field of the certificate and needs to be extracted from it.

[0109] The signature value and certificate content (identical to the content used in calculating the first hash value) are passed as input to the signature verification function. During RSA signature verification, the function uses the root public key to decrypt the signature value, obtaining the original hash value (i.e., the second hash value). The root public key is then used to verify whether the signature value was generated by signing the certificate content with a valid private key.

[0110] 303. Compare the first HASH value with the second HASH value to obtain the comparison result. The comparison result is used to determine whether the firmware program certificate has been verified.

[0111] Compare the calculated first and second hash values ​​bit by bit. You can use either a string comparison function (if the hash value is represented as a string) or a binary comparison function (if the hash value is represented as a binary string). Compare each bit of the two hash values ​​to check if they are identical.

[0112] If the first and second hash values ​​are exactly the same, the comparison result is "match". This indicates that the content of the firmware certificate has not been tampered with during transmission and storage, and the signature was generated by a legitimate private key, thus the certificate verification is successful.

[0113] If the first hash value and the second hash value do not match, the comparison result is "inconsistent". This means that the firmware certificate may have been tampered with, or the signature was not generated by a legitimate private key, and the certificate verification fails.

[0114] In an optional embodiment, during the downloading process of the firmware certificate and firmware application, regardless of whether the verification is successful (root public key verification of the firmware certificate and firmware certificate verification of the firmware application), the chip is restarted, and the legality of the firmware certificate and firmware application already downloaded in the chip is re-verified.

[0115] After the chip restarts, it will re-verify the legitimacy of the downloaded firmware program certificate and firmware application to ensure that the firmware running on the chip is safe and reliable.

[0116] In this application, the Secure Boot program stored in Flash is first used to perform the secure boot process of the chip, replacing the existing ROM BOOT program. This can save on the cost of designing and using ROM and improve the market competitiveness of the chip products. Secondly, it reduces the ROOM BOOT boot verification time and speeds up the chip boot process. In addition, the Secure Boot can be customized with the relevant functions required by the application manufacturer to meet the manufacturer's functional requirements. It also supports firmware program certificate updates, which facilitates subsequent development and customization and improves the flexibility of the chip.

[0117] Please see Figure 4 This application provides an embodiment of a secure boot system for a chip, the embodiment including:

[0118] The acquisition unit 401 is used to acquire the root public key embedded in the Secure Boot program when the chip starts up. The Secure Boot program is stored in the locked area of ​​Flash.

[0119] Verification unit 402 is used to verify the firmware program certificate and firmware application downloaded to the chip based on the root public key;

[0120] The startup unit 403 is used to start the firmware application if both the firmware certificate and the firmware application are verified.

[0121] In this embodiment, when the chip starts up, the root public key is first obtained from the Secure Boot program in Flash by the acquisition unit 401. Then, the verification unit 402 verifies the firmware program certificate and firmware application downloaded to the chip according to the root public key. If all verifications pass, the firmware program is started by the boot unit 403. Compared with the ROM BOOT program used in the prior art, this embodiment uses the Secure Boot program instead of the ROM BOOT program. The Secure Boot program is stored in Flash, which does not require additional ROM storage space, thereby saving the cost of designing and using ROM and improving the market competitiveness of the chip product.

[0122] Please see Figure 5 This application provides an embodiment of a secure boot system for a chip, the embodiment including:

[0123] The acquisition unit 501 is used to acquire the root public key embedded in the Secure Boot program when the chip starts up. The Secure Boot program is stored in the locked area of ​​Flash.

[0124] The judgment unit 502 is used to determine whether there is a download instruction from the host computer. If so, it determines the firmware program certificate and firmware application to be downloaded according to the download instruction.

[0125] Download unit 503 is used to verify the firmware certificate and firmware application to be downloaded using the root public key. If both are verified, the firmware certificate and firmware application to be downloaded are downloaded to Flash respectively.

[0126] Download unit 503 includes:

[0127] The first download module 5031 is used to download the firmware program certificate and firmware application to be downloaded through a preset communication interface and security protocol;

[0128] The second download module 5032 is used to store the firmware certificate to be downloaded into the certificate partition of Flash;

[0129] The third download module 5033 is used to store the firmware program to be downloaded into the program partition of Flash;

[0130] Verification unit 504 is used to verify the firmware certificate and firmware application downloaded to the chip based on the root public key;

[0131] The first verification module 5041 is used to verify the firmware program certificate downloaded to the chip based on the root public key;

[0132] The first verification module 5041 includes:

[0133] The first calculation submodule 50411 is used to calculate the first HASH value of the contents in the firmware certificate;

[0134] The second calculation submodule 50412 is used to calculate the second HASH value of the signature value in the firmware certificate based on the root public key.

[0135] The comparison submodule 50413 is used to compare the first HASH value with the second HASH value to obtain the comparison result. The comparison result is used to determine whether the firmware program certificate has been verified.

[0136] The second verification module 5042 is used to verify the firmware application through the firmware program certificate if the verification is successful.

[0137] The restart unit 505 is used to restart the chip and re-verify the legitimacy of the firmware program certificate and firmware application downloaded into the chip.

[0138] The startup unit 506 is used to start the firmware application if both the firmware certificate and the firmware application are verified.

[0139] Please see Figure 6 This application also provides a secure boot device for a chip, comprising:

[0140] Processor 601, memory 602, input / output unit 603, bus 604;

[0141] The processor 601 is connected to the memory 602, the input / output unit 603, and the bus 604;

[0142] The memory 602 stores the program, and the processor 601 calls the program to execute the above. Figures 1-3 Any of the embodiments.

[0143] This application also relates to a computer-readable storage medium on which a program is stored, which, when run on a computer, causes the computer to perform the above-mentioned actions. Figures 1-3 Any of the embodiments.

[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0146] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0148] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A secure boot method for a chip, characterized in that, include: When the chip boots up, it obtains the root public key embedded in the Secure Boot program, which is stored in the locked area of ​​Flash. Verify the firmware certificate and firmware application downloaded to the chip using the root public key; If both the firmware certificate and the firmware application pass verification, the firmware application is launched.

2. The secure startup method according to claim 1, characterized in that, After obtaining the root public key embedded in the Secure Boot program, and before verifying the firmware certificate and firmware application downloaded to the chip based on the root public key, the secure boot method further includes: Determine if there is a download command from the host computer; if so, determine the firmware program certificate and firmware application to be downloaded based on the download command. The root public key is used to verify the firmware certificate and the firmware application to be downloaded. If both verifications pass, the firmware certificate and the firmware application to be downloaded are downloaded to the Flash memory respectively.

3. The safe startup method according to claim 2, characterized in that, The step of downloading the firmware certificate and the firmware application to be downloaded to the Flash memory respectively includes: The firmware certificate and firmware application to be downloaded are downloaded through a preset communication interface and security protocol.

4. The safe startup method according to claim 2, characterized in that, The step of downloading the firmware certificate and the firmware application to be downloaded to the Flash memory respectively includes: The firmware certificate to be downloaded is stored in the certificate partition of the Flash memory; The firmware program to be downloaded is stored in the program partition of the Flash memory.

5. The safe start method according to any one of claims 2 to 4, characterized in that, After verifying the firmware certificate and the firmware application to be downloaded using the root public key, the secure boot method further includes: Reboot the chip and re-verify the firmware certificate and firmware application that have been downloaded into the chip.

6. The safe startup method according to any one of claims 1 to 4, characterized in that, The step of verifying the firmware certificate and firmware application downloaded to the chip based on the root public key includes: Verify the firmware certificate downloaded to the chip using the root public key; If the verification passes, the firmware application is then verified using the firmware certificate.

7. The safe startup method according to claim 6, characterized in that, The step of verifying the firmware certificate downloaded to the chip based on the root public key includes: Calculate the first hash value of the contents in the firmware certificate; Calculate the second hash value of the signature value in the firmware certificate based on the root public key; The first HASH value is compared with the second HASH value to obtain a comparison result, which is used to determine whether the firmware program certificate has been verified.

8. A secure boot system for a chip, characterized in that, include: The acquisition unit is used to acquire the root public key embedded in the Secure Boot program when the chip starts up, the Secure Boot program being stored in the locked area of ​​Flash. The verification unit is used to verify the firmware program certificate and firmware application downloaded to the chip based on the root public key. A startup unit is used to start the firmware application if both the firmware certificate and the firmware application are verified.

9. A secure boot device for a chip, characterized in that, include: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to execute the secure boot method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a program stored thereon, the program performing the secure boot method as described in any one of claims 1 to 7 when executed on a computer.