Security chip firmware limited updating method and system

By introducing an authorization mechanism in the firmware update system and using intelligent password keys to generate and verify authorization codes, the problem of lack of authorization restrictions in the existing firmware update methods is solved, and restricted updates and authorization control of the secure chip firmware are realized.

CN119918043AActive Publication Date: 2025-05-02GUANGZHOU WANXIETONG INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411927504.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-02
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing firmware update methods lack reasonable authorization restrictions and cannot flexibly limit the scope and number of firmware updates, resulting in unlimited and uncontrollable firmware update operations.

Method used

By introducing an authorization mechanism, the server side receives the firmware update request of the terminal device and sends the hardware encoding to the smart password key. The intelligent password key determines whether to authorize based on the pre-stored code to be updated and the number of authorizations, generates an authorization code and feedback it to the server. The server sends the authorization code and firmware update files to the terminal device to realize restricted updates of the security chip firmware.

Benefits of technology

The authorization mechanism for security chip firmware update is implemented to prevent unauthorized terminal devices from obtaining firmware update files, so that security chip firmware updates are restricted, and the problem of unlimited and uncontrollable update operations are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918043A_ABST
    Figure CN119918043A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a secure chip firmware limited updating method and system.The method comprises the steps that a server side receives a firmware updating request sent by terminal equipment, the firmware updating request comprises a hardware code of a secure chip, the hardware code is sent to an intelligent password key, and the hardware code is sent to the terminal equipment; the intelligent password key determines whether to authorize the hardware code according to a plurality of pre-stored to-be-updated codes and the current successful authorization times, obtains a security chip type associated with the hardware code when determining authorization, queries a character string corresponding to the security chip type according to a preset table, and updates the hardware code according to the character string. And encrypting the hardware code based on a preset encryption algorithm to obtain a to-be-combined authorization code, combining the character string with the to-be-combined authorization code to obtain an authorization code, feeding back the authorization code to the server side, and sending a preset firmware update file and the authorization code to the terminal device by the server side to perform firmware update and authorization operation of the security chip. According to the scheme, unauthorized equipment can be prevented from acquiring the firmware updating file, so that firmware updating is limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic digital data processing technology, and more particularly to a method and system for restricting firmware updates of a security chip. Background Art

[0002] Firmware is a software running in the MCU (Microcontroller Unit). It is responsible for controlling the basic functions and operating logic of the hardware. It is the basic and low-level working software of the system. The firmware determines the functions and performance of the hardware equipment. The security chip is a device that can independently generate keys and encrypt and decrypt. It has an independent processor and storage unit inside, which can store keys and feature data, and provide encryption and security authentication services for computing devices. The firmware of the security chip will be updated at regular intervals to improve security, its own performance and compatibility, or to add new functions.

[0003] In the related technologies, most of them transfer the new firmware in the form of a file and write it into a specific storage area of ​​the MCU to be upgraded, and use the new firmware to replace the old firmware to complete the firmware update operation. However, this firmware update method enables any third party who obtains the firmware update file to update the firmware of multiple existing legitimate hardware devices. It lacks reasonable authorization restrictions and cannot flexibly limit the scope and quantity of firmware updates, resulting in unlimited and uncontrollable firmware update operations. Summary of the invention

[0004] The embodiments of the present application provide a method and system for restricting the update of security chip firmware, which solves the problem that the existing firmware update method lacks reasonable authorization restrictions and cannot flexibly limit the scope and quantity of firmware updates, resulting in unlimited and uncontrollable firmware update operations. It implements an authorization mechanism for security chip firmware updates, which can prevent unauthorized terminal devices from obtaining firmware update files, thereby restricting the update of security chip firmware.

[0005] In a first aspect, an embodiment of the present application provides a method for restricting firmware update of a security chip, including:

[0006] The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, the server sends the hardware code to the smart password key, and the smart password key determines whether to authorize the terminal device with the hardware code according to a plurality of pre-stored codes to be updated and the recorded current number of successful authorizations;

[0007] When authorization is confirmed, the smart password key obtains the type of security chip associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined, combines the string with the authorization code to be combined to obtain an authorization code of the hardware code, and feeds the authorization code back to the server;

[0008] The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

[0009] Optionally, the combining the character string with the authorization code to be combined to obtain the hardware-encoded authorization code includes:

[0010] The number of digits of the authorization code to be combined is determined, the position to be inserted of the authorization code to be combined is determined according to a preset percentage and the number of digits, and the character string is inserted into the position to be inserted of the authorization code to be combined to obtain the hardware-encoded authorization code.

[0011] Optionally, the combining the character string with the authorization code to be combined to obtain the hardware-encoded authorization code includes:

[0012] The character string is evenly split into a header combination part and a tail combination part, the header combination part is added to the head of the authorization code to be combined, and the tail combination part is added to the tail of the authorization code to be combined to obtain the hardware-encoded authorization code.

[0013] Optionally, when the character string corresponding to the security chip type does not exist in the preset character string mapping table, the method for generating the authorization code further includes:

[0014] A corresponding encoding processing method is determined according to the hardware encoding format associated with the security chip type, and the hardware encoding is encrypted according to the encoding processing method to obtain a unique authorization code.

[0015] Optionally, the determining a corresponding encoding processing method according to a hardware encoding format associated with the security chip type includes:

[0016] According to the preset code number, each sub-segment coding format in the hardware coding format is determined from front to back, and the pre-stored sub-segment coding processing methods corresponding to each sub-segment coding format are combined to obtain the corresponding coding processing method, and the sub-segment coding format includes a character format, a digital format, and a character and digital combination format.

[0017] Optionally, the terminal device performs an update and authorization operation on the security chip firmware, including:

[0018] The terminal device performs digital signature verification on the preset firmware update file according to the security chip firmware, and if the digital signature verification succeeds, updates the security chip firmware according to the preset firmware update file; otherwise, refuses to update the security chip firmware;

[0019] The terminal device performs security verification on the authorization code. If the security verification is successful, the normal function of the security chip is enabled. Otherwise, an error message is prompted and any operation other than authorization is prohibited.

[0020] Optionally, before the server receives the firmware update request sent by the terminal device, the method further includes:

[0021] The server performs login authentication of the smart password key according to the input key. If the login authentication of the smart password key is passed, the server imports a plurality of pre-stored codes to be updated into the smart password key for authorization restriction.

[0022] In a second aspect, an embodiment of the present application further provides a security chip firmware restricted update device, comprising:

[0023] A receiving module, configured to receive, at the server side, a firmware update request sent by a terminal device, wherein the terminal device includes a security chip firmware to be updated, and the firmware update request includes a hardware code of the security chip;

[0024] A sending module, used for the server to send the hardware code to the smart password key;

[0025] An authorization judgment module is used for the smart password key to determine whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded current number of successful authorizations;

[0026] An authorization code generation and feedback module is used for the smart password key to obtain the type of security chip associated with the hardware code when authorization is confirmed, query the string corresponding to the security chip type according to a preset string mapping table, encrypt the hardware code based on a preset encryption algorithm to obtain the authorization code to be combined, combine the string with the authorization code to be combined to obtain a final authorization code, and feed the authorization code back to the server;

[0027] The sending module is also used for the server to send the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

[0028] In a third aspect, an embodiment of the present application further provides a security chip firmware restricted update device, the device comprising:

[0029] one or more processors;

[0030] a storage device for storing one or more programs,

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the security chip firmware restricted update method described in the embodiment of the present application.

[0032] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the security chip firmware restricted update method described in the embodiment of the present application.

[0033] In an embodiment of the present application, a server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, the server sends the hardware code to the smart password key, the smart password key determines whether to authorize the terminal device with the hardware code according to a plurality of pre-stored codes to be updated and the current number of successful authorizations recorded, and when the smart password key determines the authorization, obtains the type of security chip associated with the hardware code, queries the string corresponding to the security chip type according to a preset string mapping table, and encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined, combines the string with the authorization code to be combined to obtain an authorization code for the hardware code, and feeds the authorization code back to the server, and the server sends the preset firmware update file and the authorization code to the terminal device for the terminal device to update and authorize the security chip firmware. This solution introduces an authorization mechanism to solve the problem that there is a lack of reasonable authorization restrictions in the existing firmware update method, the scope and quantity of the firmware update cannot be flexibly restricted, and the firmware update operation is not restricted and uncontrollable, and an authorization mechanism for the security chip firmware update is implemented, which can prevent unauthorized terminal devices from obtaining firmware update files, and restrict the security chip firmware update. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of a security chip firmware restricted update method provided in an embodiment of the present application;

[0035] Figure 2 A flowchart of a method for restricting firmware updates on a security chip including a combination processing method of a character string and an authorization code to be combined provided in an embodiment of the present application;

[0036] Figure 3A flowchart of a security chip firmware restricted update method including a combination processing method of another character string and an authorization code to be combined provided in an embodiment of the present application;

[0037] Figure 4 A flowchart of a method for limited update of security chip firmware including a method for generating an authorization code provided in an embodiment of the present application;

[0038] Figure 5 A flowchart of a method for limited update of security chip firmware including a smart password key configuration method provided in an embodiment of the present application;

[0039] Figure 6 A module structure block diagram of a security chip firmware restricted update device provided in an embodiment of the present application;

[0040] Figure 7 A schematic diagram of the structure of a security chip firmware restricted update device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.

[0042] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and or or" in the specification and claims represents at least one of the connected objects, and the character "or" generally indicates that the objects associated before and after are in an "or" relationship.

[0043] The security chip firmware limited update method provided in the embodiment of the present application can be applied to the security chip firmware update scenario. For example, when the security chip firmware needs to be updated, it can be updated by the security chip firmware limited update method provided in the embodiment of the present application.

[0044] Figure 1 A flowchart of a method for restricting firmware updates of a security chip provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, specifically including:

[0045] Step S101: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, and the server sends the hardware code to a smart password key.

[0046] Among them, the server side refers to a computer system in a computer network that is responsible for receiving and processing client requests and sending corresponding data to the client. The terminal device refers to a device used by a user to interact with a computer system or network. The server side can be used to receive a firmware update request sent by a terminal device, and the hardware code of the security chip in the firmware update request can also be sent to the smart password key. The firmware update request is used to represent the request issued by the terminal device when the security chip firmware needs to be updated. The security chip firmware refers to a software program embedded in the security chip, which is responsible for managing the various functions of the security chip. The hardware code can be a unique serial number of the security chip, and the identity of each security chip can be distinguished by the hardware code. The smart password key is a terminal password product that can complete password functions and secure storage, and generally uses a USB interface. The smart password key is connected to the server side via a USB interface. An exemplary example can be that the server side receives a firmware update request sent by terminal device a, and the hardware code of the security chip to be updated of terminal device a in the firmware update request is A12-67gh, and the server side sends "A12-67gh" to the connected smart password key.

[0047] Step S102: The smart password key determines whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations.

[0048] The pre-stored code to be updated is used to represent the hardware code of the security chip stored in the smart password key waiting for firmware update. The current number of authorizations can be the total number of times the smart password key has been successfully authorized. The current number of successful authorizations can be recorded by the authorization counter built into the smart password key. For example, each time an authorization code is successfully generated, the value of the authorization counter built into the smart password key is increased by 1.

[0049] In one embodiment, the total number of pre-stored codes to be updated is counted, and when the current number of successful authorizations recorded is less than the total number, the hardware code of the security chip of the terminal device is compared with each pre-stored code to be updated respectively, and when there is a pre-stored code to be updated that is the same as the hardware code, it is determined to authorize the terminal device with the hardware code, and when the current number of successful authorizations recorded is equal to the total number or there is no pre-stored code to be updated that is the same as the hardware code, the terminal device with the hardware code is not authorized. An exemplary example may be that the hardware code of the security chip of terminal device a is A12-67gh, the total number of pre-stored codes to be updated is counted as 10, and the current number of successful authorizations recorded is 3, which is less than the total number, then the hardware code of the security chip of terminal device a is compared with each pre-stored code to be updated respectively, and if the comparison result is that there is a pre-stored code to be updated that is the same as the hardware code, it is determined to authorize terminal device a. By comparing the current number of successful authorizations with the total number of codes to be updated and matching the hardware codes, accurate control of the update scope and quantity of the security chip firmware can be ensured. At the same time, the use of smart key as the only authorization carrier enhances the security of the authorization process and realizes a safe and restricted firmware update function.

[0050] In another embodiment, the hardware code of the security chip of the terminal device is compared with each pre-stored code to be updated, and a determination is made as to whether the current number of successful authorizations recorded is less than a preset number. If the hardware code comparison is successful and the current number of successful authorizations is less than a preset number, the terminal device with the hardware code is authorized, and the preset number can be set according to actual conditions.

[0051] Step S103: When authorization is confirmed, the smart password key obtains the security chip type associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, and encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined.

[0052] Among them, the security chip type is used to characterize the classification of security chips, which can be classification in terms of brand, function, etc. The preset string mapping table can be a mapping relationship table between preset strings and security chip types. The preset string mapping table can be used to query the string corresponding to the security chip type. The preset encryption algorithm is used to characterize the preset algorithm for encrypting hardware encoding, such as SM2 (asymmetric algorithm), SM3 (digest algorithm), SM4 (symmetric algorithm) and other national secret algorithms. The authorization code to be combined can be a password waiting to be combined with other parts. An exemplary example can be a preset string mapping table, as shown in the following table:

[0053] Security chip type String Type 1 A1a Type 2 B2b Type 3 C3c Type 4 D4D

[0054] The above mapping table describes the mapping relationship between the security chip type and the string, which is specifically described as follows: when the security chip type is type 1, the corresponding string is A1a; when the security chip type is type 2, the corresponding string is B2b; when the security chip type is type 3, the corresponding string is C3c; when the security chip type is type 4, the corresponding string is D4d.

[0055] The security chip type associated with the hardware code of the security chip of terminal device a is obtained as security type 1. The corresponding string is A1a when querying the above-mentioned preset string mapping table, and the hardware code of the security chip of terminal device a is encrypted based on the preset SM4 encryption algorithm to obtain the authorization code to be combined as 67rc5b, wherein the relevant information in the materials is only for illustrative purposes, and the actual length of relevant data items may be different (such as chip hardware code, authorization code, etc.).

[0056] Step S104: Combine the character string with the authorization code to be combined to obtain the hardware-encoded authorization code, and feed the authorization code back to the server side. The server side sends the preset firmware update file and the authorization code to the terminal device for the terminal device to update the security chip firmware and perform authorization operations.

[0057] Among them, the authorization code refers to a special code used to verify the user identity or the legitimacy of the device. The authorization code can be used to perform authorization operations on the security chip firmware. The preset firmware update file is used to represent a preset update file for replacing the original firmware file in the security chip. The preset firmware update file can be used to perform an update operation on the security chip firmware. Optionally, a combination processing method of a string and an authorization code to be combined can be to determine the number of digits of the authorization code to be combined, determine the position to be inserted into the authorization code to be combined according to a preset percentage and the number of digits, and insert the string into the position to be inserted into the authorization code to be combined to obtain a hardware-coded authorization code. Determining the position where the string is inserted into the authorization code to be combined by a preset percentage can improve the security of the authorization code. In one embodiment, in the case where there is no string corresponding to the security chip type associated with the hardware code in the preset string mapping table, a method for generating an authorization code can be to determine a corresponding encoding processing method according to the hardware encoding format associated with the security chip type, and encrypt the hardware code according to the encoding processing method to obtain a unique authorization code.

[0058] In one embodiment, a method for updating and authorizing the firmware of a security chip may be that the terminal device performs digital signature verification on a preset firmware update file according to the firmware of the security chip, and if the digital signature verification is successful, the firmware of the security chip is updated according to the preset firmware update file, otherwise, the update of the firmware of the security chip is refused, and the terminal device performs security verification on the authorization code, and if the security verification is successful, the normal function of the security chip is opened, otherwise, an error is prompted and any operation other than authorization is prohibited. Among them, digital signature verification refers to the process of verifying the validity of the digital signature by using public key cryptography technology to confirm the integrity and source identity of the data. The digital signature can be obtained by signing the preset firmware update file using the private key of the firmware update key pair. The digital signature verification can be used to determine whether to update the firmware of the security chip. Security verification refers to a measure to verify the security of the authorization code. Through the digital signature verification of the update file and the security verification of the authorization code, it is achieved that the firmware update of unregistered devices is strictly prohibited, and the scope of the firmware update is ensured.

[0059] In another embodiment, a method for updating and authorizing security chip firmware may be that a terminal device performs a summary value verification on a preset firmware update file based on the security chip firmware, and performs a security verification on the authorization code, and when the digital signature verification and the security verification pass, the security chip firmware is updated according to the preset firmware update file, wherein the summary value may be a value generated by combining the contents of the preset firmware update file and a randomly generated number through a hash function.

[0060] As can be seen from the above, the server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, the server sends the hardware code to the smart password key, the smart password key determines whether to authorize the terminal device with the hardware code according to multiple pre-stored codes to be updated and the current number of successful authorizations recorded, and the smart password key obtains the type of security chip associated with the hardware code when determining the authorization, queries the string corresponding to the security chip type according to the preset string mapping table, and encrypts the hardware code based on the preset encryption algorithm to obtain the authorization code to be combined, combines the string with the authorization code to be combined to obtain the authorization code of the hardware code, and feeds the authorization code back to the server, and the server sends the preset firmware update file and the authorization code to the terminal device for the terminal device to update the security chip firmware and authorize the operation. This solution introduces an authorization mechanism to solve the problem that the existing firmware update method lacks reasonable authorization restrictions, cannot flexibly limit the scope and number of firmware updates, and causes the firmware update operation to be unlimited and uncontrollable, and realizes the authorization mechanism for the security chip firmware update, which can prevent unauthorized terminal devices from obtaining firmware update files, so that the security chip firmware update is limited.

[0061] Figure 2 A flowchart of a security chip firmware restricted update method including a combination processing method of a character string and an authorization code to be combined provided in an embodiment of the present application, such as Figure 2 As shown, specifically including:

[0062] Step S201: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, and the server sends the hardware code to the smart password key.

[0063] Step S202: The smart password key determines whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations.

[0064] Step S203: When authorization is confirmed, the smart password key obtains the security chip type associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, and encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined.

[0065] Step S204, determine the number of digits of the authorization code to be combined, determine the position to be inserted of the authorization code to be combined according to the preset percentage and the number of digits, insert the string into the position to be inserted of the authorization code to be combined to obtain the hardware-encoded authorization code, and feed the authorization code back to the server.

[0066] Among them, the preset percentage can be a percentage value set in advance according to actual conditions or randomly. The preset percentage can be used to determine the position to be inserted of the authorization code to be combined. The position to be inserted is used to characterize the position of the string to be inserted in the authorization code to be combined. Optionally, a method for determining the position to be inserted can be to multiply the preset percentage by the number of digits of the authorization code to be combined to obtain a reference number of digits, determine the position of the reference number of digits in the authorization code to be combined, and determine the position behind the reference number of digits as the position to be inserted. An exemplary example can be that the authorization code to be combined is 3a6b47, the number of digits is 6, the preset percentage is 50%, the string corresponding to the security chip type is A1a, the preset percentage is multiplied by the number of digits of the authorization code to be combined to obtain a reference number of digits of 3, the third digit in the authorization code to be combined is "6", then the position behind "6" is determined as the position to be inserted, and the hardware-coded authorization code 3a6A1ab47 is obtained by inserting the string into the position to be inserted in the authorization code to be combined. In another embodiment, a method for determining the position to be inserted may be to multiply a preset percentage by the number of digits in the authorization code to be combined to obtain a reference number of digits, determine the position of the reference number of digits in the authorization code to be combined, and determine the position in front of the position of the reference number of digits as the position to be inserted.

[0067] Step S205: The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update the security chip firmware and perform authorization operations.

[0068] As can be seen from the above, the number of digits of the authorization code to be combined is determined, the position to be inserted into the authorization code to be combined is determined according to the preset percentage and the number of digits, and the character string is inserted into the position to be inserted into the authorization code to be combined to obtain the hardware-encoded authorization code. This solution can improve the security of the authorization code by combining the character string with the authorization code to be combined to obtain the authorization code.

[0069] Figure 3 A flowchart of a security chip firmware restricted update method including a combination processing method of another character string and a to-be-combined authorization code provided in an embodiment of the present application, such as Figure 2 As shown, specifically including:

[0070] Step S301: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, and the server sends the hardware code to the smart password key.

[0071] Step S302: The smart password key determines whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations.

[0072] Step S303: When authorization is confirmed, the smart password key obtains the security chip type associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, and encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined.

[0073] Step S304, split the string evenly into a header combination part and a tail combination part, add the header combination part to the header of the authorization code to be combined, and add the tail combination part to the tail of the authorization code to be combined to obtain the hardware-encoded authorization code, and feed the authorization code back to the server.

[0074] Among them, the header combination part can be the part of the string to be combined located in the header. The tail combination part can be the part of the string to be combined located in the tail. The header combination part and the tail combination part can be combined with the authorization code to be combined to obtain a hardware-encoded authorization code. An illustrative example can be that the string corresponding to the security chip type is a2b3, and the authorization code to be combined is 6a54. The string is evenly split to obtain a header combination part of a2 and a tail combination part of b3. The header combination part is added to the head of the authorization code to be combined, and the tail combination part is added to the tail of the authorization code to be combined. The hardware-encoded authorization code obtained by combination is a26a54b3.

[0075] Step S305: The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update the security chip firmware and perform authorization operations.

[0076] As can be seen from the above, the string is evenly split into a header combination part and a tail combination part, the header combination part is added to the head of the authorization code to be combined, and the tail combination part is added to the tail of the authorization code to be combined to obtain a hardware-encoded authorization code. This solution can improve the security of the authorization code by combining the string with the authorization code to be combined to obtain the authorization code.

[0077] Figure 4 A flowchart of a method for limited updating of security chip firmware including an authorization code generation method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, specifically including:

[0078] Step S401: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, and the server sends the hardware code to the smart password key.

[0079] Step S402: The smart password key determines whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations.

[0080] Step S403: When the smart password key is authorized, it obtains the type of security chip associated with the hardware code, and searches for a character string corresponding to the type of security chip according to a preset character string mapping table.

[0081] Step S404: If the string corresponding to the security chip type does not exist in the preset string mapping table, determine the corresponding encoding processing method according to the hardware encoding format associated with the security chip type, encrypt the hardware code according to the encoding processing method to obtain a unique authorization code, and feed the authorization code back to the server.

[0082] Among them, the hardware encoding format can be a standard writing form of hardware encoding. Exemplarily, the hardware encoding format associated with security chip type a is a nine-digit code, the first three digits are numbers, the fourth and fifth digits are characters, and the last four digits are numbers. The hardware encoding format can be used to determine the encoding processing method of the hardware encoding. The encoding processing method is used to characterize the method of encrypting the hardware encoding. Optionally, a method for determining the encoding processing method can be to determine each sub-segment encoding format in the hardware encoding format associated with the security chip type from front to back according to a preset code number, and combine the pre-stored sub-segment encoding processing methods corresponding to each sub-segment encoding format to obtain the corresponding encoding processing method, the sub-segment encoding format includes a character format, a digital format, and a character and digital combination format, wherein the sub-segment encoding format can be the encoding format of the sub-part of the hardware encoding format, and the pre-stored sub-segment encoding processing method is used to characterize the encoding processing method corresponding to the pre-stored sub-segment encoding format. An exemplary example may be that the preset code number is 3, the pre-stored sub-segment coding processing method of the digital format is to calculate the sum of each digit, the pre-stored sub-segment coding processing method of the character format is to determine the ASCII code (American Standard Code for Information Interchange) of each character, and the pre-stored sub-segment coding processing method of the character and number combination is to move the digits to the tail in sequence. The hardware coding format associated with the security chip is a nine-digit code, the first three digits are digits, the fourth and fifth digits are characters, the sixth digit is a digit, and the last three digits are characters. The hardware coding format is sub-divided according to the preset code number to obtain 3 sub-segments, namely the first, second, and third digits, the fourth, fifth, and sixth digits. and the seventh, eighth, and ninth digits, the format of the first, second, and third digits of the sub-segment is a digital format, the format of the fourth, fifth, and sixth digits of the sub-segment is a character and number combination format, and the format of the first, second, and third digits of the sub-segment is a character format, then the pre-stored sub-segment coding processing methods corresponding to the sub-segment coding formats are combined and processed to obtain the corresponding coding processing method, which is to calculate the sum of the first, second, and third digits in the hardware code to obtain the first sub-password, determine the ASCII code of the fourth, fifth, and sixth digits to obtain the second sub-password, move the digits in the seventh, eighth, and ninth digits to the tail to obtain the third sub-password, and combine the first sub-password, the second sub-password, and the third sub-password.

[0083] In another embodiment, a method for determining a coding processing method may be to match a hardware coding format associated with a security chip type with each preset coding format, and determine a preset processing method associated with a successfully matched preset coding format as a coding processing method for hardware coding, wherein the preset coding format includes a character format, a digital format, and a character and digital combination format.

[0084] Step S405: The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update the security chip firmware and perform authorization operations.

[0085] From the above, it can be seen that when there is no string corresponding to the security chip type in the preset string mapping table, the corresponding encoding processing method is determined according to the hardware encoding format associated with the security chip type, the hardware code is encrypted according to the encoding processing method to obtain a unique authorization code, and the authorization code is fed back to the server. This solution determines the encryption method of the hardware code by the hardware encoding format of the security chip type, which can improve the security of the authorization code.

[0086] Figure 5 A flowchart of a method for limited updating of security chip firmware including a smart password key configuration method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, specifically including:

[0087] Step S501, the server performs login authentication of the smart password key according to the input key. When the login authentication of the smart password key is passed, the server imports a plurality of pre-stored codes to be updated into the smart password key for authorization restriction.

[0088] Among them, the key is used to represent the content input into the input position of the smart password key login key. The key can be used to perform login authentication of the smart password key. Multiple pre-stored codes to be updated can be obtained by aggregating the hardware codes of all security chips collected and ready for authorization upgrade to the server side. An illustrative example can be that the multiple pre-stored codes to be updated in the server side are z33y79, c37u56, j78n53, h42m43, and k02d48, respectively. The server side detects the key input, authenticates the key, and displays the verification passed, that is, the smart password key connected to the server side is successfully logged in. The server side imports multiple pre-stored codes to be updated z33y79, c37u56, j78n53, h42m43, and k02d48 into the connected smart password key for authorization restriction.

[0089] Step S502: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes a hardware code of the security chip, and the server sends the hardware code to the smart password key.

[0090] Step S503: the smart password key determines whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations.

[0091] Step S504: When authorization is confirmed, the smart password key obtains the security chip type associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, and encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined.

[0092] Step S505: Combine the character string with the authorization code to be combined to obtain the hardware-encoded authorization code, and feed the authorization code back to the server side. The server side sends the preset firmware update file and the authorization code to the terminal device for the terminal device to update the security chip firmware and perform authorization operations.

[0093] As can be seen from the above, the server receives the firmware update request sent by the terminal device, the terminal device includes the security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, and the server sends the hardware code to the smart password key. This solution uses the smart key as the only authorization carrier, strengthens the security of the authorization process, and realizes a secure and limited firmware update function.

[0094] Figure 6 This is a module structure diagram of a secure chip firmware limited update device provided in an embodiment of the present application. The system is used to execute a secure chip firmware limited update method provided in the above embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Figure 6 As shown, the system specifically includes:

[0095] The receiving module 101 is used for receiving, at the server side, a firmware update request sent by a terminal device, wherein the terminal device includes a security chip firmware to be updated, and the firmware update request includes a hardware code of the security chip;

[0096] A sending module 102, used for the server to send the hardware code to the smart password key;

[0097] The authorization judgment module 103 is used for the smart password key to determine whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded number of current successful authorizations;

[0098] The authorization code generation and feedback module 104 is used for the smart password key to obtain the type of security chip associated with the hardware code when authorization is confirmed, query the string corresponding to the security chip type according to the preset string mapping table, encrypt the hardware code based on a preset encryption algorithm to obtain the authorization code to be combined, combine the string with the authorization code to be combined to obtain the final authorization code, and feed the authorization code back to the server;

[0099] The sending module is also used for the server to send the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

[0100] It can be seen from the above scheme that the server receives the firmware update request sent by the terminal device, the terminal device includes the security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, the server sends the hardware code to the smart password key, the smart password key determines whether to authorize the terminal device with the hardware code according to multiple pre-stored codes to be updated and the current number of successful authorizations recorded, and the smart password key obtains the type of security chip associated with the hardware code when determining the authorization, queries the string corresponding to the security chip type according to the preset string mapping table, and encrypts the hardware code based on the preset encryption algorithm to obtain the authorization code to be combined, combines the string with the authorization code to be combined to obtain the authorization code of the hardware code, and feeds the authorization code back to the server, and the server sends the preset firmware update file and the authorization code to the terminal device for the terminal device to update the security chip firmware and authorize the operation. This scheme introduces an authorization mechanism to solve the problem that the existing firmware update method lacks reasonable authorization restrictions, cannot flexibly limit the scope and number of firmware updates, and causes the firmware update operation to be unlimited and uncontrollable, and realizes the authorization mechanism for the security chip firmware update, which can prevent unauthorized terminal devices from obtaining firmware update files and restrict the security chip firmware update.

[0101] In a possible embodiment, the authorization code generation and feedback module 104 is specifically used to:

[0102] The number of digits of the authorization code to be combined is determined, the position to be inserted of the authorization code to be combined is determined according to a preset percentage and the number of digits, and the character string is inserted into the position to be inserted of the authorization code to be combined to obtain the hardware-encoded authorization code.

[0103] In a possible embodiment, the authorization code generation and feedback module 104 is further used to:

[0104] The character string is evenly split into a header combination part and a tail combination part, the header combination part is added to the head of the authorization code to be combined, and the tail combination part is added to the tail of the authorization code to be combined to obtain the hardware-encoded authorization code.

[0105] In a possible embodiment, the authorization code generation and feedback module 104 is further used to:

[0106] A corresponding encoding processing method is determined according to the hardware encoding format associated with the security chip type, and the hardware encoding is encrypted according to the encoding processing method to obtain a unique authorization code.

[0107] In a possible embodiment, the authorization code generation and feedback module 104 is further used to:

[0108] According to the preset code number, each sub-segment coding format in the hardware coding format is determined from front to back, and the pre-stored sub-segment coding processing methods corresponding to each sub-segment coding format are combined to obtain the corresponding coding processing method, and the sub-segment coding format includes a character format, a digital format, and a character and digital combination format.

[0109] In a possible embodiment, an update and authorization module is also included, which is specifically used to:

[0110] The terminal device performs digital signature verification on the preset firmware update file according to the security chip firmware, and if the digital signature verification succeeds, updates the security chip firmware according to the preset firmware update file; otherwise, refuses to update the security chip firmware;

[0111] The terminal device performs security verification on the authorization code. If the security verification is successful, the normal function of the security chip is enabled. Otherwise, an error message is prompted and any operation other than authorization is prohibited.

[0112] In a possible embodiment, a data import module is further included, which is specifically used to:

[0113] The server performs login authentication of the smart password key according to the input key. If the login authentication of the smart password key is passed, the server imports a plurality of pre-stored codes to be updated into the smart password key for authorization restriction.

[0114] Figure 7 A structural diagram of a security chip firmware restricted update device provided in an embodiment of the present application, such as Figure 7 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Figure 7 A processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected by a bus or other means. Figure 7The example of connecting via a bus is taken. The memory 202, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions or modules corresponding to a method for restricting the update of security chip firmware in an embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, implements the above-mentioned method for restricting the update of security chip firmware. The input device 203 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.

[0115] The embodiment of the present application further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a security chip firmware limited update method when executed by a computer processor, the method comprising:

[0116] The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, the server sends the hardware code to the smart password key, and the smart password key determines whether to authorize the terminal device with the hardware code according to a plurality of pre-stored codes to be updated and the recorded current number of successful authorizations;

[0117] When authorization is confirmed, the smart password key obtains the type of security chip associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined, combines the string with the authorization code to be combined to obtain an authorization code of the hardware code, and feeds the authorization code back to the server;

[0118] The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

[0119] It is worth noting that in the embodiment of the above-mentioned security chip firmware restricted update method system, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0120] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made to the present application without departing from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for updating security chip firmware in a restricted manner, characterized in that: The method comprises: The server receives a firmware update request sent by a terminal device, the terminal device includes a security chip firmware to be updated, the firmware update request includes the hardware code of the security chip, the server sends the hardware code to the smart password key, and the smart password key determines whether to authorize the terminal device with the hardware code according to a plurality of pre-stored codes to be updated and the recorded current number of successful authorizations; When authorization is confirmed, the smart password key obtains the type of security chip associated with the hardware code, searches for the string corresponding to the security chip type according to a preset string mapping table, encrypts the hardware code based on a preset encryption algorithm to obtain an authorization code to be combined, combines the string with the authorization code to be combined to obtain an authorization code of the hardware code, and feeds the authorization code back to the server; The server sends the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

2. The method for limited updating of security chip firmware according to claim 1, characterized in that: The combining the character string with the authorization code to be combined to obtain the hardware-encoded authorization code includes: The number of digits of the authorization code to be combined is determined, the position to be inserted of the authorization code to be combined is determined according to a preset percentage and the number of digits, and the character string is inserted into the position to be inserted of the authorization code to be combined to obtain the hardware-encoded authorization code.

3. The method for limited updating of security chip firmware according to claim 1, characterized in that: The combining the character string with the authorization code to be combined to obtain the hardware-encoded authorization code includes: The character string is evenly split into a header combination part and a tail combination part, the header combination part is added to the head of the authorization code to be combined, and the tail combination part is added to the tail of the authorization code to be combined to obtain the hardware-encoded authorization code.

4. The method for limited updating of security chip firmware according to claim 1, characterized in that: In the case that the character string corresponding to the security chip type does not exist in the preset character string mapping table, the method for generating the authorization code further includes: A corresponding encoding processing method is determined according to the hardware encoding format associated with the security chip type, and the hardware encoding is encrypted according to the encoding processing method to obtain a unique authorization code.

5. The method for limited updating of security chip firmware according to claim 4, characterized in that: The determining a corresponding encoding processing method according to the hardware encoding format associated with the security chip type includes: According to the preset code number, each sub-segment coding format in the hardware coding format is determined from front to back, and the pre-stored sub-segment coding processing methods corresponding to each sub-segment coding format are combined to obtain the corresponding coding processing method, and the sub-segment coding format includes a character format, a digital format, and a character and digital combination format.

6. The method for limited updating of security chip firmware according to any one of claims 1 to 3, characterized in that: The terminal device performs an update and authorization operation of the security chip firmware, including: The terminal device performs digital signature verification on the preset firmware update file according to the security chip firmware, and if the digital signature verification succeeds, updates the security chip firmware according to the preset firmware update file; otherwise, refuses to update the security chip firmware; The terminal device performs security verification on the authorization code. If the security verification is successful, the normal function of the security chip is enabled. Otherwise, an error message is prompted and any operation other than authorization is prohibited.

7. The method for limited updating of security chip firmware according to any one of claims 1 to 3, characterized in that: Before the server receives the firmware update request sent by the terminal device, the method further includes: The server performs login authentication of the smart password key according to the input key. If the login authentication of the smart password key is passed, the server imports a plurality of pre-stored codes to be updated into the smart password key for authorization restriction.

8. A security chip firmware restricted update device, characterized in that: include: A receiving module, configured to receive, at the server side, a firmware update request sent by a terminal device, wherein the terminal device includes a security chip firmware to be updated, and the firmware update request includes a hardware code of the security chip; A sending module, used for the server to send the hardware code to the smart password key; An authorization judgment module is used for the smart password key to determine whether to authorize the hardware-coded terminal device according to a plurality of pre-stored codes to be updated and the recorded current number of successful authorizations; An authorization code generation and feedback module is used for the smart password key to obtain the type of security chip associated with the hardware code when authorization is confirmed, query the string corresponding to the security chip type according to a preset string mapping table, encrypt the hardware code based on a preset encryption algorithm to obtain the authorization code to be combined, combine the string with the authorization code to be combined to obtain a final authorization code, and feed the authorization code back to the server; The sending module is also used for the server to send the preset firmware update file and the authorization code to the terminal device, so that the terminal device can update and authorize the security chip firmware.

9. A security chip firmware limited update device, the device comprising: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the security chip firmware restricted update method as described in any one of claims 1-7.

10. A storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the security chip firmware restricted update method according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Visible intelligent cipher key

    CN101179373A

  • Apparatus for trustable digital signature to intelligent cipher key and working method thereof

    CN101478547A

  • Security chip COS firmware updating method, server side, terminal and system

    CN106227503A

  • Upgrading method, device and system for files in chip and server

    CN110764797A

  • Hardware authorization method and system

    CN113553629A