Secure firmware update method, device, equipment and storage medium

By verifying the firmware file with a secure hashing algorithm and asymmetric encryption algorithm, the integrity and authenticity of the firmware source file during the update process is solved, and the problem of firmware files being easily tampered with is improved.

CN112433742BActive Publication Date: 2024-12-17CLP FINANCIAL EQUIP SYST (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011366819.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-26
Publication Date
2024-12-17
Estimated Expiration
2040-11-26

AI Technical Summary

Technical Problem

During the existing firmware update process, firmware files are easily tampered with and it is difficult to ensure their security, although there are still major security risks after encryption.

Method used

By obtaining the firmware file package released by the Signature Center, the firmware source file, summary information and signature results are parsed, and the signature verification is performed using a secure hash algorithm and asymmetric encryption algorithm to ensure the integrity and authenticity of the firmware source file and prevent tampering.

Benefits of technology

During the process of firmware generation and update, multiple checks are used to ensure the integrity and authenticity of the firmware source files, improve the security of the firmware, and prevent tampering and tampering detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112433742B_ABST
    Figure CN112433742B_ABST
Patent Text Reader

Abstract

The present invention relates to a secure firmware update method, device, equipment and storage medium, the method comprising: obtaining a published firmware file package, parsing to obtain a firmware source file, a first summary information and a first signature result; using a secure hash algorithm to calculate the firmware source file to obtain a second summary information, analyzing whether the first summary information, the second summary information and the pre-recorded summary information are the same; if so, using the public key of an asymmetric encryption algorithm to verify the first signature result for quality inspection; downloading the firmware source file; receiving the first summary information and the first signature result; using a secure hash algorithm to calculate the firmware source file to obtain a third summary information, analyzing whether the received first summary information is the same as the third summary information; if so, using the public key to verify the received first signature result; if the verification passes, copying the firmware source file in the cache area to a flash memory. The present invention can improve the security of firmware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a secure firmware update method, device, equipment and storage medium. Background Art

[0002] For computer equipment, the security of firmware is of vital importance. After the developer completes the firmware file update, it will be released in the form of an electronic file and given to the production line production personnel. The production line production personnel will download the electronic firmware file to the computer equipment. When the firmware is subsequently updated, the firmware needs to be transferred to the computer equipment. During the whole process, the electronic firmware file is easy to be tampered with. For example, a part of the firmware file is maliciously modified, or a small Trojan program is implanted, or the entire firmware file is replaced, etc., making it difficult to ensure the security of the firmware file. At present, the firmware file is generally encrypted before being released, but this method still has a large security risk. Production personnel and others can still tamper with the firmware file after decryption. Therefore, providing a secure firmware update method has become a problem to be solved. Summary of the invention

[0003] The purpose of the present invention is to provide a secure firmware update method, device, equipment and storage medium, aiming to improve firmware security.

[0004] The present invention provides a method for updating firmware in a secure manner, which is applied to a device and includes:

[0005] Obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm;

[0006] Using the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyzing whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same;

[0007] If yes, then use the public key of the asymmetric encryption algorithm to verify the first signature result obtained after parsing for quality inspection;

[0008] During the firmware update process, downloading the firmware source file issued by the signature center and storing it in a predetermined buffer;

[0009] Receive and store the first summary information and the first signature result sent by the firmware update tool;

[0010] Using the secure hash algorithm to operate the firmware source file stored in the buffer to obtain third summary information, and analyzing whether the received first summary information is the same as the third summary information;

[0011] If yes, obtain the public key from a predetermined storage area, and use the public key to verify the received first signature result;

[0012] If the signature verification is passed, the firmware source file in the buffer is copied to the flash memory area to update the firmware.

[0013] The present invention also provides a secure firmware update device, comprising:

[0014] a parsing module, configured to obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm;

[0015] A first analysis module is used to use the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyze whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same;

[0016] A first signature verification module, used to verify the first signature result obtained after parsing using the public key of the asymmetric encryption algorithm for quality inspection;

[0017] A download module, used to download the firmware source file issued by the signature center and store it in a predetermined buffer during the firmware update process;

[0018] A receiving module, used for receiving and storing the first summary information and the first signature result sent by the firmware update tool;

[0019] A second analysis module is used to use the secure hash algorithm to calculate the firmware source file stored in the buffer to obtain third summary information, and analyze whether the received first summary information is the same as the third summary information;

[0020] A second signature verification module is used to obtain the public key from a predetermined storage area if yes, and verify the received first signature result using the public key;

[0021] The update module is used to copy the firmware source file in the buffer to the flash memory area to update the firmware if the signature verification is passed.

[0022] The present invention also provides a computer device, which includes a memory and a processor connected to the memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the secure firmware update method as described above are implemented.

[0023] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned secure firmware update method are implemented.

[0024] The beneficial effects of the present invention are as follows: after the signature center of the present invention releases the firmware file package, the firmware source file is quality-checked, including recalculating to obtain summary information, ensuring the integrity of the firmware source file by analyzing whether the summary information is consistent with the summary information in the firmware file package, and ensuring the authenticity of the firmware source file by verifying the signature result in the firmware file package using a public key, so that the firmware source file will not be tampered with in the factory link; during the firmware update process, another inspection is performed, including recalculating to obtain summary information, ensuring the integrity of the firmware source file by analyzing whether the summary information is consistent with the summary information sent by the firmware update tool, and ensuring the authenticity of the firmware source file by verifying the signature result sent by the firmware update tool using a public key, so that the firmware source file will not be tampered with during the transmission process. The present invention can ensure the integrity and authenticity of the firmware source file from the generation of the firmware to the update process, thereby improving the security of the firmware. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flowchart of an embodiment of a secure firmware update method of the present invention;

[0026] Figure 2 A schematic diagram of the structure of an embodiment of a secure firmware update device of the present invention;

[0027] Figure 3 FIG. 4 is a schematic diagram of a hardware architecture of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0029] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0030] See also Figure 1 FIG. 1 is a flow chart of a first embodiment of a secure firmware update method of the present invention. The secure firmware update method is applied in a device and includes the following steps:

[0031] Step S1, obtaining a firmware file package issued by a signature center, parsing the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm;

[0032] In this embodiment, after the firmware file package is released by the signing center, quality personnel or production line personnel can perform quality inspection on the firmware file package, such as regularly inspecting the firmware file package, including inspecting the integrity and authenticity of the firmware source file.

[0033] The firmware file package released by the signature center is packaged in a predetermined file format, preferably in a customized file format, such as a firmware file package of "*.CFESSign". Of course, other existing file formats can also be used. After obtaining the firmware file package released by the signature center, the firmware file package can be parsed using the "*.CFESSign" parsing tool to obtain the firmware source file, the first summary information and the first signature result.

[0034] Among them, the secure hash algorithm (SHA) can be the SHA-256 algorithm, which is a cryptographic hash function algorithm. For data of any length, SHA-256 can generate a 256-bit hash value as summary information. The secure hash algorithm is made public, and others can use the secure hash algorithm for calculation.

[0035] The asymmetric encryption algorithm may be an RSA encryption algorithm or an SM2 encryption algorithm, for example, an RSA-2048bit encryption algorithm. Of course, it may also be other asymmetric encryption algorithms.

[0036] The firmware file package includes the first summary information and the first signature result. The integrity of the firmware source file can be checked later through the first summary information, and the authenticity of the firmware source file can be checked through the first signature result.

[0037] Step S2, using the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyzing whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same;

[0038] During the quality inspection process, the parsed firmware file package is checked, and the second summary information is obtained by using a public secure hash algorithm to calculate the parsed firmware source file. The summary information pre-recorded in the application form is recorded by the developer and is the earliest summary information. By analyzing whether the first summary information, the second summary information and the summary information recorded in the application form are the same, it is analyzed whether the integrity of the firmware source file is destroyed. If the three are the same, the firmware source file is complete. If at least two are different, the integrity of the firmware source file has been destroyed.

[0039] Step S3: If yes, then use the public key of the asymmetric encryption algorithm to verify the first signature result obtained after parsing for quality inspection;

[0040] Among them, the public key of the asymmetric encryption algorithm is internal public information and cannot be tampered with. The public key must first be burned into the storage area predetermined by the device. The predetermined storage area is, for example, the OTP storage area supported by the device chip itself, to prevent the public key in the subsequent device from being tampered with. The quality inspection can directly use the public key of the asymmetric encryption algorithm to verify the first signature result obtained after parsing. If the signature verification passes, it means that the firmware source file has not been tampered with and is authentic, and the quality inspection passes. If the signature verification fails, it means that the firmware source file has been tampered with and the quality inspection fails. It is necessary to re-check the firmware source file, generate the first summary information and the first signature result, and package the firmware source file.

[0041] In the above quality inspection link, the integrity of the firmware source file is checked through the first summary information, and the authenticity of the firmware source file is checked through the first signature result, so as to prevent the firmware source file from being tampered with before leaving the factory and improve security.

[0042] Step S4, during the firmware update process, downloading the firmware source file issued by the signature center and storing it in a predetermined buffer;

[0043] During the firmware update process, the firmware source file data is first downloaded to an APP buffer of the device chip, and does not immediately overwrite the actual running FLASH flash area; at this time, the device still runs the original firmware in the FLASH flash area. After all the firmware source file data is downloaded, the firmware source file is checked.

[0044] Step S5, receiving and storing the first summary information and the first signature result sent by the firmware update tool;

[0045] Step S6, using the secure hash algorithm to calculate the firmware source file stored in the buffer to obtain third summary information, and analyzing whether the received first summary information is the same as the third summary information;

[0046] After downloading the firmware source file to the buffer, the firmware source file is operated with a secure hash algorithm to obtain the third summary information. By analyzing whether the received first summary information is the same as the third summary information, it is analyzed whether the integrity of the firmware source file is destroyed during the transmission process. If the two are the same, the firmware source file is complete. If the two are different, the integrity of the firmware source file has been destroyed.

[0047] Step S7: If yes, obtain the public key from a predetermined storage area, and use the public key to verify the received first signature result;

[0048] Step S8: If the signature verification is passed, the firmware source file in the buffer is copied to the flash memory area to update the firmware.

[0049] Since the public key has been burned into the predetermined storage area, the public key can be read directly from the predetermined storage area, and the public key can be used to verify the received first signature result. If the verification passes, it means that the firmware source file has not been tampered with during the transmission process, and it comes from the signature center and is authentic. If the verification fails, it means that the firmware source file has been tampered with during the transmission process. The device continues to run the original firmware in the flash memory area, deletes the firmware source file in the buffer, re-downloads the firmware source file, and checks it.

[0050] In this embodiment, after the signature verification is passed, the firmware source file in the buffer is copied to the flash memory area, overwriting the firmware in the flash memory area, so as to run the firmware corresponding to the firmware source file and complete the firmware update.

[0051] In addition, after copying the firmware source file to the flash memory area, the firmware source file in the buffer area can be deleted to release the storage space of the buffer area.

[0052] Compared with the prior art, after the signature center of this embodiment releases the firmware file package, the firmware source file is quality-checked, including recalculating to obtain summary information, ensuring the integrity of the firmware source file by analyzing whether the summary information is consistent with the summary information in the firmware file package, and verifying the signature result in the firmware file package with a public key to ensure the authenticity of the firmware source file, so that the firmware source file will not be tampered with in the factory link; during the firmware update process, another check is performed, including recalculating to obtain summary information, ensuring the integrity of the firmware source file by analyzing whether the summary information is consistent with the summary information sent by the firmware update tool, and verifying the signature result sent by the firmware update tool with a public key to ensure the authenticity of the firmware source file, so that the firmware source file will not be tampered with during the transmission process. This embodiment can ensure the integrity and authenticity of the firmware source file from the generation of the firmware to the update process, thereby improving the security of the firmware.

[0053] In another embodiment, based on the above Figure 1 Based on the embodiment, after the above step S8, the following steps are also included:

[0054] Reading the firmware source file in the flash memory area regularly;

[0055] Obtaining the stored first summary information and first signature result;

[0056] Using the secure hash algorithm to operate the firmware source file read from the flash memory area to obtain fourth summary information, and analyzing whether the obtained first summary information is the same as the fourth summary information;

[0057] If so, the public key is obtained from the predetermined storage area, and the obtained first signature result is verified using the public key to perform device self-check.

[0058] Among them, after the device updates the firmware, this embodiment performs a self-test at a fixed time, for example, the RTC clock subroutine inside the device performs a self-test every 24 hours. During the self-test process, the firmware source file in the flash memory area is calculated again using the secure hash algorithm to obtain the fourth summary information. By analyzing whether the stored first summary information is the same as the fourth summary information, it is analyzed whether the integrity of the firmware source file in the flash memory area is destroyed. If the two are the same, the firmware source file is complete. If the two are different, the integrity of the firmware source file in the flash memory area has been destroyed. Then, the public key is used to verify the stored first signature result. If the verification passes, it means that the firmware source file has not been tampered with during storage, is from the signature center, and has authenticity. If the verification fails, it means that the firmware source file has been tampered with during storage.

[0059] This embodiment can further ensure the security of the firmware running in the device through the periodic self-check of the device.

[0060] In another embodiment, based on the above Figure 1 Based on the embodiment, it also includes:

[0061] Randomly generate a verification key for the public key, use the verification key to perform a hash message authentication code operation on the public key to obtain a public key verification value, and store the verification key and the public key verification value;

[0062] After obtaining the public key from the predetermined storage area and before using the public key for signature verification each time, a public key verification step is also included, and the public key verification step includes:

[0063] Obtain the stored verification key, and use the obtained verification key to perform a hash message authentication code operation on the public key to obtain a public key verification value to be verified;

[0064] Analyze whether the public key verification value to be verified is consistent with the stored public key verification value to verify the public key.

[0065] In order to improve the security of the public key, after the public key is burned into the device, it is necessary to verify the public key before each use to ensure that the public key has not been tampered with. After the public key is burned into the device, the device randomly generates a verification key for the public key. The length of the verification key is random, for example, a string of 8 to 32 bytes. The verification key is used to perform a hash message authentication code (HMAC) operation on the public key to obtain a condensed summary value, which is the public key verification value.

[0066] Subsequently, before using the public key for signature verification each time, the public key is again hashed and the message authentication code is calculated using the stored verification key to obtain the public key verification value to be verified. The public key verification value to be verified is compared and analyzed with the stored public key verification value. If the two are consistent, it means that the public key has not been tampered with and the public key verification has passed. If they are inconsistent, it means that the public key has been tampered with.

[0067] In one embodiment, the present invention provides a secure firmware update device, which corresponds one-to-one to the method in the above embodiment. Figure 2 As shown, the device comprises:

[0068] The parsing module 101 is used to obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm;

[0069] The first analysis module 102 is used to use the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain the second summary information, and analyze whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same;

[0070] The first signature verification module 103 is used to verify the first signature result obtained after parsing by using the public key of the asymmetric encryption algorithm to perform quality inspection;

[0071] A download module 104, used to download the firmware source file issued by the signature center and store it in a predetermined buffer during the firmware update process;

[0072] The receiving module 105 is used to receive and store the first summary information and the first signature result sent by the firmware update tool;

[0073] A second analysis module 106 is configured to use the secure hash algorithm to calculate the firmware source file stored in the buffer to obtain third summary information, and analyze whether the received first summary information is the same as the third summary information;

[0074] The second signature verification module 107 is used to obtain the public key from a predetermined storage area if yes, and verify the received first signature result using the public key;

[0075] The updating module 108 is used to copy the firmware source file in the buffer to the flash memory area to update the firmware if the signature verification is passed.

[0076] The specific definition of the secure firmware update device can be found in the definition of the secure firmware update method above, which will not be repeated here. Each module in the above secure firmware update device can be implemented in whole or in part by software, hardware, and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0077] In one embodiment, a computer device is provided, which is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. The computer device can be a PC (Personal Computer), or a smart phone, a tablet computer, a computer, or a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers, wherein cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets.

[0078] like Figure 3 As shown, the computer device may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be interconnected through a system bus, and the memory 11 stores a computer program that can be run on the processor 12. It should be noted that Figure 3 Only a computer device having components 11 - 13 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may alternatively be implemented.

[0079] Among them, the memory 11 can be a non-volatile and / or volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM) or a flash memory. The volatile memory may include a random access memory (RAM) or an external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM). In this embodiment, the readable storage medium of the memory 11 is generally used to store an operating system and various application software installed on a computer device, such as storing the program code of a computer program in an embodiment of the present invention. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.

[0080] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, and is used to run the program code stored in the memory 11 or process data, such as running a computer program.

[0081] The network interface 13 may include a standard wireless network interface or a wired network interface. The network interface 13 is generally used to establish a communication connection between the computer device and other electronic devices.

[0082] The computer program is stored in the memory 11, and includes at least one computer-readable instruction stored in the memory 11. The at least one computer-readable instruction can be executed by the processor 12 to implement the methods of various embodiments of the present application, including:

[0083] Obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm;

[0084] Using the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyzing whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same;

[0085] If yes, then use the public key of the asymmetric encryption algorithm to verify the first signature result obtained after parsing for quality inspection;

[0086] During the firmware update process, downloading the firmware source file issued by the signature center and storing it in a predetermined buffer;

[0087] Receive and store the first summary information and the first signature result sent by the firmware update tool;

[0088] Using the secure hash algorithm to operate the firmware source file stored in the buffer to obtain third summary information, and analyzing whether the received first summary information is the same as the third summary information;

[0089] If yes, obtain the public key from a predetermined storage area, and use the public key to verify the received first signature result;

[0090] If the signature verification is passed, the firmware source file in the buffer is copied to the flash memory area to update the firmware.

[0091] In one embodiment, the present invention provides a computer-readable storage medium, which may be a non-volatile and / or volatile memory, on which a computer program is stored. When the computer program is executed by a processor, the steps of the secure firmware update method in the above embodiment are implemented, such as Figure 1 Alternatively, when the computer program is executed by the processor, the functions of each module / unit of the secure firmware update device in the above embodiment are realized, for example Figure 2 The functions of modules 101 to 108 are shown in Figure 1. To avoid repetition, they are not described here.

[0092] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program, when executed, can include the processes of the embodiments of the above-mentioned methods.

[0093] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0094] It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, apparatus, article or method that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, apparatus, article or method.

[0095] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A secure firmware update method, applied to a device, characterized in that: include: Obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm; Using the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyzing whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same; If yes, then use the public key of the asymmetric encryption algorithm to verify the first signature result obtained after parsing for quality inspection; During the firmware update process, downloading the firmware source file issued by the signature center and storing it in a predetermined buffer; Receive and store the first summary information and the first signature result sent by the firmware update tool; Using the secure hash algorithm to operate the firmware source file stored in the buffer to obtain third summary information, and analyzing whether the received first summary information is the same as the third summary information; If yes, obtain the public key from a predetermined storage area, and verify the received first signature result using the public key; If the signature verification is passed, the firmware source file in the buffer is copied to the flash memory area, overwriting the original firmware in the flash memory area, and the firmware source file is run to complete the firmware update.

2. The secure firmware update method according to claim 1, characterized in that: After the step of copying the firmware source file in the buffer to the flash memory area, the method further includes: Reading the firmware source file in the flash memory area regularly; Obtaining the stored first summary information and first signature result; Using the secure hash algorithm to operate the firmware source file read from the flash memory area to obtain fourth summary information, and analyzing whether the obtained first summary information is the same as the fourth summary information; If so, the public key is obtained from the predetermined storage area, and the obtained first signature result is verified using the public key to perform device self-check.

3. The secure firmware update method according to claim 1 or 2, characterized in that: Also includes: Randomly generate a verification key for the public key, use the verification key to perform a hash message authentication code operation on the public key to obtain a public key verification value, and store the verification key and the public key verification value; After obtaining the public key from the predetermined storage area and before using the public key for signature verification each time, a public key verification step is also included, and the public key verification step includes: Obtain the stored verification key, and use the obtained verification key to perform a hash message authentication code operation on the public key to obtain a public key verification value to be verified; Analyze whether the public key verification value to be verified is consistent with the stored public key verification value to verify the public key.

4. The secure firmware update method according to claim 1 or 2, characterized in that: After the step of obtaining the public key from the predetermined storage area and verifying the received first signature result using the public key, the method further includes: if the verification fails, running the original firmware in the flash memory area and deleting the firmware source file in the buffer area.

5. The secure firmware update method according to claim 1 or 2, characterized in that: After the step of copying the firmware source file in the buffer area to the flash memory area, the method further includes: deleting the firmware source file in the buffer area.

6. A secure firmware update device, characterized in that: include: a parsing module, configured to obtain a firmware file package issued by a signature center, parse the firmware file package to obtain a firmware source file, first summary information, and a first signature result, wherein the first summary information is obtained by operating the firmware source file using a secure hash algorithm, and the first signature result is obtained by signing the first summary information using a private key of a predetermined asymmetric encryption algorithm; A first analysis module is used to use the secure hash algorithm to calculate the firmware source file obtained after parsing to obtain second summary information, and analyze whether the first summary information, the second summary information and the summary information pre-recorded in the application form are the same; A first signature verification module, used to verify the first signature result obtained after parsing using the public key of the asymmetric encryption algorithm for quality inspection; A download module, used to download the firmware source file issued by the signature center and store it in a predetermined buffer during the firmware update process; A receiving module, used for receiving and storing the first summary information and the first signature result sent by the firmware update tool; A second analysis module is used to use the secure hash algorithm to calculate the firmware source file stored in the buffer to obtain third summary information, and analyze whether the received first summary information is the same as the third summary information; A second signature verification module is used to obtain the public key from a predetermined storage area if yes, and verify the received first signature result using the public key; The update module is used to copy the firmware source file in the buffer to the flash memory area if the signature verification is passed, overwrite the original firmware in the flash memory area, and run the firmware source file to complete the firmware update.

7. The secure firmware update device according to claim 6, characterized in that: Also includes: A reading module, used for regularly reading the firmware source file in the flash memory area; An acquisition module, used to acquire the stored first summary information and first signature result; A third analysis module is used to use the secure hash algorithm to calculate the firmware source file read from the flash memory area to obtain fourth summary information, and analyze whether the obtained first summary information is the same as the fourth summary information; The third signature verification module is used to obtain the public key from the predetermined storage area if yes, and use the public key to verify the obtained first signature result to perform device self-check.

8. The secure firmware update device according to claim 6 or 7, characterized in that: Also includes: A generation module, used to randomly generate a verification key of the public key, perform a hash message authentication code operation on the public key using the verification key to obtain a public key verification value, and store the verification key and the public key verification value; A processing module, used to obtain the stored verification key, and use the obtained verification key to perform a hash message authentication code operation on the public key to obtain a public key verification value to be verified; The fourth analysis module is used to analyze whether the public key verification value to be verified is consistent with the stored public key verification value, so as to verify the public key.

9. A computer device, comprising a memory and a processor connected to the memory, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the secure firmware update method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the secure firmware update method according to any one of claims 1 to 5 are implemented.