Firmware update system and method

Through digital signature and asymmetric encryption algorithm verification, combined with the alternate update mechanism of the firmware storage area, the security and stability problems of the existing firmware update method are solved, ensuring the security of the firmware update and the normal operation of the device.

CN113805908BActive Publication Date: 2024-09-13REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010551629.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-17
Publication Date
2024-09-13
Estimated Expiration
2040-06-17

AI Technical Summary

Technical Problem

The existing firmware update method has low security and is easy to be stolen or maliciously modified, and the update is not partitioned, causing the update to fail and affecting the normal operation of the electronic device.

Method used

Digital signatures and asymmetric encryption algorithms are used for permission verification and data encryption to ensure the identity verification and data integrity of the update tool. At the same time, by alternately updating the first firmware storage area and the second firmware storage area, it ensures that it can automatically update when the update fails. Roll back to previous version.

Benefits of technology

It improves the security and reliability of firmware updates, prevents illegal update tools from writing malicious firmware, and ensures that electronic devices can operate normally under unexpected circumstances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113805908B
    Figure CN113805908B
Patent Text Reader

Abstract

The present invention discloses a firmware update system and method. The firmware update method includes a host digitally signing the firmware to be updated, and an electronic device performing identity verification on the host's update tool according to an update request, and only the update tool that passes the verification has the update permission. The update tool uses an encryption algorithm to encrypt the firmware to be updated containing a digital signature, and after the encryption is completed, the host sends it to the electronic device through the update tool. The electronic device then uses the decryption algorithm in the original firmware to decrypt the received firmware, obtain the firmware to be updated containing the digital signature, and write it into the firmware to be updated storage area specified by the electronic device. The electronic device then verifies the digital signature in the firmware to be updated, and completes the firmware update if the verification passes, and erases the firmware data written in the electronic device if the verification fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a firmware update system and method, and in particular to a firmware update system and method capable of safely updating firmware online. Background Art

[0002] Firmware is a "driver" stored in electronic devices, and electronic devices operate by executing firmware. In order to extend the service life of electronic devices and improve the compatibility of electronic devices with different software and hardware environments, manufacturers need to continuously update firmware. Firmware update means that users use specific tools to upgrade the embedded firmware in electronic devices, patch vulnerabilities in previous versions, and improve the functions of electronic devices to improve the performance of electronic devices.

[0003] In the existing firmware update method, the protection during firmware update is defective and the security is low. The firmware is easy to be stolen and maliciously modified, which damages the interests of firmware manufacturers and users. At the same time, when the firmware is updated, because it is not partitioned, the currently used firmware is overwritten during the update. Moreover, if the firmware update is terminated unexpectedly, the update will fail, making the electronic device unable to be used normally.

[0004] Therefore, improving the firmware update mechanism to enhance the security of the firmware update and overcome the above-mentioned defects has become one of the important issues that the industry wants to solve. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a firmware update system and method that can be updated safely online in view of the deficiencies in the prior art.

[0006] In order to solve the above-mentioned technical problems, one of the technical solutions adopted by the present invention is to provide a firmware update method, which is applicable to a firmware update system including a host and an electronic device, wherein the host is configured to communicate with the electronic device and stores firmware to be updated, and the firmware update method includes the following steps: configuring the host to execute a firmware generation tool to digitally sign the firmware to be updated, thereby generating the firmware to be updated including the digital signature; configuring the host to execute the update tool to transmit an update command to the electronic device; in response to receiving the update command, configuring the electronic device to perform an authority verification procedure on the update tool, including: configuring the electronic device and the update tool to generate and exchange multiple groups of random numbers; configuring the update tool to sign these groups of random numbers with an asymmetric encryption algorithm to generate a verification signature and transmit it to the electronic device; and configuring the electronic device to perform an authorization verification procedure on the verification signature with the asymmetric encryption algorithm Verification, if the verification is successful, a verification success signal is transmitted to the update tool, otherwise a verification failure signal is transmitted to the update tool; in response to receiving the verification success signal, the update tool is configured to encrypt the firmware to be updated including the digital signature with a symmetric encryption algorithm to generate encrypted firmware, and transmit it to the electronic device; the electronic device is configured to execute the original firmware, and decrypt the encrypted firmware with a decryption algorithm to obtain the firmware to be updated including the digital signature; the electronic device is configured to determine which of the first firmware storage area and the second firmware storage area is the firmware to be updated storage area; the update tool is configured to write the firmware to be updated including the digital signature into the firmware to be updated storage area; in response to the firmware to be updated including the digital signature completing writing into the firmware to be updated storage area, the electronic device is configured to execute the original firmware, and verify the digital signature with a signature verification algorithm, if the verification is successful, the update is completed.

[0007] In order to solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide a firmware update system, which includes an electronic device and a host. The electronic device includes a first processing unit and a first storage module. The first storage module includes a firmware execution area, a first firmware storage area and a second firmware storage area. The firmware execution area stores the original firmware. At least one of the first firmware storage area and the second firmware storage area stores the original firmware. The host is configured to communicate with the electronic device, which includes a second processing unit and a second storage module. The second storage module stores an update tool, firmware to be updated and a firmware generation tool. The host is configured to execute the firmware generation tool to digitally sign the firmware to be updated, thereby generating the firmware to be updated including the digital signature. The host is configured to execute the update tool to transmit an update command to the electronic device. Wherein, in response to receiving the update command, the electronic device is configured to perform an authority verification procedure on the update tool, including: configuring the electronic device and the update tool to generate multiple groups of random numbers and exchange them; configuring the update tool to sign these groups of random numbers with an asymmetric encryption algorithm to generate a verification signature and transmit it to the electronic device; and configuring the electronic device to verify the verification signature with the asymmetric encryption algorithm, if the verification is successful, then transmit a verification success signal to the update tool, otherwise transmit a verification failure signal to the update tool. Wherein, in response to receiving the verification success signal, the host is configured to execute the update tool to encrypt the firmware to be updated including the digital signature with a symmetric encryption algorithm to generate encrypted firmware and transmit it to the electronic device. Wherein, the electronic device is configured to execute the original firmware and decrypt the encrypted firmware with a decryption algorithm to obtain the firmware to be updated including the digital signature. Wherein, the electronic device is configured to determine which of the first firmware storage area and the second firmware storage area is the firmware to be updated storage area. Wherein, the host is configured to execute the update tool to write the firmware to be updated including the digital signature into the firmware to be updated storage area. In response to the firmware to be updated including the digital signature being written into the firmware to be updated storage area, the electronic device is configured to execute the original firmware and verify the digital signature using a signature verification algorithm. If the verification is successful, the update is completed.

[0008] One of the beneficial effects of the present invention is that the firmware update system and method provided by the present invention can prevent electronic devices from being written with malicious firmware by illegal update tools. In addition, when the user uses an authorized tool to update the firmware, the update tools provided by manufacturers of different electronic devices contain different private keys encapsulated inside, so the update tools cannot be universal, further improving the security and reliability of the update tools. Furthermore, during the update process, since the signature verification is performed on the original firmware, it is possible to check whether there is any data added, deleted, or tampered in the firmware, thereby ensuring the integrity and correctness of the firmware to be updated.

[0009] On the other hand, the firmware update system and method provided by the present invention alternately updates the first firmware storage area and the second firmware storage area, so that the electronic device can still operate normally when the firmware update is terminated due to unexpected circumstances such as power failure. When an update error occurs in one partition of the first firmware storage area and the second firmware storage area, the electronic device can automatically run the firmware in the other partition to return to the firmware version before the update, thereby ensuring the normal operation of the electronic device.

[0010] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 FIG. 4 is a block diagram of a firmware upgrade system according to an embodiment of the present invention.

[0012] Figure 2 This is a schematic diagram of the configuration of the first storage module according to an embodiment of the present invention.

[0013] Figure 3 The figure is a flowchart of a firmware upgrade method according to an embodiment of the present invention.

[0014] Figure 4 Flow chart of the permission verification procedure of an embodiment of the present invention.

[0015] Figure 5 Flow chart of the permission verification procedure according to a specific embodiment of the present invention.

[0016] Figure 6 The figure is a flowchart of the steps for determining a firmware storage area to be updated according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following is an explanation of the implementation methods of the "firmware update system and method" disclosed in the present invention through specific specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the concept of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not drawn according to actual dimensions. It is stated in advance. The following implementation methods will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention. In addition, the term "or" used in this article may include any one or more combinations of the associated listed items depending on the actual situation.

[0018] Please refer to Figure 1 and Figure 2 , Figure 1 is a block diagram of a firmware upgrade system according to an embodiment of the present invention, Figure 2 This is a schematic diagram of the configuration of the first storage module according to an embodiment of the present invention.

[0019] Reference Figure 1 and Figure 2 As shown, the first embodiment of the present invention provides a firmware update system 1 , which includes an electronic device 10 and a host 12 .

[0020] The electronic device 10 includes a first processing unit 100 and a first storage module 102. The first processing unit 100 may be, for example, a central processing unit (CPU) or a baseboard management controller (BMC), and the first storage module 102 may be, for example, an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a flash memory, etc. The first storage module 102 is mainly used to store firmware, and includes a firmware execution area Boot, a first firmware storage area mem1, and a second firmware storage area mem2.

[0021] The firmware execution area Boot stores an initial program A0, and at least one of the first firmware storage area mem1 and the second firmware storage area mem2 stores the original firmware A, for example, the first firmware B1 or the second firmware C1 is the original firmware A. The firmware execution area Boot can execute the initial program A0 to load the original firmware A from the first firmware storage area mem1 or the second firmware storage area mem2 when the electronic device 10 is turned on.

[0022] On the other hand, the host 12 is configured to communicate with the electronic device 10, and the host 12 includes a second processing unit 120 and a second storage module 122. Similarly, the second processing unit 120 may be, for example, a central processing unit or a baseboard management controller, and the second storage module 122 may be, for example, an electrically erasable programmable read-only memory, a programmable read-only memory, a flash memory, etc. The second storage module 122 stores an update tool UT, firmware to be updated UF, and a firmware generation tool FGT.

[0023] Please refer to further Figure 3, which is a flowchart of a firmware upgrade method according to an embodiment of the present invention. As shown in the figure, the present invention provides a firmware update method, which is applicable to the firmware update system 1 including the host 12 and the electronic device 10. In detail, the firmware update method of the present invention is essentially a safe way to update the firmware of the electronic device online, and is mainly reflected in the protection mechanism when the original firmware A of the electronic device 10 is updated, and the recovery mechanism provided when the firmware update fails. As shown in the figure, the firmware update method includes the following steps:

[0024] Step S100: Configure the host 12 to execute the firmware generation tool FGT to digitally sign the firmware to be updated UF, thereby generating the firmware to be updated UF including the digital signature. For example, the firmware to be updated UF can be the latest version of the firmware obtained from the manufacturer of the electronic device 10 when the host 12 executes the update tool UT. In this step, the host 12 can be configured to execute a digital signature algorithm, such as the Elliptic Curve Digital Signature Algorithm (ECDSA), and digitally sign the firmware to be updated UF according to the first private key PK1.

[0025] In detail, in this embodiment, step S100 is based on the digital signature of the firmware UF to be updated, and the private key used for digital signature (that is, the first private key PK1 mentioned above) is encapsulated in the firmware generation tool FGT, and the public key used to verify the above digital signature is stored inside the electronic device 10.

[0026] Step S101 : the configuration host 12 executes the update tool UT to transmit an update command S1 to the electronic device 10 .

[0027] Step S102: In response to receiving the update command S1, configure the electronic device 10 to perform a permission verification procedure on the update tool UT. Specifically, after the electronic device 10 receives the update command S1 sent by the update tool UT, it first confirms the permission of the user's update tool UT. The present invention can provide different update tools for different users, but the present invention is not limited thereto.

[0028] For further reference Figure 4 , which is a flowchart of the permission verification procedure of an embodiment of the present invention. As shown in the figure, the permission verification procedure includes:

[0029] Step S1021: The configuration electronic device 10 and the update tool UT generate and exchange multiple sets of random numbers.

[0030] Step S1022: The configuration update tool UT signs these groups of random numbers using an asymmetric encryption algorithm to generate a verification signature S2 and transmit it to the electronic device.

[0031] Among them, further reference can be made to Figure 5 , which is a flowchart of the permission verification procedure of a specific embodiment of the present invention. In a specific embodiment, step S1021 to step S1022 also includes the following steps:

[0032] Step S300 : configuring the electronic device 10 to generate a first set of random numbers and transmitting the first set of random numbers to the host 12 .

[0033] Step S301: In response to receiving the first set of random numbers, the configuration host 12 generates a second set of random numbers and transmits them to the electronic device.

[0034] Step S302 : In response to receiving the second set of random numbers, configuring the electronic device 10 to generate a third set of random numbers and transmitting the third set of random numbers to the host 12 .

[0035] Step S303: The configuration host 12 uses the first set of random numbers, the second set of random numbers, and the third set of random numbers as verification information, and executes ECDSA to digitally sign the verification information according to the second private key PK2 to generate a verification signature S2. In a specific embodiment, the firmware manufacturer may provide the user with an update tool UT embedded with a private key (i.e., the second private key PK2).

[0036] Step S1023: Configure the electronic device 10 to verify the verification signature S2 using an asymmetric encryption algorithm. In step S1023, the asymmetric encryption algorithm may also be, for example, ECDSA. Therefore, step S1023 may further include configuring the electronic device 10 to execute ECDSA and verify the verification signature according to the second public key K2. The second public key K2 is built into the electronic device 10, and the second public key K2 has a pairing relationship with the second private key PK2.

[0037] If the verification is successful, the process proceeds to step S1024: a verification success signal S3 is transmitted to the update tool UT; otherwise, the process proceeds to step S1025: a verification failure signal S4 is transmitted to the update tool UT.

[0038] In the above steps, if any step fails, the process returns directly and the update tool UT is not allowed to update the firmware.

[0039] In response to receiving the verification success signal S3 , the firmware update method further executes step S103 : configuring the update tool UT to encrypt the firmware to be updated UF including the digital signature using a symmetric encryption algorithm to generate encrypted firmware S5 , and transmit it to the electronic device 10 .

[0040] After the update tool UT passes the verification, the update tool UT can further use the embedded key to encrypt the original firmware containing the digital signature for the user to download and use. Firmware encryption can prevent data from being maliciously tampered with or stolen during transmission to a certain extent. Therefore, step S103 can further include configuring the update tool UT to encrypt the firmware to be updated UF including the digital signature according to the first key SK1 using a symmetric encryption algorithm.

[0041] Next, execute step S104: configure the electronic device 10 to execute the original firmware A, and decrypt the encrypted firmware S5 with a decryption algorithm to obtain the firmware to be updated UF including a digital signature. This step corresponds to step S103, and therefore, may further include configuring the electronic device 10 to decrypt the encrypted firmware with the decryption algorithm according to the second key SK2 to obtain the firmware to be updated UT including a digital signature, wherein, since the update tool UT encrypts the firmware to be updated UF including a digital signature according to the first key SK1 using a symmetric encryption algorithm, and the symmetric encryption algorithm has only one non-public key, which is stored in the electronic device 10 and the update tool UT, respectively. In other words, the security of the firmware can be further guaranteed by ensuring the security of the key. In a specific embodiment, the key may be kept by the firmware manufacturer to prevent it from being leaked, but the present invention is not limited to this. Therefore, in this embodiment, the first key SK1 is the same as the second key SK2.

[0042] Step S105: configure the electronic device 10 to determine which of the first firmware storage area mem1 and the second firmware storage area mem2 is the firmware storage area to be updated. Specifically, the non-volatile storage space of the electronic device 10 can be divided into two partitions, the first firmware storage area mem1 and the second firmware storage area mem2, and the memory partition that needs to be updated is determined accordingly. The structure of each memory partition of the electronic device 10 for storing firmware is as follows: Figure 2 As shown, the first firmware storage area mem1 may further store a first existence flag B2 and a first update number B3, and the second firmware storage area mem2 may further store a second existence flag C2 and a second update number C3.

[0043] Therefore, refer to Figure 6 , which is a flowchart of the steps for determining the firmware storage area to be updated according to an embodiment of the present invention. Step S105 may further include the following steps:

[0044] Step S400: Check whether the first existence mark B2 in the first firmware storage area mem1 and the second existence mark C2 in the second firmware storage area mem2 are marked as updated.

[0045] If neither the first existence flag B2 nor the second existence flag C2 indicates that the firmware has been updated, the process proceeds to step S401: determining that the first firmware storage area mem1 is a firmware storage area to be updated.

[0046] If one of the first existence flag B2 and the second existence flag C2 indicates updated, the process proceeds to step S402: determining that the area not marked as updated is a firmware storage area to be updated.

[0047] If both the first existence flag B1 and the second existence flag B2 indicate updated, then enter step S403: compare the first firmware update count B3 in the first firmware storage area mem1 with the second firmware update count C3 in the second firmware storage area, and enter step S404: determine that the area with the smaller number is the firmware storage area to be updated.

[0048] For further example, each time a firmware update is completed, the existence flag and update count of the current memory partition will be updated. By checking the firmware update count and existence flag of the two memory partitions, the memory address space to which the firmware update is written is determined. When the firmware existence flags of the first firmware storage area mem1 and the second firmware storage area mem2 are both not set (for example, the values ​​are both 0), the firmware is updated to the first firmware storage area mem1. When the existence flag of one and only one of the two partitions is not set, the firmware is updated to the partition. When the existence flags of the first firmware storage area mem1 and the second firmware storage area mem2 are set at the same time (for example, the value is 1), the firmware update counts of the two partitions are compared. If the firmware update count of the first firmware storage area mem1 is greater than that of the second firmware storage area mem2, it means that the firmware version of the current first firmware storage area mem1 is updated later than that of the second firmware storage area mem2, and the firmware of the second firmware storage area mem2 needs to be updated, otherwise the first firmware storage area mem1 is updated.

[0049] Therefore, when the update process is unexpectedly terminated or an update error occurs, the electronic device 10 can automatically run the firmware in another partition and roll back to the firmware version before the update to ensure the normal operation of the electronic device 10.

[0050] After the firmware storage area to be updated is determined, the process proceeds to step S106: the configuration update tool UT writes the firmware to be updated UF including the digital signature into the firmware storage area to be updated.

[0051] Step S107: In response to the completion of writing the firmware to be updated UF including the digital signature into the firmware to be updated storage area, the electronic device 10 is configured to execute the original firmware A, and the digital signature is verified using a signature verification algorithm. The signature verification algorithm may also be, for example, ECDSA, so step S107 may further include configuring the electronic device 10 to execute ECDSA, and verifying the digital signature based on the first public key K1, wherein the first public key K1 is built into the electronic device 10. In a specific embodiment, the public key may be embedded in the electronic device 10 when the electronic device 10 leaves the factory, and cannot be modified after leaving the factory. The first public key K1 has a pairing relationship with the first private key PK1.

[0052] If the verification is successful, then the process proceeds to step S108, indicating that the update is successful. The configurable electronic device 10 returns the update success information S6, and at the same time sets the existence flag of the area (for example, changes its value from 0 to 1), and increases the corresponding update times by 1. Moreover, after the firmware update is successful this time, when the firmware is updated again, the firmware to be updated can be written to another partition according to the information indicated by the existence flag to perform alternate update. If the verification fails, then the process proceeds to step S109, indicating that the update fails.

[0053] If the updating fails, the process proceeds to step S110 : erasing the firmware to be updated UF written into the firmware to be updated storage area, and transmitting an error message S7 to the updating tool UT.

[0054] In the above embodiment of the present invention, all encryption algorithms, decryption algorithms and digital signature algorithms involved in the above steps are not limited, and the encryption algorithm, decryption algorithm and digital signature algorithm can be any achievable algorithm in the prior art. When decrypting and verifying the signature of the received encrypted firmware, the decryption algorithm corresponds to the encryption algorithm, and the signature verification algorithm corresponds to the signature algorithm. Similarly, when performing the permission verification procedure on the update tool, the corresponding encryption algorithm and decryption algorithm are also corresponding.

[0055] Advantageous Effects of Embodiments

[0056] One of the beneficial effects of the present invention is that the firmware update system and method provided by the present invention can prevent electronic devices from being written with malicious firmware by illegal update tools. In addition, when the user uses an authorized tool to update the firmware, the update tools provided by manufacturers of different electronic devices contain different private keys encapsulated inside, so the update tools cannot be universal, further improving the security and reliability of the update tools. Furthermore, during the update process, since the signature verification is performed on the original firmware, it is possible to check whether there is any data added, deleted, or tampered in the firmware, thereby ensuring the integrity and correctness of the firmware to be updated.

[0057] On the other hand, the firmware update system and method provided by the present invention alternately updates the first firmware storage area and the second firmware storage area. When the firmware update is terminated due to unexpected circumstances such as power failure during the firmware update, the device can still operate normally. When an update error occurs in one partition of the first firmware storage area and the second firmware storage area, the electronic device can automatically run the firmware in the other partition to return to the firmware version before the update, thereby ensuring the normal operation of the electronic device.

[0058] The contents disclosed above are only preferred feasible embodiments of the present invention, and are not intended to limit the scope of the claims of the present invention. Therefore, any equivalent technical changes made using the contents of the present invention description and drawings are included in the scope of the claims of the present invention.

[0059] Description of Reference Numerals

[0060] - Firmware Update System: 1

[0061] Electronic equipment: 10

[0062] First processing unit: 100

[0063] First storage module: 102

[0064] Firmware execution area: Boot

[0065] The first firmware storage area: mem1

[0066] Second firmware storage area: mem2

[0067] Initial program: A0

[0068] Original firmware: A

[0069] First firmware: B1

[0070] First Existence Mark: B2

[0071] First update number: B3

[0072] Second firmware: C1

[0073] Second existence mark: C2

[0074] Second update number: C3

[0075] Host: 12

[0076] Second processing unit: 120

[0077] Second storage module: 122

[0078] Update tool: UT

[0079] Firmware to be updated: UF

[0080] Firmware Generation Tool: FGT

[0081] Update command: S1

[0082] Verify signature: S2

[0083] First private key: PK1

[0084] Second private key: PK2

[0085] First public key: K1

[0086] Second public key: K2

[0087] Verification success signal: S3

[0088] Verification failure signal: S4

[0089] Encrypted firmware: S5

[0090] First key: SK1

[0091] Second key: SK2

[0092] Update success information: S6

[0093] Error message: S7

Claims

1. A firmware update method, applicable to a firmware update system comprising a host and an electronic device, wherein the host is configured to be communicatively connected to the electronic device and stores firmware to be updated, the firmware update method comprising the following steps: Configuring the host to execute a firmware generation tool to digitally sign the firmware to be updated, thereby generating the firmware to be updated including the digital signature; configuring the host to execute an update tool to transmit an update command to the electronic device; In response to receiving the update command, configuring the electronic device to perform an authority verification procedure on the update tool includes: Configuring the electronic device and the update tool to generate and exchange multiple sets of random numbers; configuring the update tool to sign the groups of random numbers using an asymmetric encryption algorithm to generate a verification signature and transmit it to the electronic device; and Configuring the electronic device to verify the verification signature using the asymmetric encryption algorithm, and if the verification is successful, transmitting a verification success signal to the update tool, otherwise transmitting a verification failure signal to the update tool; In response to receiving the verification success signal, configuring the update tool to encrypt the firmware to be updated including the digital signature using a symmetric encryption algorithm to generate encrypted firmware, and transmitting the encrypted firmware to the electronic device; Configuring the electronic device to execute the original firmware, and decrypting the encrypted firmware using a decryption algorithm to obtain the firmware to be updated including the digital signature; The electronic device is configured to determine which of the first firmware storage area and the second firmware storage area is the firmware storage area to be updated; configuring the update tool to write the firmware to be updated including the digital signature into the firmware to be updated storage area; In response to the firmware to be updated including the digital signature being written into the firmware to be updated storage area, the electronic device is configured to execute the original firmware and verify the digital signature using a signature verification algorithm. If the verification is successful, the update is completed.

2. The firmware update method according to claim 1, wherein the step of configuring the host to execute the firmware generation tool to digitally sign the firmware to be updated, thereby generating the firmware to be updated including the digital signature further comprises: The host is configured to execute an elliptic curve digital signature algorithm, and digitally sign the firmware to be updated according to a first private key.

3. The firmware update method according to claim 2, wherein the step of configuring the electronic device to execute the original firmware and verifying the digital signature using the signature verification algorithm further comprises: configuring the electronic device to execute an elliptic curve digital signature algorithm and verifying the digital signature according to a first public key, The first public key is paired with the first private key.

4. The firmware update method according to claim 1, wherein the steps of configuring the electronic device and the update tool to generate and exchange the groups of random numbers, and configuring the update tool to sign the groups of random numbers using the asymmetric encryption algorithm to generate the verification signature and transmit it to the electronic device further include: Configuring the electronic device to generate a first set of random numbers and transmit the first set of random numbers to the host; In response to receiving the first set of random numbers, configuring the host to generate a second set of random numbers and transmit the second set of random numbers to the electronic device; In response to receiving the second set of random numbers, configuring the electronic device to generate a third set of random numbers and transmit the third set of random numbers to the host; as well as The host is configured to use the first group of random numbers, the second group of random numbers, and the third group of random numbers as verification information, and execute an elliptic curve digital signature algorithm to digitally sign the verification information according to a second private key to generate the verification signature.

5. The firmware update method according to claim 4, wherein the step of configuring the electronic device to verify the verification signature using the asymmetric encryption algorithm further comprises: configuring the electronic device to execute an elliptic curve digital signature algorithm and verifying the verification signature according to a second public key, The second public key and the second private key have a pairing relationship.

6. The firmware update method according to claim 1, wherein the step of configuring the update tool to encrypt the firmware to be updated including the digital signature using the symmetric encryption algorithm to generate the encrypted firmware further comprises: The update tool is configured to encrypt the firmware to be updated including the digital signature according to the first key using the symmetric encryption algorithm.

7. The firmware update method according to claim 6, wherein the step of configuring the electronic device to execute the original firmware and decrypting the encrypted firmware with the decryption algorithm to obtain the firmware to be updated including the digital signature further comprises: configuring the electronic device to decrypt the encrypted firmware using the decryption algorithm according to the second key to obtain the firmware to be updated including the digital signature, The first key is the same as the second key.

8. The firmware updating method according to claim 1, wherein the step of configuring the electronic device to determine which of the first firmware storage area and the second firmware storage area is the firmware storage area to be updated further comprises: Check whether a first existence flag in the first firmware storage area and a second existence flag in the second firmware storage area are marked as updated, If the first existence flag and the second existence flag are not marked as updated, then the first firmware storage area is determined to be the firmware storage area to be updated; If one of the first existence flag and the second existence flag indicates that the firmware has been updated, the area that has not been updated is determined to be the firmware storage area to be updated.

9. The firmware update method as described in claim 8, wherein if the first existence flag and the second existence flag are both marked as updated, the first firmware update number in the first firmware storage area is further compared with the second firmware update number in the second firmware storage area, and the area with the smaller number is determined to be the firmware storage area to be updated.

10. A firmware update system, comprising: Electronic equipment, comprising: a first processing unit; and The first storage module comprises: The firmware execution area stores the initial program; At least one of the first firmware storage area and the second firmware storage area stores original firmware; and A host, configured to communicate with the electronic device, comprising: a second processing unit; a second storage module storing an update tool, a firmware to be updated, and a firmware generation tool, wherein the host is configured to execute the firmware generation tool to digitally sign the firmware to be updated, thereby generating the firmware to be updated including the digital signature; wherein the host is configured to execute the update tool to transmit an update command to the electronic device; In response to receiving the update command, the electronic device is configured to perform an authority verification procedure on the update tool, including: Configuring the electronic device and the update tool to generate and exchange multiple sets of random numbers; configuring the update tool to sign the groups of random numbers using an asymmetric encryption algorithm to generate a verification signature and transmit it to the electronic device; and Configuring the electronic device to verify the verification signature using the asymmetric encryption algorithm, and if the verification is successful, transmitting a verification success signal to the update tool, otherwise transmitting a verification failure signal to the update tool; Wherein, in response to receiving the verification success signal, the host is configured to execute the update tool to encrypt the firmware to be updated including the digital signature using a symmetric encryption algorithm to generate encrypted firmware, and transmit the encrypted firmware to the electronic device; The electronic device is configured to execute the original firmware and decrypt the encrypted firmware using a decryption algorithm to obtain the firmware to be updated including the digital signature; The electronic device is configured to determine which of the first firmware storage area and the second firmware storage area is the firmware storage area to be updated; The host is configured to execute the update tool to write the firmware to be updated including the digital signature into the firmware to be updated storage area; In response to the firmware to be updated including the digital signature being written into the firmware to be updated storage area, the electronic device is configured to execute the original firmware and verify the digital signature using a signature verification algorithm. If the verification is successful, the update is completed.