Hard disk firmware downloading method, electronic equipment and computer readable storage medium
By implementing the firmware download method in a solid-state hard disk, including verification of firmware download tools and sub-firmware, the problem of inability to effectively ensure the data security of the hard disk in the prior art is solved, and higher data security is achieved.
Patent Information
- Application Number
- CN202510171410.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing hard disk encryption technology cannot effectively ensure the security of the internal data of the hard disk, and there is a risk of being tampered with or destroyed.
By implementing firmware download methods in a solid state hard disk, including verifying the firmware download tool, obtaining the firmware and tool keys to be downloaded, and verifying and downloading the sub-firmware to be validated to ensure the security of the hard disk firmware.
Improve the security of firmware downloads and ensure the security of internal data of the hard disk, thereby enhancing the data security of the solid-state drive.
Smart Images

Figure CN119629169A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a hard disk firmware downloading method, electronic equipment and computer-readable storage medium. Background Art
[0002] With the advent of the digital age, data security has become particularly important. As a widely used storage device, hard disks not only provide large-capacity storage space, but also support multiple functions such as fast data reading and writing, system startup, data backup and recovery, etc. In order to maintain the data security of the hard disk, encryption technology can be used to encrypt the data in the hard disk to prevent the data in the hard disk from being illegally obtained.
[0003] Current encryption technologies mainly include symmetric encryption and asymmetric encryption. Symmetric encryption uses a key to encrypt and decrypt data; asymmetric encryption uses a pair of public and private keys to encrypt and decrypt data. When hard disk manufacturers use encryption technology to verify data security, they generally use the key certified by the CA (Certificate Authority) center to verify the data interaction between the user and the hard disk. This method ensures data security at the user level and cannot guarantee whether the data inside the hard disk is safe. If there is a security vulnerability inside the hard disk, even if the user data appears to be safe, it may face the risk of being tampered with or destroyed. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a hard disk firmware downloading method, an electronic device and a computer-readable storage medium, which can improve the security of firmware downloading.
[0005] To solve the above technical problems, a technical solution adopted in the present application is: a hard disk firmware downloading method is provided, and the hard disk firmware downloading method is applied to a solid-state hard disk, and the solid-state hard disk is communicatively connected to a firmware download tool, and the method includes: the solid-state hard disk verifies the firmware download tool to obtain a tool verification result; in response to the tool verification result indicating that the verification is successful, the hard disk firmware to be downloaded and the tool key are obtained from the firmware download tool, and the hard disk firmware to be downloaded includes at least two sub-firmware; the sub-firmware in the hard disk firmware to be downloaded is verified according to the tool key to obtain a download verification result; in response to the download verification result indicating that the verification is successful, the sub-firmware is downloaded.
[0006] In some embodiments, each sub-firmware includes a private key signature, and the solid-state drive verifies the firmware download tool to obtain a tool verification result, including: verifying the tool private key signature of the firmware download tool according to a first preset public key to obtain a tool verification result; the root verifies the sub-firmware in the hard disk firmware to be downloaded according to the tool secret key to obtain a download verification result, including: verifying the private key signature of each sub-firmware according to the tool public key in the tool secret key to obtain a download verification result.
[0007] In some embodiments, after the step of downloading the sub-firmware, the method further includes: obtaining the startup sequence of each sub-firmware; verifying the corresponding sub-firmware according to the startup sequence of each sub-firmware to obtain a startup verification result; in response to the startup verification result indicating that the verification is successful, starting the corresponding sub-firmware.
[0008] In some embodiments, the at least two sub-firmware include a first sub-firmware and a second sub-firmware, the startup sequence of the first sub-firmware is earlier than the startup sequence of the second sub-firmware, the startup verification result includes a first startup verification result, and the step of verifying the corresponding sub-firmware according to the startup sequence of each sub-firmware to obtain the startup verification result includes: performing a first verification process on the firmware key of the first sub-firmware according to a second preset public key to obtain the first startup verification result; the step of starting the corresponding sub-firmware in response to the startup verification result indicating a successful verification includes: starting the first sub-firmware in response to the first startup verification result indicating a successful verification.
[0009] In some embodiments, after the step of starting the first sub-firmware in response to the first boot verification result indicating successful verification, the method further includes: performing a second verification process on the firmware key of the second sub-firmware according to the firmware key of the first sub-firmware to obtain a second boot verification result; and starting the second sub-firmware in response to the second boot verification result indicating successful verification. In some embodiments, after the step of starting the second sub-firmware in response to the second boot verification result indicating successful verification, the method further includes: obtaining data to be processed; determining data to be encrypted according to the identification field corresponding to the data to be processed; encrypting the data to be encrypted using a preset encryption method to obtain encrypted data; and storing the key information corresponding to the encrypted data in the key storage area of the solid-state drive, the key storage area being used to encrypt the key information stored therein.
[0010] In some embodiments, the step of storing the key information corresponding to the encrypted data in the key storage area of the solid state drive includes: copying the key information corresponding to the encrypted data to obtain the copied key information; storing the key information corresponding to the encrypted data and the copied key information in the key storage area.
[0011] In some embodiments, after the step of storing the key information corresponding to the encrypted data in a key storage area of the solid-state drive, wherein the key storage area is used to encrypt the key information stored therein, the method further includes: obtaining the encrypted data and the key information corresponding to the encrypted data, the encrypted data including a data public key and a private key signature, and the key information including a reference public key and a reference private key; verifying the private key signature of the encrypted data according to the reference public key to obtain a second private key signature verification result; in response to the second private key signature verification result indicating successful verification, verifying the data public key of the encrypted data according to the reference public key to obtain a data public key verification result; in response to the data public key verification result indicating successful verification, decrypting the encrypted data according to the reference private key to obtain the data to be processed.
[0012] To solve the above technical problem, another technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above hard disk firmware downloading method.
[0013] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a computer-readable storage medium including program data stored therein, wherein the program data is used to implement the above hard disk firmware downloading method when executed by a processor.
[0014] Compared with the traditional scheme that only verifies the main body and does not guarantee the security of the internal data of the hard disk firmware, the present application provides a hard disk firmware download method, including: the solid state hard disk verifies the firmware download tool to obtain the tool verification result; in response to the tool verification result indicating that the verification is successful, the hard disk firmware to be downloaded and the tool secret key are obtained from the firmware download tool, and the hard disk firmware to be downloaded includes at least two sub-firmwares; the sub-firmware in the hard disk firmware to be downloaded is verified according to the firmware tool secret key to obtain the download verification result; in response to the download verification result indicating that the verification is successful, the sub-firmware is downloaded. In this way, verification is performed before downloading each sub-firmware, ensuring the internal security of the hard disk firmware, thereby improving the data security of the solid state hard disk. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 It is a flowchart of an exemplary embodiment of a hard disk firmware downloading method shown in the present application; Figure 2 is a schematic structural diagram of an exemplary embodiment of a sub-firmware shown in the present application; Figure 3 It is a schematic diagram of the framework of the download verification process shown in this application; Figure 4 It is a schematic diagram of the framework of the chain verification process started in this application; Figure 5 It is a schematic diagram of the framework of traditional data interaction mode; Figure 6 It is a schematic diagram of the data decryption process shown in this application; Figure 7 It is a structural diagram of an exemplary embodiment of a hard disk firmware downloading device shown in the present application; Figure 8 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application; Fig. 9 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0017] First of all, it should be noted that as a widely used storage device, it is very necessary to ensure the secure storage of data on solid-state drives. The traditional key management method is to manage the keys from the upper read-write data layer, such as using the CA key authorization method to ensure the data interaction between the user and the solid-state drive through encryption and decryption between public and private keys. However, this method does not take into account the secure management of the firmware in the solid-state drive. When the user interacts with the solid-state drive, if the firmware in the solid-state drive has security vulnerabilities or is maliciously tampered with, then even if the user data is safe on the surface, it may face the potential risk of being stolen, tampered with or destroyed. This risk exists quietly without being noticed and may be triggered by a seemingly ordinary firmware update or external attack. Based on this, the present application provides a hard disk firmware download method, an electronic device, and a computer-readable storage medium that can improve the security of firmware downloads.
[0018] For details, please refer to Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of a hard disk firmware downloading method shown in the present application.
[0019] The execution subject of the hard disk firmware downloading method may be a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the hard disk firmware downloading method may also be a hard disk firmware downloading device / solid state hard disk. In some possible implementations, the hard disk firmware downloading method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0020] Specifically, the hard disk firmware download method of this embodiment includes the following steps: S110: The solid state drive verifies the firmware download tool and obtains a tool verification result.
[0021] Solid State Drive (SSD) is a hard disk made of solid-state electronic storage chip array. Because it has no mechanical structure, it has the advantages of fast reading and writing speed, good shock resistance, light weight, small size, etc. In order to put the solid-state drive into use, it is necessary to burn the solid-state drive. The process of burning the hard disk is actually writing the hard disk firmware into the solid-state drive, that is, downloading the corresponding hard disk firmware to be downloaded.
[0022] The firmware download tool is used to provide the hard disk firmware to be downloaded. For example, the hard disk manufacturer needs to use the firmware download tool to uniformly install the firmware on the solid-state hard disk before leaving the factory to complete the card activation. When the solid-state hard disk is burned, the solid-state hard disk communicates with the firmware download tool. First, before the solid-state hard disk obtains the hard disk firmware to be downloaded from the firmware download tool, it needs to verify whether the firmware download tool has risks. If not, the solid-state hard disk obtains the hard disk firmware to be downloaded from the firmware download tool.
[0023] The tool verification result refers to the verification result of the firmware download tool. For example, the validity and compatibility of the firmware download tool can be verified through tool verification. When the tool verification result indicates that the verification is successful, it means that the firmware download tool meets the requirements of the solid-state drive and the hard disk firmware to be downloaded can be obtained from the firmware download tool.
[0024] S120: In response to the tool verification result indicating that the verification is successful, obtaining the hard disk firmware to be downloaded and the tool key from the firmware download tool, where the hard disk firmware to be downloaded includes at least two sub-firmware.
[0025] The hard disk firmware to be downloaded refers to the firmware waiting to be written into the solid-state hard disk, which is responsible for managing and controlling the basic functions and behaviors of the solid-state hard disk. Exemplarily, the hard disk firmware to be downloaded can be a bootable image file. The hard disk firmware to be downloaded is written to the solid-state hard disk through a firmware download tool. In order to detect the security of the hard disk firmware to be downloaded, the hard disk burning can be completed by segmented downloading. Among them, the hard disk firmware to be downloaded can be functionally distinguished to obtain at least two sub-firmware of the hard disk firmware to be downloaded. Exemplarily, the hard disk firmware to be downloaded can include mass production sub-firmware and product sub-firmware.
[0026] The tool key refers to the key of the firmware download tool. The firmware download tool can also be called tool firmware. When the tool verification result is successfully verified, the tool key of the firmware download tool and the hard disk firmware to be downloaded in the firmware download tool can be obtained. Exemplarily, the tool key can include the tool public key, the tool private key signature, and of course, the tool hash value.
[0027] S130: Verify the sub-firmware in the hard disk firmware to be downloaded according to the tool key to obtain a download verification result.
[0028] The download verification result refers to the verification result of each sub-firmware. Exemplarily, the tool key of the firmware download tool is used to verify each sub-firmware in the hard disk firmware to be downloaded, and the download verification result is obtained. When the download verification result indicates that the verification is successful, it means that the corresponding sub-firmware meets the preset requirements and can be downloaded to the solid state drive.
[0029] In order to verify each sub-firmware, when compiling the hard disk firmware to be downloaded, the firmware public key, private key signature and the digital certificate generated by the firmware hash value (hash) need to be packaged into each sub-firmware. The private key is stored on the server and can only be signed with the corresponding private key after authentication. The structure of the sub-firmware can be seen in Figure 2 As shown, the sub-firmware includes a first digital certificate and a second digital certificate, the first digital certificate includes a firmware public key and a private key signature, and the second digital certificate includes a firmware public key and a firmware hash value. Therefore, when downloading the hard disk firmware, the security of each sub-firmware can be verified by key verification. In some embodiments, each sub-firmware can be verified in turn by a tool key to obtain a download verification result of each sub-firmware.
[0030] S140: In response to the download verification result indicating that the verification is successful, the sub-firmware is downloaded.
[0031] The solid-state drive verifies the sub-firmware through the tool key. If the download verification result indicates success, it means that there is no security risk in the corresponding sub-firmware, and the corresponding sub-firmware is downloaded.
[0032] The hard disk firmware downloading method of this embodiment can also be applied to the update and upgrade of hard disk firmware.
[0033] It can be seen that in the hard disk firmware downloading method of the embodiment of the present application, the solid state hard disk verifies the firmware download tool and obtains the tool verification result; in response to the tool verification result indicating that the verification is successful, the hard disk firmware to be downloaded and the tool key are obtained from the firmware download tool, and the hard disk firmware to be downloaded includes at least two sub-firmwares; according to the download order of the sub-firmware in the hard disk firmware to be downloaded by the tool key, the corresponding sub-firmware is verified and processed to obtain the download verification result; in response to the download verification result indicating that the verification is successful, the sub-firmware is downloaded. In this way, verification is performed before downloading each sub-firmware, ensuring the internal security of the hard disk firmware, thereby improving the data security of the solid state hard disk.
[0034] Furthermore, the process of verifying the firmware download tool and each sub-firmware in the hard disk firmware to be downloaded specifically includes the following steps: verifying the tool private key signature of the firmware download tool according to the first preset public key to obtain the tool verification result; in response to the tool verification result indicating successful verification, obtaining the hard disk firmware to be downloaded and the tool key from the firmware download tool, the hard disk firmware to be downloaded including at least two sub-firmware; verifying the private key signature of each sub-firmware according to the tool public key in the tool key to obtain the download verification result. In other embodiments, the solid-state hard disk can also verify the unified key in the hard disk firmware to be downloaded by using a preset root key, and if the verification is successful, all sub-firmware in the hard disk firmware to be downloaded are directly downloaded.
[0035] The first preset public key is used to verify the firmware download tool. In some application scenarios, if the current hard disk firmware download is a forced download, the firmware download tool is verified by the first preset public key stored in the ROM Code (read-only memory code) of the main control chip to obtain a tool verification result. In other application scenarios, if the current hard disk firmware download is a normal download, the firmware download tool is verified by the first firmware that was successfully flashed on the solid-state drive last time to obtain a tool verification result. After the tool verification result indicates that the verification is successful, the hard disk firmware to be downloaded is verified according to the tool key of the firmware download tool.
[0036] In some embodiments, the verification of the firmware download tool and each sub-firmware can be completed by an asymmetric key. Specifically, the private key signature of the firmware download tool is verified by the first preset public key, and the private key signature of each sub-firmware is verified by the tool public key in the tool key to obtain the download verification result. In other embodiments, the verification of the firmware download tool and each sub-firmware can also be completed by a symmetric key.
[0037] As an example, the process of hard disk firmware download can be found in Figure 3 First, determine the current hard disk firmware download type. If the download type is forced download, verify the private key signature of the firmware download tool through the first preset public key in the main control chip ( Figure 3 As shown in 1), the tool verification result is obtained. If the download type is normal download, the private key signature of the firmware download tool is verified by the public key in the first firmware that was successfully flashed in the solid-state drive last time ( Figure 3 2), and obtain the tool verification result; if the tool verification result indicates that the verification is successful, the private key signature in the second digital certificate of each sub-firmware in the hard disk firmware to be downloaded is verified by the tool public key of the firmware download tool ( Figure 3 3 and 4 shown in ); the first digital certificate is then verified by the second digital certificate.
[0038] After the hard disk firmware is downloaded, the startup process of the solid-state drive can also verify each sub-firmware to strengthen the security detection of the hard disk firmware and prevent the risk of data loss.
[0039] Specifically, during the startup phase of the solid state drive, the startup sequence of each sub-firmware is obtained; and the corresponding sub-firmware is verified according to the startup sequence of each sub-firmware to obtain a startup verification result.
[0040] The boot sequence refers to the order in which the solid-state drive boots each sub-firmware. Exemplarily, the boot sequence of each sub-firmware can be determined by the performance of each sub-firmware, such as the mass production sub-firmware first and the product sub-firmware later. In other embodiments, the boot sequence of each sub-firmware can also be determined by the storage size of each sub-firmware, with the sub-firmware with a larger storage space being started first and the sub-firmware with a smaller storage space being started later. When the solid-state drive boots each sub-firmware, it will verify each sub-firmware in turn according to the boot sequence to obtain a boot verification result.
[0041] The startup verification result includes the verification result of each sub-firmware at startup. Exemplarily, before each sub-firmware is started, the legitimacy of each sub-firmware is verified to obtain the startup verification result of the corresponding sub-firmware. In some embodiments, each sub-firmware can be verified in sequence by the same secret key to obtain the startup verification result of each sub-firmware. In other embodiments, the first sub-firmware can also be verified by the second preset public key to obtain the verification result of the first sub-firmware; if the first sub-firmware is successfully verified, the firmware key of the second sub-firmware is verified according to the firmware secret key of the first sub-firmware to obtain the verification result of the second sub-firmware. In this way, a chain check is performed until all sub-firmware are successfully verified, which indicates that the hard disk firmware is successfully started.
[0042] Specifically, the following steps may be included: performing a first verification process on the firmware key of the first sub-firmware according to the second preset public key to obtain a first startup verification result; in response to the first startup verification result indicating that the verification is successful, starting the first sub-firmware.
[0043] The first sub-firmware may be the sub-firmware with the first startup order in the hard disk firmware to be started. Exemplarily, the first sub-firmware may be the mass-produced sub-firmware in the hard disk firmware to be started. In other embodiments, the first sub-firmware may also be the sub-firmware with the largest proportion among the sub-firmware. If the first startup verification result indicates that the first sub-firmware verification is successful, the first sub-firmware is started; if the first startup verification result indicates that the first sub-firmware verification fails, the startup is stopped and a verification failure is prompted.
[0044] Furthermore, if the hard disk firmware to be started also includes a second sub-firmware, and the startup sequence of the second sub-firmware is later than that of the first sub-firmware. After starting the first sub-firmware, the solid-state hard disk performs a second verification process on the firmware key of the second sub-firmware according to the firmware key of the first sub-firmware to obtain a second startup verification result; in response to the second startup verification result indicating that the verification is successful, the second sub-firmware is started.
[0045] Furthermore, if the hard disk firmware to be started also includes a third sub-firmware, and the startup sequence of the third sub-firmware is later than that of the second sub-firmware, after starting the second sub-firmware, the solid-state hard disk performs a third verification process on the firmware key of the third sub-firmware according to the firmware key of the second sub-firmware, and obtains a third startup verification result; in response to the third startup verification result indicating that the verification is successful, the third sub-firmware is started. Thus, the hard disk firmware to be started is verified by a chain verification method, starting from the bottom layer of the firmware, and ensuring the security of each layer of keys layer by layer, ensuring that even if a layer of sub-firmware is tampered with or damaged, it can be discovered in time and prevented from causing security threats to the upper layer keys and data, and the keys can also be safely restored when the solid-state hard disk is abnormal.
[0046] Among them, the verification process is verified by a secret key. In this embodiment, an asymmetric encryption algorithm can be selected. The secret key pair is a public and private key. The public key is used to verify the private key signature. The secret key is generally set at the end of the firmware. As an example, the firmware secret key of the second sub-firmware is verified for the second time according to the firmware secret key of the first sub-firmware, and the process of obtaining the second startup verification result may include the following steps: verifying the private key signature of the second sub-firmware according to the first public key of the first sub-firmware to obtain the first private key signature verification result; in response to the first private key signature verification result indicating that the verification is successful, verifying the second public key of the second sub-firmware according to the first public key to obtain the second public key verification result; determining the second startup verification result according to the second public key verification result.
[0047] The firmware key of the first sub-firmware includes the first public key, and the firmware key of the second sub-firmware includes the second public key and the private key signature. The purpose of verifying the private key signature with the first public key is to determine whether the subject is correct. If the subject is correct, the first public key of the first sub-firmware is used to make a consistency judgment on the second public key of the second sub-firmware, thereby verifying the private key signature and the second public key of the second sub-firmware to ensure the security of the firmware key of the second sub-firmware. For details, please refer to Figure 4 , Figure 4 This is a schematic diagram of the process of starting chain verification shown in this application. First, the solid-state drive verifies the private key signature of the second digital certificate in the tail of the product firmware through the second preset public key in the main control chip ( Figure 4 As shown in 1), after verification, compare whether the second preset public key in the main control chip stored in the second digital certificate is consistent with the second preset public key in the main control chip ( Figure 4 2); if they are consistent, the firmware hash value in the first digital certificate is checked for integrity using the firmware public key in the second digital certificate ( Figure 4 3); if complete, the firmware public key in the first digital certificate is verified by the firmware public key in the second digital certificate, and if the verification is successful, it indicates that the product firmware verification is successful ( Figure 44). Then, the second sub-firmware is verified by using the first sub-firmware in the above manner.
[0048] In addition, different sub-firmware can also set different firmware keys. For example, if the firmware keys of the first sub-firmware and the second sub-firmware are different, the solid-state drive first performs a first verification process on the first sub-firmware according to the second preset public key to obtain a first startup verification result; if the first startup verification result indicates that the verification is successful, the first sub-firmware is started; then the second sub-firmware is verified by the first sub-firmware, specifically, the private key signature of the second sub-firmware is verified by the decryption public key used to verify the second sub-firmware obtained by the first sub-firmware. If the verification is successful, the firmware public key of the second sub-firmware is verified by the decryption public key of the first sub-firmware. If the verification is successful, the second sub-firmware is started.
[0049] In other embodiments, in order to improve the verification efficiency, the firmware secret key of the second sub-firmware can also be verified for a third time according to the second preset public key to obtain a third startup verification result; in response to the third startup verification result indicating successful verification, the second sub-firmware is started. In this way, all sub-firmware are verified by the second preset public key, ensuring the security of the secret key of each sub-firmware. This method does not limit the verification order of each sub-firmware, and each sub-firmware can be verified in batches by the second preset public key, or each sub-firmware can be verified in sequence by the second preset public key. If all sub-firmware are verified successfully, each sub-firmware is started; if there is a sub-firmware verification failure, the startup is stopped.
[0050] In other embodiments, the solid state drive may also verify the unified secret key in the hard disk firmware to be started by using the second preset public key, and if the verification is successful, all sub-firmware in the hard disk firmware are directly started.
[0051] After the hard disk firmware is downloaded and the startup verification is completed, it means that the secret key used by the hard disk firmware is trusted. Users can read and write normally on the SSD. Traditionally, data interaction between users and SSDs is authenticated through CA key authorization. CA is a certification center that provides secret keys and ensures the legitimacy of the secret keys distributed to users and devices. For more information, please refer to Figure 5 , Figure 5 This is a schematic diagram of the framework of the traditional data interaction method. The SSD and the user are connected through a server. When the user needs to access the SSD, the SSD can obtain the legitimacy of the user's key pair from the server, and the user can also obtain the legitimacy of the SSD's key pair from the server, thereby ensuring the security of data transmission between the user and the SSD. However, the traditional data reading and writing process does not reasonably classify the data, which will seriously affect the efficiency of data reading and writing, and frequent reading and writing operations on the SSD will also significantly reduce the performance of the hard disk, thereby affecting the user experience.
[0052] Based on this, when reading and writing data, the client of the embodiment of the present application can classify the data according to the data sensitivity and importance of the application scenario, and adopt different encryption strategies for different categories of data, thereby ensuring data security while minimizing unnecessary encryption and decryption operations and achieving efficient use of resources.
[0053] Exemplarily, data can be divided into two types: data that needs to be encrypted and data that does not need to be encrypted. The client can mark the data to be encrypted and the non-encrypted data through the identification field. The solid-state drive obtains the data to be processed from the client; determines the data to be encrypted according to the identification field corresponding to the data to be processed; encrypts the data to be encrypted using a preset encryption method to obtain encrypted data; stores the key information corresponding to the encrypted data in the key storage area of the solid-state drive, and the key storage area is used to encrypt the key information stored therein.
[0054] When the client sends the data to be processed, different identification fields are used to mark the encrypted data and the non-encrypted data, for example, they can be marked at the end of the data. In other embodiments, the encrypted data can also be divided according to importance, and different identification fields are used to mark important encrypted data and general encrypted data. Other data classifications that can be thought of by those skilled in the art can also be classified and marked using identification fields, which are not specifically limited here.
[0055] After the solid-state drive obtains the data to be processed, it determines the data to be encrypted according to the identification field corresponding to the data to be processed; and uses the preset encryption method to encrypt the data to be encrypted to obtain the encrypted data. The preset encryption method can be RSA (Rivest-Shamir-Adleman), ECC (Elliptic Curve Cryptography), DSA (Digital Signature Algorithm), etc. After obtaining the encrypted data, the encrypted data field and public key information can be placed in the P2L table (Physical to Logical). The encrypted data is in banks. When a bank is full, it will trigger the P2L table to be flushed. At this time, the encrypted information can be flushed together to reduce performance loss.
[0056] The key information corresponding to the encrypted data is then stored in the key storage area (keystore) of the solid state drive. The key storage area can be placed in a fixed area of the NAND flash memory in the solid state drive. The key storage area can be protected by a password provided by the user so that the key storage area can encrypt the key information stored therein.
[0057] In order to prevent the problem of abnormal reading and writing caused by the inability to read the public and private keys normally, the key information corresponding to the encrypted data can also be copied to obtain the copied key information; the key information corresponding to the encrypted data and the copied key information are stored in the key storage area. In this way, the key information is backed up, and when the normal private key cannot be read normally, the private key is taken out from the backup space for verification. Among them, the key information corresponding to the encrypted data and the copied key information are in different spaces in the key storage area, and the copied key information is placed in the backup space of the key storage area. In order to ensure that the backed up key information is always valid and has not been tampered with, the client can regularly push updates to the user and verify the integrity of the backed up key information after the user enters the password of the key storage area.
[0058] When reading data, the data must be decrypted first. Obtain the encrypted data and the key information corresponding to the encrypted data; the encrypted data obtains the data to be processed based on the solid-state hard disk, determines the data to be encrypted according to the identification field corresponding to the data to be processed, and encrypts the encrypted data using a preset encryption method. Verify the private key signature of the encrypted data according to the reference public key to obtain a second private key signature verification result; in response to the second private key signature verification result indicating successful verification, verify the data public key of the encrypted data according to the reference public key to obtain a data public key verification result; in response to the data public key verification result indicating successful verification, decrypt the encrypted data according to the reference private key to obtain the data to be processed. The reference public key and the reference private key are key information stored in the key storage area during the data encryption stage.
[0059] When a user requests to read encrypted data in a solid-state drive, please refer to Figure 6 , Figure 6 This is a schematic diagram of the data decryption process shown in this application. First, confirm whether the data is encrypted through the identification field at the end of the P2L table ( Figure 6 As shown in 1), if encrypted, first open the key storage area with the password corresponding to the key storage area, and take out the reference public key and reference private key from the key storage area; then verify the private key signature in the encrypted data with the reference public key in the key storage area to determine whether the subject is correct ( Figure 6 2); if the verification is successful, the data public key in the encrypted data is verified according to the reference public key in the key storage area, which can be to verify whether the reference public key and the data public key are consistent. If they are consistent, the encrypted data field is decrypted by the reference private key to obtain the data to be processed, that is, the original data before encryption ( Figure 6 as shown in 3).
[0060] Finally, the present application is described in combination with the above embodiments, and the details are as follows: First, the solid-state hard disk needs to download the hard disk firmware before leaving the factory to complete the card activation. Specifically, the first preset public key is placed in the ROM code of the main control chip, which can ensure that the first preset public key is placed in the physical space and will not be obtained. When the hard disk firmware is compiled, the digital certificate generated by the firmware public key and private key signature is packaged into each sub-firmware of the hard disk firmware. The private key is stored through the server. Only after the authentication is passed can the corresponding private key be used for signing to obtain the private key signature; the solid-state hard disk verifies the firmware download tool through the first preset public key. If the verification is successful, the sub-firmware in the hard disk firmware to be downloaded is verified according to the tool public key of the firmware download tool. If the verification fails, the download is stopped and the verification failure is prompted. If the verification is successful, all sub-firmware in the hard disk firmware to be downloaded are downloaded to complete the card activation of the solid-state hard disk.
[0061] During the hard disk firmware startup process, the solid state drive first performs the first verification process on the mass production firmware in the hard disk firmware to be downloaded according to the second preset public key in the rom code, and obtains the first startup verification result; if the first startup verification result indicates that the verification failed, the startup is stopped and the verification failure is prompted; if the first startup verification result indicates that the verification is successful, the product firmware is secondly verified through the mass production firmware to obtain the second startup verification result; if the second startup verification result indicates that the verification failed, the download is stopped and the verification failure is prompted, otherwise the product firmware is started. In this way, the verification of all sub-firmware is realized through the chain verification method, and the startup of the hard disk firmware is completed.
[0062] After the download and startup are verified, data reading and writing operations can be performed. During the reading and writing process, the data is written with the key information, and the corresponding key information is used for decryption when reading the data. Specifically, the client can divide the data to be processed into encrypted data and non-encrypted data according to the data sensitivity and importance of the application scenario, and mark them with different identification fields. The identification field can be a specific identifier or data header; after the solid-state drive obtains the data to be processed, it determines the data to be encrypted according to the identification field, and uses the preset encryption method to encrypt the encrypted data to obtain the encrypted data; the encrypted data and public key information are placed in the P2L table, and the key information corresponding to the encrypted data (reference public key and reference private key) is placed in the fixed position key storage area in the NAND flash memory, and the key storage area is encrypted with the password provided by the user; at the same time, the key information corresponding to the encrypted data can also be backed up. When reading data, determine whether it is encrypted data by identifying the identification field at the end of the data; if so, first use the password provided by the user to decrypt the key storage area, and then verify the private key signature in the encrypted data with the reference public key in the key storage area. If the verification is successful, verify the data public key in the encrypted data according to the reference public key to confirm whether they are consistent. If they are consistent, decrypt the encrypted data with the reference private key to obtain the data to be processed, that is, the original data before encryption.
[0063] See also Figure 7 , Figure 7 It is a structural diagram of an exemplary embodiment of a hard disk firmware downloading device shown in the present application. The hard disk firmware downloading device 700 includes an acquisition module 710, a verification module 720 and a downloading module 730. The acquisition module 710 is used for responding to the main body verification between the solid state hard disk and the firmware provider, and the solid state hard disk obtains the hard disk firmware to be downloaded from the firmware provider. The hard disk firmware to be downloaded includes at least two sub-firmwares; the verification module 720 is used to verify the corresponding sub-firmware according to the download order of each sub-firmware to obtain the download verification result; the downloading module 730 is used to respond to the download verification result indicating that the verification is successful, and then download the corresponding sub-firmware.
[0064] In the above scheme, in response to the main body verification between the solid state hard disk and the firmware provider, the hard disk firmware downloading device obtains the hard disk firmware to be downloaded from the firmware provider, and the hard disk firmware to be downloaded includes at least two sub-firmwares; the corresponding sub-firmware is verified according to the download order of each sub-firmware to obtain the download verification result; in response to the download verification result indicating that the verification is successful, the corresponding sub-firmware is downloaded. In this way, verification is performed before downloading each sub-firmware, and the internal security of the hard disk firmware is guaranteed from bottom to top, thereby improving the data security of the solid state hard disk.
[0065] The functions of each module can be found in the hard disk firmware download method embodiment, which will not be described in detail here.
[0066] In order to implement the hard disk firmware download method of the above embodiment, this application proposes another electronic device, which is specifically referred to as Figure 8 , Figure 8 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0067] The electronic device 800 includes a memory 810 and a processor 820 , wherein the memory 810 and the processor 820 are coupled.
[0068] The memory 810 is used to store program data, and the processor 820 is used to execute the program data to implement the hard disk firmware downloading method of the above embodiment.
[0069] In this embodiment, the processor 820 may also be referred to as a CPU (Central Processing Unit). The processor 820 is an integrated circuit chip having the ability to process signals. The processor 820 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 820 may also be any conventional processor, etc.
[0070] The present application also provides a computer-readable storage medium, such as Fig. 9 As shown, the computer-readable storage medium 900 is used to store program data 910. When the program data 910 is executed by the processor, it is used to implement the hard disk firmware downloading method in the method embodiment of the present application.
[0071] The method involved in the embodiment of the hard disk firmware download method of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0072] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for downloading hard disk firmware, characterized in that: The hard disk firmware downloading method is applied to a solid state hard disk, the solid state hard disk is communicatively connected with a firmware downloading tool, and the method comprises: The solid state drive performs verification processing on the firmware download tool to obtain a tool verification result; In response to the tool verification result indicating successful verification, obtaining the hard disk firmware to be downloaded and the tool key from the firmware download tool, wherein the hard disk firmware to be downloaded includes at least two sub-firmwares; Verifying the sub-firmware in the hard disk firmware to be downloaded according to the tool key to obtain a download verification result; In response to the download verification result indicating that the verification is successful, the sub-firmware is downloaded.
2. The hard disk firmware downloading method according to claim 1, characterized in that: Each sub-firmware includes a private key signature, and the solid-state drive verifies the firmware download tool to obtain a tool verification result, including: Verifying the tool private key signature of the firmware download tool according to the first preset public key to obtain a tool verification result; The step of verifying the sub-firmware in the hard disk firmware to be downloaded according to the tool key to obtain a download verification result includes: The private key signature of each sub-firmware is verified according to the tool public key in the tool secret key to obtain the download verification result.
3. The hard disk firmware downloading method according to claim 1, characterized in that: After the step of downloading the sub-firmware, the method further includes: Get the boot order of each sub-firmware; Verifying the corresponding sub-firmware according to the startup sequence of each sub-firmware to obtain a startup verification result; In response to the boot verification result indicating that the verification is successful, the corresponding sub-firmware is started.
4. The hard disk firmware downloading method according to claim 3, characterized in that: The at least two sub-firmwares include a first sub-firmware and a second sub-firmware, the startup sequence of the first sub-firmware is earlier than the startup sequence of the second sub-firmware, the startup verification result includes a first startup verification result, and the step of performing verification processing on the corresponding sub-firmware according to the startup sequence of each sub-firmware to obtain the startup verification result includes: Performing a first verification process on the firmware secret key of the first sub-firmware according to the second preset public key to obtain a first startup verification result; The step of starting the corresponding sub-firmware in response to the startup verification result indicating that the verification is successful includes: In response to the first startup verification result indicating that the verification is successful, the first sub-firmware is started.
5. The hard disk firmware downloading method according to claim 4, characterized in that: After the step of starting the first sub-firmware in response to the first startup verification result indicating that the verification is successful, the method further includes: Performing a second verification process on the firmware key of the second sub-firmware according to the firmware key of the first sub-firmware to obtain a second startup verification result; In response to the second startup verification result indicating that the verification is successful, the second sub-firmware is started.
6. The hard disk firmware downloading method according to claim 5, characterized in that: After the step of starting the second sub-firmware in response to the second startup verification result indicating that the verification is successful, the method further includes: Get the data to be processed; Determining the data to be encrypted according to the identification field corresponding to the data to be processed; Encrypting the data to be encrypted using a preset encryption method to obtain encrypted data; The key information corresponding to the encrypted data is stored in a key storage area of the solid state drive, and the key storage area is used to encrypt the key information stored therein.
7. The hard disk firmware downloading method according to claim 6, characterized in that: The step of storing the key information corresponding to the encrypted data in the key storage area of the solid state drive includes: Copying the key information corresponding to the encrypted data to obtain the copied key information; The key information corresponding to the encrypted data and the copied key information are stored in the key storage area.
8. The hard disk firmware downloading method according to claim 6, characterized in that: After the step of storing the key information corresponding to the encrypted data in a key storage area of the solid state drive, wherein the key storage area is used to encrypt the key information stored therein, the method further includes: Acquire the encrypted data and the key information corresponding to the encrypted data, the encrypted data including a data public key and a private key signature, and the key information including a reference public key and a reference private key; Verifying the private key signature of the encrypted data according to the reference public key to obtain a second private key signature verification result; In response to the second private key signature verification result indicating successful verification, verifying the data public key of the encrypted data according to the reference public key to obtain a data public key verification result; In response to the data public key verification result indicating successful verification, the encrypted data is decrypted according to the reference private key to obtain the data to be processed.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Preloading firmware downloading and writing method and device
CN107273150A
Firmware authentication method and solid state drive
CN109445705A
Encrypted data processing method and device based on solid state disk and computer equipment
CN109766731A
Firmware upgrading method and device, computer device and storage medium
CN112187544A
Firmware update system and method
CN113805908A