A security system and method for cloud server access to solid-state hard disk based on national encryption

By using the national secret algorithm to establish secure channels and manage master keys in cloud computing, the security issues caused by hard disk resource sharing under the virtualization layer are solved, virtual machine identity authentication and data encryption and decryption are realized, ensuring data security. and uniqueness, preventing data leaks and phishing attacks.

CN114553478BActive Publication Date: 2024-10-01CHENGDU CHUXUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210038649.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-13
Publication Date
2024-10-01
Estimated Expiration
2042-01-13

AI Technical Summary

Technical Problem

In existing cloud computing technology, the sharing of hard disk resources caused by the virtualization layer brings security issues. After a user unlocks the data, other users can pretend to access the stolen data, and phishing software attacks are difficult to prevent.

Method used

Using a security system based on the national secret algorithm SM9, SM3 or SM4, the virtual machine administrator establishes a secure channel, manages the master key, performs virtual machine identity verification and data encryption and decryption to ensure the security of data during the reading and writing process.

Benefits of technology

It achieves data storage security for multi-user and multi-virtual machine platforms, ensuring that only legitimate users can access, read and write data, preventing data leaks and phishing attacks, and improving cloud security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114553478B_ABST
    Figure CN114553478B_ABST
Patent Text Reader

Abstract

The present invention discloses a security system and method for a cloud server to access a solid-state hard disk based on national secrets, and the security strategy is based on Chinese commercial secret algorithms SM3, SM4 and SM9. In an NVMe security disk, first, the security administrator needs to verify the identity of the user; secondly, the user applies to the security administrator for hard disk resources; thirdly, a secure channel needs to be established between the user and the hard disk to complete the operation command of the hard disk; finally, when writing data, the data is encrypted according to the user ID, and when reading data, the user ID is required to complete the decryption. In this system and method, triple verification of users, commands, and data is implemented. It truly realizes a solution in which other users, phishing software, and even administrators cannot steal user data when a multi-user system operates in parallel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a security system and method for a cloud server to access a solid-state hard disk based on national encryption. Background Art

[0002] With the booming development of cloud computing and virtualization technology, various software and applications are deployed in the cloud. These different applications use virtualization technology to abstract storage devices into a dynamic resource pool. Multiple users share the same physical storage device, which leads to new security issues. For example, users obtain computing resources provided by cloud services by renting virtual machines. The virtualization layer directly interacts with users and calls the underlying hardware resources. Therefore, virtualization security is the core issue of cloud computing security. For example, attacks between virtual machines, illegal programs of virtual machine administrators attack users, etc. Since most current hard disks use self-encryption, when a user opens his hard disk resources, other users can pretend to be the user to steal data. Summary of the invention

[0003] The purpose of the present invention is to address the defects of the prior art and provide a security system and method for cloud servers accessing solid-state hard drives based on national encryption.

[0004] In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0005] A security system for cloud servers to access solid-state hard disks based on national secrets, including virtual machine hardware devices, virtual machine administrators, and several physical hosts; the virtual machine administrators are connected to the virtual machine hardware devices and several physical hosts respectively; each of the several physical hosts includes several virtual machines and several operating systems;

[0006] Each of the plurality of virtual machines reads and writes data to a virtual machine hardware device through a virtual machine administrator;

[0007] The virtual machine administrator establishes a secure channel based on the national encryption algorithm SM9, SM3 or SM4, and is responsible for managing the master key and handling the work of the key generation center.

[0008] Correspondingly, a security method for a cloud server based on national encryption to access a solid-state hard disk is also provided. The security method is: an encryption and decryption system is constructed using national encryption algorithms SM9, SM3 or SM4, identity authentication is performed when a virtual machine accesses a virtual machine hardware device, and hard disk resources are applied for. The reading and writing of the virtual machine hardware device are both based on the virtual machine identity to establish a secure channel, and data is read and written within the secure channel; in the data written to the virtual machine hardware device, the user information of the virtual machine is added to encrypt the data, and the user information of the virtual machine is required to decrypt the data when reading the data.

[0009] Furthermore, in the security method, when a new virtual machine is added, the registration operation method with the virtual machine administrator includes:

[0010] S1. Through the national secret algorithm SM2 key exchange protocol, the new virtual machine and the virtual machine administrator establish a secure channel;

[0011] S2. The new virtual machine sends its user ID to the virtual machine administrator;

[0012] S3. The virtual machine administrator generates an encrypted private key for the new virtual machine according to the national encryption algorithm SM9 protocol;

[0013] S4. The virtual machine administrator determines whether to update the encryption master private key and the encryption master public key in the process of generating a new virtual machine private key. If so, it is necessary to update the encryption private keys of all known virtual machines and store the updated encryption private keys in the virtual machine administrator's secure area, and execute step S5; if not, execute step S5;

[0014] S5. The virtual machine administrator sends the generated encrypted private key to the new virtual machine.

[0015] Furthermore, in step S4, the updating of the encryption master private key and the encryption master public key is specifically as follows:

[0016] A1. The VM administrator blocks the registration of new VMs.

[0017] A2. The virtual machine administrator uses the last encrypted information and the key exchange protocol of the national encryption algorithm SM9 to establish a secure channel with the virtual machine;

[0018] A3. Send the updated key information to the virtual machine;

[0019] A4. Repeat steps A2-A3 until all virtual machines are updated.

[0020] A5. Open the registration process for new virtual machines.

[0021] Furthermore, in the security method, after the virtual machine completes registration, the method of applying for hard disk resources from the virtual machine administrator includes:

[0022] S1. Through the national secret algorithm SM9 key exchange protocol, the virtual machine and the virtual machine administrator establish a secure channel;

[0023] S2. The virtual machine applies for hard disk space from the virtual machine administrator;

[0024] S3. The virtual machine administrator allocates hard disk space and sends the virtual machine's own user ID and allocated hard disk space to the virtual machine hardware device;

[0025] S4. The virtual machine hardware device establishes a correspondence table between the hard disk space and the virtual machine;

[0026] S5. Return the hard disk identifier of the virtual machine hardware device and the corresponding hard disk space allocated to the virtual machine.

[0027] Furthermore, in the security method, when the virtual machine sends a command to its own space, the operating system in the physical host establishes a security layer for each virtual machine to complete the establishment of a secure session, specifically including:

[0028] S1. Through the national secret algorithm SM9 key exchange protocol, the virtual machine and the virtual machine administrator establish a secure channel;

[0029] S2. The virtual machine initiates a secure session to the virtual machine hardware device, and the virtual machine administrator generates a session key;

[0030] S3. The virtual machine administrator uses the generated session key to complete the encryption and decryption operations of the command.

[0031] Furthermore, initiating a secure session in step S2 specifically includes:

[0032] B1. Determine whether the session is established. If not, proceed to step B2; if so, proceed to step B3;

[0033] B2. If the virtual machine administrator updates the key of the virtual machine or virtual machine hardware device during the session establishment process, the session establishment fails; when the session establishment fails, the virtual machine confirms to the virtual machine administrator that the key update is complete, then re-establishes the session and executes step B4;

[0034] B3. After the session has been established, the virtual machine administrator updates the key, then the session continues until the session ends, and the next time a session is established, the updated key is used, and step B4 is executed;

[0035] B4. After the session has been established, the virtual machine performs secure read, write and erase operations.

[0036] Furthermore, in step B4, the virtual machine performs secure read, write and erase operations as follows:

[0037] C1. The user layer of the virtual machine sends the command to the security layer of the virtual machine;

[0038] C2. The virtual machine's security layer passes the session key as a parameter to the driver;

[0039] C3. After the driver generates a write command, the virtual machine administrator encrypts the command using the national encryption algorithm SM4;

[0040] C4. After the virtual machine hardware device receives the command, the virtual machine administrator uses the session key to decrypt the command using the national encryption algorithm SM4;

[0041] C5. The virtual machine administrator verifies the legitimacy of the command and executes it if it is legal.

[0042] Furthermore, after step C2, the following steps are further included:

[0043] If the driver and virtual machine hardware devices cannot complete the encryption and decryption operations through the national encryption algorithm SM4, the user ID and session key of the virtual machine will be operated through the national encryption algorithm SM3 and placed in the apptag of the NVMe command. After receiving the command, the virtual machine hardware device will find the user ID of the virtual machine based on the accessed address range.

[0044] Furthermore, after step C5, the following steps are further included:

[0045] C6. After the command legitimacy check is completed, determine whether the command is a write command or a read command. If it is a write command, encrypt the data according to the PIN code or user identification of the user of the virtual machine; if it is a write command, read the data according to the PIN code of the user of the virtual machine.

[0046] Compared with the prior art, the present invention provides a data storage security system and method based on a multi-user, multi-virtual machine platform, which is used to solve the problem of verifying the user identity when reading and writing storage devices, and protecting the data in the transmission process. In particular, in a traditional TCG-based self-encrypting disk, once a user unlocks his or her data in the hard disk, other users or administrators can also access the data in this area. In particular, some phishing software may continue to attack the user's data, and once it is discovered that the user has unlocked the data of the storage device, the data will be stolen immediately. Especially in cloud virtual machines, hardware resources are shared, so data needs to be protected from the user to the hardware resource pool.

[0047] In the system of the present invention, the virtual machine administrator assigns different identity identifiers to different virtual machine users according to the key exchange protocol. The virtual machine user applies for resources from the hardware resource pool according to the identifier, and the resource belongs exclusively to the user until the user releases the resource or the virtual machine administrator reclaims the resource.

[0048] After the user's identity is established, the user and the hardware resource generate a temporary session key through a key exchange protocol, which is used for command authentication of the user and the hardware resource during this user activity until the session ends.

[0049] During the data reading and writing process, after the user establishes a secure channel with the hard disk, he sends a data PIN to the hard disk. If no data PIN is sent, the hard disk generates a data PIN based on the user ID, which is used as part of the initial vector for data encryption and decryption. When reading data, the same data ID needs to be entered to decrypt the data. Therefore, it can be guaranteed that only the user can read the data.

[0050] After adopting the present invention, the resource application of the hard disk, the operation command of the hard disk and the data read and written to the hard disk are encrypted according to the user identification. If other users access the data area of ​​other users, the command cannot be executed by the hard disk, and a command error is returned to the driver. In this system, the administrator is only responsible for allocating and recycling hard disk resources. If the administrator accesses the data area of ​​the user, since the administrator cannot obtain the session key between the user and the hard disk, it is also impossible to issue a valid command, and thus it is impossible to obtain the user data. When the hard disk is lost, others cannot obtain the user's identification or the user's PIN, and therefore cannot decrypt the data.

[0051] At the same time, due to the adoption of an identity-based security authentication strategy, during the cloud migration process, users and hard disks can be replaced as long as their identities remain unchanged without affecting the validity of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the virtualization structure provided in Example 1;

[0053] Figure 2 This is a schematic diagram of security user definition provided in Example 1;

[0054] Figure 3 This is a schematic diagram of the command sending process provided in Example 2. DETAILED DESCRIPTION

[0055] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0056] The purpose of the present invention is to address the defects of the prior art and provide a security system and method for cloud servers accessing solid-state hard drives based on national encryption.

[0057] Embodiment 1

[0058] This embodiment provides a security system for a cloud server to access a solid-state hard disk based on national encryption, including a virtual machine hardware device, a virtual machine administrator, and several physical hosts; the virtual machine administrator is connected to the virtual machine hardware device and the several physical hosts respectively; each of the several physical hosts includes several virtual machines and several operating systems;

[0059] Each of the plurality of virtual machines reads and writes data to a virtual machine hardware device through a virtual machine administrator;

[0060] The virtual machine administrator establishes a secure channel based on the national encryption algorithm SM9, SM3 or SM4, and is responsible for managing the master key and handling the work of the key generation center.

[0061] This embodiment provides a data storage security system and method for a multi-user, multi-virtual machine platform, based on the national secret SM9 and other commercial secret algorithms, for solving the problems of verifying user identities when reading and writing storage devices, and protecting data during the transmission process.

[0062] This embodiment takes a solid-state drive based on the NVMe protocol as an example, but it should be noted that the system of this embodiment can be expanded to other storage devices during application.

[0063] like Figure 1 As shown, the virtualization structure includes virtual machine hardware devices, virtual machine administrators, and multiple physical hosts; each physical host includes multiple operating systems, virtual machines compatible with the multiple operating systems, and applications installed in the virtual machines.

[0064] In a multi-virtual machine platform, a virtual machine refers to a virtual host running on a physical host. A physical host can run multiple virtual hosts at the same time, and a virtual machine platform can support multiple physical hosts. The virtual hardware devices accessed by the virtual machine are also virtualized, which is realized through the virtualization technology of the virtual machine administrator. Therefore, when the application running in the virtual machine reads and writes data, the data read and written is the data in the hard disk of the virtual hardware device. After the conversion of the virtual machine administrator virtual machine, it becomes a read and write operation to access the physical hard disk.

[0065] Virtual machine hardware devices are put into the resource pool as resources, so different virtual machines may access different storage volumes of the same virtual machine hardware device. Moreover, for the same virtual machine, different applications may access the same virtual machine hardware device. Therefore, for virtual machine hardware devices, it is necessary to be able to distinguish different virtual machine users and corresponding physical resources.

[0066] like Figure 2As shown in the figure, virtual machines and virtual machine hardware devices can be regarded as different security users. During the startup phase, they need to apply for private keys from the virtual machine administrator according to their own user IDs. According to the national encryption algorithm SM9 protocol, the virtual machine reading and writing data to the hard disk of the virtual machine hardware device can be regarded as security user A (virtual machine) sending messages to security user B (virtual machine hardware device). Among them, the virtual machine administrator belongs to the security administrator user ADMIN, who is responsible for managing the master key and handling the work of the key generation center.

[0067] In the entire cloud security system, all users and hard disk virtual machines and virtual machine hardware devices must be assigned a user ID. When migrating the hard disk of a virtual machine or virtual machine hardware device, the same user ID must be assigned to the new hard disk to complete the hard disk replacement. Similarly, if a user switches virtual machines, the user can migrate between virtual machines by using the same user ID.

[0068] This embodiment is based on the Chinese commercial secret algorithms SM3, SM4 and SM9 in the security strategy. In the NVMe security disk, first the security administrator needs to verify the identity of the user; secondly, the user applies for hard disk resources from the security administrator; thirdly, a secure channel needs to be established between the user and the hard disk to complete the operation commands of the hard disk; finally, when writing data, the data is encrypted according to the user ID, and when reading data, the user ID is required to complete the decryption. In this system and method, triple verification of users, commands, and data is implemented. It truly realizes a solution in which other users, phishing software, and even administrators cannot steal user data when a multi-user system operates in parallel.

[0069] Embodiment 2

[0070] This embodiment provides a security method for a cloud server to access a solid-state hard disk based on national encryption, which is implemented based on a security system for a cloud server to access a solid-state hard disk based on national encryption in Embodiment 1.

[0071] This embodiment adopts the national secret algorithm SM9, SM3 or SM4 to build an encryption and decryption system. When the virtual machine accesses the virtual machine hardware device, identity authentication is performed and hard disk resources are applied for. The reading and writing of the virtual machine hardware device are both based on the virtual machine identity to establish a secure channel, and the data is read and written within the secure channel; the user information of the virtual machine is added to the data written to the virtual machine hardware device to encrypt the data, and the user information of the virtual machine is required to decrypt the data when reading the data.

[0072] When a new virtual machine (new user) is added, the registration operation method with the virtual machine administrator (security administrator) includes:

[0073] S1. Through the national secret algorithm SM2 key exchange protocol, the new user and the security administrator establish a secure channel;

[0074] S2. The new user sends his / her user ID, such as ID number, email or mobile phone number, to the security administrator;

[0075] S3. The security administrator generates the encrypted private key of the new user according to the national encryption algorithm SM9 protocol;

[0076] S4. The security administrator determines whether to update the encryption master private key and the encryption master public key in the process of generating the new user private key. If so, it is necessary to update the encryption private keys of all known users and store the updated encryption private keys in the security administrator's security area, and execute step S5; if not, execute step S5;

[0077] S5. The security administrator sends the generated encrypted private key to the new user.

[0078] In step S4, when the security administrator needs to update the encryption master public key and user private key, the specific steps are:

[0079] A1. The security administrator blocks the registration of new users;

[0080] A2. The security administrator uses the last encrypted information and the key exchange protocol of the national encryption algorithm SM9 to establish a secure channel with the user;

[0081] A3. Send the updated key information to the user;

[0082] A4. Repeat steps A2-A3 until all users are updated;

[0083] A5. Open the registration process for new users, that is, execute step S1.

[0084] When an existing user performs identity authentication, the steps are as follows:

[0085] According to the SM9 digital signature process, the user ID is signed using the user's private key;

[0086] S1. The security administrator verifies the signature.

[0087] S2. When a virtual machine hardware device (hard disk) is added to a resource pool, the cloud administrator needs to assign a user ID to the hard disk and then register or verify the same user with the security administrator.

[0088] After the user completes registration, the methods for applying for hard disk resources from the security administrator include:

[0089] S1. Through the national secret algorithm SM9 key exchange protocol, the user and the security administrator establish a secure channel;

[0090] S2. The user applies for hard disk space from the security administrator;

[0091] S3. The security administrator allocates hard disk space and sends the user's own user ID and allocated hard disk space to the hard disk;

[0092] S4. The hard disk establishes a correspondence table between the hard disk space and the virtual machine;

[0093] S5. Return the hard disk identifier and the corresponding allocated hard disk space to the user.

[0094] When a user sends a command to his own space, refer to Figure 3 , a security layer is established for each user in the operating system to complete the establishment of a secure session, including:

[0095] S1. Through the national secret algorithm SM9 key exchange protocol, the user and the security administrator establish a secure channel;

[0096] S2. The user initiates a secure session to the hard disk, and the security administrator generates a session key;

[0097] S3. The security administrator uses the generated session key to complete the encryption and decryption operations of the command.

[0098] In this embodiment, initiating a secure session in step S2 specifically includes:

[0099] B1. Determine whether the session is established. If not, proceed to step B2; if so, proceed to step B3;

[0100] B2. If the security administrator updates the host or hard disk key during the session establishment process, the session establishment fails; when the session establishment fails, the user confirms to the security administrator that the key update is complete, then re-establishes the session and executes step B4;

[0101] B3. After the session has been established, the security administrator updates the key, then the session continues until the session ends, and the next time a session is established, the updated key is used, and step B4 is performed;

[0102] B4. After the session has been established, the user performs secure read, write and erase operations.

[0103] In this embodiment, the secure read, write and erase operations performed by the virtual machine in step B4 are specifically as follows:

[0104] C1. The user layer of the virtual machine sends the command to the security layer of the virtual machine;

[0105] C2. The virtual machine's security layer passes the session key as a parameter to the driver;

[0106] C3. After the driver generates a write command, the security administrator encrypts the command using the national encryption algorithm SM4;

[0107] C4. After the hard disk receives the command, the security administrator uses the session key to decrypt the command using the national encryption algorithm SM4;

[0108] C5. The security administrator verifies the legitimacy of the command and executes it if it is legal.

[0109] In this embodiment, step C2 further includes:

[0110] If the drive and hard disk cannot complete the encryption and decryption operations through the national encryption algorithm SM4, the user's user ID and session key will be operated through the national encryption algorithm SM3 and placed in the apptag of the NVMe command. After the hard disk receives the command, it will find the user ID of the virtual machine based on the accessed address range.

[0111] Furthermore, after step C5, the following steps are further included:

[0112] C6. After the command legitimacy check is completed, determine whether the command is a write command or a read command. If it is a write command, encrypt the data according to the PIN code or user ID of the user of the virtual machine; if it is a write command, read the data according to the PIN code of the user of the virtual machine.

[0113] In this embodiment, if it is a write command, the data is encrypted according to the user's PIN or user identification, and the steps are:

[0114] 1. According to the requirements of the self-encrypting disk, if the user enters a PIN, the user's PIN is used, otherwise the user ID is used as the user PIN;

[0115] 2. Perform SM4-based KDF operation based on user PIN and TRNG true random number to generate KEK;

[0116] 3. The hard disk generates a DEK for encrypting data based on TRNG;

[0117] 4. Use KEK to perform SM4 key encapsulation operation on DEK to generate MEK, and store MEK on the hard disk;

[0118] 5. Use DEK to encrypt data based on SM4.

[0119] If it is a read command, the steps to read data according to the user's PIN are as follows:

[0120] 1. If the key is not loaded into the decryption module, the user needs to enter a PIN or generate a KEK based on the user's identity, and then use the KEK to perform SM4 decryption on the MEK to restore the DEK;

[0121] 2. Use the DEK to decrypt the data.

[0122] When performing the erasure operation, the stored MEK can be directly deleted to complete the data deletion operation.

[0123] Since each read, write, and erase command needs to verify the legitimacy of the user, it ensures that when other users use the hard disk at the same time, they cannot steal the current user's information.

[0124] In this embodiment, for the self-encrypting hard disk, when the user provides a data key, the data is encrypted and decrypted using the data key. When the data key is not provided, the user identification is used as the data key to encrypt and decrypt the data.

[0125] When the user of this embodiment sends the IO operation command of the hard disk to the hard disk drive, it passes through a security layer in the middle. In the security layer, the command encryption method, user identification and session key are sent to the hard disk drive. If the command self-encryption is selected, the driver needs to SM4 encrypt the read and write commands according to the session key first, and then write them into the memory. After the hard disk takes out the command, the command must first be SM4 decrypted, and the command can only be executed after the correctness of the command is verified. If the signature verification method is selected, the driver SM4 encrypts the user identification according to the session key, and then puts it into the apptag of the NVMe command. After the hard disk takes out the command, the apptag is first SM4 decrypted, and then the interval accessed by the command is verified to be consistent with the user's legal access interval before access can be made.

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

Claims

1. A secure method for a cloud server to access a solid-state hard disk based on national encryption, characterized in that: The method is based on a security system for a cloud server to access a solid-state hard disk based on national secrets; the security system includes a virtual machine hardware device, a virtual machine administrator, and several physical hosts; the virtual machine administrator is connected to the virtual machine hardware device and several physical hosts respectively; each of the several physical hosts includes several virtual machines and several operating systems; Each of the plurality of virtual machines reads and writes data to a virtual machine hardware device through a virtual machine administrator; The virtual machine administrator establishes a secure channel based on the national encryption algorithm SM9, SM3 or SM4, and is responsible for managing the master key and handling the work of the key generation center; The safe method is: The encryption and decryption system is constructed using the national secret algorithm SM9, SM3 or SM4. When a virtual machine accesses a virtual machine hardware device, identity authentication is performed and hard disk resources are applied for. The reading and writing of the virtual machine hardware device are based on the establishment of a secure channel based on the identity of the virtual machine, and data is read and written within the secure channel. When writing data to the virtual machine hardware device, the user information of the virtual machine is added to encrypt the data, and when reading the data, the user information of the virtual machine is required to decrypt the data. In the security method, when a new virtual machine is added, the registration operation method with the virtual machine administrator includes: S1. Through the national secret algorithm SM2 key exchange protocol, the new virtual machine and the virtual machine administrator establish a secure channel; S2. The new virtual machine sends its own user ID to the virtual machine administrator; S3. The virtual machine administrator generates an encrypted private key for the new virtual machine according to the national encryption algorithm SM9 protocol; S4. The virtual machine administrator determines whether to update the encryption master private key and the encryption master public key in the process of generating a new virtual machine private key. If so, it is necessary to update the encryption private keys of all known virtual machines and store the updated encryption private keys in the virtual machine administrator's secure area, and execute step S5; if not, execute step S5; Update the encryption master private key and encryption master public key as follows: A1. The VM administrator blocks the registration of new VMs. A2. The virtual machine administrator uses the last encrypted information and the key exchange protocol of the national encryption algorithm SM9 to establish a secure channel with the virtual machine; A3. Send the updated key information to the virtual machine; A4. Repeat steps A2-A3 until all virtual machines are updated. A5. Open the registration process for new virtual machines; S5. The virtual machine administrator sends the generated encrypted private key to the new virtual machine; In the security method, when the virtual machine sends a command to its own space, the operating system in the physical host establishes a security layer for each virtual machine to complete the establishment of a secure session, which specifically includes: S1. Through the national secret algorithm SM9 key exchange protocol, the virtual machine and the virtual machine administrator establish a secure channel; S2. The virtual machine initiates a secure session to the virtual machine hardware device, and the virtual machine administrator generates a session key; S3. The virtual machine administrator uses the generated session key to complete the encryption and decryption operations of the command.

2. According to a security method for a cloud server to access a solid state drive based on national encryption according to claim 1, it is characterized in that: In the security method, after the virtual machine completes registration, the method of applying for hard disk resources from the virtual machine administrator includes: S1. Through the national secret algorithm SM9 key exchange protocol, the virtual machine and the virtual machine administrator establish a secure channel; S2. The virtual machine applies for hard disk space from the virtual machine administrator; S3. The virtual machine administrator allocates hard disk space and sends the virtual machine's own user ID and allocated hard disk space to the virtual machine hardware device; S4. The virtual machine hardware device establishes a correspondence table between the hard disk space and the virtual machine; S5. Return the hard disk identifier of the virtual machine hardware device and the corresponding hard disk space allocated to the virtual machine.

3. A secure method for a cloud server to access a solid state drive based on national encryption according to claim 2, characterized in that: The initiation of a secure session specifically includes: B1. Determine whether the session is established. If not, proceed to step B2; if so, proceed to step B3; B2. If the virtual machine administrator updates the key of the virtual machine or virtual machine hardware device during the session establishment process, the session establishment fails; when the session establishment fails, the virtual machine confirms to the virtual machine administrator that the key update is complete, then re-establishes the session and executes step B4; B3. After the session has been established, the virtual machine administrator updates the key, then the session continues until the session ends, and the next time a session is established, the updated key is used, and step B4 is executed; B4. After the session has been established, the virtual machine performs secure read, write and erase operations.

4. A secure method for a cloud server to access a solid state drive based on national encryption according to claim 3, characterized in that: The secure read, write and erase operations performed by the virtual machine in step B4 are specifically as follows: C1. The user layer of the virtual machine sends the command to the security layer of the virtual machine; C2. The virtual machine's security layer passes the session key as a parameter to the driver; C3. After the driver generates a write command, the virtual machine administrator encrypts the command using the national encryption algorithm SM4; C4. After the virtual machine hardware device receives the command, the virtual machine administrator uses the session key to decrypt the command using the national encryption algorithm SM4; C5. The virtual machine administrator verifies the legitimacy of the command and executes it if it is legal.

5. A secure method for a cloud server to access a solid state drive based on national encryption according to claim 4, characterized in that: The step C2 further includes: If the driver and virtual machine hardware devices cannot complete the encryption and decryption operations through the national encryption algorithm SM4, the user ID and session key of the virtual machine will be operated through the national encryption algorithm SM3 and placed in the apptag of the NVMe command. After receiving the command, the virtual machine hardware device will find the user ID of the virtual machine based on the accessed address range.

6. A secure method for a cloud server to access a solid state drive based on national encryption according to claim 5, characterized in that: The step C5 further includes: C6. After the command legitimacy check is completed, determine whether the command is a write command or a read command. If it is a write command, encrypt the data according to the PIN code or user identification of the user of the virtual machine; if it is a write command, read the data according to the PIN code of the user of the virtual machine.