System-on-chip secure starting method and device, system-on-chip and storage medium

By using the ancestral algorithm and the SM2 algorithm for parallel processing and decryption when the SOC is called, the problem of slow resource consumption is large and slow when SOC startup, and a more efficient and secure startup process is achieved.

CN119357969APending Publication Date: 2025-01-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411193001.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the prior art, the SoC consumes a large resource and is slow to start, making it difficult to effectively prevent attacks and tampering of SoCs during startup.

Method used

By obtaining the encrypted configuration instructions, encrypted image startup file and signature when the on-chip system is powered on, the Zu Chongzhi algorithm is used to determine the decrypted image startup file and the digest value to be verified in parallel, and the SM2 algorithm is used to decrypt the signature to obtain the original digest. Value, compare the digest value to be verified and the original digest value to determine the integrity and security of the image file.

Benefits of technology

Improve the security and efficiency of the mirror startup file and the summary value to be verified, save system resources, improve the start speed and start safety of the system on the film.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357969A_ABST
    Figure CN119357969A_ABST
Patent Text Reader

Abstract

The invention provides a system-on-chip secure startup method and device, a system-on-chip and a storage medium, and relates to the technical field of chips.The method comprises the steps that under the condition that the system-on-chip is powered on, an encryption configuration instruction, an encryption mirror image startup file and a signature are obtained; based on the encryption configuration instruction, determining a decrypted mirror image startup file and a to-be-verified abstract value corresponding to the encrypted mirror image startup file in parallel, and an original abstract value corresponding to the signature; the mirror image starting file and the digest value to be verified are determined by utilizing a Zhongzhi algorithm; and under the condition that the digest value to be verified is the same as the original digest value, safely starting the system-on-chip based on the decrypted mirror image starting file. According to the method, system resources can be saved, and the starting speed and the starting safety of the system on chip are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to a method and device for securely starting a system on a chip, a system on a chip, and a storage medium. Background Art

[0002] System on Chip (SoC) is an integrated circuit that compresses all the components required by the system onto the same chip. It is a system-level chip. SoC is widely used in wired applications such as data centers, artificial intelligence and high-performance computing, as well as battery-powered devices such as smart terminals and wearable devices. SoC is used as the most critical part in practical applications. For example, in server applications, the baseboard management controller (BMC), which is the key component responsible for monitoring the entire server, is SoC. Therefore, SoC is one of the primary targets for attacks by outsiders. With the development of information technology, there are more and more means of attacking SoC, especially when SoC is started. If the SoC is successfully attacked, it is very likely to cause the entire system to work abnormally or even paralyze the system.

[0003] In the prior art, secure booting of SoC is generally achieved through the secure hash algorithm (SHA), asymmetric algorithm (RSA algorithm) and symmetric algorithm Advanced Encryption Standard (AES) in the hash function algorithm. However, SHA and AES are two independent algorithm cores with complex operation structures, resulting in large consumption of SoC resources and slow booting speed. Summary of the invention

[0004] The present invention provides a method and device for securely starting a system on chip, a system on chip and a storage medium, which are used to solve the defects of large SoC resource consumption and slow startup speed in the prior art.

[0005] The present invention provides a method for securely starting a system on a chip, comprising: When the system on chip is powered on, the encrypted configuration instructions, encrypted image startup files and signatures are obtained; Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; In a case where the digest value to be verified is the same as the original digest value, the system on chip is securely started based on the decrypted image startup file.

[0006] According to the system on chip secure boot method provided by the present invention, based on the encrypted configuration instruction, the decrypted image boot file and the digest value to be verified corresponding to the encrypted image boot file, as well as the original digest value corresponding to the signature are determined in parallel, including: Based on the configuration key, decrypt the encrypted configuration instruction to obtain the OTP configuration instruction; Based on the OTP configuration instruction, determine Zu Chongzhi's key information and public key respectively; Based on the Zu Chongzhi key information, using the Zu Chongzhi algorithm, the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified are determined in parallel; Based on the public key, an original digest value corresponding to the signature is determined.

[0007] According to the system on chip secure boot method provided by the present invention, based on the Zu Chongzhi key information, using the Zu Chongzhi algorithm, the decrypted image boot file corresponding to the encrypted image boot file and the digest value to be verified are determined in parallel, including: Based on the Zu Chongzhi key information, the encrypted image startup file is decrypted using the Zu Chongzhi algorithm to obtain the decrypted image startup file; Based on the Zu Chongzhi key information, the Zu Chongzhi algorithm is used to perform integrity calculation on the encrypted image startup file to obtain the summary value to be verified.

[0008] According to the system on chip secure boot method provided by the present invention, determining the original digest value corresponding to the signature based on the public key includes: Based on the public key, the signature is decrypted using the SM2 algorithm to obtain the original summary value.

[0009] According to the system on chip secure boot method provided by the present invention, the encrypted configuration instruction is obtained by performing an XOR operation on the OTP configuration instruction and the configuration key; The encrypted image startup file is obtained by encrypting the image startup file using the Zu Chongzhi algorithm; The signature is obtained by performing an integrity operation on the encrypted image startup file using the Zu Chongzhi algorithm to obtain an original summary value, and then encrypting the original summary value using the SM2 algorithm.

[0010] According to the system on chip secure boot method provided by the present invention, the method further includes: In the case that the digest value to be verified is different from the original digest value, an error warning signal is generated, where the error warning signal is used to instruct the system on chip to stop starting.

[0011] The present invention also provides a system on chip secure boot device, comprising: An acquisition module is used to obtain encrypted configuration instructions, encrypted image startup files and signatures when the system on chip is powered on; A determination module, configured to determine, based on the encrypted configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature in parallel; the image startup file and the digest value to be verified are determined using the Zu Chongzhi algorithm; A startup module is used to securely start the system on chip based on the decrypted image startup file when the digest value to be verified is the same as the original digest value.

[0012] The present invention also provides a system on chip, including a memory, a processing module and a computer program stored in the memory and executable on the processing module, wherein the memory also stores encrypted configuration instructions, encrypted image startup files and signatures; when the processing module executes the computer program, the system on chip secure startup method described in any one of the above is implemented.

[0013] According to the system on chip provided by the present invention, the processing module includes an OTP unit, an SM2 algorithm decryption unit, a Zu Chongzhi algorithm calculation unit, a verification unit, a startup control unit and a processor, wherein: The OTP unit is used to decrypt the encrypted configuration instruction based on the configuration key to obtain the OTP configuration instruction; based on the OTP configuration instruction, determine the key information and public key of Zu Chongzhi respectively; The SM2 algorithm decryption unit is used to determine the original digest value corresponding to the signature based on the public key; The Zu Chongzhi algorithm calculation unit is used to determine the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified in parallel by using the Zu Chongzhi algorithm based on the Zu Chongzhi key information; The verification unit is used to determine whether the digest value to be verified is the same as the original digest value; The startup control unit is used to send the decrypted image startup file to the processor when the digest value to be verified is the same as the original digest value; and generate an error warning signal when the digest value to be verified is different from the original digest value, wherein the error warning signal is used to instruct the system on chip to stop starting; The processor is used for performing secure booting based on the decrypted image boot file.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processing module, the system-on-chip secure startup method described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processing module, the computer program implements any of the above-mentioned system-on-chip secure boot methods.

[0016] The system-on-chip secure boot method, device, system-on-chip and storage medium provided by the present invention obtain encrypted configuration instructions, encrypted image boot files and signatures after the system-on-chip is powered on, and the decrypted image boot files or digest values ​​to be verified corresponding to the encrypted image boot files are determined in parallel by using the Zu Chongzhi algorithm through the encrypted configuration instructions. At the same time, the original digest value corresponding to the signature is determined through the encrypted configuration instructions, and the digest value to be verified is compared with the original digest value. When the digest value to be verified is the same as the original digest value, the system-on-chip is securely booted through the decrypted image boot file. The Zu Chongzhi algorithm used in the present invention has high security, low complexity and fast running speed. The security and determination efficiency of the image boot files and the digest value to be verified are improved through the Zu Chongzhi algorithm, and system resources are saved, thereby improving the startup speed and startup security of the system-on-chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flowchart of SoC secure booting provided by the prior art.

[0019] Figure 2 This is one of the flow charts of the method for securely starting a system on a chip provided by an embodiment of the present invention.

[0020] Figure 3 This is the second flow chart of the method for securely starting a system on a chip provided by an embodiment of the present invention.

[0021] Figure 4 It is a schematic diagram of the structure of a system on chip secure boot device provided by an embodiment of the present invention.

[0022] Figure 5 It is a schematic diagram of the structure of the system on chip provided by an embodiment of the present invention.

[0023] Figure 6 It is a structural schematic diagram of a processing module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0025] In order to better understand the embodiments of the present invention, the prior art is first described in detail.

[0026] Figure 1 This is a flow chart of SoC secure booting provided by the prior art, such as Figure 1 As shown in the figure, when the secure boot of the system on chip (SoC) is realized by the secure hash algorithm (SHA), the asymmetric algorithm (RSA algorithm) and the symmetric algorithm Advanced Encryption Standard (AES) in the hash function algorithm, the image file is first encrypted by AES to generate an encrypted image file, and then the hash value generated by SHA is used as the summary of the encrypted image file; the summary is encrypted by RSA private key to generate a signature, and the encrypted image file and the signature are written to the flash memory. When the SoC is ready to boot securely, the encrypted image file and signature are first read from the flash memory, and then the pre-stored public key corresponding to the RSA private key is read from the one-time programmable memory (OTP) according to the configuration, the signature is decrypted by the public key to obtain the summary, the encrypted image file is calculated by the SHA algorithm, and the obtained image hash value is compared with the summary. If they are consistent, it proves that the image file is safe and valid and has not been tampered with. After that, the chip reads the pre-stored decryption key from the OTP to start decrypting the encrypted image file, and the decrypted image file is placed in the specified location to start the SoC.

[0027] The prior art has the following problems.

[0028] Problem 1: SHA's operation structure is relatively complex. When processing continuous data streams, the data throughput is poor, which consumes a lot of resources and causes a decrease in operating speed, thereby affecting the startup speed of the SoC and generating unnecessary costs.

[0029] Question 2: Since SHA and AES are two independent algorithm cores with high complexity, if SHA and AES are processed in parallel, the resource consumption will be large. Therefore, when the SoC is started, it is usually decrypted first and then the digest is determined. This will result in a slow speed when processing large amounts of data, thus affecting the startup speed of the SoC and consuming more power.

[0030] Question 3: Since SHA and RSA are both international encryption algorithms and are not autonomous and controllable algorithms, SHA and RSA are incompatible with domestic technical standards and security policies, resulting in lower security.

[0031] Question 4: OTP is used to store keys, so its confidentiality is extremely high. The system can select other public keys and AES keys stored in OTP by changing the configuration instructions of OTP. However, in the prior art, the configuration instructions of OTP are not kept confidential during transmission. Attackers can intercept the configuration instructions of OTP during transmission and then locate the locations of various keys in OTP. Therefore, the risk of leakage of OTP configuration instructions in the prior art is relatively high and the security is relatively low.

[0032] In view of the above problems in the prior art, an embodiment of the present invention provides a method for securely starting a system on a chip. Figure 2 FIG. 1 is one of the flow charts of the secure boot method of the system on chip provided by the embodiment of the present invention. Figure 2 As shown, the method includes the following steps 210 to 230.

[0033] Step 210: When the system on chip is powered on, obtain the encrypted configuration instruction, the encrypted image startup file and the signature.

[0034] Specifically, after the SoC is powered on, the processing module in the SoC can obtain the pre-stored encryption configuration instructions, encrypted image startup files and signatures from the memory. Among them, the OTP stores keys corresponding to multiple algorithms. Through the encryption configuration instructions, the Zu Chongzhi key information corresponding to the Zu Chongzhi algorithm corresponding to the encrypted image startup file and the public key corresponding to the signature can be accurately located in the OTP. The encryption configuration instruction is obtained by encrypting the OTP configuration instruction. By encrypting the OTP configuration instruction, it is prevented from intercepting the OTP configuration instruction during the transmission process by the attacker, thereby preventing the attacker from maliciously locating the positions of various keys in the OTP through the OTP configuration instruction, reducing the risk of key leakage, and thus ensuring the safe startup of the SoC. The encrypted image startup file is obtained by encrypting the image startup file, and the image startup file is the image startup program of the SoC. By encrypting the image startup file, it is prevented from the attacker obtaining the image startup file to maliciously start the SoC. The signature is obtained by encrypting the original summary value. By encrypting the original summary value, it is prevented from the attacker obtaining the original summary value for verification, and maliciously starting the SoC after the verification is successful.

[0035] Optionally, the memory may be a flash memory (Flash) or a static random access memory (SRAM), etc., which is not limited in the embodiment of the present invention.

[0036] Further, the encrypted configuration instruction is obtained by performing an XOR operation on the OTP configuration instruction and the configuration key; The encrypted image boot file is obtained by encrypting the image boot file using Zu Chongzhi algorithm; The signature is obtained by using the Zu Chongzhi algorithm to perform integrity calculation on the encrypted image boot file to obtain the original summary value, and then encrypting the original summary value using the SM2 algorithm.

[0037] Specifically, Figure 3 FIG. 2 is a flow chart of a method for securely starting a system on a chip according to an embodiment of the present invention. Figure 3 As shown, before executing step 210, the Zu Chongzhi algorithm can be used, and the Zu Chongzhi key information can be used to encrypt the image startup file to obtain an encrypted image startup file. The Zu Chongzhi key information includes the Zu Chongzhi algorithm key and the initial vector, wherein the Zu Chongzhi algorithm key is used for encryption or decryption. During the encryption process, the Zu Chongzhi algorithm key is combined with the image startup file, and a ciphertext is generated by the Zu Chongzhi algorithm, and the ciphertext is the encrypted image startup file. The Zu Chongzhi algorithm key is generally 128 bits. The initial vector is a random value or a pseudo-random value, which is used to initialize the state of the Zu Chongzhi algorithm. The length of the initial vector is generally the same as the length of the Zu Chongzhi algorithm key, ensuring sufficient security. When the image startup file is encrypted, the initial vector and the Zu Chongzhi algorithm key are both used as inputs of the Zu Chongzhi algorithm, and jointly affect the initial state of the Zu Chongzhi algorithm internal state machine to ensure the uniqueness of the encryption process, increase the difficulty of the attacker to crack the encrypted image startup file, thereby reducing the risk of leakage of the image startup file and improving the security of SoC startup.

[0038] After encrypting the encrypted image startup file, the encrypted image startup file is stored in the memory, and the Zu Chongzhi algorithm with the same configuration, that is, the same Zu Chongzhi key information is used to perform integrity operation on the encrypted image startup file to obtain the original summary value. After that, the SM2 private key in the SM2 algorithm is used to encrypt the original summary value to obtain a signature, and the signature is stored in the memory.

[0039] At the same time, while using the Zu Chongzhi algorithm for encryption and integrity operations, the configuration key and the OTP configuration instruction can also be XORed to encrypt the OTP configuration instruction, obtain the encrypted configuration instruction, and store the encrypted configuration instruction in the memory.

[0040] It should be noted that the Zu Chongzhi (ZUC) algorithm is an encryption and integrity algorithm independently designed by Chinese scholars and is the first algorithm to be included in international standards. The ZUC algorithm is a sequence cipher algorithm based on word design. The ZUC algorithm is a stream cipher algorithm based on linear feedback shift register (LFSR) and nonlinear functions. The core of the ZUC algorithm is to generate a high-entropy pseudo-random bit stream for encryption and decryption of data through nonlinear transformation and key scheduling mechanism. For example, according to the 128-bit Zu Chongzhi algorithm key and the 128-bit initial vector, a 32-bit ZUC key sequence is output for encryption and integrity protection of data. Its encryption function is achieved by performing encryption operation on the output ZUC key sequence and plaintext (i.e., image boot file). Its integrity operation function is to generate a message authentication code by representing the generated ZUC key sequence with a bit string and performing integrity operation on the input plaintext (i.e., encrypted image boot file). The ZUC algorithm can ensure whether the data has been tampered with during transmission through the message authentication code, just like the SHA and SM4 algorithms. The ZUC algorithm has the characteristics of large period, good random statistical characteristics, and is nonlinear in the binary domain, which can improve the ability to resist cryptanalysis in the binary domain; using linear transformations and S-boxes with good diffusion and confusion characteristics in block ciphers, it can provide high nonlinearity. The ZUC algorithm benefits from its structural characteristics, and the existing analysis results show that it has very high security. In addition, compared with the national secret algorithms SM3 and SM4, the ZUC algorithm focuses on ensuring the security strength of the algorithm while meeting the low complexity of the algorithm hardware and software implementation during design. Therefore, it consumes less resources, can achieve higher throughput, and runs faster.

[0041] It should be noted that the embodiment of the present invention does not limit the length of the configuration key. For example, the length of the configuration key may be 128 bits, and it is different from the Zu Chongzhi algorithm key.

[0042] In addition, the encrypted configuration instructions, encrypted image boot files and signatures are all predetermined by the manufacturer and stored in the memory before the SoC leaves the factory.

[0043] Step 220: Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, as well as the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using the Zu Chongzhi algorithm.

[0044] Specifically, after obtaining the encryption configuration instruction, the keys required for the encrypted image startup file and the signature can be located according to the encryption configuration instruction, and then the encrypted image startup file can be decrypted and the integrity operation can be performed to obtain the decrypted image startup file and the summary value to be verified. At the same time, the original summary value can be obtained by decrypting the signature.

[0045] Further, based on the encrypted configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, as well as the original digest value corresponding to the signature are determined in parallel, including: Based on the configuration key, the encrypted configuration instruction is decrypted to obtain the OTP configuration instruction; Based on the OTP configuration instructions, determine Zu Chongzhi's key information and public key respectively; Based on Zu Chongzhi's key information, using Zu Chongzhi's algorithm, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file are determined in parallel; Based on the public key, determine the original digest value corresponding to the signature.

[0046] Specifically, after determining the encrypted configuration instruction, the configuration key can also be obtained. Since the encrypted configuration instruction is obtained by performing an XOR operation on the OTP configuration instruction and the configuration key, and the XOR operation is symmetric, the configuration key and the encrypted configuration instruction can be XORed to achieve decryption of the encrypted configuration instruction, thereby obtaining the OTP configuration instruction. After determining the OTP configuration instruction, the positions corresponding to the Zu Chongzhi key information and the public key can be located, thereby obtaining the Zu Chongzhi key information and the public key. The public key is the SM2 public key corresponding to the SM2 private key. Afterwards, the decrypted image startup file corresponding to the encrypted image startup file and the summary value to be verified can be determined in parallel using the Zu Chongzhi algorithm through the Zu Chongzhi key information. At the same time, the signature can be decrypted using the public key to obtain the original summary value.

[0047] Further, based on Zu Chongzhi's key information, using Zu Chongzhi's algorithm, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file are determined in parallel, including: Based on Zu Chongzhi's key information, the encrypted image startup file is decrypted using Zu Chongzhi's algorithm to obtain the decrypted image startup file; Based on Zu Chongzhi's key information, Zu Chongzhi's algorithm is used to perform integrity calculation on the encrypted image boot file to obtain the summary value to be verified.

[0048] Specifically, after determining the Zu Chongzhi key information, the encrypted image file can be decrypted and integrity calculated in parallel using the Zu Chongzhi algorithm using the same Zu Chongzhi key information to obtain the decrypted image startup file and the summary value to be verified.

[0049] It should be noted that the integrity operation is to further process the encrypted image boot file by using the Zu Chongzhi algorithm with the same configuration as the encryption process. The summary value to be verified obtained by the integrity operation can be understood as a hash value or message digest. The summary value to be verified is used to represent the compact representation of the encrypted image boot file. Any minor changes to the encrypted image boot file during the transmission and storage process will cause the generated summary value to be verified to change significantly.

[0050] Furthermore, based on the public key, the original digest value corresponding to the signature is determined, including: Based on the public key, the signature is decrypted using the SM2 algorithm to obtain the original summary value.

[0051] Step 230: When the digest value to be verified is the same as the original digest value, securely boot the system on chip based on the decrypted image boot file.

[0052] Specifically, after determining the digest value to be verified and the original digest value, the digest value to be verified and the original digest value are compared. If the digest value to be verified and the original digest value are the same, it indicates that the encrypted image startup file has not changed during the transmission process and the storage process, that is, the encrypted image startup file is safe and reliable. At this time, the on-chip system can be securely started according to the decrypted image startup file.

[0053] Furthermore, the method further comprises: When the digest value to be verified is different from the original digest value, an error warning signal is generated, and the error warning signal is used to instruct the system on chip to stop starting.

[0054] Specifically, if the digest value to be verified is different from the original digest value, it indicates that the encrypted image startup file has changed during the transmission and storage process, that is, the encrypted image startup file may have been leaked, and the file content may have been maliciously tampered with by an attacker. At this time, the decrypted image startup file is no longer safe and reliable. At this time, an error alarm signal can be generated to instruct the on-chip system to stop booting.

[0055] The system-on-chip secure boot method provided by the embodiment of the present invention obtains an encrypted configuration instruction, an encrypted image boot file and a signature after the system-on-chip is powered on, and determines the decrypted image boot file or the digest value to be verified corresponding to the encrypted image boot file in parallel by using the Zu Chongzhi algorithm through the encrypted configuration instruction. At the same time, the original digest value corresponding to the signature is determined through the encrypted configuration instruction, and the digest value to be verified is compared with the original digest value. When the digest value to be verified is the same as the original digest value, the system-on-chip is securely booted through the decrypted image boot file. The Zu Chongzhi algorithm used in the present invention has high security, low complexity and fast running speed. The security and determination efficiency of the image boot file and the digest value to be verified are improved through the Zu Chongzhi algorithm, and system resources are saved, thereby improving the startup speed and startup security of the system-on-chip.

[0056] The system on chip secure boot device provided by the present invention is described below. The system on chip secure boot device described below and the system on chip secure boot method described above can be referenced to each other.

[0057] The embodiment of the present invention also provides a system on chip secure boot device, Figure 4 is a schematic diagram of the structure of a secure boot device for a system on a chip provided by an embodiment of the present invention. Figure 4 As shown, the system on chip secure boot device 400 includes: an acquisition module 410 , a determination module 420 and a boot module 430 .

[0058] The acquisition module 410 is used to acquire the encrypted configuration instruction, the encrypted image startup file and the signature when the system on chip is powered on; The determination module 420 is used to determine the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file and the original digest value corresponding to the signature in parallel based on the encrypted configuration instruction; the image startup file and the digest value to be verified are determined using the Zu Chongzhi algorithm; The startup module 430 is used to securely start the system on chip based on the decrypted image startup file when the digest value to be verified is the same as the original digest value.

[0059] The system-on-chip secure boot device provided by the embodiment of the present invention obtains the encrypted configuration instruction, the encrypted image boot file and the signature after the system-on-chip is powered on, and determines the decrypted image boot file or the digest value to be verified corresponding to the encrypted image boot file in parallel by using the Zu Chongzhi algorithm through the encrypted configuration instruction, and at the same time, determines the original digest value corresponding to the signature through the encrypted configuration instruction, compares the digest value to be verified with the original digest value, and securely boots the system-on-chip through the decrypted image boot file when the digest value to be verified is the same as the original digest value. The Zu Chongzhi algorithm used in the present invention has high security, low complexity and fast running speed, and improves the security and determination efficiency of the image boot file and the digest value to be verified through the Zu Chongzhi algorithm, saves system resources, and thus improves the startup speed and startup security of the system-on-chip.

[0060] Optionally, the determination module 420 is specifically configured to: Based on the configuration key, decrypt the encrypted configuration instruction to obtain the OTP configuration instruction; Based on the OTP configuration instruction, determine Zu Chongzhi's key information and public key respectively; Based on the Zu Chongzhi key information, using the Zu Chongzhi algorithm, the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified are determined in parallel; Based on the public key, an original digest value corresponding to the signature is determined.

[0061] Optionally, the determination module 420 is specifically configured to: Based on the Zu Chongzhi key information, the encrypted image startup file is decrypted using the Zu Chongzhi algorithm to obtain the decrypted image startup file; Based on the Zu Chongzhi key information, the Zu Chongzhi algorithm is used to perform integrity calculation on the encrypted image startup file to obtain the summary value to be verified.

[0062] Optionally, the determination module 420 is specifically configured to: Based on the public key, the signature is decrypted using the SM2 algorithm to obtain the original summary value.

[0063] Optionally, the encrypted configuration instruction is obtained by performing an XOR operation on the OTP configuration instruction and the configuration key; The encrypted image startup file is obtained by encrypting the image startup file using the Zu Chongzhi algorithm; The signature is obtained by performing an integrity operation on the encrypted image startup file using the Zu Chongzhi algorithm to obtain an original summary value, and then encrypting the original summary value using the SM2 algorithm.

[0064] Optionally, the system on chip secure boot device 400 further includes an alarm module, and the alarm module is specifically used to: In the case that the digest value to be verified is different from the original digest value, an error warning signal is generated, where the error warning signal is used to instruct the system on chip to stop starting.

[0065] Figure 5 is a schematic diagram of the structure of the system on chip provided by an embodiment of the present invention, such as Figure 5 As shown, the system on chip may include: a processing module 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processing module 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The memory 530 also stores encrypted configuration instructions, encrypted image startup files and signatures. The processing module 510 can call the logic instructions in the memory 530 to execute the system on chip secure startup method, which includes: When the system on chip is powered on, the encrypted configuration instructions, encrypted image startup files and signatures are obtained; Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; In a case where the digest value to be verified is the same as the original digest value, the system on chip is securely started based on the decrypted image startup file.

[0066] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0067] Further, Figure 6 is a schematic diagram of the structure of the processing module provided by an embodiment of the present invention, such as Figure 6As shown, the processing module 510 includes an OTP unit, an SM2 algorithm decryption unit, a Zu Chongzhi algorithm calculation unit, a verification unit, a startup control unit and a processor, wherein: The OTP unit is used to decrypt the encrypted configuration instruction based on the configuration key to obtain the OTP configuration instruction; based on the OTP configuration instruction, determine the Zu Chongzhi key information and the public key respectively; The SM2 algorithm decryption unit is used to determine the original summary value corresponding to the signature based on the public key; The Zu Chongzhi algorithm calculation unit is used to determine the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file in parallel by using the Zu Chongzhi algorithm based on the Zu Chongzhi key information; The verification unit is used to determine whether the digest value to be verified is the same as the original digest value; The startup control unit is used to send the decrypted image startup file to the processor when the digest value to be verified is the same as the original digest value; when the digest value to be verified is different from the original digest value, an error alarm signal is generated, and the error alarm signal is used to instruct the system on chip to stop starting; The processor is used to start the file based on the decrypted image to perform a secure boot.

[0068] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processing module, the computer can execute the system-on-chip secure boot method provided by the above methods, the method includes: When the system on chip is powered on, the encrypted configuration instructions, encrypted image startup files and signatures are obtained; Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; In a case where the digest value to be verified is the same as the original digest value, the system on chip is securely started based on the decrypted image startup file.

[0069] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processing module, the method for securely starting a system on a chip provided by the above methods is implemented, and the method comprises: When the system on chip is powered on, the encrypted configuration instructions, encrypted image startup files and signatures are obtained; Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; In a case where the digest value to be verified is the same as the original digest value, the system on chip is securely started based on the decrypted image startup file.

[0070] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0071] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for securely booting a system on a chip, characterized in that: include: When the system on chip is powered on, the encrypted configuration instructions, encrypted image startup files and signatures are obtained; Based on the encryption configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature are determined in parallel; the image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; In a case where the digest value to be verified is the same as the original digest value, the system on chip is securely started based on the decrypted image startup file.

2. The method for securely booting a system on a chip according to claim 1, characterized in that: The step of determining, based on the encrypted configuration instruction, the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature in parallel includes: Based on the configuration key, decrypt the encrypted configuration instruction to obtain the OTP configuration instruction; Based on the OTP configuration instruction, determine Zu Chongzhi's key information and public key respectively; Based on the Zu Chongzhi key information, using the Zu Chongzhi algorithm, the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified are determined in parallel; Based on the public key, an original digest value corresponding to the signature is determined.

3. The method for securely booting a system on a chip according to claim 2, wherein: The method of determining the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified in parallel based on the Zu Chongzhi key information and using the Zu Chongzhi algorithm includes: Based on the Zu Chongzhi key information, the encrypted image startup file is decrypted using the Zu Chongzhi algorithm to obtain the decrypted image startup file; Based on the Zu Chongzhi key information, the Zu Chongzhi algorithm is used to perform integrity calculation on the encrypted image startup file to obtain the summary value to be verified.

4. The method for securely booting a system on a chip according to claim 2, wherein: The determining, based on the public key, an original digest value corresponding to the signature includes: Based on the public key, the signature is decrypted using the SM2 algorithm to obtain the original summary value.

5. The method for securely booting a system on a chip according to any one of claims 1 to 4, characterized in that: The encrypted configuration instruction is obtained by performing an XOR operation on the OTP configuration instruction and the configuration key; The encrypted image startup file is obtained by encrypting the image startup file using the Zu Chongzhi algorithm; The signature is obtained by performing an integrity operation on the encrypted image startup file using the Zu Chongzhi algorithm to obtain an original summary value, and then encrypting the original summary value using the SM2 algorithm.

6. The method for securely booting a system on a chip according to any one of claims 1 to 4, characterized in that: The method further comprises: In the case that the digest value to be verified is different from the original digest value, an error warning signal is generated, where the error warning signal is used to instruct the system on chip to stop starting.

7. A system on chip secure boot device, characterized in that: include: An acquisition module, used to acquire encrypted configuration instructions, encrypted image startup files and signatures when the system on chip is powered on; A determination module, configured to determine, based on the encrypted configuration instruction, in parallel the decrypted image startup file and the digest value to be verified corresponding to the encrypted image startup file, and the original digest value corresponding to the signature; The image startup file and the digest value to be verified are determined using Zu Chongzhi's algorithm; A startup module is used to securely start the system on chip based on the decrypted image startup file when the digest value to be verified is the same as the original digest value.

8. A system on chip, comprising a memory, a processing module, and a computer program stored in the memory and executable on the processing module, characterized in that: The memory also stores encrypted configuration instructions, encrypted image startup files and signatures; When the processing module executes the computer program, the system on chip secure boot method as described in any one of claims 1-6 is implemented.

9. The system on chip according to claim 8, characterized in that: The processing module includes an OTP unit, an SM2 algorithm decryption unit, a Zu Chongzhi algorithm calculation unit, a verification unit, a startup control unit and a processor, wherein: The OTP unit is used to decrypt the encrypted configuration instruction based on the configuration key to obtain the OTP configuration instruction; based on the OTP configuration instruction, determine the key information and the public key of Zu Chongzhi respectively; The SM2 algorithm decryption unit is used to determine the original digest value corresponding to the signature based on the public key; The Zu Chongzhi algorithm calculation unit is used to determine the decrypted image startup file corresponding to the encrypted image startup file and the digest value to be verified in parallel by using the Zu Chongzhi algorithm based on the Zu Chongzhi key information; The verification unit is used to determine whether the digest value to be verified is the same as the original digest value; The startup control unit is used to send the decrypted image startup file to the processor when the digest value to be verified is the same as the original digest value; and generate an error warning signal when the digest value to be verified is different from the original digest value, wherein the error warning signal is used to instruct the system on chip to stop starting; The processor is used for performing secure booting based on the decrypted image boot file.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processing module, the system on chip secure boot method as described in any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Method, device and equipment for protecting data in OTP memory and storage medium

    CN113408017A

  • BMC safe starting method and device based on national cryptographic algorithm, equipment and medium

    CN113505380A

  • Method for safely starting application program, storage control chip and electronic equipment

    CN115859267A

  • Network security protection method and system based on electronic archives

    CN117499160A

  • System starting method, system starting device, server, and readable storage medium

    WO2023071040A1