Secure firmware deployment method, system, and electronic device

CN117131474BActive Publication Date: 2026-10-27BEIJING SPREADTRUM HI TECH COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210566981.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2026-10-27
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

然而,如何确保该安全固件的完整性、真实性、防篡改性,是一个需要重视的问题,现有技术中,往往不能有效地确保该安全固件的完整性、真实性、以及不被防篡

Benefits of technology

[0008]可以看出,在本申请实施例中,通过所述安全模块对第一安全固件进行验签和解密这双重验证而得到第二安全固件,提高了安全固件的安全性,另外,还进一步对所述第二安全固件进行加密而得到第三安全固件,从而加载在第二存储器中以在后续运行的安全固件是经过加密后的安全固件,能够有效确保加载在第二存储器中的安全固件不被篡改,保证了安全固件的完整性、安全性以及防篡改性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131474B_ABST
    Figure CN117131474B_ABST
Patent Text Reader

Abstract

The application provides a secure firmware deployment method, which is used for deploying secure firmware; the method comprises the following steps: when it is determined that secure firmware deployment is needed, sending encrypted and signed first secure firmware stored in a first memory to a secure module to obtain second secure firmware by signature verification and decryption of the secure module; encrypting the second secure firmware to obtain third secure firmware; and loading the third secure firmware into a second memory to complete deployment of the secure firmware, wherein the second memory is an internal memory and the first memory is an external memory. The application also provides a secure firmware deployment system and an electronic device. In the application, the secure firmware loaded in the second memory for subsequent running is encrypted secure firmware, which can effectively ensure that the secure firmware loaded in the second memory is not tampered with, thereby guaranteeing security and tamper resistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of firmware management, and more particularly to a secure firmware deployment method, a secure firmware deployment system, and an electronic device. Background Technology

[0002] Mobile phones, tablets, and other electronic devices are becoming increasingly common. These devices are also becoming more powerful, and functions such as mobile payments, account logins for various software applications, and money transfers typically require secure management to ensure information security. Currently, the common approach is to first deploy secure firmware using SE (Secure Element) or ISE (Integrated Secure Element). This involves loading the secure firmware into the electronic device's memory and then subsequently calling / running it for security management. However, ensuring the integrity, authenticity, and tamper-resistance of this secure firmware is a critical issue. Existing technologies often fail to effectively guarantee the integrity, authenticity, and tamper-resistance of the secure firmware. In particular, for ISE (Integrated Secure Element), since ISE is a secure (tamper-proof) subsystem (not an independent IC (integrated circuit chip)), data storage and program execution depend on part of the AP (application) environment. Therefore, the design of ISE system is different from that of traditional SE (Secure Element) subsystem. It has its own independent execution environment and secure storage. How to ensure the anti-tampering of the secure firmware of ISE system is a problem that needs to be solved. Summary of the Invention

[0003] This application provides a secure firmware deployment method, a secure firmware deployment system, and an electronic device, which can effectively ensure the security and tamper-proof nature of secure firmware deployment.

[0004] In a first aspect, embodiments of this application provide a secure firmware deployment method, the method being used to deploy secure firmware; the method includes: when it is determined that secure firmware deployment is required, sending a first secure firmware, which is encrypted and signed and stored in a first memory, to a security module, so that the security module can verify the signature and decrypt it to obtain a second secure firmware; encrypting the second secure firmware to obtain a third secure firmware; and loading the third secure firmware into a second memory to complete the deployment of the secure firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0005] Secondly, embodiments of this application provide a secure firmware deployment system, which includes a transmission control module, an encryption module, and a loading module. The transmission control module, upon determining that secure firmware deployment is required, sends an encrypted and signed first secure firmware stored in a first memory to a security module, which verifies and decrypts the signature to obtain a second secure firmware. The encryption module encrypts the second secure firmware to obtain a third secure firmware. The loading module loads the third secure firmware into a second memory to complete the deployment of the secure firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0006] Thirdly, embodiments of this application provide an electronic device, the electronic device including a processor and a memory, the memory storing a program for the processor to execute a secure firmware deployment method, the method including: when it is determined that secure firmware deployment is required, sending a first secure firmware stored in a first memory that has been encrypted and signed to a security module, so as to obtain a second secure firmware by the security module through signature verification and decryption; encrypting the second secure firmware to obtain a third secure firmware; and loading the third secure firmware into a second memory to complete the deployment of the secure firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program for execution by a computer using a secure firmware deployment method. The method includes: upon determining that secure firmware deployment is required, sending an encrypted and signed first secure firmware stored in a first memory to a security module for signature verification and decryption by the security module to obtain a second secure firmware; encrypting the second secure firmware to obtain a third secure firmware; and loading the third secure firmware into a second memory to complete the deployment of the secure firmware. The second memory is an internal memory, and the first memory is an external memory.

[0008] As can be seen, in this embodiment of the application, the second security firmware is obtained by performing dual verification of the first security firmware through the security module, which improves the security of the security firmware. In addition, the second security firmware is further encrypted to obtain the third security firmware. Thus, the security firmware loaded in the second memory for subsequent operation is the encrypted security firmware, which can effectively ensure that the security firmware loaded in the second memory is not tampered with, and guarantee the integrity, security and tamper resistance of the security firmware. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart of a secure firmware deployment method according to an embodiment of this application.

[0011] Figure 2 A flowchart of a secure firmware deployment method according to another embodiment of this application.

[0012] Figure 3 A schematic diagram of some internal modules of an electronic device to which the secure firmware deployment method is applied in one embodiment.

[0013] Figure 4 This is a flowchart illustrating the steps included in the first deployment operation of the secure firmware deployment method in another embodiment of this application.

[0014] Figure 5 This is a flowchart illustrating the steps included in the second deployment operation of the secure firmware deployment method in another embodiment of this application.

[0015] Figure 6 This is a schematic diagram of the modules of a secure firmware deployment system according to an embodiment of this application.

[0016] Figure 7 This is a schematic diagram of a more specific internal module of an electronic device according to an embodiment of this application.

[0017] Figure 8 This is a schematic diagram of a more specific internal module of an electronic device according to another embodiment of this application.

[0018] Figure 9 This is a schematic diagram of another part of the electronic device in some embodiments of this application. Detailed Implementation

[0019] The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terms "first," "second," "third," and "fourth," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. The expression "A / B" includes both "A and B" and "A or B."

[0020] The electronic devices in this application may include handheld devices such as mobile phones and tablets, as well as in-vehicle devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of user equipment (UE), mobile station (MS), terminal device, etc.

[0021] Please see Figure 1 This is a flowchart of a secure firmware deployment method according to an embodiment of this application. The method is used for secure firmware deployment in an electronic device, and the steps included in the method are not limited to the following:

[0022] 101: When it is determined that secure firmware deployment is required, the encrypted and signed first secure firmware stored in the first memory is sent to the security module so that the second secure firmware can be obtained by the security module through signature verification and decryption.

[0023] 103: The second security firmware is encrypted to obtain the third security firmware.

[0024] 105: Load the third security firmware into the second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0025] Therefore, in this application, the second secure firmware is obtained by performing dual verification of the first secure firmware through signature verification and decryption by the security module, which improves the security of the secure firmware. In addition, the second secure firmware is further encrypted to obtain the third secure firmware. Thus, the secure firmware loaded into the second memory for subsequent operation is the encrypted secure firmware, which can effectively ensure that the secure firmware loaded into the second memory is not tampered with, and guarantee the integrity, security and tamper resistance of the secure firmware.

[0026] In some embodiments, the step of "sending the encrypted and signed first security firmware stored in the first memory to the security module" may include: sending the encrypted and signed first security firmware stored in the first memory to a second memory for temporary storage, and then sending the first security firmware temporarily stored in the second memory to the security module.

[0027] As described above, the security firmware deployment method involves deploying security firmware in an electronic device. The security module can be an integrated chip, and both the first memory and the second memory are memories within the electronic device. The second memory, being an internal memory, is connected between the security module and the first memory, which is an external memory. Therefore, by sending the encrypted and signed first security firmware stored in the first memory to the second memory for temporary storage, and then sending the temporarily stored first security firmware in the second memory to the security module, the encrypted and signed first security firmware stored in the first memory can be sent to the security module.

[0028] Specifically, the process of obtaining the second secure firmware through signature verification and decryption by the security module may include: verifying the signature of the first secure firmware and decrypting the first secure firmware, thereby obtaining the second secure firmware after successful signature verification and decryption. That is, the second secure firmware can be the secure firmware obtained after the first secure firmware has been successfully signed, verified, and decrypted by the security module. Upon receiving the first secure firmware, the security module automatically performs signature verification and decryption.

[0029] Specifically, when the second security firmware is encrypted to obtain the third security firmware, the third security firmware is the security firmware obtained by encrypting the second security firmware.

[0030] In some embodiments, step 103 may further include: encrypting and signing the second security firmware to obtain a third security firmware. That is, in some embodiments, not only is the second security firmware encrypted, but it is also signed to obtain the third security firmware. Therefore, in some instances, the third security firmware is the security firmware obtained by encrypting and signing the second security firmware.

[0031] The security module in this application may be an integrated chip that integrates a Secure Element (SE) or an Integrated Secure Element (ISE). The security firmware may be SE security firmware or ISE security firmware.

[0032] In some embodiments, such as Figure 1 As shown, the method further includes: 107: storing the third security firmware in the backup partition of the first memory.

[0033] The backup partition of the first memory can be a specially designated storage area for storing the third security firmware.

[0034] The aforementioned first security firmware is stored in a specific storage area outside the backup partition of the first memory. The security firmware for security management can be pre-compiled, then encrypted and signed to obtain the first security firmware, which is then stored in the specific storage area of ​​the first memory. The encryption method used in encrypting and signing the security firmware to obtain the first security firmware may include encryption using two pairs of AES (Advanced Encryption Standard) symmetric keys. The encryption method used in encrypting the second security firmware to obtain the third security firmware may be the same as or different from the encryption method used to obtain the first security firmware. For example, it may also be encryption using two pairs of AES (Advanced Encryption Standard) symmetric keys, or it may be encryption using an asymmetric key.

[0035] In some embodiments, the first security firmware may be pre-stored in the first memory before the electronic device leaves the factory, and may be updated and upgraded accordingly in response to updates and upgrades from the electronic device manufacturer or operating system provider.

[0036] In some embodiments, before sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption to obtain the second security firmware, the method further includes: determining whether the current security firmware deployment is the first deployment. Sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption to obtain the second security firmware includes: if the current security firmware deployment is the first deployment, then sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption to obtain the second security firmware.

[0037] That is, in some embodiments, when the current security firmware deployment is the first deployment, the aforementioned step 101, "sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption by the security module to obtain the second security firmware," and subsequent steps 103-107 are executed. Clearly, in other embodiments, regardless of whether the current security firmware deployment is the first deployment, when it is determined that security firmware deployment is required, the aforementioned step 101, "sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption by the security module to obtain the second security firmware," and subsequent steps 103-107 are executed.

[0038] In some embodiments, the method further includes: when the current security firmware deployment is not the first deployment, obtaining the version of the encrypted and signed first security firmware stored in the first memory; comparing the version of the first security firmware with the version of the third security firmware stored in the backup partition of the first memory; and when the version of the first security firmware is equal to or lower than the version of the third security firmware, directly loading the third security firmware from the backup partition of the first memory into the second memory to complete the deployment of the security firmware.

[0039] Therefore, in some embodiments, since the backup partition of the first memory already stores the third security firmware that has been verified and decrypted by the security module and then re-encrypted, when the current security firmware deployment is not the first deployment, the version of the current first security firmware in the first memory can be compared with the version of the third security firmware stored in the backup partition of the first memory. If the version of the first security firmware is equal to or lower than the version of the third security firmware, it indicates that the third security firmware stored in the backup partition of the first memory is the latest version. In this case, the third security firmware in the backup partition of the first memory can be directly loaded into the second memory to complete the deployment of the security firmware. Thus, the aforementioned operations during the first deployment are not required, improving deployment efficiency.

[0040] In some embodiments, after comparing the version of the first security firmware with the version of the third security firmware stored in the backup partition of the first memory, the method further includes: when the version of the first security firmware is higher than the version of the third security firmware, sending the encrypted and signed first security firmware stored in the first memory to a security module for signature verification and decryption by the security module to obtain a second security firmware; encrypting the second security firmware to obtain a third security firmware; loading the third security firmware into the second memory to complete the deployment of the security firmware; and storing the currently obtained third security firmware in the backup partition of the first memory, replacing the previously stored third security firmware in the backup partition of the first memory.

[0041] That is, in some embodiments, when the version of the first security firmware is higher than the version of the third security firmware, it indicates that the version of the security firmware has been updated. The updated security firmware version has not been verified and decrypted by the security module. Therefore, it is necessary to re-execute the operation performed during the initial deployment, verify and decrypt the new version of the security firmware, encrypt it, and then load it into the second memory to complete the deployment of the security firmware and to synchronously update the third security firmware in the backup partition of the first memory.

[0042] In some embodiments, determining the need for secure firmware deployment includes: determining the need for secure firmware deployment when the electronic device is powered on. The aforementioned secure firmware deployment method is executed every time the electronic device is powered on, enabling the secure firmware to be securely loaded into the second memory. Because the secure firmware is re-encrypted, tampering is effectively prevented, improving security. Specifically, in some embodiments, when the electronic device powers on from a powered-off state in response to an operation such as pressing the power button, the aforementioned secure firmware deployment method is executed, enabling the secure firmware to be securely loaded into the second memory. In this application, the secure firmware deployment method can be executed at any stage of the power-on process, for example, during the loading process of applications, the desktop, etc., after the screen lights up, or after responding to the power button press but before the screen lights up. After the secure firmware is loaded into the second memory, it can be subsequently run by the security module for secure management of events such as payment events, account login events, and unlocking events.

[0043] The step 107, "Storing the third security firmware to the backup partition of the first memory", can be performed after each deployment, thereby ensuring that the third security firmware stored in the backup partition of the first memory can be updated in a timely manner.

[0044] In some embodiments, the method may further include determining whether the current deployment is the first time by querying whether security firmware is stored in the backup partition of the first memory. Specifically, if security firmware is not found in the backup partition of the first memory, the current deployment is determined to be the first time; if security firmware is found in the backup partition of the first memory, the current deployment is determined to be a non-first time. In other embodiments, the determination of whether the current deployment is the first time can also be made by determining whether the electronic device is being powered on for the first time.

[0045] Please see Figure 2 This is a flowchart of a secure firmware deployment method according to another embodiment of this application. The method is used to deploy secure firmware, and the steps included in the method are not limited to the following:

[0046] 201: When it is determined that a security firmware deployment is required, determine whether the current security firmware deployment is the first deployment. If yes, proceed to step 203; otherwise, proceed to step 205.

[0047] 203: If the current security firmware deployment is determined to be the first deployment, perform the first deployment operation.

[0048] The first deployment operation may include: sending a first security firmware, which has been encrypted and signed and is stored in a first memory, to a security module for verification and decryption by the security module to obtain a second security firmware; encrypting the second security firmware to obtain a third security firmware; and loading the third security firmware into a second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0049] Thus, by performing dual verification of the first security firmware through signature verification and decryption by the security module, the second security firmware is obtained, which improves the security of the security firmware. In addition, the second security firmware is further encrypted to obtain the third security firmware. Therefore, the security firmware loaded in the second memory for subsequent operation is the encrypted security firmware, which can effectively ensure that the security firmware loaded in the second memory is not tampered with, and guarantee the integrity, security and tamper resistance of the security firmware.

[0050] In some embodiments, the first deployment operation may further include: storing the third security firmware in a backup partition of the first memory.

[0051] That is, in some embodiments, the first deployment operation may include Figure 1 The flowchart shown includes step 101, which involves "sending the encrypted and signed first security firmware stored in the first memory to the security module for verification and decryption to obtain the second security firmware," and subsequent steps 103-107. Clearly, in some embodiments, "storing the third security firmware in the backup partition of the first memory" can also be a step independent of the first deployment operation. After the security firmware deployment is completed through the first deployment operation, the step of "storing the third security firmware in the backup partition of the first memory" will be executed.

[0052] like Figure 2 As shown, the method further includes: 205: when it is determined that the current security firmware deployment is not the first deployment, performing a second deployment operation. The second deployment operation differs at least partially from the steps included in the first deployment operation.

[0053] The second deployment operation may include the following steps: obtaining the version of the encrypted and signed first security firmware stored in the first memory; comparing the version of the first security firmware with the version of the third security firmware stored in the backup partition of the first memory; when the version of the first security firmware is equal to or lower than the version of the third security firmware, directly loading the third security firmware from the backup partition of the first memory into the second memory to complete the deployment of the security firmware; when the version of the first security firmware is higher than the version of the third security firmware, re-executing the aforementioned first deployment operation to complete the deployment of the security firmware, etc.

[0054] Obviously, in other embodiments, the second deployment operation can be the same as the first deployment operation. That is, regardless of whether the current security firmware deployment is the first deployment, when it is determined that security firmware deployment is required, the steps in the aforementioned first deployment operation are executed: sending the encrypted and signed first security firmware stored in the first memory to the security module for signature verification and decryption by the security module to obtain the second security firmware; encrypting the second security firmware to obtain the third security firmware; loading the third security firmware into the second memory to complete the deployment of the security firmware; and storing the third security firmware in the backup partition of the first memory.

[0055] Obviously, in other embodiments, when the second deployment operation is the same as the first deployment operation, the step of "determining whether the current security firmware deployment is the first deployment" can be omitted.

[0056] in, Figure 2 The security firmware deployment method shown is similar to Figure 1 Compared to the security firmware deployment method shown, Figure 2 The difference between the security firmware deployment methods shown lies in distinguishing between the initial deployment and non-initial deployment operations. Other related steps or further steps can be found in [reference needed]. Figure 1 Related descriptions.

[0057] In order to better understand the secure firmware deployment method of this application, the following describes the first deployment operation and the second deployment operation in detail, taking the difference between the second deployment operation and the first deployment operation as an example.

[0058] Please refer to the following: Figure 3 and Figure 4 , Figure 3 A schematic diagram of some internal modules of an electronic device 100 to which the secure firmware deployment method is applied in one embodiment. Figure 4 This is a flowchart illustrating the steps involved in the first deployment operation. (Example:) Figure 3As shown, the electronic device 100 includes a first memory 10, a second memory 20, and the aforementioned security module 30. The security module 30 may be an integrated chip integrating an SE or ISE module. The first memory 10 is an external memory, such as flash memory or a micro hard drive. The second memory 20 is an internal memory, such as DDR (Double Data Rate) synchronous dynamic random access memory. The second memory 20, being an internal memory, is connected between the security module 30 and the first memory 10, which is an external memory.

[0059] like Figure 4 As shown, the first deployment operation includes the following steps:

[0060] 401: The encrypted and signed first security firmware stored in the first memory 10 is sent to the security module 30 so that the second security firmware can be obtained by the security module 30 through signature verification and decryption.

[0061] Among them, such as Figure 3 As shown, the first memory 10 includes a firmware storage area 11 and a backup partition 12, wherein the firmware storage area 11 is the aforementioned specific storage area used to store the encrypted and signed first secure firmware. Figure 3 As shown by the solid arrow in the diagram, step 401 may specifically include: sending the encrypted and signed first secure firmware stored in the firmware storage area 11 of the first memory 10 to the second memory 20 for temporary storage, and then sending the first secure firmware temporarily stored in the second memory 20 to the security module 30, so that the second secure firmware can be obtained through signature verification and decryption by the security module. Figure 3 As shown, the second memory 20 includes a temporary storage area 20a, and the encrypted and signed first security firmware is specifically temporarily stored in the temporary storage area 20a of the second memory 20.

[0062] 403: The second security firmware is encrypted to obtain the third security firmware.

[0063] In some embodiments, the encryption of the second security firmware can be performed by a MED (Memory Encryption Decryption) module. The MED module can be embedded in the security module 30, or it can be a standalone module or a module embedded in other systems. As mentioned above, the encryption method used in the process of encrypting the second security firmware to obtain the third security firmware can be the same as or different from the encryption method used to obtain the first security firmware.

[0064] 405: Load the third security firmware into the second memory 20 to complete the deployment of the security firmware.

[0065] The second memory 20 further includes a running memory area 20b, such as... Figure 3 As indicated by the solid arrow, the third security firmware can specifically be loaded and stored in the runtime memory area 20b of the second memory 20. That is, loading the third security firmware into the second memory 20 as described elsewhere in this application means loading the third security firmware into the runtime memory area 20b of the second memory 20.

[0066] Please refer to the following: Figure 5 This is a flowchart illustrating the steps involved in the second deployment operation. Figure 5 As shown, the second deployment operation includes:

[0067] 501: Obtain the encrypted and signed version of the first secure firmware stored in the first memory 10. Specifically, obtain the encrypted and signed version of the first secure firmware stored in the firmware storage area 11 of the first memory 10.

[0068] 503: Compare the version of the first security firmware with the version of the third security firmware stored in the backup partition 12 of the first memory 10 to determine whether the version of the first security firmware is higher than the version of the third security firmware. If yes, proceed to step 507; if no, that is, the version of the first security firmware is equal to or lower than the version of the third security firmware, proceed to step 505.

[0069] 505: When the version of the first security firmware is equal to or lower than the version of the third security firmware, such as Figure 3 As indicated by the dashed arrow, the third security firmware in the backup partition of the first memory is directly loaded into the second memory to complete the deployment of the security firmware.

[0070] 507: When the version of the first security firmware is higher than the version of the third security firmware, the aforementioned first deployment operation is performed. Specifically, this includes: sending the encrypted and signed first security firmware stored in the first memory 10 to the security module 30 for signature verification and decryption by the security module 30 to obtain the second security firmware; encrypting the second security firmware to obtain the third security firmware; loading the third security firmware into the second memory 20 to complete the deployment of the security firmware; and storing the currently obtained third security firmware into the backup partition 12 of the first memory 10, replacing the previously stored third security firmware in the backup partition 12 of the first memory 10.

[0071] Specifically, since the third security firmware loaded into the second storage 20 is also backed up to the backup partition 12 of the first storage 10 upon completion of the first deployment operation during the initial deployment, or upon completion of each deployment, the backup partition 12 of the first storage 10 already stores the third security firmware that has been verified and decrypted by the security module 30, and further encrypted. Because the first security firmware stored in the first storage 10 is updated periodically in response to security firmware updates from electronic device manufacturers or operating system providers, the first security firmware may have been updated to a version higher than the third security firmware version backed up to the backup partition 12 of the first storage 10 during the previous deployment when security firmware deployment is required next time.

[0072] Therefore, by comparing the version of the first security firmware with the version of the third security firmware stored in the backup partition 12 of the first memory 10, when the version of the first security firmware is equal to or lower than the version of the third security firmware, it indicates that the version of the third security firmware stored in the backup partition 12 of the first memory 10 is the latest version. In this case, it is not necessary to repeat the aforementioned first deployment operation, but the third security firmware in the backup partition 12 of the first memory 10 can be directly loaded into the second memory 20 to complete the security firmware deployment, thus improving efficiency. When the version of the first security firmware is higher than the version of the third security firmware, it indicates that there is a higher version of the first security firmware. In this case, it is necessary to perform the first deployment operation again, verify and decrypt the higher version of the first security firmware, and encrypt it again to obtain the corresponding version of the third security firmware. Then, the corresponding version of the third security firmware is loaded into the second memory 20 to complete the security firmware deployment, and the corresponding version of the third security firmware is stored in the backup partition 12 of the first memory 10, replacing the original third security firmware.

[0073] Therefore, this application can not only ensure the security and tamper resistance of secure firmware deployment, but also effectively improve deployment efficiency.

[0074] In some embodiments, such as Figure 3 As shown, the firmware storage area 11 of the first memory 10 specifically includes a first firmware storage area 11a and a second firmware storage area 11b. In the initial state, that is, before or at the time of leaving the factory, the first security firmware can be pre-stored in either the first firmware storage area 11a or the second firmware storage area 11b in the first memory.

[0075] The method in any of the foregoing embodiments may further include the steps of: responding to an update or upgrade notification from an electronic device manufacturer or operating system provider, downloading a higher version of the first security firmware, and storing the higher version of the first security firmware in a target firmware storage area within the first firmware storage area 11a and the second firmware storage area 11b of the first memory. The target firmware storage area is a storage area other than the firmware storage area previously used for the deployment of the first security firmware.

[0076] For example, in the initial state, that is, before the electronic device leaves the factory, the first security firmware can be pre-stored in the first firmware storage area 11a in the first memory. When the security firmware is deployed for the first time, the first deployment operation performed obtains the first security firmware stored in the first firmware storage area 11a. Then, when responding to / receiving an update and upgrade notification from the electronic device manufacturer or the operating system provider, a higher version of the first security firmware is downloaded and stored in the second firmware storage area 11b in the first memory.

[0077] In any of the foregoing embodiments, after determining that security firmware deployment is required, the method may further include the step of: determining the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory.

[0078] In any of the foregoing embodiments, the step of "sending the encrypted and signed first security firmware stored in the first memory to the security module" may include: sending the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory to the security module. The step of "obtaining the version of the encrypted and signed first security firmware stored in the first memory" may include: obtaining the version of the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory.

[0079] In some embodiments, after storing a higher version of the first security firmware in the target firmware storage area of ​​the first firmware storage area 11a and the second firmware storage area 11b in the first memory, the method may further include the step of deleting the first security firmware stored in another firmware storage area of ​​the first firmware storage area 11a and the second firmware storage area 11b in the first memory 10, thereby saving storage space. The other firmware storage area is a firmware storage area other than the current target firmware storage area. For example, when the target firmware storage area is the first firmware storage area 11a, then the other firmware storage area is the second firmware storage area 11b; when the target firmware storage area is the second firmware storage area 11b, then the other firmware storage area is the first firmware storage area 11a.

[0080] Therefore, in some embodiments, only one of the first firmware storage areas 11a and 11b in the first memory stores the first secure firmware. Thus, in any of the foregoing embodiments, the step of "sending the encrypted and signed first secure firmware stored in the first memory to the security module" may include: sending the first secure firmware stored in the first firmware storage area 11a or the second firmware storage area 11b of the first memory to the security module. The step of "obtaining the version of the encrypted and signed first secure firmware stored in the first memory" may include: obtaining the version of the first secure firmware stored in the first firmware storage area 11a or the second firmware storage area 11b of the first memory.

[0081] In a specific example of the method in any of the foregoing embodiments, the step "encrypting the second security firmware to obtain the third security firmware" may include: encrypting the second security firmware and signing it to obtain the third security firmware. That is, the second security firmware is not only encrypted but also further signed to obtain the third security firmware.

[0082] In some embodiments, as described above, the security module 30 may be an integrated chip. In any of the foregoing embodiments, the method further includes the step of: after the deployment of the security firmware is completed, i.e., after deployment is complete, controlling the security module 30 to shut down or go into hibernation, thereby saving energy. Correspondingly, in any of the foregoing embodiments, after determining that security firmware deployment is required, the method further includes the step of: controlling the security module 30 to start, so that after receiving the encrypted and signed first security firmware, the security module 30 verifies and decrypts the first security firmware to obtain the second security firmware. Thus, the security module 30 can be controlled to start only when it is needed to participate in security management; at other times, the security module 30 can be in a shut-down or hibernation state, effectively saving energy.

[0083] In this application, the security module 30, upon startup, receives the encrypted and signed first security firmware and then verifies and decrypts it to obtain the second security firmware. The security module 30 may embed a corresponding algorithm program to execute the verification and decryption process.

[0084] In some embodiments, controlling the activation of the safety module 30 may include: energizing the safety module 30 by controlling the conduction of a switch located between the safety module 30 and a power supply (e.g., a battery), thereby powering on the safety module 30 and activating it. Alternatively, in other embodiments, the safety module 30 may remain electrically connected to the power supply, and the safety module 30 may be activated by controlling the sending of an activation command to the safety module 30, the activation command including a specific register value.

[0085] In some embodiments, controlling the safety module 30 to shut down or go into sleep mode may include: controlling a switch located between the safety module 30 and the power supply to disconnect, thereby stopping the power supply to the safety module 30 and shutting it down. Alternatively, in other embodiments, the safety module 30 may remain electrically connected to the power supply, and the safety module 30 may go into sleep mode by controlling the sending of a sleep command to the safety module 30; the sleep command may also include a specific register value.

[0086] The start command and hibernation command can be sent to the security module 30 via the kernel.

[0087] In any of the foregoing embodiments, the method may further include the step of: when the electronic device 100 is powered off, controlling the storage of the third security firmware loaded in the second memory 20 into the backup partition 12 of the first memory 10. Thus, even if the electronic device 100 suddenly shuts down due to an anomaly during a security management event such as a payment, the third security firmware can be promptly stored in the backup partition 12 of the first memory 10. After the electronic device 100 restarts, the backup partition 12 of the first memory 10 can be quickly loaded into the second memory 20, effectively ensuring the deployment efficiency of the security firmware.

[0088] The corresponding steps in the above embodiments of this application can be referred to each other, and the simplified descriptions in some embodiments can be referred to the more detailed descriptions in other embodiments.

[0089] Please see Figure 6This is a schematic diagram of a secure firmware deployment system 200 according to an embodiment of this application. The secure firmware deployment system 200 is used to deploy secure firmware in electronic devices. Figure 6 As shown, the secure firmware deployment system 200 includes a transmission control module 21, an encryption module 22, and a loading module 23.

[0090] When it is determined that secure firmware deployment is required, the transmission control module 21 sends the encrypted and signed first secure firmware stored in the first memory to the security module, so that the second secure firmware can be obtained by the security module through signature verification and decryption.

[0091] The encryption module 22 is used to encrypt the second secure firmware to obtain the third secure firmware. The encryption method used by the encryption module 22 in encrypting the second secure firmware to obtain the third secure firmware can be the same as or different from the encryption method used to obtain the first secure firmware. For example, it can be encrypted using two pairs of AES (Advanced Encryption Standard) symmetric keys, or it can be encrypted using an asymmetric key. The encryption module 22 can be a MED (Memory Encryption Decryption) module. In some embodiments, the encryption module 22 is also used to sign the second secure firmware; therefore, in some embodiments, the third secure firmware can be the secure firmware obtained after encrypting and signing the second secure firmware.

[0092] The loading module 23 is used to load the third security firmware into the second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0093] In some embodiments, such as Figure 6 As shown, the security firmware deployment system 200 also includes a backup module 24, which is used to store the third security firmware in the backup partition 12 of the first memory 10 when / after the loading module 23 loads the third security firmware into the second memory.

[0094] like Figure 6 As shown, the secure firmware deployment system 200 also includes a judgment module 25. The judgment module 25 is used to determine whether the current secure firmware deployment is the first deployment.

[0095] In some embodiments, when the transmission control module 21 determines that secure firmware deployment is required and the judgment module 25 determines that the current secure firmware deployment is the first deployment, it sends the encrypted and signed first secure firmware stored in the first memory to the security module, so that the security module can verify the signature and decrypt it to obtain the second secure firmware. Correspondingly, the encryption module 22 then encrypts the second secure firmware to obtain the third secure firmware, and the loading module 23 loads the third secure firmware into the second memory to complete the deployment of the secure firmware.

[0096] In some embodiments, such as Figure 6 As shown, the secure firmware deployment system 200 further includes a version comparison module 26. The version comparison module 26 is used to obtain the version of the encrypted and signed first secure firmware stored in the first memory when it is determined that secure firmware deployment needs to be performed and the judgment module 25 determines that the current secure firmware deployment is not the first deployment, and compare the version of the first secure firmware with the version of the third secure firmware stored in the backup partition of the first memory.

[0097] The loading module 23 is further configured to, when the version comparison module 26 determines that the version of the first security firmware is equal to or lower than the version of the third security firmware, directly load the third security firmware from the backup partition of the first memory into the second memory to complete the deployment of the security firmware.

[0098] The transmission control module 21 is further configured to, when the version comparison module 26 determines that the version of the first security firmware is higher than the version of the third security firmware, send the encrypted and signed first security firmware stored in the first memory to the security module, so that the security module can verify the signature and decrypt it to obtain the second security firmware. Correspondingly, the encryption module 22 then encrypts the second security firmware to obtain the third security firmware, and the loading module 23 loads the third security firmware into the second memory to complete the deployment of the security firmware.

[0099] The determination module 25 can determine whether this is the first deployment by querying whether security firmware is stored in the backup partition 12 of the first memory 10. Specifically, if no security firmware is found in the backup partition 12 of the first memory 10, it is determined that this is the first deployment; if security firmware is found in the backup partition 12 of the first memory 10, it is determined that this is not the first deployment. In other embodiments, the determination module 25 can also determine whether this is the first deployment by judging whether the electronic device 100 is powered on for the first time.

[0100] In some embodiments, such as Figure 6 As shown, the security firmware deployment system 200 also includes a download module 27, which is used to download a higher version of the first security firmware in response to update and upgrade notifications from electronic device manufacturers or operating system providers, and store the higher version of the first security firmware in the first memory.

[0101] The electronic device may be the aforementioned electronic device 100. For example, Figure 3 As shown, the first memory may include a first firmware storage area 11a and a second firmware storage area 11b.

[0102] The download module 27 is specifically used to respond to update and upgrade notifications from electronic device manufacturers or operating system providers, download a higher version of the first security firmware, and store the higher version of the first security firmware in the target firmware storage area within the first firmware storage area 11a and the second firmware storage area 11b of the first memory 10. The target firmware storage area is a storage area other than the firmware storage area used for the first security firmware deployment.

[0103] For example, in the initial state, that is, before the electronic device leaves the factory, the first security firmware can be pre-stored in the first firmware storage area 11a in the first memory 10. When the security firmware is deployed for the first time, the transmission control module 21 obtains the first security firmware stored in the first firmware storage area 11a. Then, when the download module 27 responds to / receives an update and upgrade notification from the electronic device manufacturer or the operating system provider, it downloads a higher version of the first security firmware and stores the higher version of the first security firmware in the second firmware storage area 11b in the first memory 10.

[0104] In some embodiments, the secure firmware deployment system 200 further includes a determining module 28, which determines whether secure firmware deployment is currently required. In some embodiments, the determining module 28 determines that secure firmware deployment is required when the electronic device is powered on. The aforementioned modules all perform corresponding functions when the determining module 28 determines that secure firmware deployment is required. In some embodiments, the determining module 28 may generate a trigger signal to a corresponding module when the electronic device is powered on, causing the corresponding module to perform a corresponding function, for example, generating a trigger signal to the transmission control module 21, causing the transmission control module 21 to perform a corresponding function.

[0105] In some embodiments, the determining module 28 is further configured to determine the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory 10. Specifically, the transmission control module 21 sending the encrypted and signed first security firmware stored in the first memory 10 to the security module may include: sending the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory 10 to the security module. The version comparison module 26 obtaining the version of the encrypted and signed first security firmware stored in the first memory 10 may include: obtaining the version of the highest version of the first security firmware stored in the first firmware storage area 11a and the second firmware storage area 11b of the first memory 10.

[0106] In some embodiments, after storing a higher version of the first security firmware in the target firmware storage area of ​​the first firmware storage area 11a and the second firmware storage area 11b in the first memory 10, the download module 27 also deletes the security firmware stored in another firmware storage area of ​​the first firmware storage area 11a and the second firmware storage area 11b in the first memory 10, thereby saving storage space and facilitating the quick storage of the downloaded updated version of the first security firmware in another firmware storage area during the next security firmware update.

[0107] Therefore, in some embodiments, only one firmware storage area (11a) or the second firmware storage area (11b) in the first memory stores the first secure firmware. Thus, the transmission control module 21 sending the encrypted and signed first secure firmware stored in the first memory 10 to the security module may include sending the first secure firmware stored in either the first firmware storage area 11a or the second firmware storage area 11b of the first memory 10 to the security module. The version comparison module 26 obtaining the version of the encrypted and signed first secure firmware stored in the first memory 10 may include obtaining the version of the first secure firmware stored in either the first firmware storage area 11a or the second firmware storage area 11b of the first memory 10.

[0108] In some embodiments, the judgment module 25 and the version comparison module 26 may also be omitted. Regardless of whether the current security firmware deployment is the first deployment, when it is determined that security firmware deployment is required, the transmission control module 21 sends the encrypted and signed first security firmware stored in the first memory 10 to the security module 30, so that the security module 30 can verify the signature and decrypt it to obtain the second security firmware. The encryption module 22 encrypts the second security firmware to obtain the third security firmware, and the loading module 23 loads the third security firmware into the second memory 20 to complete the deployment of the security firmware.

[0109] In some embodiments, the security module 30 may be an integrated chip. The security firmware deployment system 200 may further include a startup control module (not shown), which controls the security module 30 to shut down or go into hibernation after the security firmware deployment is completed, thereby saving energy. Correspondingly, the startup control module is also used to control the security module 30 to start after determining that security firmware deployment is required, so that after receiving the encrypted and signed first security firmware, the security module 30 verifies and decrypts the first security firmware to obtain the second security firmware. Thus, the security module 30 can be started only when it is needed to participate in security management; at other times, the security module 30 can be in a shut-down or hibernation state, effectively saving energy.

[0110] In some embodiments, the backup module 24 is further configured to control the storage of the third security firmware loaded in the second memory 20 to the backup partition 12 of the first memory 10 when the electronic device 100 is powered off. Thus, even if the electronic device 100 suddenly shuts down due to an anomaly during a security management event such as a payment, the third security firmware can be promptly stored in the backup partition 12 of the first memory 10. After the electronic device 100 restarts, the backup partition 12 of the first memory 10 can be quickly loaded into the second memory 20, effectively ensuring the deployment efficiency of the security firmware.

[0111] The secure firmware deployment system 200 may be an application installed in the electronic device, and each module in the secure firmware deployment system 200 may be a program module in the application. In some embodiments, at least some of the modules in the secure firmware deployment system 200 may be program modules embedded in different hardware of the electronic device 100. For example, the encryption module 22 may also be an encryption program embedded in the security module 30.

[0112] The functions performed by the secure firmware deployment system 200 are the same as those described above. Figures 1-5 The methods and steps are the same as those in the previous section. More specific details can be found by referring to each other, and will not be repeated here.

[0113] Please see Figure 7 This is a more specific internal module diagram of an electronic device 100 according to an embodiment of this application. Figure 7 As shown, the electronic device 100 includes the aforementioned first memory 10, second memory 20, and security module 30, and also includes the aforementioned secure firmware deployment system 200. The secure firmware deployment system 200 can be connected to the security module 30 via the kernel 300. The secure firmware deployment system 200 can also be connected to the first memory 10 and the second memory 20 via the kernel 300, and control the sending of corresponding instructions from the kernel 300 to the security module 30 to send the encrypted and signed first secure firmware from the first memory 10, to load the third secure firmware into the second memory 20, and to store the third secure firmware in the backup partition 12 of the first memory 10, etc.

[0114] For example, in some embodiments, such as Figure 7 As shown, the electronic device 100 may further include a power supply 40, which may be a battery. The security module 30 and the power supply 40 may maintain a constant electrical connection. The startup control module may send an enable command to the security module 30 via the kernel 300 to start the security module 30. The enable command may include a specific register value. The startup control module may also send a sleep command to the security module 30 to put the security module into sleep mode. The sleep command may also include a specific register value.

[0115] Please see Figure 8 This is a more specific internal module diagram of an electronic device 100 in another embodiment of this application.

[0116] In other embodiments, such as Figure 8As shown, the electronic device 100 may further include a switch 50 connected between the power supply 40 and the safety module 30. The startup control module can control the switch 50 located between the safety module 30 and the power supply 40 to turn on, thereby supplying power to the safety module 30 and enabling it to power on and start. Conversely, it can control the switch 50 located between the safety module 30 and the power supply 40 to turn off, thereby stopping the power supply to the safety module 30 and shutting it down. The switch 50 may be a digitally controlled switch, such as a MOSFET, transistor, or other similar device. The startup control module can send corresponding logic level signals to the switch 50 to control its on or off state.

[0117] Please see Figure 9 This is a schematic diagram of another part of the modules of the electronic device 100 in some embodiments of this application. Figure 9 As shown, the electronic device 100 may include a processor 70 and a memory 80. The memory 80 stores a program that is invoked by the processor 70 to execute the steps of the method in any of the foregoing embodiments.

[0118] For example, the program is used to perform the following steps after being invoked by the processor 70:

[0119] When it is determined that secure firmware deployment is required, the encrypted and signed first secure firmware stored in the first memory is sent to the security module, so that the second secure firmware can be obtained by the security module through signature verification and decryption.

[0120] The second security firmware is encrypted to obtain the third security firmware; and

[0121] The third security firmware is loaded into the second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory.

[0122] For details of the other method steps that the program is used to execute after being called by the processor 70, please refer to the foregoing. Figures 1-5 The relevant descriptions will not be repeated here.

[0123] The processor 70 may be a central processing unit, a microcontroller, a digital signal processor, etc. The memory 80 may be the aforementioned first memory 10 and / or second memory 20, or may be a memory other than the aforementioned first memory 10 and second memory 20.

[0124] The electronic device 100 may include handheld devices such as mobile phones and tablets, as well as in-vehicle devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of user equipment (UE), mobile station (MS), terminal device, etc.

[0125] This application also provides a computer-readable storage medium storing a program for electronic data interchange that causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes the aforementioned electronic device. The computer-readable storage medium may be the aforementioned first memory 10, or other storage media such as an optical disc, USB flash drive, flash memory card, etc.

[0126] Therefore, according to the secure firmware deployment method, system, and electronic device provided in this application, the second secure firmware is obtained by performing dual verification of the first secure firmware through signature verification and decryption by the security module, which improves the security of the secure firmware. In addition, the second secure firmware is further encrypted to obtain the third secure firmware. Thus, the secure firmware loaded in the second memory for subsequent operation is the encrypted secure firmware, which can effectively ensure that the secure firmware loaded in the second memory is not tampered with, and guarantee the integrity, security, and tamper resistance of the secure firmware.

[0127] The above embodiments mainly describe the solutions of the embodiments of this application from the perspective of the method execution process in conjunction with the hardware framework. It is understood that, in order to achieve the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0128] This application embodiment can divide an electronic device into functional units according to the method example described above. For example, each function can be divided into its own functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0129] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0130] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0131] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0132] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0133] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0135] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0136] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0137] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for deploying secure firmware, characterized in that, The method is used for deploying secure firmware in an electronic device; the method includes: When it is determined that secure firmware deployment is required, the encrypted and signed first secure firmware stored in the first memory is sent to the security module, so that the second secure firmware can be obtained by the security module through signature verification and decryption. The second security firmware is encrypted to obtain the third security firmware; and The third security firmware is loaded into the second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory; The method further includes, prior to sending the encrypted and signed first security firmware stored in the first memory to the security module for signature verification and decryption to obtain the second security firmware, the method includes: Determine whether the current security firmware deployment is the first deployment; The step of sending the encrypted and signed first security firmware stored in the first memory to the security module for signature verification and decryption to obtain the second security firmware includes: When the current security firmware deployment is the first deployment, the encrypted and signed first security firmware stored in the first memory is sent to the security module so that the security module can verify the signature and decrypt it to obtain the second security firmware. The method further includes: When the current security firmware deployment is not the first deployment, obtain the version of the first security firmware that is encrypted and signed and stored in the first memory; The version of the first security firmware is compared with the version of the third security firmware stored in the backup partition of the first memory; When the version of the first security firmware is equal to or lower than the version of the third security firmware, the third security firmware in the backup partition of the first memory is directly loaded into the second memory to complete the deployment of the security firmware.

2. The method according to claim 1, characterized in that, The method further includes: The third security firmware is stored in the backup partition of the first memory.

3. The method according to claim 2, characterized in that, After comparing the version of the first security firmware with the version of the third security firmware stored in the backup partition of the first memory, the method further includes: When the version of the first security firmware is higher than the version of the third security firmware, the encrypted and signed first security firmware stored in the first memory is sent to the security module for verification and decryption by the security module to obtain the second security firmware; the second security firmware is encrypted to obtain the third security firmware; the third security firmware is loaded into the second memory to complete the deployment of the security firmware; and the currently obtained third security firmware is stored in the backup partition of the first memory, replacing the previously stored third security firmware in the backup partition of the first memory.

4. The method according to any one of claims 1-3, characterized in that, The determination that security firmware deployment is required includes: When the electronic device is powered on, it is determined that security firmware deployment is required.

5. A secure firmware deployment system, characterized in that, The system includes: The transmission control module is used to send the encrypted and signed first secure firmware stored in the first memory to the security module when it is determined that secure firmware deployment is required, so that the second secure firmware can be obtained by the security module through signature verification and decryption. An encryption module is used to encrypt the second security firmware to obtain the third security firmware; A loading module is used to load the third security firmware into a second memory to complete the deployment of the security firmware, wherein the second memory is an internal memory and the first memory is an external memory; The judgment module is used to determine whether the current security firmware deployment is the first deployment; and A version comparison module is configured to, when the determination module determines that the current security firmware deployment is not the first deployment, obtain the version of the encrypted and signed first security firmware stored in the first memory; and compare the version of the first security firmware with the version of the third security firmware stored in the backup partition of the first memory. The loading module is also used to load the third security firmware in the backup partition of the first memory into the second memory when the version comparison module determines that the version of the first security firmware is equal to or lower than the version of the third security firmware, so as to complete the deployment of the security firmware. Specifically, when the judgment module determines that the current security firmware deployment is the first deployment, the transmission control module sends the encrypted and signed first security firmware stored in the first memory to the security module so that the security module can verify the signature and decrypt it to obtain the second security firmware.

6. The system according to claim 5, characterized in that, The system also includes: A backup module is used to store the third security firmware in the backup partition of the first memory.

7. The system according to claim 6, characterized in that, The transmission control module is further configured to, when the version comparison module determines that the version of the first security firmware is higher than the version of the third security firmware, send the encrypted and signed first security firmware stored in the first memory to the security module, so that the security module can verify the signature and decrypt it to obtain the second security firmware; the encryption module correspondingly encrypts the second security firmware to obtain the third security firmware; and the loading module correspondingly loads the third security firmware into the second memory to complete the deployment of the security firmware. The backup module accordingly stores the currently obtained third security firmware into the backup partition of the first memory, and replaces the previously stored third security firmware in the backup partition of the first memory.

8. The system according to any one of claims 5-7, characterized in that, The secure firmware deployment system is applied to an electronic device. The system also includes a determination module, which determines whether secure firmware deployment is required when the electronic device is powered on.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a program for the processor to execute the method as described in any one of claims 1-4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when invoked by a processor, executes the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Chip security boot method and device, security chip and computer equipment

    CN112733208A