System starting method, trusted link construction method, device, equipment and medium

By summarizing and verifying the sampled startup program, the subsystems at all levels in the hardware system are started step by step, solving the contradiction between system startup speed and security, and achieving fast and safe system startup.

CN119885207APending Publication Date: 2025-04-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510122908.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

How to improve system startup speed while ensuring the safety of system startup, especially when performing secure verification of startup programs for each device, software and application.

Method used

By summarizing and extracting the sampled startup program and after the summary value is checked, the subsystems at all levels in the hardware system are started step by step, thereby achieving rapid and secure startup of the system.

Benefits of technology

The calculation amount of summary extraction is reduced, the system startup speed is improved, and the security and reliability of hardware system startup is improved by pre-constructing trusted links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885207A_ABST
    Figure CN119885207A_ABST
Patent Text Reader

Abstract

The invention provides a system starting method, a trusted link construction method, a trusted link construction device, equipment and a medium, and relates to the field of system security, and the system starting method comprises the following steps: after a hardware system is powered on, obtaining a trusted link which is constructed in advance based on starting programs at all levels in the hardware system; traversing each stage of starting program in the trusted link step by step, and sampling the currently traversed starting program by using a target binary number corresponding to the currently traversed starting program to obtain current sampling data; performing abstract extraction on the current sampling data to obtain a to-be-verified abstract value; and performing consistency verification on the digest value to be verified and the original digest value of the currently traversed starting program, and after the verification succeeds, starting a corresponding hierarchy subsystem in the hardware system through the currently traversed starting program until all levels of starting programs in the trusted link are traversed so as to complete the starting of the hardware system. On the basis, the hardware system is safely started, and meanwhile the starting speed of the system is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of system security, and in particular to a system startup method, a trusted link building method, a device, a equipment and a medium. Background Art

[0002] Current electronic information devices and systems all need to load a startup program before starting up, and then execute the startup program to start the corresponding system, and then the system starts to work normally after starting up. Therefore, loading the startup program is often the first step in starting up the device. How to ensure the correctness of the startup program used to start the system when the system starts up is a very important thing. If the wrong startup program is used to start the system, it will cause system malfunction at best, damage the system at worst, and even cause malware to be implanted in the system to leak core information. In this regard, secure boot devices are currently widely used to verify whether the loaded startup program is safe and reliable. If it is safe and reliable, the corresponding system is started. If it is not safe and reliable, the system startup is stopped; and for the safety and stability of the entire system, it is necessary to perform security verification on the startup programs of each device, software and application loaded into the system. Although the purpose of securely starting the system can be achieved, it will also greatly increase the startup time of the system.

[0003] It can be seen that how to improve the system startup speed while starting the system safely is a problem that needs to be solved by those skilled in the art. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a system startup method, a trusted link construction method, an apparatus, a device and a medium, which can extract a digest of the sampled startup program, and after the extracted digest value is verified, start the corresponding system through the startup program, thereby safely starting the system and improving the system startup speed. The specific scheme is as follows:

[0005] In a first aspect, the present invention provides a system startup method, comprising:

[0006] After the hardware system is powered on, a trusted link pre-built based on various levels of startup programs in the hardware system is obtained; each level of startup program is used to start the corresponding level subsystem in the hardware system;

[0007] Traverse the startup programs at each level in the trusted link step by step, and use the target binary number corresponding to the startup program currently traversed to sample the startup program currently traversed to obtain current sampled data, and then extract the summary of the current sampled data to obtain the summary value to be verified;

[0008] Perform consistency check on the digest value to be verified and the original digest value of the currently traversed startup program. After the verification succeeds, start the corresponding hierarchical subsystem in the hardware system through the currently traversed startup program until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system.

[0009] Among them, each level of the boot program is data constructed based on binary numbers; the original summary value of each level of the boot program is the summary value obtained after summarizing the original sampling data of each level of the boot program during the construction of the trusted link; the original sampling data of each level of the boot program is the data obtained after sampling each level of the boot program using the binary number corresponding to each level of the boot program.

[0010] Optionally, before sampling the currently traversed startup program using the target binary number corresponding to the currently traversed startup program, the method further includes:

[0011] Obtaining a target ciphertext corresponding to the currently traversed startup program, and obtaining a decryption key corresponding to the currently traversed startup program from a first memory; the first memory is a one-time programmable memory;

[0012] Decrypt the target ciphertext using the decryption key to obtain the target binary number and the original summary value corresponding to the currently traversed startup program from the decrypted information;

[0013] Among them, when the currently traversed startup program is the first-level startup program in the trusted link, the target ciphertext is located in the second memory; when the currently traversed startup program is not the first-level startup program in the trusted link, the target ciphertext is located in the previous-level startup program in the trusted link.

[0014] Optionally, the target binary number corresponding to the currently traversed startup program is used to sample the currently traversed startup program to obtain current sampling data, including:

[0015] Based on the target binary number corresponding to the currently traversed startup program, determine the window size and window sliding step of the current sliding window; the window size and window sliding step of the current sliding window are both equal to the total number of bits of the target binary number;

[0016] Generate the current sliding window at the starting position of the currently traversed startup program according to the window size of the current sliding window, and determine the position of the binary number to be sampled in the current sliding window based on the position of the preset binary number in the target binary number;

[0017] Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled, and the target sampling data is determined according to the currently sampled binary number;

[0018] The window sliding step is used to control the current sliding window to slide on the currently traversed startup program to update the position of the current sliding window on the currently traversed startup program, and jump again to the step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the currently traversed startup program, so as to determine the current sampling data corresponding to the currently traversed startup program based on each target sampling data.

[0019] In a second aspect, the present invention provides a trusted link establishment method, comprising:

[0020] The last level of the startup program among the startup programs at each level obtained from the hardware system is determined as the current level target startup program; each level of the startup program is used to start the corresponding level subsystem in the hardware system;

[0021] The current level target startup program is sampled using the binary number corresponding to the current level target startup program, and the original sampled data obtained after sampling is abstracted to obtain the original abstract value;

[0022] If the current-level target startup program is not the first-level startup program among the startup programs at all levels, the encrypted original summary value is combined with the previous-level startup program among the startup programs at all levels, and the combined previous-level startup program is determined as the new current-level target startup program, and then the process jumps again to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program;

[0023] If the current-level target boot program is the first-level boot program among the various levels of boot programs, the encrypted original digest value is stored in the second memory, and a trusted link is constructed based on the various levels of target boot programs.

[0024] Optionally, the encrypted original digest value is combined with the previous level startup program in each level of startup programs, including:

[0025] Constructing information to be encrypted based on the original summary value and the binary number corresponding to the current-level target startup program, and encrypting the information to be encrypted using the encryption key to obtain a first encrypted ciphertext;

[0026] Combining the first encrypted ciphertext with the previous level startup program in each level of startup programs to obtain a combined previous level startup program;

[0027] Accordingly, storing the encrypted original digest value in the second memory includes:

[0028] The information to be encrypted is constructed based on the original summary value and the binary number corresponding to the current-level target startup program, and the information to be encrypted is encrypted using the encryption key to obtain a second encrypted ciphertext, and then the second encrypted ciphertext is stored in the second memory.

[0029] Optionally, sampling the current-level target startup program using a binary number corresponding to the current-level target startup program includes:

[0030] Based on the binary number corresponding to the current level target startup program, determine the window size and window sliding step of the current sliding window; the window size and window sliding step of the current sliding window are both equal to the total number of bits of the binary number corresponding to the current level target startup program;

[0031] Generate the current sliding window at the starting position of the current level target startup program according to the window size of the current sliding window, and determine the position of the binary number to be sampled in the current sliding window based on the position of the preset binary number in the binary number corresponding to the current level target startup program;

[0032] Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled, and the target sampling data is determined according to the currently sampled binary number;

[0033] The window sliding step is used to control the current sliding window to slide on the current level target startup program to update the position of the current sliding window on the current level target startup program, and jump again to the step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the current level target startup program, so as to determine the original sampling data corresponding to the current level target startup program based on each target sampling data.

[0034] In a third aspect, the present invention provides a system startup device, comprising:

[0035] A trusted link acquisition module is used to acquire a trusted link pre-built based on various levels of startup programs in the hardware system after the hardware system is powered on; each level of startup program is used to start the corresponding level subsystem in the hardware system;

[0036] A data sampling module is used to traverse the startup programs at each level in the trusted link step by step, and use the target binary number corresponding to the startup program currently traversed to sample the startup program currently traversed to obtain current sampled data, and then perform summary extraction on the current sampled data to obtain a summary value to be verified;

[0037] The system startup module is used to perform consistency check on the digest value to be verified and the original digest value of the currently traversed startup program. After the verification succeeds, the corresponding hierarchical subsystem in the hardware system is started through the currently traversed startup program until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system.

[0038] Among them, each level of the boot program is data constructed based on binary numbers; the original summary value of each level of the boot program is the summary value obtained after summarizing the original sampling data of each level of the boot program during the construction of the trusted link; the original sampling data of each level of the boot program is the data obtained after sampling each level of the boot program using the binary number corresponding to each level of the boot program.

[0039] In a fourth aspect, the present invention provides a trusted link construction device, comprising:

[0040] A startup program determination module is used to determine the last level startup program among the startup programs at each level obtained from the hardware system as the current level target startup program; each level startup program is used to start the corresponding level subsystem in the hardware system;

[0041] A summary extraction module is used to sample the current level target startup program using the binary number corresponding to the current level target startup program, and perform summary extraction on the original sampled data obtained after sampling to obtain the original summary value;

[0042] A combining module, for combining the encrypted original summary value with the previous-level startup program in each level of startup programs if the current-level target startup program is not the first-level startup program in each level of startup programs, and determining the combined previous-level startup program as the new current-level target startup program, and then jumping back to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program;

[0043] The trusted link building module is used to store the encrypted original summary value in the second memory if the current target startup program is the first-level startup program among the startup programs at all levels, and to build a trusted link based on the target startup programs at all levels.

[0044] In a fifth aspect, the present invention provides an electronic device, comprising:

[0045] Memory for storing computer programs;

[0046] A processor is used to execute a computer program to implement the aforementioned method.

[0047] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the aforementioned method when executed by a processor.

[0048] In the present application, after the hardware system is powered on, a trusted link pre-constructed based on various levels of boot programs in the hardware system is obtained; each level of boot program is used to start the corresponding hierarchical subsystem in the hardware system; the boot programs at various levels in the trusted link are traversed level by level, and the currently traversed boot program is sampled using the target binary number corresponding to the currently traversed boot program to obtain the current sampled data, and then the current sampled data is abstracted to obtain the summary value to be verified; the summary value to be verified and the original summary value of the currently traversed boot program are checked for consistency, and after the verification is successful, the corresponding hierarchical subsystem in the hardware system is started by the currently traversed boot program until all levels of boot programs in the trusted link are traversed to complete the startup of the hardware system; wherein, each level of boot programs are data constructed based on binary numbers; the original summary value of each level of boot programs is the summary value obtained after abstracting the original sampled data of each level of boot programs during the construction of the trusted link; the original sampled data of each level of boot programs is the data obtained after sampling each level of boot programs using the binary number corresponding to each level of boot programs.

[0049] Beneficial effect: For any level of startup program in a trusted link, the present invention first uses the binary number corresponding to any level of startup program to sample any level of startup program, and extracts the summary of the sampled data to obtain the summary value to be verified, and then performs consistency check on the summary value to be verified and the original summary value of any level of startup program, and after the consistency check is successful, the corresponding level subsystem in the hardware system is started by any level of startup program; in this way, the present invention extracts the summary of the sampled startup program, thereby reducing the calculation amount of summary extraction, which has the effect of improving the system startup speed. In addition, the present invention pre-constructs a trusted link based on the startup programs at all levels in the hardware system, so that after the hardware system is powered on, the startup programs at all levels in the trusted link are started step by step in the above manner. At this time, since the startup programs at all levels in the hardware system have a dependency relationship, the present invention can further improve the security and reliability of the hardware system startup through the trusted link. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flow chart of a system startup method provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a sliding window provided by an embodiment of the present invention;

[0053] Figure 3 A system startup flow chart provided for an embodiment of the present invention;

[0054] Figure 4 A hardware architecture diagram for implementing system startup provided by an embodiment of the present invention;

[0055] Figure 5 A flow chart of a trusted link establishment method provided by an embodiment of the present invention;

[0056] Figure 6 A schematic diagram of the structure of a system startup device provided by an embodiment of the present invention;

[0057] Figure 7 A schematic diagram of the structure of a trusted link building device provided by an embodiment of the present invention;

[0058] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] At present, secure boot devices are widely used to verify whether the loaded boot program is safe and reliable. If it is safe and reliable, the corresponding system is started. If it is not safe and reliable, the system startup is stopped. In addition, for the safety and stability of the entire system, it is necessary to perform security verification on the boot program of each device, software and application loaded into the system. Although the purpose of securely booting the system can be achieved, it will also greatly increase the startup time of the system. To this end, the present invention provides a system startup method, which extracts a summary of the sampled startup program, and after the extracted summary value is verified, the corresponding system is started through the startup program, thereby improving the system startup speed while securely booting the system.

[0061] See also Figure 1 As shown, an embodiment of the present invention provides a system startup method, including:

[0062] Step S11: After the hardware system is powered on, a trusted link pre-built based on various levels of startup programs in the hardware system is obtained; each level of startup program is used to start a corresponding level subsystem in the hardware system.

[0063] In the embodiment of the present invention, after the hardware system is powered on, a trusted link pre-built based on various levels of boot programs in the hardware system is first obtained; wherein each level of boot program is used to start the corresponding level subsystem in the hardware system, and each level of boot program is data built based on binary numbers, that is, each level of boot program is stored in the hardware system in the form of binary numbers. In order to further improve the security of hardware system startup, the boot program in the embodiment of the present invention can be a mirrored boot program obtained by mirroring the original boot program.

[0064] Step S12, traversing each level of the startup program in the trusted link step by step, and using the target binary number corresponding to the currently traversed startup program, sampling the currently traversed startup program to obtain current sampled data, and then extracting the summary of the current sampled data to obtain the summary value to be verified.

[0065] In the embodiment of the present invention, after obtaining the trusted link, the boot programs at each level in the trusted link are traversed step by step, and for the boot program currently traversed, the boot program currently traversed is sampled using the target binary number corresponding to the boot program currently traversed to obtain the current sampled data, and the current sampled data is abstracted using the hash algorithm to obtain the abstract value to be verified corresponding to the boot program currently traversed. It should be noted that the hash algorithm can use SHA (Secure Hash Algorithm).

[0066] Before sampling the currently traversed startup program using the target binary number corresponding to the currently traversed startup program, it is necessary to first obtain the target ciphertext corresponding to the currently traversed startup program, and obtain the decryption key corresponding to the currently traversed startup program from the first memory; wherein the first memory is a one-time programmable memory (OTP, One Time Programmable). Then, the target ciphertext is decrypted using the decryption key obtained from the first memory to obtain the decrypted information, and the target binary number and the original digest value corresponding to the currently traversed startup program are obtained from the decrypted information. It should be noted that the embodiment of the present invention stores the decryption key in a one-time programmable memory. Since the decryption key cannot be changed or cleared again after being written into the one-time programmable memory, the risk of tampering with the decryption key can be reduced to a certain extent, thereby improving the security of the storage of the decryption key.

[0067] Furthermore, when the currently traversed boot program is the first-level boot program in the trusted link, the target ciphertext is located in the second memory of the hardware system; when the currently traversed boot program is not the first-level boot program in the trusted link, the target ciphertext is located in the previous-level boot program in the trusted link. The second memory can be a non-volatile memory, and the boot programs at all levels in the trusted link can be pre-stored in the second memory.

[0068] That is, for the currently traversed boot program, it is necessary to first determine whether the currently traversed boot program is the first-level boot program in the trusted link. If the currently traversed boot program is the first-level boot program in the trusted link, then obtain the target ciphertext corresponding to the currently traversed boot program from the second memory of the hardware system, and obtain the decryption key corresponding to the currently traversed boot program from the first memory, then use the decryption key to decrypt the target ciphertext, and obtain the target binary number and original summary value corresponding to the currently traversed boot program from the decrypted information. If the currently traversed boot program is not the first-level boot program in the trusted link, then obtain the target ciphertext corresponding to the currently traversed boot program from the previous-level boot program in the trusted link, and obtain the decryption key corresponding to the currently traversed boot program from the first memory, then use the decryption key to decrypt the target ciphertext, and obtain the target binary number and original summary value corresponding to the currently traversed boot program from the decrypted information.

[0069] It should be noted that the embodiment of the present invention traverses the startup programs at each level in the trusted link step by step, and verifies and starts the startup programs step by step. Therefore, when obtaining the target ciphertext corresponding to the currently traversed startup program from the previous level startup program in the trusted link, since the previous level startup program has been successfully verified, the data in the previous level startup program is safe and reliable, that is, the target ciphertext corresponding to the currently traversed startup program obtained from the previous level startup program is safe and reliable.

[0070] For the sampling of the currently traversed startup program, specifically: based on the target binary number corresponding to the currently traversed startup program, determine the window size and window sliding step of the current sliding window; wherein the window size and window sliding step of the current sliding window are both equal to the total number of bits of the target binary number. Then, based on the window size of the current sliding window, generate the current sliding window at the starting position of the currently traversed startup program, and determine the position of the binary number to be sampled in the current sliding window based on the position of the preset binary number in the target binary number. Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled to determine the target sampling data according to the currently sampled binary number; then the window sliding step is used to control the current sliding window to slide on the currently traversed startup program to update the position of the current sliding window on the currently traversed startup program, and jump back to the above step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the currently traversed startup program, so as to determine the current sampling data corresponding to the currently traversed startup program based on each target sampling data. Wherein, the total number of bits of the target binary number is greater than 1, and the preset binary number is 0 or 1.

[0071] For example, the current traversed startup program is a 16-bit binary number 0110111100110110, the target binary number is an 8-bit binary number 10011011, and the preset binary number is 1. The window size and window sliding step of the current sliding window are both the total number of bits of the target binary number, 8. Figure 2As shown, according to the window size of the current sliding window, the current sliding window is generated at the starting position of the currently traversed startup program, and the data in the current sliding window includes 01101111; based on the position of the preset binary number in the target binary number, the position of the binary number to be sampled in the current sliding window is determined, which is the first, fourth, fifth, seventh and eighth positions at this time; then based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled to determine the target sampling data according to the currently sampled binary number, and the target sampling data at this time is 00111. Then, the window sliding step is used to control the current sliding window to slide on the currently traversed startup program to update the position of the current sliding window on the currently traversed startup program, and the data in the current sliding window includes 00110110, and then the binary number at the corresponding position in the current sliding window is still sampled based on the position of the binary number to be sampled in the current sliding window to determine the target sampling data according to the currently sampled binary number, and the target sampling data at this time is 01010. Since the current sliding window is already at the end position of the currently traversed startup program, the current sampling data 0011101010 corresponding to the currently traversed startup program can be determined based on the target sampling data 00111 and 01010. It should be noted that the target binary number can be not only an eight-bit binary number, but also a sixteen-bit binary number, a thirty-two-bit binary number, etc.

[0072] It should also be noted that different levels of startup programs in a trusted link may correspond to different binary numbers, or may correspond to the same binary number. If different levels of startup programs in a trusted link correspond to different binary numbers, then different levels of startup programs will have different sampling processes, that is, the sampling positions and sampling quantities of the binary numbers of different levels of startup programs are different. In this way, the embodiment of the present invention can not only reduce the amount of calculation of summary extraction and increase the system startup speed through the setting of binary numbers, but also improve the security of system startup by setting different binary numbers for different levels of startup programs, thereby using different binary number sampling positions and sampling quantities.

[0073] Step S13: Perform consistency check on the summary value to be verified and the original summary value of the currently traversed startup program. After the verification is successful, start the corresponding hierarchical subsystem in the hardware system through the currently traversed startup program until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system.

[0074] In an embodiment of the present invention, after obtaining the digest value to be verified corresponding to the currently traversed boot program, a consistency check is performed on the digest value to be verified and the original digest value of the currently traversed boot program to obtain a consistency check result. If the consistency check result indicates that the check failed, a boot program error prompt is issued for the currently traversed boot program, and the traversal of the boot programs at all levels in the trusted link is ended. If the consistency check result indicates that the check is successful, the corresponding hierarchical subsystem in the hardware system is started through the currently traversed boot program, and the next level of boot programs in the trusted link are continued to be traversed until all levels of boot programs in the trusted link are traversed, thereby completing the secure startup of the hardware system based on the trusted link.

[0075] Among them, the original summary value of each level of the boot program is the summary value obtained after summarizing the original sampling data of each level of the boot program during the construction of the trusted link; the original sampling data of each level of the boot program is the data obtained after sampling each level of the boot program using the binary number corresponding to each level of the boot program.

[0076] Specifically, Figure 3 As shown, after the hardware system is powered on, a trusted link pre-built based on the boot programs at various levels in the hardware system is first obtained. The first-level boot program is determined from the trusted link, and the target ciphertext corresponding to the first-level boot program is obtained from the second memory of the hardware system, and the decryption key corresponding to the first-level boot program is obtained from the first memory. The target ciphertext is then decrypted using the decryption key, and the target binary number and the original summary value corresponding to the first-level boot program are obtained from the decrypted information. The first-level boot program is sampled using the target binary number corresponding to the first-level boot program, and the current sampled data is abstracted to obtain the summary value to be verified, and the summary value to be verified and the original summary value of the first-level boot program are checked for consistency. If the consistency check result indicates that the summary value check is inconsistent, it indicates that the system startup has failed.

[0077] If the consistency check result indicates that the summary value check is consistent, the corresponding hierarchical subsystem in the hardware system is started through the first-level startup program, and then the next-level startup program is determined from the trusted link, which is the second-level startup program at this time, and the target ciphertext corresponding to the second-level startup program is obtained from the previous-level startup program (which is the first-level startup program at this time), and the decryption key corresponding to the second-level startup program is obtained from the first memory, and then the target ciphertext is decrypted using the decryption key, and the target binary number and original summary value corresponding to the second-level startup program are obtained from the decrypted information. The second-level startup program is sampled using the target binary number corresponding to the second-level startup program, and the summary of the current sampled data is extracted to obtain the summary value to be verified, and the summary value to be verified and the original summary value of the second-level startup program are checked for consistency. If the consistency check result indicates that the summary value check is inconsistent, it indicates that the system startup has failed. If the consistency check result indicates that the summary value check is consistent, the corresponding hierarchical subsystem in the hardware system is started through the second-level startup program, and then the next-level startup program is determined from the trusted link, and the above steps are repeated until the corresponding hierarchical subsystem in the hardware system is started through the last-level startup program, thereby completing the secure startup of the hardware system.

[0078] Further, such as Figure 4 As shown, Figure 4 A system architecture diagram for realizing secure booting of a hardware system is provided. Specifically, for any level-one booting program in a trusted link, it is necessary to obtain any level-one booting program from a second memory through a sampling module; obtain a target ciphertext corresponding to any level-one booting program from the second memory through an encryption and decryption module, and obtain a decryption key corresponding to any level-one booting program from a first memory, then decrypt the target ciphertext using the decryption key, and obtain a target binary number and an original summary value corresponding to any level-one booting program from the decrypted information. Sample any level-one booting program using a target binary number corresponding to any level-one booting program through a sampling module to obtain current sampled data. Extract a summary of the current sampled data through a summary extraction module to obtain a summary value to be verified. A control unit performs a consistency check on the summary value to be verified and the original summary value of any level-one booting program, and after the check succeeds, the startup unit is called to start the corresponding hierarchical subsystem in the hardware system through any level-one booting program.

[0079] Beneficial effect: For any level of startup program in a trusted link, the present invention first uses the binary number corresponding to any level of startup program to sample any level of startup program, and extracts the summary of the sampled data to obtain the summary value to be verified, and then performs consistency check on the summary value to be verified and the original summary value of any level of startup program, and after the consistency check is successful, the corresponding level subsystem in the hardware system is started by any level of startup program; in this way, the present invention extracts the summary of the sampled startup program, thereby reducing the calculation amount of summary extraction, which has the effect of improving the system startup speed. In addition, the present invention pre-constructs a trusted link based on the startup programs at all levels in the hardware system, so that after the hardware system is powered on, the startup programs at all levels in the trusted link are started step by step in the above manner. At this time, since the startup programs at all levels in the hardware system have a dependency relationship, the present invention can further improve the security and reliability of the hardware system startup through the trusted link.

[0080] See also Figure 5 As shown, an embodiment of the present invention provides a trusted link establishment method, including:

[0081] Step S21, determining the last level startup program among the startup programs at each level obtained from the hardware system as the current level target startup program; each level startup program is used to start the corresponding level subsystem in the hardware system.

[0082] In order to safely start the hardware system, the embodiment of the present invention builds a trusted link based on the various levels of startup programs in the hardware system, thereby using the trusted link to achieve safe startup of the hardware system. For the construction of the trusted link, it is first necessary to obtain the startup programs at various levels in the hardware system; wherein each level of startup program is used to start the corresponding level subsystem in the hardware system, and each level of startup program is data constructed based on binary numbers.

[0083] Since the summary value of the next-level startup program is stored in the previous-level startup program, and the summary value of the first-level startup program is stored in a specific memory, the embodiment of the present invention needs to process the startup programs at each level in reverse order of the levels. Specifically, the last-level startup program in each level of startup programs needs to be determined as the current-level target startup program.

[0084] Step S22: sampling the current-level target startup program using the binary number corresponding to the current-level target startup program, and performing summary extraction on the original sampled data obtained after sampling to obtain the original summary value.

[0085] In the embodiment of the present invention, after determining the current level target startup program, the current level target startup program is sampled using the binary number corresponding to the current level target startup program to obtain original sampled data, and the original sampled data is abstracted to obtain the original abstract value. It should be noted that the binary numbers corresponding to the startup programs at each level can be set by the user or automatically generated by a random number generator, which is not limited here.

[0086] According to one of the embodiments, for determining the binary numbers corresponding to the startup programs at each level, the binary numbers corresponding to the startup programs at each level can be determined according to the importance of the startup programs at each level and the total number of bits of the binary numbers contained in the startup programs at each level. Specifically, for any level of startup programs, the first digit can be determined according to the total number of bits of the binary numbers contained in any level of startup programs; wherein the first digit is less than the total number of bits of the binary numbers contained in any level of startup programs, and the first digit is in a multiple relationship with the total number of bits of the binary numbers contained in any level of startup programs. After determining the first digit, the number of bits of the preset binary number is determined according to the importance of any level of startup programs to obtain the second digit; wherein the importance of the startup program is positively correlated with the number of bits of the preset binary number, that is, the more important the startup program is, the more bits of the preset binary number are. Further, the binary number corresponding to any level of startup programs is determined according to the first digit and the second digit, at this time, the number of bits of the binary number corresponding to any level of startup programs is equal to the first digit, and the binary number corresponding to any level of startup programs contains the preset binary number of the second digit. In this way, by considering the importance of each level of startup programs and the total number of bits of the binary numbers contained in each level of startup programs, a binary number that is more suitable for each level of startup programs can be obtained, thereby achieving adaptive sampling of each level of startup programs.

[0087] As for the sampling of the current level target startup program, it can specifically include: determining the window size and window sliding step of the current sliding window based on the binary number corresponding to the current level target startup program; wherein the window size and window sliding step of the current sliding window are both equal to the total number of bits of the binary number corresponding to the current level target startup program. Then, according to the window size of the current sliding window, the current sliding window is generated at the starting position of the current level target startup program, and the position of the binary number to be sampled in the current sliding window is determined based on the position of the preset binary number in the binary number corresponding to the current level target startup program. Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled to determine the target sampling data according to the binary number currently sampled; then, the window sliding step is used to control the current sliding window to slide on the current level target startup program to update the position of the current sliding window on the current level target startup program, and jump to the above-mentioned step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the current level target startup program, so as to determine the original sampling data corresponding to the current level target startup program based on each target sampling data.

[0088] It should be noted that different levels of startup programs in a trusted link may correspond to different binary numbers, or may correspond to the same binary number. If different levels of startup programs in a trusted link correspond to different binary numbers, then different levels of startup programs will have different sampling processes, that is, the sampling positions and sampling quantities of the binary numbers of different levels of startup programs are different. In this way, the embodiment of the present invention can not only reduce the amount of calculation of summary extraction and shorten the construction time of the trusted link through the setting of binary numbers, but also improve the security and reliability of the trusted link by setting different binary numbers for different levels of startup programs, thereby using different binary number sampling positions and sampling quantities.

[0089] Step S23: If the current-level target startup program is not the first-level startup program in the startup programs at all levels, the encrypted original summary value and the previous-level startup program in the startup programs at all levels are combined, and the combined previous-level startup program is determined as the new current-level target startup program, and then the process jumps again to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program.

[0090] In an embodiment of the present invention, after obtaining the original summary value corresponding to the current-level target startup program, if the current-level target startup program is not the first-level startup program in each level of startup programs, the original summary value corresponding to the current-level target startup program is encrypted, and the encrypted original summary value and the previous-level startup program in each level of startup programs are combined to obtain the combined previous-level startup program, and then the combined previous-level startup program is determined as the new current-level target startup program, and the process jumps again to the above-mentioned step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program.

[0091] Specifically, if the current-level target startup program is not the first-level startup program among the startup programs at all levels, the information to be encrypted is constructed based on the original summary value corresponding to the current-level target startup program and the binary number corresponding to the current-level target startup program, and the information to be encrypted is encrypted using the encryption key to obtain a first encrypted ciphertext; then the first encrypted ciphertext and the previous-level startup program in the startup programs at all levels are combined to obtain a combined previous-level startup program; thereafter, the combined previous-level startup program is determined as the new current-level target startup program, and the process jumps again to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program.

[0092] Step S24: If the current-level target boot program is the first-level boot program among the various levels of boot programs, the encrypted original digest value is stored in the second memory, and a trusted link is established based on the various levels of target boot programs.

[0093] In an embodiment of the present invention, after obtaining the original digest value corresponding to the current-level target startup program, if the current-level target startup program is the first-level startup program among the startup programs at all levels, the original digest value corresponding to the current-level target startup program is encrypted, and the encrypted original digest value is stored in the second memory of the hardware system. At this time, a trusted link can be built based on the target startup programs at all levels.

[0094] Specifically, if the current-level target startup program is the first-level startup program among the startup programs at all levels, the information to be encrypted is constructed based on the original summary value corresponding to the current-level target startup program and the binary number corresponding to the current-level target startup program, and the information to be encrypted is encrypted using the encryption key to obtain a second encrypted ciphertext, and then the second encrypted ciphertext is stored in the second memory of the hardware system. At this time, a trusted link can be constructed based on the target startup programs at all levels, that is, a trusted link is constructed based on the last-level startup program without the combined encrypted ciphertext and other startup programs at all levels with the combined encrypted ciphertext.

[0095] Taking the hardware system including two-level boot programs as an example, the construction of the trusted link is explained. The specific scheme is as follows:

[0096] The last level startup program is determined from the two-level startup program, and the last level startup program is sampled using the binary number corresponding to the last level startup program to obtain original sampled data, and the original sampled data is abstracted to obtain an original abstract value. Information to be encrypted is constructed based on the original abstract value corresponding to the last level startup program and the binary number corresponding to the last level startup program, and the information to be encrypted is encrypted using an encryption key to obtain a first encrypted ciphertext; then the first encrypted ciphertext is combined with the first level startup program in the two-level startup program to obtain a combined first level startup program.

[0097] Furthermore, the combined first-level boot program is sampled using the binary number corresponding to the combined first-level boot program to obtain the original sampled data, and the original sampled data is abstracted to obtain the original abstract value. The information to be encrypted is constructed based on the original abstract value corresponding to the combined first-level boot program and the binary number corresponding to the combined first-level boot program, and the information to be encrypted is encrypted using the encryption key to obtain the second encrypted ciphertext; then the second encrypted ciphertext is stored in the second memory of the hardware system, at which time a trusted link can be constructed based on the last-level boot program and the combined first-level boot program, and the decryption keys used to decrypt the encrypted ciphertext are stored in the first memory of the hardware system.

[0098] Beneficial effect: For any level of startup program in the hardware system, the present invention first uses the binary number corresponding to any level of startup program to sample any level of startup program, and extracts the summary of the sampled data to obtain the original summary value, and then encrypts the original summary value and the binary number corresponding to any level of startup program and adds it to the previous level startup program or stores it in a specific memory, so that there is a dependency relationship between the startup programs at all levels in the hardware system, and a trusted link is built based on the startup programs at all levels with dependencies, thereby improving the reliability and security of the trusted link. Furthermore, the present invention reduces the amount of calculation of the summary extraction by extracting the summary of the sampled startup program, which has the effect of shortening the time to build the trusted link, and the security and reliability of the hardware system startup can be further improved through the trusted link.

[0099] See also Figure 6 As shown, an embodiment of the present invention provides a system startup device, including:

[0100] The trusted link acquisition module 11 is used to acquire the trusted link pre-built based on the various levels of startup programs in the hardware system after the hardware system is powered on; each level of startup program is used to start the corresponding level subsystem in the hardware system;

[0101] The data sampling module 12 is used to traverse the startup programs at each level in the trusted link step by step, and use the target binary number corresponding to the startup program currently traversed to sample the startup program currently traversed to obtain current sampled data, and then perform summary extraction on the current sampled data to obtain a summary value to be verified;

[0102] The system startup module 13 is used to perform consistency check on the digest value to be verified and the original digest value of the currently traversed startup program, and after the verification succeeds, start the corresponding hierarchical subsystem in the hardware system through the currently traversed startup program until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system;

[0103] Among them, each level of the boot program is data constructed based on binary numbers; the original summary value of each level of the boot program is the summary value obtained after summarizing the original sampling data of each level of the boot program during the construction of the trusted link; the original sampling data of each level of the boot program is the data obtained after sampling each level of the boot program using the binary number corresponding to each level of the boot program.

[0104] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.

[0105] Beneficial effect: For any level of startup program in a trusted link, the present invention first uses the binary number corresponding to any level of startup program to sample any level of startup program, and extracts the summary of the sampled data to obtain the summary value to be verified, and then performs consistency check on the summary value to be verified and the original summary value of any level of startup program, and after the consistency check is successful, the corresponding level subsystem in the hardware system is started by any level of startup program; in this way, the present invention extracts the summary of the sampled startup program, thereby reducing the calculation amount of summary extraction, which has the effect of improving the system startup speed. In addition, the present invention pre-constructs a trusted link based on the startup programs at all levels in the hardware system, so that after the hardware system is powered on, the startup programs at all levels in the trusted link are started step by step in the above manner. At this time, since the startup programs at all levels in the hardware system have a dependency relationship, the present invention can further improve the security and reliability of the hardware system startup through the trusted link.

[0106] See also Figure 7 As shown, an embodiment of the present invention provides a trusted link construction device, including:

[0107] The startup program determination module 21 is used to determine the last startup program of each level of startup programs obtained from the hardware system as the current level target startup program; each level of startup program is used to start the corresponding level subsystem in the hardware system;

[0108] The summary extraction module 22 is used to sample the current level target startup program using the binary number corresponding to the current level target startup program, and perform summary extraction on the original sampled data obtained after sampling to obtain the original summary value;

[0109] A combining module 23 is used for combining the encrypted original summary value with the previous-level startup program in each level of startup programs if the current-level target startup program is not the first-level startup program in each level of startup programs, and determining the combined previous-level startup program as the new current-level target startup program, and then jumping back to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program;

[0110] The trusted link building module 24 is used to store the encrypted original digest value in the second memory if the current target startup program is the first-level startup program among the various levels of startup programs, and to build a trusted link based on the target startup programs at various levels.

[0111] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.

[0112] Beneficial effect: For any level of startup program in the hardware system, the present invention first uses the binary number corresponding to any level of startup program to sample any level of startup program, and extracts the summary of the sampled data to obtain the original summary value, and then encrypts the original summary value and the binary number corresponding to any level of startup program and adds it to the previous level startup program or stores it in a specific memory, so that there is a dependency relationship between the startup programs at all levels in the hardware system, and a trusted link is built based on the startup programs at all levels with dependencies, thereby improving the reliability and security of the trusted link. Furthermore, the present invention reduces the amount of calculation of the summary extraction by extracting the summary of the sampled startup program, which has the effect of shortening the time to build the trusted link, and the security and reliability of the hardware system startup can be further improved through the trusted link.

[0113] Furthermore, the present application also discloses an electronic device. Figure 8 This is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.

[0114] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0115] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0116] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0117] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned disclosed method when executed by a processor. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiment, and will not be repeated here.

[0118] Furthermore, the present application also discloses a computer program product, including a computer program / instruction; wherein the computer program / instruction, when executed by a processor, implements the aforementioned disclosed method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiment, and no further description will be given here.

[0119] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0120] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0121] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0122] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0123] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A system startup method, characterized in that: include: After the hardware system is powered on, a trusted link pre-built based on various levels of startup programs in the hardware system is obtained; Each level of startup program is used to start the corresponding level subsystem in the hardware system; Traversing the boot programs at each level in the trusted link step by step, and sampling the boot program currently traversed by using the target binary number corresponding to the boot program currently traversed to obtain current sampled data, and then extracting a summary of the current sampled data to obtain a summary value to be verified; Performing a consistency check on the digest value to be verified and the original digest value of the currently traversed startup program, and after the check succeeds, starting the corresponding hierarchical subsystem in the hardware system through the currently traversed startup program, until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system; Among them, each level of the startup program is data constructed based on binary numbers; the original summary value of each level of the startup program is the summary value obtained after summarizing the original sampling data of each level of the startup program during the construction of the trusted link; the original sampling data of each level of the startup program is the data obtained after sampling each level of the startup program using the binary number corresponding to each level of the startup program.

2. The system startup method according to claim 1, characterized in that: Before sampling the currently traversed startup program using the target binary number corresponding to the currently traversed startup program, the method further includes: Obtaining a target ciphertext corresponding to the currently traversed startup program, and obtaining a decryption key corresponding to the currently traversed startup program from a first memory; the first memory is a one-time programmable memory; Decrypting the target ciphertext using the decryption key to obtain a target binary number and an original summary value corresponding to the currently traversed startup program from the decrypted information; Among them, when the currently traversed startup program is the first-level startup program in the trusted link, the target ciphertext is located in the second memory; when the currently traversed startup program is not the first-level startup program in the trusted link, the target ciphertext is located in the previous-level startup program in the trusted link.

3. The system startup method according to claim 1 or 2, characterized in that: The method of sampling the currently traversed startup program by using the target binary number corresponding to the currently traversed startup program to obtain current sampled data includes: Based on the target binary number corresponding to the currently traversed startup program, determine the window size and window sliding step of the current sliding window; the window size and window sliding step of the current sliding window are both equal to the total number of bits of the target binary number; Generate the current sliding window at the starting position of the currently traversed startup program according to the window size of the current sliding window, and determine the position of the binary number to be sampled in the current sliding window based on the position of the preset binary number in the target binary number; Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled, and the target sampling data is determined according to the currently sampled binary number; The window sliding step is used to control the current sliding window to slide on the currently traversed startup program to update the position of the current sliding window on the currently traversed startup program, and jump again to the step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the currently traversed startup program, so as to determine the current sampling data corresponding to the currently traversed startup program based on each of the target sampling data.

4. A trusted link construction method, characterized in that: include: The last level startup program among the startup programs at each level obtained from the hardware system is determined as the current level target startup program; Each level of startup program is used to start the corresponding level subsystem in the hardware system; The current-level target startup program is sampled using the binary number corresponding to the current-level target startup program, and the original sampled data obtained after sampling is abstracted to obtain the original abstract value; If the current-level target startup program is not the first-level startup program among the startup programs at each level, the encrypted original summary value is combined with the previous-level startup program among the startup programs at each level, and the combined previous-level startup program is determined as the new current-level target startup program, and then the process jumps again to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program; If the current-level target startup program is the first-level startup program among the various levels of startup programs, the encrypted original digest value is stored in the second memory, and a trusted link is established based on the various levels of target startup programs.

5. The trusted link building method according to claim 4, characterized in that: The step of combining the encrypted original digest value with a previous level startup program in each level of startup programs includes: Constructing information to be encrypted based on the original digest value and the binary number corresponding to the current-level target startup program, and encrypting the information to be encrypted using an encryption key to obtain a first encrypted ciphertext; Combining the first encrypted ciphertext with a previous level startup program in each level of startup programs to obtain the combined previous level startup program; Correspondingly, storing the encrypted original digest value in the second memory includes: The information to be encrypted is constructed based on the original summary value and the binary number corresponding to the current-level target startup program, and the information to be encrypted is encrypted using an encryption key to obtain a second encrypted ciphertext, and then the second encrypted ciphertext is stored in a second memory.

6. The trusted link establishment method according to claim 4 or 5, characterized in that: The sampling of the current-level target startup program by using the binary number corresponding to the current-level target startup program includes: Based on the binary number corresponding to the current level target startup program, determine the window size and window sliding step of the current sliding window; the window size and window sliding step of the current sliding window are both equal to the total number of bits of the binary number corresponding to the current level target startup program; Generate the current sliding window at the starting position of the current level target startup program according to the window size of the current sliding window, and determine the position of the binary number to be sampled in the current sliding window based on the position of the preset binary number in the binary number corresponding to the current level target startup program; Based on the position of the binary number to be sampled in the current sliding window, the binary number at the corresponding position in the current sliding window is sampled, and the target sampling data is determined according to the currently sampled binary number; The window sliding step is used to control the current sliding window to slide on the current level target startup program to update the position of the current sliding window on the current level target startup program, and jump again to the step of sampling the binary number at the corresponding position in the current sliding window based on the position of the binary number to be sampled in the current sliding window, until the current sliding window slides to the end position of the current level target startup program, so as to determine the original sampling data corresponding to the current level target startup program based on each of the target sampling data.

7. A system startup device, characterized in that: include: A trusted link acquisition module, used to acquire a trusted link pre-built based on various levels of startup programs in the hardware system after the hardware system is powered on; Each level of startup program is used to start the corresponding level subsystem in the hardware system; A data sampling module, used to traverse the startup programs at each level in the trusted link step by step, and use the target binary number corresponding to the startup program currently traversed to sample the startup program currently traversed to obtain current sampled data, and then perform summary extraction on the current sampled data to obtain a summary value to be verified; A system startup module, used to perform consistency check on the digest value to be verified and the original digest value of the currently traversed startup program, and after the verification succeeds, start the corresponding hierarchical subsystem in the hardware system through the currently traversed startup program until all levels of startup programs in the trusted link are traversed to complete the startup of the hardware system; Among them, each level of the startup program is data constructed based on binary numbers; the original summary value of each level of the startup program is the summary value obtained after summarizing the original sampling data of each level of the startup program during the construction of the trusted link; the original sampling data of each level of the startup program is the data obtained after sampling each level of the startup program using the binary number corresponding to each level of the startup program.

8. A trusted link building device, characterized in that: include: A startup program determination module, used to determine the last level startup program among the startup programs at each level obtained from the hardware system as the current level target startup program; Each level of startup program is used to start the corresponding level subsystem in the hardware system; A summary extraction module, used to sample the current-level target startup program using the binary number corresponding to the current-level target startup program, and perform summary extraction on the original sampled data obtained after sampling to obtain an original summary value; A combining module, for combining the encrypted original summary value with the previous-level startup program in the startup programs at each level if the current-level target startup program is not the first-level startup program in the startup programs at each level, and determining the combined previous-level startup program as the new current-level target startup program, and then jumping back to the step of sampling the current-level target startup program using the binary number corresponding to the current-level target startup program; The trusted link building module is used to store the encrypted original summary value in the second memory if the current-level target startup program is the first-level startup program among the startup programs at all levels, and to build a trusted link based on the target startup programs at all levels.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 6.

10. 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 method according to any one of claims 1 to 6 is implemented.