Firmware upgrading method and device, equipment and computer readable storage medium
By verifying and verifying the firmware update program, it ensures its legality and integrity, and solves the security risks caused by not verifying the firmware update package during the firmware upgrade process in the existing technology, improving the security of firmware updates sex.
Patent Information
- Application Number
- CN202411092771.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-10
AI Technical Summary
During the firmware upgrade process, the existing technology only checks the security chip cache area and does not check the firmware update package, resulting in a security risk to the hardware equipment.
By obtaining the firmware update program and verifying it with a pre-written firmware signature certificate, ensuring the legality and data integrity of the firmware update program, and then updating the target firmware with the preset boot boot program and firmware update program. Ensure the security of firmware signature certificates and the validity of data.
It effectively improves the security of the firmware update process, prevents illegal firmware update packages from being downloaded to the security chip, and avoids safety hazards from hardware equipment.
Smart Images

Figure CN119105778A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of firmware upgrade, and in particular to a firmware upgrade method and apparatus, device, and computer-readable storage medium. Background Art
[0002] With the advancement and development of science and technology, smart terminals are becoming more and more popular in people's lives. In the process of using smart terminals, it is necessary to perform firmware upgrade operations on the firmware in the smart terminal according to actual needs. During the firmware upgrade operation, the security chip manufacturer's detection program is generally used to verify the security chip cache area. Only after the verification is passed, the firmware update package is allowed to be downloaded to the security chip. However, this process only involves verifying the security chip cache area, and will not verify the firmware update package. Once an illegal firmware update package is downloaded to the security chip, it will bring certain security risks to the hardware device. Summary of the invention
[0003] The purpose of this application is to provide a firmware upgrade method and apparatus, device, and computer-readable storage medium to verify the firmware update package and improve the security of the firmware update process.
[0004] In a first aspect, an embodiment of the present application provides a firmware upgrade method, which is applied to a smart terminal, and the method includes: obtaining a firmware update program. The firmware update program is data fed back by the server in response to a firmware update request sent by the smart terminal, and is used to update the target firmware in the smart terminal. Among them, the firmware update program is obtained by signing the firmware update data by the server based on the firmware signature certificate of the smart terminal. The firmware update program is verified using the pre-written firmware signature certificate of the smart terminal. After the verification is passed, the target firmware is updated based on the preset boot program and firmware update program.
[0005] In the firmware upgrade method provided by the embodiment of the present application, after obtaining the firmware update program, the smart terminal uses the pre-written firmware signature certificate to verify the signature. After the signature verification is passed, the firmware update program is verified using the preset firmware signature certificate. After the signature verification is passed, the target firmware is updated using the preset boot program and firmware update program. By verifying the firmware update program, the legitimacy of the source of the firmware update program and the integrity of the data can be determined.
[0006] In a possible implementation, the firmware upgrade method provided in the embodiment of the present application may further include: receiving an imported firmware signature certificate when the smart terminal is in a preset security environment. The firmware signature certificate is used to verify at least one firmware including the target firmware. The firmware signature certificate is verified using a root certificate preset in the smart terminal. After the firmware signature certificate is verified, the firmware signature certificate is written into a security chip in the smart terminal.
[0007] In this possible implementation, the firmware signing certificate is verified using a root certificate pre-installed in the smart terminal. After the verification passes, the firmware signing certificate is written into the security chip of the smart terminal, which can ensure the security of the firmware signing certificate and the validity of the data.
[0008] A possible implementation method is to write the firmware signing certificate into the security chip in the smart terminal, including: encrypting the firmware signing certificate using the device certificate. The device certificate is issued by the root certificate and stored in the security chip of the smart terminal. The encrypted firmware signing certificate is written into the security chip.
[0009] In this possible implementation, the smart terminal uses the device certificate to encrypt the firmware signing certificate, which can ensure the security of the firmware signing certificate.
[0010] A possible implementation method is to update the target firmware based on a preset boot program and a firmware update program, including: starting the preset boot program through a security chip in the smart terminal. The boot program is pre-installed in the security chip. The target firmware is verified for firmware validity through the boot program. After the target firmware passes the validity verification, the target firmware is updated using the firmware update program.
[0011] In a possible implementation, the boot program includes a first boot program and a second boot program, and the target firmware is verified for firmware validity by the boot program, including: using the first boot program to perform a security check on the second boot program. After the second boot program passes the security check, the target firmware is verified for validity by the second boot program.
[0012] In this possible implementation, the smart terminal uses the first boot program to perform a security check on the second boot program. After the second boot program passes the security check, the second boot program performs a validity check on the target firmware. The firmware itself can be checked to prevent abnormal firmware from being downloaded to the smart terminal, which would cause security risks to the smart terminal.
[0013] In a possible implementation, the second boot program is used to verify the validity of the target firmware, including: verifying the validity of the firmware signature certificate through the second boot program. After the validity of the firmware signature certificate is verified, verifying the validity of the target firmware.
[0014] A possible implementation method is to use the firmware update program to update the target firmware, including: clearing the cache area of the security chip, and writing the firmware update program into the cleared cache area. The firmware is updated using the firmware update program in the cache area.
[0015] In a possible implementation, obtaining the firmware update program includes: sending a firmware update request to a server, receiving an access path of the firmware update program fed back by the server according to the firmware update request, and downloading the firmware update program through the access path of the firmware update program.
[0016] In a second aspect, an embodiment of the present application provides a firmware upgrade device, which includes: an acquisition module, a signature verification module, and an update module.
[0017] The acquisition module is used to acquire a firmware update program. The firmware update program is data fed back by the server in response to a firmware update request sent by the smart terminal, and is used to update the target firmware in the smart terminal. The firmware update program is obtained by the server signing the firmware update data based on the firmware signature certificate of the smart terminal.
[0018] The signature verification module is used to verify the signature of the firmware update program using the pre-written firmware signature certificate of the smart terminal.
[0019] The update module is used to update the target firmware based on the preset boot program and firmware update program after the signature verification is passed.
[0020] In a third aspect, the present application provides an intelligent terminal having the function of implementing the firmware upgrade method of the first aspect or any possible implementation method. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0021] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute the firmware upgrade method of the first aspect or any possible implementation manner.
[0022] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the firmware upgrade method of the first aspect or any possible implementation manner.
[0023] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different possible implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A schematic diagram of the structure of an intelligent terminal provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of the structure of a firmware upgrade system provided in an embodiment of the present application;
[0027] Figure 3 A flowchart of a firmware upgrade method provided in an embodiment of the present application;
[0028] Figure 4 Another flowchart of a firmware upgrade method provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application;
[0030] Figure 6 Another structural schematic diagram of a firmware upgrade system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0032] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0033] At present, during the firmware upgrade process, the security chip manufacturer's own detection program is generally used to verify the cache area of the security chip. Only after the verification is passed, the firmware update package is allowed to be downloaded to the security chip. However, this process only involves verifying the cache area of the security chip, and does not verify the firmware update package. Once an illegal firmware update package is downloaded to the security chip, it will bring certain security risks to the hardware device.
[0034] Based on this, an embodiment of the present application provides a firmware upgrade method, which is applied to a smart terminal. The method includes: obtaining a firmware update program, which is data fed back by a server in response to a firmware update request sent by a smart terminal, and is used to update the target firmware in the smart terminal. The firmware update program is obtained by signing the firmware update data by the server based on the firmware signature certificate of the smart terminal. The firmware update program is verified using the pre-written firmware signature certificate of the smart terminal. After the verification is passed, the target firmware is updated based on the preset boot program and firmware update program.
[0035] In the firmware upgrade method provided in the embodiment of the present application, after obtaining the firmware update program, the smart terminal uses the pre-written firmware signature certificate to verify the signature. After the signature verification is passed, the target firmware is updated using the preset boot program and firmware update program. By verifying the firmware update program, the legitimacy of the source of the firmware update program and the integrity of the data can be determined.
[0036] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0037] On the one hand, a firmware upgrade method provided in an embodiment of the present application can be executed by a smart terminal. Figure 1 As shown, the smart terminal 100 may include a processor 101 and a security chip 102 .
[0038] The processor 101 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), or a processor. A general purpose processor may be a microprocessor or any conventional processor.
[0039] Exemplarily, the processor 101 can be used to obtain a firmware update program, use the firmware signature certificate pre-written into the smart terminal to verify the signature of the firmware update data, and after the signature verification is passed, update the target firmware based on the preset boot program and firmware update program. The firmware update program can be a program for updating firmware. The firmware can be software embedded in the smart terminal 100.
[0040] The security chip 102 may be a hardware component embedded in the smart terminal 100, and is used to enhance the security of the smart terminal. The security chip 102 has a built-in memory for storing encryption keys, performing encryption operations, verifying identities, and protecting sensitive data to ensure that the data stored in the security chip is protected from attacks by malware and physical tampering. The memory has hardware-level protection measures, such as anti-tampering and anti-side channel attack technologies, which can ensure that when the security chip is physically attacked, the information stored in the security chip is also difficult to be extracted or modified.
[0041] Exemplarily, the security chip 102 may store an encryption key, a firmware signing certificate encrypted using the encryption key, a boot program, a firmware update program, and the like.
[0042] The security chip 102 may also store computer executable instructions for implementing the solution of the present application, and the execution is controlled by the processor 101. The processor 101 is used to execute the computer executable instructions stored in the security chip 102, thereby implementing the firmware upgrade method provided in the following embodiment of the present application.
[0043] On the one hand, the firmware upgrade method provided in the embodiment of the present application can be executed by a firmware upgrade system. Figure 2 As shown, the firmware upgrade system 200 may include: a smart terminal 100 and a server 201 .
[0044] The intelligent terminal 100 refers to a device, an apparatus or a machine with computing and processing capabilities. In the embodiments of the present application, it may be a device with data processing capabilities or functional peripherals, as well as various sensors and IoT terminal devices, etc. The intelligent terminal 100 may also be referred to as a user device, a mobile station, a mobile terminal or a terminal device, etc. The intelligent terminal can be widely used in various scenarios, such as device-to-device, vehicle-to-object communication, IoT, virtual reality, augmented reality, industrial control, automatic driving, telemedicine, remote shopping, smart grid, smart home, smart office, smart transportation, smart city, etc. The intelligent terminal 100 may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle-mounted terminal, a robot, a mechanical arm, a smart home device, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the intelligent terminal 100.
[0045] The server 201 is used to store the configuration information of each smart terminal, and can also be used to store the configuration information of the application and multimedia resources, etc. The smart terminal can obtain the data packet for loading the application, as well as the configuration information or multimedia information of the application, etc. by exchanging information with the server. In the embodiment of the present application, the application can be a firmware update program.
[0046] It should be noted that the above-mentioned server may be a physical server, or a virtual server or a cloud server, such as an edge cloud or a remote cloud, etc. The smart terminal and the cloud server may form a terminal-cloud communication network architecture.
[0047] The functions of the above-mentioned servers can be configured on one server or implemented through multiple servers, and the embodiments of the present application do not impose specific restrictions on this.
[0048] On the one hand, the embodiment of the present application discloses a communication method for an Internet of Things device, which can be performed as follows: Figure 2 The smart terminal 100 in the firmware upgrade system 200 shown in FIG. Figure 3 As shown, the method may include the following steps:
[0049] S301, obtaining a firmware update program.
[0050] In a possible implementation, the process of the smart terminal obtaining the firmware update program may be that the smart terminal sends a firmware update request to the server. After receiving the firmware update request, the server sends the access path of the firmware update program corresponding to the firmware update request to the smart terminal. After receiving the access path of the firmware update program, the smart terminal downloads the firmware update program through the access path.
[0051] The firmware update program is obtained by signing the firmware update data by the server based on the firmware signature certificate of the smart terminal. The firmware update program is used to update the target firmware in the smart terminal.
[0052] S302: Use the pre-written firmware signature certificate of the smart terminal to verify the signature of the firmware update program.
[0053] In a possible implementation, after obtaining the firmware update program, the smart terminal first obtains the pre-written firmware signature certificate from the security chip, and uses the firmware signature certificate to verify the firmware update data.
[0054] Another possible implementation method is that after obtaining the firmware update program, the smart terminal first obtains the pre-written encrypted firmware signature certificate from the security chip. The encrypted firmware signature certificate is decrypted using the decryption key pre-distributed by the security chip to obtain the firmware signature certificate. The smart terminal uses the firmware signature certificate to verify the signature of the firmware update program.
[0055] The security of the firmware signature certificate can be further improved by encrypting the firmware signature certificate and writing it into the security chip. The decrypted firmware signature certificate can be used to verify the signature of the firmware update program to further ensure the legitimacy of the firmware update program.
[0056] In one possible implementation, the process of using the firmware signature certificate to verify the firmware update program by the smart terminal can extract the digital signature and related firmware update data from the firmware update data for the smart terminal. The public key of the root certificate of the smart terminal is used to verify the authenticity of the firmware signature certificate, such as detecting whether the firmware signature certificate is expired, revoked, and whether it is used for firmware update. After verifying the authenticity of the firmware signature certificate, the smart terminal uses the public key in the firmware signature certificate to verify the data signature and update data in the firmware update program.
[0057] If the firmware signature certificate does not exist, the smart terminal enters the loader program to use the loader program to perform verification of the firmware update program.
[0058] S303: after the signature verification is passed, the target firmware is updated based on the preset boot program and firmware update program.
[0059] Among them, the boot program is pre-installed in the security chip.
[0060] The smart terminal starts the preset boot program through the security chip in the smart terminal, and performs firmware validity verification on the target firmware through the boot program. After the target firmware passes the validity verification, the target firmware is updated using the firmware update program.
[0061] In a possible implementation, the boot program may include a first boot program and a second boot program. The smart terminal may use the first boot program to perform a security check on the second boot program, and after the second boot program passes the security check, the second boot program performs a legitimacy check on the firmware signing certificate, and after the legitimacy check on the firmware signing certificate passes, the validity of the target firmware is checked.
[0062] After the smart terminal determines that the target firmware is valid, it clears the cache area of the security chip, writes the firmware update program into the cleared cache area, and uses the firmware update program in the cache area to update the firmware. In this process, by verifying the target firmware itself, it is possible to avoid downloading abnormal firmware to the security chip, thus avoiding security risks to the smart terminal.
[0063] Another possible implementation method is that after the signature verification fails, the boot program reports an exception.
[0064] In another possible implementation, after the signature verification is passed, if the smart terminal determines that the target firmware is invalid, the boot program reports an exception.
[0065] In the firmware upgrade method provided by the embodiment of the present application, after obtaining the firmware update program, the smart terminal uses the pre-written firmware signature certificate to verify the signature. After the signature verification is passed, the firmware update program is verified using the preset firmware signature certificate. After the signature verification is passed, the target firmware is updated using the preset boot program and firmware update program. By verifying the firmware update program, the legitimacy of the source of the firmware update program and the integrity of the data can be determined.
[0066] In a possible implementation, the firmware upgrade method provided in the embodiment of the present application may further include: S304-S306. Figure 4 As shown, S304 - S306 may be executed before S301 .
[0067] S304: When the smart terminal is in a preset security environment, receive an imported firmware signing certificate.
[0068] The firmware signing certificate is used to verify at least one firmware including the target firmware.
[0069] In a possible implementation, the preset security environment may be a security environment within the smart terminal manufacturer. For example, the security environment may be OpenSSL at the national security level.
[0070] S305: Verify the firmware signature certificate using the root certificate preset in the smart terminal.
[0071] In one possible implementation, the smart terminal first checks whether the firmware signing certificate is accompanied by any intermediate certificates, and attempts to build a certificate chain from the firmware signing certificate to one or more pre-made trusted root certificates. Each step in the process verifies the signature of the lower-level certificate by the upper-level certificate. The smart terminal device checks the validity period, revocation status, basic constraints and extended constraints of each level of certificate in the certificate chain to ensure that each certificate in the certificate chain is issued by a trusted CA (Certificate Authority) and has not been tampered with or revoked. The smart terminal device uses the public key obtained from the constructed certificate chain to decrypt and verify the signature of the firmware image.
[0072] S306, after the firmware signature certificate is verified, the firmware signature certificate is written into the security chip in the smart terminal.
[0073] In a possible implementation, the smart terminal device determines that the firmware signature certificate verification has passed after verifying the validity period, revocation status, and basic constraints and extended verification of all certificates in the certificate chain.
[0074] In one possible implementation, after the firmware signature certificate is verified, the smart terminal uses the device certificate to encrypt the firmware signature certificate. The device certificate is issued by the root certificate and stored in the security chip of the smart terminal. The encrypted firmware signature certificate is written to the security chip.
[0075] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the working principle of the device. It is understandable that in order to realize the above functions, the intelligent terminal includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0076] The embodiment of the present application can divide the functional modules of the intelligent terminal according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or software functional module.
[0077] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. Figure 5 FIG. 2 shows a possible schematic diagram of the firmware upgrade device involved in the above embodiments. Figure 5 As shown, the firmware upgrade device 500 may include: an acquisition module 501 , a signature verification module 502 , and an update module 503 .
[0078] The acquisition module 501 is used to support the firmware upgrade device 500 to perform the following steps: Figure 3 S301 in the firmware upgrade method shown.
[0079] The signature verification module 502 is used to support the firmware upgrade device 500 to perform the following Figure 3 S302 in the firmware upgrade method shown.
[0080] The update module 503 is used to support the firmware upgrade device 500 to perform the following steps: Figure 3 S303 in the firmware upgrade method shown.
[0081] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0082] The firmware upgrade device 500 provided in the embodiment of the present application is used to perform the above Figure 3 or Figure 4 The firmware upgrade method shown can therefore achieve the same effect as the above-mentioned firmware upgrade method.
[0083] The present application also provides a smart terminal, which can be the smart terminal described in the above embodiment. Figure 1 The smart terminal 100 shown can execute the firmware upgrade method and related steps in the above method embodiment.
[0084] An embodiment of the present application also provides a computer-readable storage medium on which instructions are stored. When the instructions are executed, the firmware upgrade method and related steps in the above method embodiment are executed.
[0085] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer executes the firmware upgrade method and related steps in the above method embodiment.
[0086] In some embodiments, the methods described herein may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or articles of manufacture.
[0087] The present application also provides a firmware upgrade system 600. Figure 6 As shown, the firmware upgrade system 600 includes at least one processor 601 and at least one interface circuit 602 .
[0088] As an example, when the firmware upgrade system 600 includes a processor and an interface circuit, the processor may be Figure 6 The processor 601 shown in the solid line frame (or the processor 601 shown in the dotted line frame) may be Figure 6 The interface circuit 602 shown in the solid line frame (or the interface circuit 602 shown in the dotted line frame) is shown in the solid line frame. When the chip system 600 includes two processors and two interface circuits, the two processors include Figure 6 The processor 601 shown in the solid line frame and the processor 601 shown in the dotted line frame, the two interface circuits include Figure 6 The interface circuit 602 shown in the solid line frame and the interface circuit 602 shown in the dotted line frame are not limited to this.
[0089] The processor 601 and the interface circuit 602 can be interconnected via a line. For example, the interface circuit 602 can be used to receive a signal. For another example, the interface circuit 602 can be used to send a signal to another device (such as the processor 601). For example, the interface circuit 602 can read a computer instruction stored in a memory and send the computer instruction to the processor 601. The processor 601 executes the instruction and implements the various steps in the above embodiments in combination with the input and output devices, such as implementing Figure 3 or Figure 4 Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0090] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0091] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0092] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0093] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0095] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A firmware upgrade method, It is characterized in that Applied to a smart terminal, the method comprises: Obtain a firmware update program; the firmware update program is data fed back by the server in response to a firmware update request sent by the smart terminal, and is used to update the target firmware in the smart terminal; wherein the firmware update program is obtained by the server signing the firmware update data based on the firmware signature certificate of the smart terminal; Using the pre-written firmware signature certificate of the smart terminal to verify the signature of the firmware update program; After the signature verification is passed, the target firmware is updated based on the preset boot program and the firmware update program.
2. The method according to claim 1, It is characterized in that The method further comprises: When the smart terminal is in a preset security environment, receiving an imported firmware signature certificate; the firmware signature certificate is used to verify at least one firmware including the target firmware; Verifying the firmware signing certificate using a root certificate pre-installed in the smart terminal; After the firmware signature certificate is verified, the firmware signature certificate is written into the security chip in the smart terminal.
3. The method according to claim 2, It is characterized in that The step of writing the firmware signature certificate into the security chip in the smart terminal includes: The firmware signature certificate is encrypted using a device certificate; the device certificate is issued by the root certificate and stored in a security chip of the smart terminal; The encrypted firmware signature certificate is written into the security chip.
4. The method according to any one of claims 1 to 3, It is characterized in that The updating of the target firmware based on the preset boot program and the firmware update program includes: Starting a preset boot program through the security chip in the smart terminal; the boot program is pre-installed in the security chip; Performing firmware validity verification on the target firmware through the boot program; After the target firmware passes the validity check, the target firmware is updated using the firmware update program.
5. The method according to claim 4, It is characterized in that The boot program includes a first boot program and a second boot program, and the firmware validity check of the target firmware by the boot program includes: Using the first boot program to perform a security check on the second boot program; After the second boot program passes the security check, the target firmware is verified for validity by the second boot program.
6. The method according to claim 5, It is characterized in that The performing validity verification on the target firmware by the second boot program includes: Performing a validity check on the firmware signature certificate by using the second boot program; After the legitimacy of the firmware signature certificate is verified, the validity of the target firmware is verified.
7. The method according to claim 4, It is characterized in that The using the firmware update program to update the target firmware includes: Clearing the cache area of the security chip, and writing the firmware update program into the cleared cache area; The firmware is updated using the firmware update program in the cache area.
8. The method according to claim 1, It is characterized in that The obtaining of the firmware update program includes: Send a firmware update request to the server; Receiving an access path of a firmware update program fed back by the server according to the firmware update request; The firmware update program is downloaded through the access path of the firmware update program.
9. A firmware upgrade device, It is characterized in that Applied to a smart terminal, the device comprises: An acquisition module is used to acquire a firmware update program; the firmware update program is data fed back by the server in response to a firmware update request sent by the smart terminal, and is used to update the target firmware in the smart terminal; wherein the firmware update program is obtained by the server signing the firmware update data based on the firmware signature certificate of the smart terminal; A signature verification module, used to verify the signature of the firmware update program using the pre-written firmware signature certificate of the smart terminal; The update module is used to update the target firmware based on a preset boot program and the firmware update program after the signature verification is passed.
10. A smart terminal, It is characterized in that The smart terminal includes a processor and a memory, the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the firmware upgrade method according to any one of claims 1 to 8.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the firmware upgrade method according to any one of claims 1 to 8.
Citation Information
Cited By
Intelligent household electrical appliance, control method of intelligent household electrical appliance, computer equipment and storage medium
CN121217501A
Smart home appliances, control methods for smart home appliances, computer equipment and storage media
CN121217501B
