Firmware security deployment method, device, equipment, medium and program product
By using a security chip to verify signatures and encrypt firmware, the problem of data leakage caused by security vulnerabilities in firmware is solved, and security and reliability are achieved during firmware deployment.
Patent Information
- Application Number
- CN202411788033.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The firmware contains a potential security vulnerability that could lead to the leakage of sensitive data during information transmission, triggering spoofing attacks and service interruptions.
Firmware verification and encryption are performed using a security chip. After receiving the firmware deployment instruction, the firmware file is decrypted and re-encrypted based on the manufacturer's certificate and encryption key to ensure the security and reliability of the firmware deployment process.
It improves the security and reliability of the firmware deployment process, prevents data leakage, and enhances device security.
Smart Images

Figure CN119718352B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a firmware security deployment method, device, equipment, medium and program product. BACKGROUND
[0002] At present, the running of a terminal depends on multiple firmwares, which are responsible for controlling device hardware and providing core functions. However, the firmwares tend to hide potential security vulnerabilities, which may cause the device to leak sensitive data in the information transmission process, thereby causing a forgery attack and service interruption. Therefore, how to realize the security deployment of the firmware is a technical problem to be solved. SUMMARY
[0003] In order to solve the above technical problems, the present disclosure provides a firmware security deployment method, device, equipment, medium and program product.
[0004] A first aspect of an embodiment of the present disclosure provides a firmware security deployment method applied to a security chip, comprising:
[0005] receiving a firmware deployment instruction sent by a firmware chip, wherein the firmware deployment instruction comprises an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first vendor identification information corresponding to the to-be-deployed firmware;
[0006] obtaining a first firmware vendor certificate corresponding to the to-be-deployed firmware based on the first vendor identification information, and performing firmware signature verification on the to-be-deployed firmware based on the first firmware vendor certificate;
[0007] after the firmware signature verification passes, obtaining a firmware encryption key based on the firmware encryption key index, and performing decryption processing on the encrypted firmware file according to the firmware encryption key to obtain a decrypted firmware file;
[0008] performing re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, and sending the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
[0009] A second aspect of an embodiment of the present disclosure provides a firmware security deployment device suitable for a security chip, comprising:
[0010] a firmware deployment instruction receiving module configured to receive a firmware deployment instruction sent by a firmware chip, wherein the firmware deployment instruction comprises an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first vendor identification information corresponding to the to-be-deployed firmware;
[0011] a firmware signature verification module configured to obtain a first firmware vendor certificate corresponding to the to-be-deployed firmware based on the first vendor identification information, and perform firmware signature verification on the to-be-deployed firmware based on the first firmware vendor certificate;
[0012] a firmware processing module, configured to, after the firmware signature verification passes, acquire the firmware encryption key based on the firmware encryption key index, and perform decryption processing on the encrypted firmware file according to the firmware encryption key to obtain a decrypted firmware file;
[0013] a firmware deployment module, configured to perform re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, and send the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
[0014] A third aspect of the embodiments of the present disclosure provides an electronic device, comprising:
[0015] a processor;
[0016] a memory configured to store executable instructions;
[0017] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the firmware security deployment method provided in the first aspect.
[0018] A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the firmware security deployment method provided in the first aspect.
[0019] A fifth aspect of the embodiments of the present disclosure provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the firmware security deployment method of the first aspect is implemented.
[0020] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0021] The firmware security deployment method, device, equipment, medium and program product provided by the embodiments of the present disclosure can receive a firmware deployment instruction sent by a firmware chip, wherein the firmware deployment instruction comprises an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first vendor identification information corresponding to the to-be-deployed firmware; after receiving the firmware deployment instruction, the firmware deployment instruction is parsed to obtain the first vendor identification information, and then a first firmware vendor certificate corresponding to the to-be-deployed firmware is obtained based on the first vendor identification information, and the to-be-deployed firmware is subjected to firmware signature verification based on the first firmware vendor certificate; after the firmware signature verification passes, a firmware encryption key is obtained based on the firmware encryption key index, and the encrypted firmware file is decrypted based on the firmware encryption key to obtain a decrypted firmware file; the decrypted firmware file is subjected to re-encryption processing to obtain a re-encrypted firmware file, and the re-encrypted firmware file is sent to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file. Therefore, the firmware can be subjected to signature verification through the first firmware vendor certificate, and the decryption of the firmware file is performed after the signature verification passes. Moreover, when the secure chip sends the firmware file to the firmware chip, the decrypted firmware file is continuously encrypted and then transmitted. That is, the secure chip is introduced to perform the firmware signature verification in the firmware deployment process, and the encrypted transmission is performed based on the passed firmware signature verification, so as to ensure the security and reliability of the firmware file and data in the firmware deployment process, and thus the security of the firmware deployment is improved. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, brief introductions will be given to the drawings needed to be used in the embodiments or prior art descriptions. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.
[0024] Figure 1 is a flowchart of a firmware security deployment method provided by an embodiment of the present disclosure;
[0025] Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0026] Figure 3 is a flowchart of another firmware security deployment method provided by an embodiment of the present disclosure;
[0027] Figure 4 is a flowchart of a firmware data security destruction method provided by an embodiment of the present disclosure;
[0028] Figure 5 is a structural schematic diagram of a firmware security deployment device provided by an embodiment of the present disclosure.
[0029] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0031] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.
[0032] It should be understood that each of the steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] It should be noted that, in this document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between or among the entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0034] It should be noted that the modification of "one" or "multiple" mentioned in the present disclosure is illustrative rather than limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0035] Generally, firmware tends to hide potential security vulnerabilities, which can cause the device to leak sensitive data during information transmission, thereby triggering a counterfeit attack and causing service interruption. Therefore, how to implement secure deployment of firmware is a technical problem to be solved. In view of this problem, the embodiment of the present disclosure provides a firmware secure deployment method, which will be introduced below in combination with specific embodiments.
[0036] Figure 1 is a flowchart of a firmware secure deployment method provided by the embodiment of the present disclosure. The method can be executed by a firmware secure deployment device, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a server or a terminal. The terminal specifically includes a mobile phone, a computer, a tablet computer, and the like. In addition, the method can be applied to the application scenario shown in the figure, which includes a firmware management system 10 and a terminal device 20. The firmware management system 10 and the terminal device 20 can communicate with each other. It can be understood that the firmware secure deployment method provided by the embodiment of the present disclosure can also be applied in other scenarios. Figure 2
[0037] As shown in the figure, the firmware management system 10 can be understood as a server that interacts with the terminal device 20, which can be used to manage firmware to ensure the normal operation of the terminal device 20; can also be used to generate a firmware manufacturer certificate based on a private key, and send the firmware manufacturer certificate to a firmware production manufacturer, so that the firmware production manufacturer certificate is preinstalled in the secure chip 22; can also be used to perform hash calculation on the firmware file based on a preset hash algorithm, generate a hash value, and determine the hash value as a firmware index corresponding to the firmware file; and can also be used to generate an encryption key index corresponding to the firmware file based on a preset random function, and the like. Figure 2
[0038] The terminal device 20 includes a software development kit 21, a secure chip 22, a firmware chip 23, and a Flash memory 24.
[0039] The software development kit 21 can be used to create, test, deploy, and manage software applications.
[0040] The secure chip 22 can be used to verify the signature of the firmware based on the firmware manufacturer certificate, to ensure the trust relationship between the firmware management system 10 and the firmware chip 23, and to authenticate during the interaction with the firmware chip 23, to further ensure the security of the firmware deployment.
[0041] The firmware chip 23 is a hardware device for storing firmware, which is used for deployment of firmware, and specifically can include installation of firmware and upgrading of firmware, etc.
[0042] The flash memory 24 is configured to store a firmware file, and specifically, the firmware file can include a firmware file that is encrypted and signed; and the flash memory 24 is also configured to store data related to the firmware.
[0043] Specifically, the firmware management system 10 can send a firmware deployment instruction and / or a data destruction instruction to the firmware chip 23, the firmware chip 23 sends the firmware deployment instruction and / or the data destruction instruction to the secure chip 22 after receiving the firmware deployment instruction and / or the data destruction instruction, the secure chip 22 verifies the firmware corresponding to the firmware deployment instruction and / or the data destruction instruction, and then performs authentication with the firmware chip 23 after the verification is passed, and performs an operation related to the firmware deployment instruction and / or the data destruction instruction after the authentication is passed.
[0044] The firmware secure deployment method provided in the embodiments of the present application will be described below in combination with the application scenarios shown in Figure 2 The firmware secure deployment method provided in the embodiments of the present application will be described below in combination with the application scenarios shown in Figure 1 The firmware secure deployment method provided in the embodiments of the present application will be described below in combination with the application scenarios shown in Figure 2 The secure chip 22 in the electronic device 100 shown in Figure 1 The firmware secure deployment method provided in the embodiments of the present application will be described below in combination with the application scenarios shown in
[0045] S110, receiving a firmware deployment instruction sent by a firmware chip, the firmware deployment instruction including an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first manufacturer identification information corresponding to the to-be-deployed firmware.
[0046] In the embodiments of the present application, the firmware deployment instruction can be a firmware installation instruction for installing firmware and a firmware upgrade instruction for upgrading firmware. The firmware deployment instruction can be an instruction sent by a firmware management system to a firmware chip when it is determined that firmware deployment is needed, and the firmware chip sends the firmware deployment instruction to a secure chip after receiving the firmware deployment instruction.
[0047] The to-be-deployed firmware can be firmware to be installed or firmware to be upgraded.
[0048] The firmware file is a carrier for storing a firmware program.
[0049] The firmware encryption key index is an index for searching and managing an encryption key corresponding to the to-be-deployed firmware. The firmware encryption key index is determined by a firmware management system corresponding to the firmware chip based on a preset random function. Specifically, the firmware management system determines a set of encryption keys for encrypting and decrypting the firmware file of the to-be-deployed firmware corresponding to the firmware deployment instruction from a plurality of sets of encryption keys pre-set based on the preset random function, and determines an index corresponding thereto as the firmware encryption key index.
[0050] The first manufacturer identification information can be an ID of a manufacturer or a unique identification of a manufacturer.
[0051] Specifically, the security chip can receive the firmware deployment instruction sent by the firmware chip in real time.
[0052] S120, based on the first manufacturer identification information, obtaining a first firmware manufacturer certificate corresponding to the to-be-deployed firmware, and performing firmware signature verification on the to-be-deployed firmware based on the first firmware manufacturer certificate.
[0053] In the embodiments of the present disclosure, the first firmware manufacturer certificate can be generated by the firmware management system based on a private key provided by the firmware manufacturer and pre-stored in the security chip.
[0054] Specifically, after receiving the firmware deployment instruction, the security chip parses the firmware deployment instruction, obtains the first manufacturer identification information corresponding to the to-be-deployed firmware in the firmware deployment instruction, obtains the first firmware manufacturer certificate based on the first manufacturer identification information, obtains the public key corresponding to the first firmware manufacturer certificate after obtaining the first firmware manufacturer certificate, and performs firmware signature verification on the to-be-deployed firmware based on the public key, so as to determine whether the to-be-deployed firmware is of the manufacturer. The process of performing firmware signature verification is similar to the specific implementation of the existing signature verification process, which will not be repeated here.
[0055] S130, after the firmware signature verification passes, obtaining the firmware encryption key based on the firmware encryption key index, and performing decryption processing on the encrypted firmware file according to the firmware encryption key to obtain the decrypted firmware file.
[0056] Specifically, after determining that the firmware signature verification passes, the security chip obtains the firmware encryption index from the firmware deployment instruction, obtains the firmware encryption key according to the firmware encryption index, and then performs decryption processing on the encrypted firmware file in the firmware deployment instruction according to the firmware encryption key to obtain the decrypted firmware file, so as to ensure the security and reliability of the firmware file by performing encryption and decryption on the encrypted firmware file.
[0057] S140, performing re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, sending the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
[0058] In the embodiments of the present disclosure, the firmware deployment operation can include a first installation operation of the firmware, or can include an upgrade operation on the installed firmware.
[0059] Specifically, after obtaining the decrypted firmware file, the security chip performs re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, sends the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
[0060] In the embodiments of the present disclosure, the firmware chip can send a firmware deployment instruction, wherein the firmware deployment instruction includes an encrypted firmware file corresponding to the firmware to be deployed, a firmware encryption key index, and first vendor identification information corresponding to the firmware to be deployed. After receiving the firmware deployment instruction, the firmware deployment instruction is parsed to obtain the first vendor identification information, and then a first firmware vendor certificate corresponding to the firmware to be deployed is obtained based on the first vendor identification information, and the firmware to be deployed is verified based on the first firmware vendor certificate. After the firmware verification passes, the firmware encryption key is obtained based on the firmware encryption key index, and the encrypted firmware file is decrypted based on the firmware encryption key to obtain a decrypted firmware file. The decrypted firmware file is re-encrypted to obtain a re-encrypted firmware file, and the re-encrypted firmware file is sent to the firmware chip to enable the firmware chip to perform a firmware deployment operation based on the re-encrypted firmware file. In this way, the firmware can be verified by the first firmware vendor certificate, and the decryption of the firmware file is performed after the verification passes. When the secure chip sends the firmware file to the firmware chip, the decrypted firmware file is continuously encrypted and transmitted. That is, the secure chip is introduced to verify the firmware during the firmware deployment process, and the firmware is transmitted in an encrypted manner after the verification passes, thereby ensuring the security and reliability of the firmware file and data during the firmware deployment process, and improving the security of the firmware deployment.
[0061] In the embodiments of the present disclosure, the firmware deployment instruction further includes a firmware index, which is used for the terminal device to search and manage the firmware to be deployed.
[0062] The firmware index is determined based on a hash value of the firmware file corresponding to the firmware to be deployed, which is obtained by a firmware management system corresponding to the firmware chip based on a preset hash algorithm.
[0063] Specifically, after obtaining the firmware file corresponding to the firmware to be deployed, the firmware management system performs hash processing on the firmware file based on a preset hash algorithm to obtain a hash value, and determines the hash value as the firmware index for uniquely identifying the firmware file.
[0064] In some embodiments of the present disclosure, the secure chip can parse the firmware deployment instruction after obtaining the firmware deployment instruction, obtain the firmware index, and perform hash processing on the decrypted firmware file based on a preset hash algorithm after obtaining the decrypted firmware file to obtain a target hash value. The target hash value and the firmware index are compared to determine the integrity of the firmware file.
[0065] In the embodiment of the present disclosure, the management efficiency of the terminal device for the firmware can be improved by attaching the firmware index in the firmware deployment instruction, and meanwhile, the security chip can further verify the integrity of the firmware file, thereby improving the security of the firmware upgrade.
[0066] In the embodiment of the present disclosure, the session authentication is performed before the security chip receives the firmware deployment instruction sent by the firmware chip, so as to further improve the security of data transmission.
[0067] Figure 3 FIG. 3 is a flowchart of another firmware security deployment method provided by the embodiment of the present disclosure, as shown in the figure, the firmware security deployment method can specifically include the following steps: Figure 3
[0068] S310, receiving an authentication session request sent by the firmware chip, the authentication session request including a first encrypted random number obtained by encrypting a first random number by the firmware chip based on an authentication session key.
[0069] In the embodiment of the present disclosure, the authentication session key is pre-stored in the security chip, which is used for authentication between the security chip and the firmware chip.
[0070] Specifically, before sending the firmware deployment instruction to the security chip, the firmware chip encrypts the first random number based on the authentication session key to obtain the first encrypted random number, generates the authentication session request based on the first encrypted random number, and sends the authentication session request to the security chip, and the security chip can receive the authentication session request sent by the firmware chip in real time.
[0071] S320, decrypting the first encrypted random number based on the authentication session key to obtain a second random number, and returning the second random number to the firmware chip, so that the firmware chip determines whether the authentication is successful based on the first random number and the second random number, and sends the firmware deployment instruction to the security chip after determining that the authentication is successful.
[0072] Specifically, after receiving the authentication session request, the security chip parses the authentication session request to obtain the first encrypted random number, and then decrypts the first encrypted random number based on the pre-stored authentication session key to obtain the second random number, and sends the second random number to the firmware chip, so that the firmware chip determines whether the authentication is successful based on the first random number and the second random number, and sends the firmware deployment instruction to the security chip after determining that the authentication is successful, and does not send the firmware deployment instruction to the security chip in the case of authentication failure.
[0073] S330, receiving the firmware deployment instruction sent by the firmware chip, the firmware deployment instruction including the encrypted firmware file corresponding to the to-be-deployed firmware, the firmware encryption key index, and the first vendor identification information corresponding to the to-be-deployed firmware.
[0074] S340, obtain the first firmware manufacturer certificate corresponding to the to-be-deployed firmware based on the first manufacturer identification information, and perform firmware signature verification on the to-be-deployed firmware based on the first firmware manufacturer certificate.
[0075] S350, after the firmware signature verification passes, obtain the firmware encryption key based on the firmware encryption key index, and perform decryption processing on the encrypted firmware file according to the firmware encryption key to obtain the decrypted firmware file.
[0076] It should be noted that the specific implementation of steps S330-S350 is similar to that of steps S110-S130 in the above-mentioned embodiments of the present disclosure, and will not be repeated here.
[0077] S360, re-encrypt the decrypted firmware file to obtain a re-encrypted firmware file, and send the re-encrypted firmware file to the firmware chip to enable the firmware chip to perform a firmware deployment operation based on the re-encrypted firmware file.
[0078] In the embodiments of the present disclosure, the decrypted firmware file is re-encrypted to obtain a re-encrypted firmware file, which can specifically include: re-encrypting the decrypted firmware file based on a target session key to obtain a re-encrypted firmware file.
[0079] The target session key is generated by negotiation between the secure chip and the firmware chip in the authentication process. The specific target session key negotiation generation process is similar to the existing session key generation process in the authentication process, and will not be repeated here.
[0080] Specifically, after obtaining the decrypted firmware file, the secure chip re-encrypts the decrypted firmware file based on the target session key generated by negotiation in the authentication process to obtain a re-encrypted firmware file, and sends the re-encrypted firmware file to the firmware chip. After receiving the re-encrypted firmware file, the firmware chip decrypts the re-encrypted firmware file based on the target session key and performs a firmware deployment operation to complete the deployment of the firmware.
[0081] In the embodiments of the present disclosure, the firmware chip can be authenticated before receiving the firmware deployment instruction sent by the firmware chip, a secure channel is established after authentication, and then the transmission and interaction of the firmware deployment instruction, the firmware file and related data are performed, further improving the security of the firmware deployment.
[0082] In the embodiments of the present disclosure, after the firmware chip performs the firmware deployment operation based on the re-encrypted firmware file, the terminal device or the firmware management system will make the firmware chip and / or the secure chip perform data security destruction of the firmware in response to the satisfaction of a preset condition by sending a destruction instruction to the firmware chip, so as to further ensure the security of the firmware. The preset condition can be a user's click operation on a data destruction button, reaching a preset time interval, and the like.
[0083] Figure 4 FIG. 1 is a flowchart of a firmware data security destruction method provided by an embodiment of the present disclosure. As shown in FIG. 1, the firmware data security destruction method can specifically include the following steps: Figure 4
[0084] S410, receiving a target authentication session request sent by the firmware chip, the target authentication session request including a third encrypted random number obtained by encrypting a third random number by the firmware chip based on an authentication session key.
[0085] S420, decrypting the third encrypted random number based on the authentication session key to obtain a fourth random number, and returning the fourth random number to the firmware chip, so that the firmware chip determines whether the authentication is successful based on the third random number and the fourth random number, and sends a data destruction instruction to the secure chip after determining that the authentication is successful.
[0086] Specifically, when the firmware management system or the terminal device determines that the data security destruction of the firmware needs to be performed, the firmware management system or the terminal device sends a data destruction instruction to the firmware chip. Before sending the data destruction instruction to the secure chip, the firmware chip sends a target authentication session request to the secure chip to perform authentication, so as to ensure the reliability between the firmware chip and the secure chip.
[0087] It should be noted that steps S410-S420 are similar to the specific implementation of the authentication between the firmware chip before receiving the firmware deployment instruction sent by the firmware chip in the above-mentioned embodiments of the present disclosure, and will not be described here.
[0088] S430, receiving a data destruction instruction sent by the firmware chip, the data destruction instruction including a target firmware index corresponding to the data to be destroyed, second vendor identification information corresponding to the data to be destroyed, and command identification information.
[0089] In the embodiments of the present disclosure, the target firmware index can be understood as the index of the firmware corresponding to the data to be destroyed, that is, which firmware related data is determined to be destroyed.
[0090] The second vendor identification information can be understood as the unique identification information of the vendor corresponding to the firmware corresponding to the data to be destroyed, such as a vendor ID.
[0091] The command identification information is used to determine whether to agree to execute the data destruction instruction, and the data destruction can be executed when the command identification information is agreed.
[0092] Specifically, when the authentication succeeds, the secure chip receives the data destruction instruction sent by the firmware chip in real time.
[0093] S440, obtaining a second firmware manufacturer certificate based on the second manufacturer identification information, and performing firmware signature verification based on the second firmware manufacturer certificate.
[0094] It should be noted that the specific implementation of performing firmware signature verification in step S440 is similar to the specific implementation of obtaining a first firmware manufacturer certificate corresponding to the to-be-deployed firmware based on the first manufacturer identification information, and performing firmware signature verification on the to-be-deployed firmware based on the first manufacturer identification information in the above-mentioned embodiments of the present disclosure, and will not be described here.
[0095] S450, determining the target firmware corresponding to the data destruction instruction based on the target firmware index after the firmware signature verification passes, and determining the to-be-destroyed data according to the target firmware.
[0096] Specifically, the secure chip determines the target firmware corresponding to the data destruction instruction according to the target firmware index after determining that the firmware signature verification passes, and determines the related data corresponding to the target firmware as the to-be-destroyed data.
[0097] S460, performing a destruction operation on the to-be-destroyed data based on the command identification information, and the to-be-destroyed data includes the target firmware file corresponding to the target firmware, the target encryption key, the second firmware manufacturer certificate, and the target authentication session key.
[0098] The destruction operation can be understood as deleting the to-be-destroyed data stored in itself.
[0099] Specifically, the secure chip parses the command identification information after determining the to-be-destroyed data, and destroys the to-be-destroyed data when determining that the identification corresponding to the command identification information is an agreed identification.
[0100] S470, returning a self-destruction instruction to the firmware chip, so that the firmware chip performs a self-destruction operation on the to-be-destroyed data based on the self-destruction instruction after receiving the self-destruction instruction.
[0101] Specifically, the secure chip returns destruction completion information to the firmware chip and returns a self-destruction instruction to the firmware chip after performing the destruction operation and completing the destruction, so that the firmware chip deletes the to-be-destroyed data stored therein based on the self-destruction instruction after receiving the self-destruction instruction, and also clears the to-be-destroyed data in the Flash memory corresponding to the firmware chip, so as to realize the firmware irrecoverability.
[0102] In this embodiment of the disclosure, the firmware chip can perform firmware deployment operations and destroy the relevant data of the firmware after the firmware is deployed. Furthermore, authentication between the security chip and the firmware chip is performed before the data destruction command is transmitted, which improves the reliability of data transmission. By destroying the relevant data of the firmware, the effect of preventing data leakage or data attack is achieved, thereby further improving the security of the firmware.
[0103] Figure 5 This is a schematic diagram of the structure of a firmware security deployment device provided in an embodiment of this disclosure.
[0104] In this embodiment, the firmware security deployment device can be installed within an electronic device and is understood as a functional module within the aforementioned electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes mobile phones, computers, or tablet computers, etc., without limitation.
[0105] like Figure 5 As shown, the firmware security deployment device 500 is suitable for security chips and may specifically include a firmware deployment instruction receiving module 510, a firmware signature verification module 520, a firmware processing module 530, and a firmware deployment module 540.
[0106] The firmware deployment instruction receiving module 510 can be used to receive firmware deployment instructions sent by the firmware chip. The firmware deployment instructions include the encrypted firmware file corresponding to the firmware to be deployed, the firmware encryption key index, and the first manufacturer identification information corresponding to the firmware to be deployed.
[0107] The firmware verification module 520 can be used to obtain the first firmware vendor certificate corresponding to the firmware to be deployed based on the first vendor identification information, and to perform firmware verification on the firmware to be deployed based on the first firmware vendor certificate.
[0108] The firmware processing module 530 can be used to obtain the firmware encryption key based on the firmware encryption key index after the firmware verification is passed, and to decrypt the encrypted firmware file according to the firmware encryption key to obtain the decrypted firmware file.
[0109] The firmware deployment module 540 can be used to re-encrypt the decrypted firmware file to obtain a re-encrypted firmware file, and send the re-encrypted firmware file to the firmware chip so that the firmware chip can perform firmware deployment operations based on the re-encrypted firmware file.
[0110] In the embodiments of the present disclosure, the firmware deployment instruction sent by the firmware chip can be received, wherein the firmware deployment instruction includes an encrypted firmware file corresponding to the to-be-deployed firmware, a firmware encryption key index, and first vendor identification information corresponding to the to-be-deployed firmware. After receiving the firmware deployment instruction, the firmware deployment instruction is parsed to obtain the first vendor identification information, and then a first firmware vendor certificate corresponding to the to-be-deployed firmware is obtained based on the first vendor identification information, and the to-be-deployed firmware is verified based on the first firmware vendor certificate. After the firmware verification passes, the firmware encryption key is obtained based on the firmware encryption key index, and the encrypted firmware file is decrypted based on the firmware encryption key to obtain a decrypted firmware file. The decrypted firmware file is re-encrypted to obtain a re-encrypted firmware file, and the re-encrypted firmware file is sent to the firmware chip to enable the firmware chip to perform a firmware deployment operation based on the re-encrypted firmware file. In this way, the firmware can be verified by the first firmware vendor certificate, the decryption of the firmware file can be performed after the verification passes, and the decrypted firmware file is continuously encrypted and transmitted when the secure chip sends the firmware file to the firmware chip. That is, the secure chip is introduced to verify the firmware during the firmware deployment process, and the firmware is transmitted in an encrypted manner after the verification passes, so as to ensure the security and reliability of the firmware file and data during the firmware deployment process, and the security of the firmware deployment is improved.
[0111] In some embodiments of the present disclosure, an authentication session key is pre-stored in the secure chip.
[0112] The secure firmware deployment apparatus 500 can further include an authentication module.
[0113] The authentication module can be configured to receive an authentication session request sent by the firmware chip before receiving the firmware deployment instruction sent by the firmware chip, wherein the authentication session request includes a first encrypted random number obtained by encrypting a first random number by the firmware chip based on the authentication session key.
[0114] The first encrypted random number is decrypted based on the authentication session key to obtain a second random number, and the second random number is returned to the firmware chip to enable the firmware chip to determine whether the authentication is successful based on the first random number and the second random number, and send the firmware deployment instruction to the secure chip after determining that the authentication is successful.
[0115] In some embodiments of the present disclosure, the firmware deployment instruction further includes a firmware index, the firmware index is used for searching and managing the to-be-deployed firmware, the firmware index is determined based on a hash value obtained by performing a hash operation on a firmware file corresponding to the to-be-deployed firmware by a firmware management system corresponding to the firmware chip according to a preset hash algorithm, and the firmware encryption key index is determined based on a preset random function by the firmware management system.
[0116] In some embodiments of the present disclosure, the firmware deployment module 540 can be specifically configured to re-encrypt the decrypted firmware file based on a target session key to obtain a re-encrypted firmware file, wherein the target session key is generated by the secure chip and the firmware chip in the authentication process.
[0117] In some embodiments of the present disclosure, the secure firmware deployment apparatus 500 can further include a data destruction module.
[0118] The data destruction module can be configured to re-encrypt the decrypted firmware file to obtain a re-encrypted firmware file, and send the re-encrypted firmware file to the firmware chip, so that after the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file, the data destruction module receives a data destruction instruction sent by the firmware chip, wherein the data destruction instruction includes a target firmware index corresponding to the data to be destroyed, second vendor identification information corresponding to the data to be destroyed, and command identification information.
[0119] Based on the second vendor identification information, a second firmware vendor certificate is obtained, and a firmware signature verification is performed based on the second firmware vendor certificate.
[0120] After the firmware signature verification is passed, the target firmware corresponding to the data destruction instruction is determined based on the target firmware index, and the data to be destroyed is determined according to the target firmware.
[0121] Based on the command identification information, a destruction operation is performed on the data to be destroyed, and the data to be destroyed includes the target firmware file corresponding to the target firmware, the target encryption key, the second firmware vendor certificate, and the target authentication session key.
[0122] In some embodiments of the present disclosure, the secure firmware deployment apparatus 500 can further include a self-destruction instruction sending module.
[0123] The self-destruction instruction sending module can be configured to return a self-destruction instruction to the firmware chip after the destruction operation is performed on the data to be destroyed based on the command identification information, so that the firmware chip performs a self-destruction operation on the data to be destroyed based on the self-destruction instruction after receiving the self-destruction instruction.
[0124] It should be noted that, Figure 5 The secure firmware deployment apparatus 500 shown can perform each step in the above method embodiments, and realize each process and effect in the above method embodiments, which will not be repeated here.
[0125] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0126] In an embodiment of the present disclosure, Figure 6 The electronic device shown can be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer, a tablet computer, etc., which are not limited here.
[0127] As shown in Figure 6 , the electronic device can include a processor 610 and a memory 620 storing computer program instructions.
[0128] In particular, the processor 610 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits that embody the embodiments of the present disclosure.
[0129] The memory 620 can include a mass storage for information or instructions. By way of example, and not limitation, the memory 620 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Storage memory 620, where appropriate, can be removable or non-removable (or fixed) media. Where appropriate, storage memory 620 can be internal or external to the integrated gateway device. In particular embodiments, the storage memory 620 is non-volatile solid-state memory. In particular embodiments, the storage memory 620 includes read-only memory (ROM). Where appropriate, this ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0130] The processor 610 performs the steps of the firmware security deployment method provided by the embodiments of the present disclosure by reading and executing the computer program instructions stored in the memory 620.
[0131] In one example, the electronic device can further include a transceiver 630 and a bus 640. As shown in Figure 6 , the processor 610, the memory 620 and the transceiver 630 are connected through the bus 640 and complete communication between each other.
[0132] Bus 640 includes a hardware, software, or both that couples components of computer system 600 to each other. As an example without limitation, bus 640 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side BUS (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or some other suitable bus or a combination of two or more of these. Where appropriate, bus 640 can include one or more buses of the same type or buses of different types.
[0133] The embodiment of the present disclosure further provides a computer readable storage medium, which can store a computer program. When the computer program is executed by a processor, the processor implements the firmware security deployment method provided by the embodiment of the present disclosure.
[0134] The storage medium described above can for example include a memory 620 of computer program instructions, and the above instructions can be executed by the processor 610 of the electronic device to complete the firmware security deployment method provided by the embodiment of the present disclosure. Optionally, the storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a ROM, a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data semi-virtualization storage device, etc.
[0135] The embodiments of the present disclosure further provide a computer program product, which comprises a computer program or instructions, and the computer program or instructions, when executed by a processor, implement the firmware security deployment method provided by the embodiments of the present disclosure, and can implement the various processes and effects in the above-mentioned embodiments of the present disclosure, which will not be repeated here.
[0136] The above description is merely that of the specific embodiments of the present disclosure to enable a person skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A secure firmware deployment method, characterized by, The application is applied to a secure chip, comprising: receiving a firmware deployment instruction sent by a firmware chip, wherein the firmware deployment instruction comprises an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first vendor identification information corresponding to the to-be-deployed firmware; obtaining a first firmware vendor certificate corresponding to the to-be-deployed firmware based on the first vendor identification information, and performing firmware signature verification on the to-be-deployed firmware based on the first firmware vendor certificate; after the firmware signature verification passes, obtaining a firmware encryption key based on the firmware encryption key index, and performing decryption processing on the encrypted firmware file according to the firmware encryption key to obtain a decrypted firmware file; performing re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, and sending the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
2. The method of claim 1, wherein, The secure chip is pre-stored with an authentication session key; Before the receiving of the firmware deployment instruction sent by the firmware chip, the method further comprises: receiving an authentication session request sent by the firmware chip, wherein the authentication session request comprises a first encrypted random number obtained by encrypting a first random number based on an authentication session key by the firmware chip; performing decryption processing on the first encrypted random number based on the authentication session key to obtain a second random number, and returning the second random number to the firmware chip, so that the firmware chip determines whether the authentication is successful based on the first random number and the second random number, and sends the firmware deployment instruction to the secure chip after determining that the authentication is successful.
3. The method of claim 1, wherein, The firmware deployment instruction further comprises a firmware index, which is used for searching and managing a to-be-deployed firmware; the firmware index is determined based on a hash value obtained by performing hash processing on a firmware file corresponding to the to-be-deployed firmware by a firmware management system corresponding to the firmware chip according to a preset hash algorithm; and the firmware encryption key index is determined based on a preset random function by the firmware management system.
4. The method of claim 1, wherein, The re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file comprises: performing re-encryption processing on the decrypted firmware file based on a target session key to obtain a re-encrypted firmware file, wherein the target session key is generated in an authentication process by the secure chip and the firmware chip.
5. The method of claim 1, wherein, After the re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, and sending the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file, the method further comprises: receiving a data destruction instruction sent by the firmware chip, wherein the data destruction instruction comprises a target firmware index corresponding to to-be-destroyed data, second vendor identification information corresponding to the to-be-destroyed data, and command identification information; obtaining a second firmware vendor certificate based on the second vendor identification information, and performing firmware signature verification based on the second firmware vendor certificate; After the firmware signature verification passes, a data destruction instruction is determined based on the target firmware index, and the target firmware is determined based on the target firmware to determine the data to be destroyed; Based on the command identification information, the destruction operation is performed on the data to be destroyed, and the data to be destroyed includes the target firmware file corresponding to the target firmware, the target encryption key, the second firmware manufacturer certificate, and the target authentication session key.
6. The method of claim 5, wherein, After the destruction operation is performed on the data to be destroyed based on the command identification information, the method further comprises: The self-destruction instruction is returned to the firmware chip, so that the firmware chip performs the self-destruction operation of the data to be destroyed based on the self-destruction instruction after receiving the self-destruction instruction.
7. A firmware security deployment apparatus, characterized by comprising: Suitable for security chip, comprising: A firmware deployment instruction receiving module is configured to receive a firmware deployment instruction sent by a firmware chip, wherein the firmware deployment instruction includes an encrypted firmware file corresponding to a to-be-deployed firmware, a firmware encryption key index, and first manufacturer identification information corresponding to the to-be-deployed firmware. A firmware signature verification module is configured to obtain a first firmware manufacturer certificate corresponding to the to-be-deployed firmware based on the first manufacturer identification information, and perform firmware signature verification on the to-be-deployed firmware based on the first firmware manufacturer certificate. A firmware processing module is configured to, after the firmware signature verification passes, obtain a firmware encryption key based on the firmware encryption key index, and perform decryption processing on the encrypted firmware file based on the firmware encryption key to obtain a decrypted firmware file. A firmware deployment module is configured to perform re-encryption processing on the decrypted firmware file to obtain a re-encrypted firmware file, and send the re-encrypted firmware file to the firmware chip, so that the firmware chip performs a firmware deployment operation based on the re-encrypted firmware file.
8. An electronic device, comprising: Comprising: A processor; A memory for storing executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the firmware security deployment method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the firmware security deployment method of any one of claims 1-6.
10. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the firmware security deployment method of any one of claims 1-6.
Citation Information
Patent Citations
Equipment, firmware upgrading device thereof and firmware upgrading method thereof
CN108196867A
Safety chip-based firmware safe downloading and checking device and method
CN108306970A