Memory system and firmware update method, apparatus, and readable storage medium thereof
By establishing a correspondence between firmware version information and keys, generating file signature values and performing authentication, the problem of not being able to skip or downgrade updates in traditional firmware update methods is solved, achieving flexible, secure, and efficient firmware updates.
Patent Information
- Application Number
- CN202110495988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-07
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2041-05-07
AI Technical Summary
Traditional firmware update methods cannot achieve cross-level upgrades or downgrades, are inefficient, and cannot effectively protect the security of firmware update files.
By establishing an update information list, including the correspondence between firmware version information and keys, generating a file signature value, and authenticating it on the user terminal, a non-stepwise firmware update is achieved.
It achieves flexibility and security in firmware updates, enabling upgrades to higher or lower levels in a single update process, significantly improving update efficiency.
Smart Images

Figure CN113127041B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer technical field, more particularly, to a firmware updating method of a memory system, a memory system, a firmware updating device of a memory system and a computer readable storage medium. BACKGROUND
[0002] Firmware is a program stored in an EEPROM or a FLASH chip in a device and can be upgraded by a user terminal through a specific refreshing program. Firmware usually performs the most basic and bottom-level work in devices such as personal computers, mobile phones, GPS terminals and digital satellite receivers. Firmware updating or upgrading refers to a process of writing new firmware into the above-mentioned chip to replace the original firmware.
[0003] Since the information stored in the EEPROM or the FLASH chip is usually confidential, it is crucial to ensure the security of the stored data information, and one of the main functions of firmware updating is to repair the BUG in the existing firmware and improve the quality and security of the firmware.
[0004] The traditional firmware updating method can only realize step-by-step firmware upgrading, in other words, the traditional firmware updating method cannot realize overstep upgrading through one firmware updating process, in addition, the traditional firmware updating method also cannot realize downgrading updating (downgrading updating is to replace the existing high-level firmware version with a low-level firmware version). In addition, when overstep updating firmware is realized by using the traditional firmware updating method, it is necessary to pass through multiple firmware updating processes to step by step progress to the target firmware version to be updated, thus greatly reducing the efficiency of firmware updating. SUMMARY
[0005] The present application provides a firmware updating method of a memory system, a memory system, a firmware updating device of a memory system and a computer readable storage medium which can at least partially solve the above-mentioned problems existing in the prior art.
[0006] One aspect of the present application provides a firmware updating method of a memory system, the method comprising: in response to a firmware updating request from a user terminal coupled with the memory system, the firmware updating request including version information of a current firmware of the memory system and version information of a target firmware to be updated, generating a corresponding file signature value according to an updating information list and the firmware updating request, wherein the updating information list includes a corresponding relationship between version information of firmware and a key; and sending a firmware updating file including the target firmware and the corresponding file signature value to the user terminal.
[0007] In one embodiment of the present application, the method further comprises: generating the updating information list.
[0008] In one embodiment of the present application, the step of generating the update information list comprises generating an update information list comprising N version information of the firmware and N keys, the keys comprising a public key and a private key corresponding to each other, wherein the N-1th firmware version information corresponds to the Nth public key; the N-1th firmware version information corresponds to the N-1th private key; and N is any positive integer and N≥2.
[0009] In one embodiment of the present application, the step of generating the file signature value comprises: obtaining the public key corresponding to the version information of the target firmware from the update information list; calculating the hash value of the target firmware by calculating the target firmware and the public key corresponding to the version information of the target firmware; and generating the file signature value based on the hash value.
[0010] In one embodiment of the present application, generating the file signature value based on the hash value comprises: obtaining the private key corresponding to the version information of the current firmware from the update information list; and encrypting the hash value of the target firmware by the private key corresponding to the version information of the current firmware to form the file signature value.
[0011] In one embodiment of the present application, the firmware update file further comprises the public key corresponding to the version information of the target firmware.
[0012] In one embodiment of the present application, the version of the target firmware reflected by the version information of the target firmware is lower than the version of the current firmware reflected by the version information of the current firmware, or the version of the target firmware reflected by the version information of the target firmware is at least two levels higher than the version of the current firmware reflected by the version information of the current firmware.
[0013] In one embodiment of the present application, the memory system comprises a solid state disk.
[0014] Another aspect of the present application provides a firmware update method, the method comprising: receiving a firmware update file comprising the target firmware and a corresponding file signature value, wherein the file signature value is generated according to an update information list, version information of a current firmware of a memory system and version information of a target firmware to be updated, the update information list comprising a corresponding relationship between version information of firmware and keys; authenticating the received firmware update file; and allowing the current firmware to be updated to the target firmware if the authentication is passed.
[0015] In one embodiment of the present application, the step of authenticating the received firmware update file comprises: decrypting the file signature value using a locally saved public key corresponding to the version information of the current firmware to obtain the hash value of the target firmware; performing hash calculation on the obtained target firmware and the public key corresponding to the version information of the target firmware to obtain a hash target firmware to be verified; determining whether the hash target firmware to be verified is identical to the target firmware hash value; and if identical, passing the authentication.
[0016] In one embodiment of the present application, in the case of failed authentication, the current firmware is prohibited from being updated to the target firmware.
[0017] In one embodiment of the present application, the version of the target firmware reflected by the version information of the target firmware is lower than the version of the current firmware reflected by the version information of the current firmware, or the version of the target firmware reflected by the version information of the target firmware is at least two levels higher than the version of the current firmware reflected by the version information of the current firmware.
[0018] In one embodiment of the present application, the memory system comprises a solid state disk.
[0019] Another aspect of the present application provides a memory system comprising a storage controller configured with firmware, wherein the storage controller is configured to be capable of updating the current firmware to the corresponding target version using the firmware update method of any one of the memory systems provided in another aspect of the present application.
[0020] Another aspect of the present application provides a firmware update device of a memory system, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor is capable of executing the computer program to implement the firmware update method of any one of the memory systems provided in one aspect of the present application, or to implement the firmware update method of any one of the memory systems provided in another aspect of the present application.
[0021] Another aspect of the present application provides a computer readable storage medium for storing a computer program, wherein the computer program is executable by a processor to implement the firmware update method of any one of the memory systems provided in one aspect of the present application, or to implement the firmware update method of any one of the memory systems provided in another aspect of the present application.
[0022] According to the firmware updating method of the memory system, the memory system, the firmware updating device of the memory system and the computer readable storage medium provided by one embodiment of the present application, by establishing the updating information list, the firmware updating file meeting the firmware updating request of the user terminal can be sent according to the version information of the current firmware of the user terminal and the version information of the target firmware to be updated, and then the firmware updating mode of non-step-by-step progression is realized, so that the firmware updating is more flexible, safe and reliable.
[0023] In addition, according to at least one embodiment of the present application, by establishing the updating information list, the over-grade firmware updating or the down-grade firmware updating of the user terminal can be realized only through one firmware updating process, so that the efficiency of the firmware updating is greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] Other characteristics, objects and advantages of the present application will become more apparent from the detailed description of the non-restrictive embodiments, made with reference to the attached drawings. Among these:
[0025] Figure 1 is a flow chart of the firmware updating method according to one embodiment of the present application;
[0026] Figure 2 is a schematic diagram of the updating information list according to one embodiment of the present application;
[0027] Figure 3 is a schematic diagram of the structure and working mode of the firmware updating system according to one embodiment of the present application;
[0028] Figure 4 is a schematic diagram of the process of generating the firmware updating file according to one embodiment of the present application;
[0029] Figure 5 is a schematic diagram of the process of implementing decryption and authentication by the user terminal according to one embodiment of the present application;
[0030] Figure 6 is a schematic diagram of the process of generating the firmware updating file according to another embodiment of the present application;
[0031] Figure 7 is a schematic diagram of the process of implementing decryption and authentication by the user terminal according to another embodiment of the present application;
[0032] Figure 8 is a schematic diagram of the firmware updating mode according to one embodiment of the present application;
[0033] Figure 9 is a schematic diagram of the user terminal with the memory system according to one embodiment of the present application;
[0034] Figure 10is a schematic diagram of a memory system according to an embodiment of the present application; and
[0035] Figures 11 to 13 is a schematic diagram of a firmware update method according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] For a better understanding of the present application, various aspects of the present application will be described in greater detail below with reference to the accompanying drawings. It is to be noted that these detailed descriptions are merely descriptive of exemplary embodiments of the present application and are not intended in any way to limit the scope of the present application. Throughout the specification, like drawing reference numerals refer to like elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0037] It is to be noted that, in the present specification, the expressions first, second, third and the like are merely used to separate one feature from another feature area, and do not represent any limitation on the features, especially do not represent any order of precedence. Therefore, the first firmware version information discussed in the present application can also be referred to as the second firmware version information, the first private key can also be referred to as the second private key, and vice versa, without departing from the teachings of the present application.
[0038] In the drawings, the thickness, size, and shape of components have been slightly adjusted for ease of illustration. The drawings are merely schematic and are not drawn to scale. As used in this document, the terms "substantially", "approximately", and similar terms are used as terms of approximation and not as terms of degree, and are intended to account for the inherent deviations in a measuring or computing process.
[0039] It should also be understood that expressions such as "include", "including", "have", "has", "contain" and / or "containing", and the like, are open-ended expressions that are used to specify the presence of stated features, elements, and / or components, but do not preclude the presence or addition of one or more other features, elements, components, and / or combinations thereof. In addition, when such expressions as "at least one of", "one or more of", and the like are followed by a list of elements, the expression is intended to cover all of the individual elements in the list, as well as any combination of one or more of the elements. Further, when describing embodiments of the present application, the use of "may" indicates that one or more embodiments of the present application. Also, the expression "exemplary" is intended to mean an example or an illustration.
[0040] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0041] It should be noted that the embodiments and features of the embodiments in the present application can be combined with each other without conflict. In addition, the specific steps contained in the methods described in the present application are not necessarily limited to the order described unless expressly limited or contradicted by the context. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0042] In addition, when "connected" or "coupled" is used in the present application, it can mean direct contact or indirect contact between the corresponding components unless expressly defined otherwise or deduced from the context.
[0043] Figure 1 is a flow chart of a firmware update method 1000 of a memory system according to an embodiment of the present application. As shown in Figure 1 The present application provides a firmware update method 1000 of a memory system, which includes:
[0044] S1, in response to a firmware update request from a user terminal coupled with the memory system, the firmware update request including version information of current firmware of the memory system and version information of target firmware to be updated, generating a corresponding file signature value according to the update information list and the firmware update request, wherein the update information list includes the corresponding relationship between the version information of the firmware and the key;
[0045] S2, sending a firmware update file including the target firmware and the corresponding file signature value to the user terminal.
[0046] The specific steps of the above firmware update method 1000 will be described in detail below in conjunction with Figures 2 to 8
[0047] Figure 2 is a schematic diagram of an update information list according to an embodiment of the present application. Figure 3 is a schematic diagram of the structure and working mode of a firmware update system according to an embodiment of the present application.
[0048] As shown in Figure 2 and Figure 3 As shown, the firmware update system can mainly include a firmware release server 100 and a user terminal 200 coupled with a memory system, wherein the user terminal 200 can be a personal computer, a mobile phone, a GPS terminal, a digital satellite receiver, etc.
[0049] In an embodiment of the present application, the memory system (e.g. a solid state disk (SSD)) can include a device of a FLASH chip (e.g. a three-dimensional NAND Flash memory). The FLASH chip can store data as a storage medium of the SSD 210 of the memory system.
[0050] Firmware is a program stored in an EEPROM (Electrically Erasable Programmable ROM) or a FLASH chip of the device and can be upgraded by a specific refresh program of the user terminal 200. The firmware controls the read / write and transmission algorithm of the SSD 210 and reasonably allocates the storage of data. The SSD 210 is widely used in important fields such as military field due to its high-speed storage, shock resistance and high reliability. Since the SSD 210 usually stores confidential information, it is crucial to ensure the security of the data information stored in the SSD 210, and one of the main functions of the firmware update is to repair the BUG of the SSD 210 and improve the quality and security of the SSD 210.
[0051] In an embodiment of the present application, the user terminal 200 can establish a connection with the firmware release server 100 through, for example, a TCP / IP protocol, send a firmware update request, and obtain a firmware update version sent in response to the firmware update request. Further, inside the user terminal 200, the obtained firmware update file can also be transmitted to the SSD 210 through, for example, a PCIe (peripheral component interconnect express) bus, and the firmware update file can be decrypted, authenticated and updated based on the target update file in the SSD 210.
[0052] In the conventional firmware update method, in order to protect the firmware update file from being maliciously tampered with or intercepted by a third party, the firmware release server usually performs an operation on the target firmware (the image file of the target firmware) to be sent to the user terminal in advance by using a one-way hash function such as MD5, SHA1, and CRC32, generates a corresponding hash digest, and generates a public key and a private key corresponding to each other by a key generation module of the firmware release server, encrypts the hash digest by the private key, and thereby generates a file signature value. Then, the file signature value, the target firmware itself, and the public key corresponding to the private key are packaged into a firmware update file, which is used to respond to the firmware update request of the user terminal.
[0053] Further, in the conventional firmware update method, the firmware release server usually sends the public key required by the user terminal for this firmware update to the user terminal in advance. In other words, the firmware update file sent this time includes the public key (i.e., the next public key) required for decrypting the next higher firmware version adjacent to the target firmware version.
[0054] Specifically, the firmware release server can include a calculation module and an encryption module, such as an SHA hash engine and an RSA encryption engine, and the calculation module can calculate and extract a hash value from the target firmware and the next public key. Then, the encryption module can encrypt the hash value by the private key of the keys corresponding to each other generated by the key generation module to generate a file signature value, wherein the public key corresponding to the private key has been sent to the user terminal in the last firmware update process. Then, the target firmware (i.e., the image file of the target firmware), the next public key, and the file signature value are packaged to generate a firmware update file.
[0055] When the SSD of the user terminal receives a firmware update file, it can first calculate and extract a hash value from the received target firmware and the next public key by using the same calculation module as the calculation module of the firmware release server, such as an SHA hash engine, and at the same time, the decryption module of the SSD, which is opposite to the encryption module of the firmware release server, such as an RSA decryption engine, can decrypt the received file signature value by using the public key received in the last update process to output the original hash value. Then, the original hash value and the hash value calculated by the local calculation module are compared. If they are the same, it is considered that the received target firmware is safe and reliable, and the firmware update can be implemented based on the target firmware; if they are not the same, it is considered that the received target firmware is illegal or has been maliciously tampered with or intercepted, and the firmware update cannot be implemented based on the target firmware.
[0056] However, as Figures 11 to 13As shown, traditional firmware update methods can only achieve incremental firmware upgrades. In other words, traditional firmware update methods cannot achieve skip-level upgrades in a single firmware update process, nor can they achieve downgrade updates (replacing an existing high-level firmware version with a lower-level firmware version). Furthermore, when using traditional firmware update methods to achieve skip-level firmware updates, multiple firmware update processes must be performed, progressively advancing to the target firmware version, thus significantly reducing the efficiency of firmware updates.
[0057] In the firmware update method provided in this application, an update information list 110 can be generated in the firmware distribution server 100. The update information list 110 may include the correspondence between the version information of each firmware and the key. By establishing the update information list 110, the firmware distribution server 100 can send a firmware update file that conforms to the firmware update request of the user terminal 200 according to the current firmware version information of the user terminal 200 and the version information of the target firmware to be updated. This enables a non-stepwise firmware update. In other words, the firmware update method provided in this application can achieve a leapfrog upgrade or downgrade update in only one firmware update process, making firmware updates more flexible, versatile, secure, and reliable. Furthermore, the firmware update method provided in this application can update the firmware of the SSD 210 of the user terminal 200 to the target firmware in only one firmware update process, significantly improving the efficiency of firmware updates.
[0058] In one embodiment of this application, the step of generating the update information list 110 may include: generating an update information list comprising N version information of firmware and N keys, wherein the keys include corresponding public and private keys. In other words, the firmware distribution server 100 can encrypt the firmware using the private key corresponding to the firmware version information, and similarly, the SSD 210 of the user terminal 200 can decrypt the firmware using the public key corresponding to the private key. In the update information list 110, the (N-1)th firmware version information corresponds to the Nth public key, and the (N-1)th firmware version information corresponds to the (N-1)th private key, where N is any positive integer and N≥2. Alternatively, the aforementioned public and private keys may also be their corresponding indices.
[0059] Specifically, such as Figure 2 As shown, when N=6, the update information list 110 contains 5 firmware version information and 6 pairs of keys. The 6 pairs of keys include 6 pairs of corresponding public and private keys (e.g., ...). Figure 2As shown in the middle elliptic dashed line, in the update information list 110, the firmware first version information corresponds to the first private key and the second public key; the firmware second version information corresponds to the second private key and the third public key; the firmware fifth version information corresponds to the fifth private key and the sixth public key. As an option, the firmware first version can be an initial firmware version burned in the SSD 210 when the SSD 210 is manufactured, and the first version firmware can be encrypted by the first private key, and then the second public key can be stored in the EEPROM or the FLASH chip of the SSD 210 at the same time as the first version firmware.
[0060] Figure 4 is a process diagram of generating a firmware update file by the firmware release server 100 according to an embodiment of the present application. Figure 6 is a process diagram of generating a firmware update file by the firmware release server 100 according to another embodiment of the present application.
[0061] As an option, in an embodiment of the present application, the version of the target firmware reflected by the version information of the target firmware can be lower than the version of the current firmware reflected by the version information of the current firmware; as another option, in another embodiment of the present application, the version of the target firmware reflected by the version information of the target firmware is at least two levels higher than the version of the current firmware reflected by the version information of the current firmware.
[0062] Specifically, as shown in Figure 3 , Figure 4 and Figure 6 , step S1 responds to the firmware update request from the user terminal 200 coupled with the memory system, the firmware update request including the version information of the current firmware of the memory system and the version information of the target firmware to be updated, and the file signature value corresponding to the firmware update request can be generated according to the update information list 110, for example, the firmware release server 100 generates the update information list 110 including the corresponding relationship between the version information of all the firmware on the firmware release server 100 and the key by the management module (not shown); the public key corresponding to the version information of the target firmware to be updated of the SSD 210 of the user terminal 200 is obtained through the update information list 110; the target firmware and the public key corresponding to the version information of the target firmware are calculated to generate the hash value of the target firmware; the private key corresponding to the version information of the current firmware on the SSD 210 of the user terminal 200 is obtained through the update information list 110; the target firmware hash value is encrypted by the private key corresponding to the version information of the current firmware to form the file signature value; and step S2 sends the firmware update file including the target firmware and the file signature value.
[0063] Further, the firmware update file can further include the public key corresponding to the version information of the target firmware.
[0064] Specifically, as shown inFigure 4 As shown, in one embodiment of this application, the firmware release server 100 can generate an update information list 110 that includes the correspondence between version information and keys of all firmware on the firmware release server 100 through the management module.
[0065] According to the firmware update request, the current firmware version on the SSD210 of user terminal 200 is firmware version 1, and the target firmware version to be updated is firmware version 5. In response to the firmware update request, firmware release server 100 obtains the public key 6 corresponding to firmware version 5, the public key 1 corresponding to firmware version 1, and the private key 1 corresponding to public key 1 from update information list 110.
[0066] Furthermore, as an alternative, the firmware release server 100 may also include a receiving calculation module (not shown) and an encrypted sending module (not shown). The receiving calculation module may include, for example, a SHA hash engine for calculation, and the encrypted sending module may include, for example, an RSA encryption engine for encryption. The receiving calculation module calculates the hash value of firmware 5 (i.e., the image file of firmware 5) and public key 6. The encrypted sending module may use private key 2 to encrypt the hash value of firmware 5 to generate a file signature value. Then, firmware 5 (i.e., the image file of the target firmware), public key 6, and file signature value are packaged to generate a firmware update file and sent to the SSD 210 of user terminal 200.
[0067] In the above embodiments, the firmware update method provided by this application can, for example, upgrade the firmware version of a user terminal from version 1 to version 5 in a single firmware update process. In other words, the firmware update method provided by this application can achieve a skip-level firmware update in a single firmware update process, thereby making firmware updates more flexible, adaptable, secure, and reliable. Furthermore, because the firmware update method provided by this application can update to the target firmware in only one firmware update process, it significantly improves the efficiency of firmware updates.
[0068] like Figure 6 As shown, in one embodiment of this application, the firmware release server 100 can generate an update information list 110 that includes the correspondence between version information and keys of all firmware on the firmware release server 100 through the management module.
[0069] According to the firmware update request, it is learned that the version of the current firmware on the SSD 210 of the user terminal 200 is the fifth version firmware 5, and the version of the target firmware to be updated is the fourth version firmware 4. In response to the firmware update request, the firmware release server 100 acquires, through the update information list 110, the public key 5 corresponding to the fourth version firmware 4 information, the public key 6 corresponding to the fifth version firmware 5 information, and the private key 6 corresponding to the public key 6.
[0070] Further, as an option, the firmware release server 100 can further include a receiving calculation module (not shown) and an encryption sending module (not shown). The receiving calculation module can include, for example, a SHA hash engine for calculation, and the encryption sending module can include, for example, an RSA encryption engine for encryption. The receiving calculation module calculates and extracts the hash value of the firmware 4 by calculating the firmware 4 (the image file of the firmware 4) and the public key 5. The encryption sending module can encrypt the hash value of the firmware 4 using the private key 6 to generate a file signature value. Then, the firmware 4 (the image file of the target firmware), the public key 5, and the file signature value are packaged to generate a firmware update file, which is sent to the SSD 210 of the user terminal 200.
[0071] In the above embodiment, the firmware update method provided by the present application can, for example, downgrade the firmware version of the user terminal from the fifth version to the fourth version through one firmware update process. In other words, the firmware update method provided by the present application enables the firmware update to realize downgrade update, thereby making the firmware update more flexible, safe and reliable.
[0072] Another aspect of the present application also provides a method for implementing decryption, authentication and firmware update on a user terminal 200 coupled with a memory system.
[0073] Figure 5 is a process diagram of the user terminal 200 implementing decryption and authentication according to an embodiment of the present application. Figure 7 is a process diagram of the user terminal 200 implementing decryption and authentication according to another embodiment of the present application.
[0074] As shown in Figure 5 and Figure 7 , the method can include, for example, receiving a firmware update file; authenticating the firmware update file, if the authentication fails, prohibiting updating the current firmware to the target firmware; and if the authentication passes, allowing updating the current firmware to the target firmware.
[0075] In one embodiment of the present application, the authentication process of the SSD 210 may, for example, include the following steps: when the SSD 210 of the user terminal 200 receives a firmware update file including a file signature value and a target firmware, and receives a public key corresponding to the version information of the target firmware, first, the decryption module of the SSD, which is opposite to the encryption sending module of the firmware publishing server 100, such as an RSA decryption engine, decrypts the file signature value using the locally saved public key corresponding to the version information of the current firmware to obtain the hash value of the target firmware. Further, the received target firmware and the public key corresponding to the version information of the target firmware can be hashed to extract the hash value using the same SHA hash engine as the receiving calculation module of the firmware publishing server 100, to obtain the hash target firmware to be verified. Then, it is determined whether the hash target firmware to be verified is the same as the hash value of the target firmware. If they are the same, it is considered that the received target firmware is safe and reliable, and the firmware update can be implemented based on the target firmware; if they are not the same, it is considered that the received target firmware is illegal, or is maliciously tampered with or intercepted, and the current firmware is prohibited from being updated to the target firmware; if the authentication is passed, the firmware update is implemented based on the target firmware of the firmware update file.
[0076] Further, in the firmware update method of the memory system provided by the present application, the version of the target firmware reflected by the version information of the target firmware is lower than the version of the current firmware reflected by the version information of the current firmware, or the version of the target firmware reflected by the version information of the target firmware is at least two levels higher than the version of the current firmware reflected by the version information of the current firmware.
[0077] Specifically, as shown in Figure 5 In one embodiment of the present application, the version of the current firmware of the SSD 210 is firmware version 1, and the version of the target firmware to be updated is firmware version 5. The received firmware 5 and public key 6 in the firmware update file are hashed to extract the hash value of the firmware 5 to be verified. The file signature value in the received firmware update file is decrypted using the pre-acquired public key 2 corresponding to the firmware 1 to obtain the file hash value. It is determined whether the firmware 5 hash value is the same as the file firmware hash value. If they are the same, it is considered that the received firmware 5 is safe and reliable, and the firmware update can be implemented based on the firmware 5; if they are not the same, it is considered that the received firmware 5 is illegal, or is maliciously tampered with or intercepted, and the firmware update cannot be implemented based on the firmware 5.
[0078] In the above embodiments, the method for decryption, authentication, and firmware update of user terminal 200 provided in this application can, for example, upgrade the firmware version of the user terminal from version 1 to version 5 in a single firmware update process. This enables firmware updates to achieve skip-level upgrades, making firmware updates more flexible, adaptable, secure, and reliable. Furthermore, the firmware update method provided in this application significantly improves the efficiency of firmware updates because it updates to the target firmware in only one process.
[0079] like Figure 7 As shown, in one embodiment of this application, the current firmware version of the SSD210 is firmware version 5, and the target firmware version to be updated is firmware version 4. A hash calculation is performed on firmware 4 and public key 5 in the received firmware update file to extract the hash value of firmware 4 to be verified. The file signature value in the received firmware update file is decrypted using the pre-obtained public key 6 corresponding to firmware 5 to obtain the file hash value. It is determined whether the firmware 4 hash value and the file firmware hash value are the same. If they are the same, the received firmware 4 is considered secure and reliable, and firmware updates can be performed based on firmware 4; if they are different, the received firmware 4 is considered illegal, or maliciously tampered with or intercepted, and firmware updates cannot be performed based on firmware 4.
[0080] In the above embodiments, the method for decryption, authentication and firmware update of user terminal 200 provided in this application can, for example, downgrade the firmware version of user terminal from version 5 to version 4 through a single firmware update process, thereby enabling firmware update to achieve downgrade update, and thus making firmware update more flexible, secure and reliable.
[0081] Figure 8 This is a schematic diagram illustrating a firmware update method according to one embodiment of this application. According to one embodiment of the firmware update method provided by this application, by establishing an update information list, a firmware update file matching the user terminal's firmware update request can be sent based on the user terminal's current firmware version information and the target firmware version information to be updated. This achieves a non-stepwise firmware update method, such as achieving a skip-level upgrade or downgrade update in a single update process, making firmware updates more flexible, adaptable, secure, and reliable. Furthermore, according to at least one embodiment of this application, by establishing an update information list, a skip-level firmware update or downgrade update of the user terminal can be achieved in a single firmware update process, thus significantly improving the efficiency of firmware updates.
[0082] Figure 9 This is a schematic diagram of a user terminal 400 having a memory system according to one embodiment of this application. Figure 10 This is a schematic diagram of a memory system 420 according to one embodiment of this application.
[0083] like Figure 9 and Figure 10 As shown, another aspect of this application also provides a storage system 420. The storage system 420 may include a storage controller 428 configured with firmware, which may be configured to use the decryption, authentication, and firmware update methods provided in another aspect of this application to update the current firmware to the corresponding target version.
[0084] Specifically, user terminal 400 typically includes a microprocessor 408, random access memory (RAM) 412, input / output circuitry 418, and a system bus 404. User terminal 400 can be any system that can actually store and retrieve data or information, such as a camera, video camera, mobile communication device, audio player, or video player; this application does not limit it to any such system.
[0085] In one embodiment, a storage system 420 including removable non-volatile memory 424 is connected to a bus 404 to store information. Optionally, an interface unit 430 may allow the storage system 420 to be indirectly connected to the bus 404. The storage system 420 may include non-volatile memory 424 and a storage controller 428. Alternatively, the storage system 420 may be implemented on a single chip or circuit chip; alternatively, the storage system 420 may be implemented on a multi-chip module or on multiple distributed components that can form a chipset and may be part of the storage system 420.
[0086] Alternatively, the non-volatile memory 424 may be a three-dimensional NAND flash memory used to store data and make the data accessible or readable when needed. Furthermore, the data stored in the non-volatile memory 424 can also be erased when appropriate. The processes of storing, retrieving, and erasing data are typically controlled by the storage controller 428. When the control system is present, the storage controller 428 communicates with the user terminal 400 or other systems using the storage system to store data via bus 15. Figure 10 Bus 15 in the middle is usually Figure 9 It is part of bus 104. The storage controller 428 can control the operation of non-volatile memory 424, which includes memory cell array 11, to write data provided by user terminal 400, read data requested by user terminal 400, and perform various housekeeping functions in non-volatile memory 424.
[0087] The memory cell array 11 is generally addressable by the memory controller 428 through an address decoder 17. The decoder 17 applies the correct voltages to the gate and bit lines of the memory cell array 11 to write data to the memory cells, read data from the memory cells, or erase the memory cells. Additional circuitry 19 (write and read) includes control of the voltages applied to the elements of the memory cell array 11 depending on the data to be written to the addressed memory cells. The memory cell array 11 can be divided into a number of data blocks (Block 0 - Block N), a data block being the smallest erase unit, in other words, each data block contains the smallest number of memory cells that can be erased together, and each data block can generally be divided into a number of pages (e.g., page 5 and page 6). The non-volatile memory 424 can be managed by the memory controller 428, which effectively executes at least one of software and firmware to control the non-volatile memory 424. In other words, the memory controller 428 can run a software code or a firmware code to control the non-volatile memory 424. Further, the memory controller 428 can also be configured to use the method for implementing decryption, authentication, and firmware update provided by another aspect of the present application to update the current firmware to a corresponding target version to fix a bug in the existing firmware and improve the quality and security of the firmware.
[0088] Since the content and structure involved in the description of the firmware update method 1000 above can be completely or partially applicable to the memory system of the user terminal described herein, the content related or similar thereto will not be described again.
[0089] According to the firmware update device provided by one embodiment of the present application, by establishing the update information list, the firmware update file conforming to the firmware update request of the user terminal can be sent according to the version information of the current firmware of the user terminal and the version information of the target firmware to be updated, and thus the firmware update method of non-step-by-step progression is implemented, for example, the overstep upgrade or downgrade update is implemented through one firmware update process, so that the firmware update is more flexible, safe, and reliable. In addition, according to at least one embodiment of the present application, the firmware update device can implement the overstep upgrade or downgrade update of the user terminal through only one firmware update process, and thus the efficiency of the firmware update is greatly improved.
[0090] Still another aspect of the present application further provides a firmware update device, which can include a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the firmware update method 1000 provided by any one of the above embodiments of the present application or the method for implementing decryption, authentication, and firmware update with respect to the user terminal 200 provided by any one of the above embodiments of the present application when the computer program is executed.
[0091] Another aspect of the present application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the firmware updating method 1000 according to any one of the above embodiments or the method for implementing decryption, authentication and firmware updating on the user terminal 200 according to any one of the above embodiments.
[0092] Since the content and structure involved in the description of the firmware updating method 1000 and the method for implementing decryption, authentication and firmware updating on the user terminal 200 above can be completely or partially applicable to the firmware updating device and the computer readable storage medium described herein, the content related or similar thereto will not be described again.
[0093] In addition, the part of the above technical solutions provided in the embodiments of the present application which is consistent with the implementation principle of the corresponding technical solution in the prior art is not described in detail to avoid excessive description.
[0094] The above description is only an embodiment of the present application and an explanation of the technical principles applied. Those skilled in the art should understand that the protection scope of the present application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the technical concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present application (but not limited to) having similar functions.
Claims
1. A firmware update method of a memory system, characterized by, The method comprises: in response to a firmware update request from a user terminal coupled with the memory system, the firmware update request including version information of a current firmware of the memory system and version information of a target firmware to be updated, generating a corresponding file signature value according to an update information list and the firmware update request, obtaining a private key corresponding to a public key corresponding to the version information of the current firmware through the update information list, and encrypting a hash value of the target firmware through the private key to form the file signature value, wherein the update information list includes a corresponding relationship between N version information of firmware and N keys, the keys including mutually corresponding public keys and private keys, the N-1 firmware version information corresponding to the N public key, and the N-1 firmware version information corresponding to the N-1 private key; and N is any positive integer, and N≥2; and sending a firmware update file including the target firmware and the corresponding file signature value to the user terminal, wherein the step of generating the file signature value comprises: obtaining a public key corresponding to the version information of the target firmware through the update information list; calculating the hash value of the target firmware by calculating the target firmware and the public key corresponding to the version information of the target firmware; and generating the file signature value based on the hash value, wherein the version information of the target firmware reflects a version of the target firmware lower than the version information of the current firmware reflecting the version of the current firmware, or the version information of the target firmware reflects a version of the target firmware at least two levels higher than the version information of the current firmware reflecting the version of the current firmware; and the firmware update file further includes a public key required for decrypting a next higher level firmware version adjacent to the target firmware version.
2. The method of claim 1, wherein, The method further comprises generating the update information list.
3. The method of any one of claims 1-2, wherein, The memory system includes a solid state disk.
4. A firmware update method of a memory system, characterized by, receiving a firmware update file including a target firmware and a corresponding file signature value, wherein the file signature value is generated according to an update information list, version information of a current firmware of the memory system and version information of a target firmware to be updated, a private key corresponding to a public key corresponding to the version information of the current firmware is obtained through the update information list, wherein the update information list includes a corresponding relationship between N firmware version information of firmware and N keys, the keys including mutually corresponding public keys and private keys, the N-1 firmware version information corresponding to the N public key, and the N-1 firmware version information corresponding to the N-1 private key; and N is any positive integer, and N≥2, a hash value of the target firmware is encrypted through the private key to form the file signature value, and the update information list includes a corresponding relationship between version information of firmware and keys; authenticating the received firmware update file; and in the case of passing the authentication, allowing the current firmware to be updated to the target firmware, The step of authenticating the received firmware update file comprises: decrypting the file signature value using a locally saved public key corresponding to the version information of the current firmware to obtain the hash value of the target firmware; performing hash calculation on the obtained target firmware and the public key corresponding to the version information of the target firmware to obtain a to-be-verified hash target firmware; determining whether the to-be-verified hash target firmware is identical to the hash value of the target firmware; and if so, passing the authentication; and The version of the target firmware reflected by the version information of the target firmware is lower than the version of the current firmware reflected by the version information of the current firmware, or the version of the target firmware reflected by the version information of the target firmware is at least two levels higher than the version of the current firmware reflected by the version information of the current firmware; and The firmware update file further comprises a public key required for decrypting a next higher level firmware version adjacent to the version of the target firmware.
5. The firmware update method according to claim 4, wherein The method further comprises: In the case of failed authentication, the current firmware is prohibited from being updated to the target firmware.
6. The method of any one of claims 4-5, wherein, The memory system comprises a solid state disk.
7. A memory system comprising a storage controller configured with firmware, characterized by, The storage controller is configured to update the current firmware to a corresponding target version using the firmware update method of the memory system according to any one of claims 4 to 6. 8.A firmware update device of a memory system, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein The processor is executable to implement the firmware update method of the memory system according to any one of claims 1 to 3.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium is used to store a computer program, wherein the computer program is executable by the processor to implement the firmware update method of the memory system according to any one of claims 1 to 3.
Citation Information
Patent Citations
Chip updating method based on BMC (Baseband Management Controller), equipment and storage medium
CN108363583A
Firmware security verification method and device
CN111984962A
Firmware version refreshing method, device and system and medium
CN112685067A
Security chip firmware updating method and device
CN110688648A
Software upgrading method, device and system
CN111459524A