Virtual machine creation and related startup configuration, identity verification method and related equipment

By generating and managing disk keys on the user side and combining them with the public key encryption technology of the hardware root key, the problem of disk data leakage in the virtual machine is solved, and the security and transmission security of the virtual machine disk data are achieved.

CN120670086APending Publication Date: 2025-09-19HYGON YUNXIN INTEGRATED CIRCUIT DESIGN (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510780006.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

User data in existing virtual machines is at risk of leakage, especially in cloud platforms, where the security of disk data is difficult to guarantee.

Method used

By generating a disk key and creating an encrypted disk based on the disk key, using the user end to generate and manage the disk key, encrypting it with the public key of the hardware root key, generating a startup parameter file, and configuring and starting the virtual machine on the target host, it ensures that the disk key is not leaked during transmission.

Benefits of technology

It improves the security of virtual machine disk data, avoids the cloud platform's configuration of disk keys, and enhances the security of disk data and transmission security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670086A_ABST
    Figure CN120670086A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine creation method, a related startup configuration method, an identity verification method and related equipment. The virtual machine creation method comprises the following steps: sending a key certificate chain acquisition request; after the key certificate chain is obtained, generating a disk key, and creating an encrypted disk of the target virtual machine based on the disk key; wherein the virtual machine firmware used for starting the target virtual machine is at least used for obtaining a disk key in a preset storage space and mounting the encrypted disk based on the disk key; generating a starting parameter file; and sending the encrypted disk and the startup parameter file, so that a target host configures and starts the target virtual machine based on the encrypted disk and the startup parameter file. According to the embodiment of the invention, the security of the disk data of the virtual machine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of confidential computing technology, and specifically to a virtual machine creation and related startup configuration, identity authentication method and related equipment. Background Art

[0002] With the development of information technology, especially the development and popularization of cloud computing technology, more and more customers are deploying their business systems in the cloud. Virtualization technology, as a computer technology applied to the cloud, can virtualize multiple virtual machines (VMs) from a host to achieve efficient utilization of the host's hardware resources. To enhance the security of virtual machine data, secure virtualization technology can further combine virtualization technology with TEE (Trusted Execution Environment) technology to encrypt and isolate virtual machine data within the CPU, building a trusted execution environment based on virtual machines.

[0003] However, user data in existing virtual machines still faces the risk of leakage. Summary of the Invention

[0004] In view of this, an embodiment of the present invention provides a virtual machine creation and related startup configuration, identity authentication method and related equipment to improve the security of virtual machine disk data.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions.

[0006] In a first aspect, an embodiment of the present invention provides a virtual machine creation method for creating a target virtual machine, which is applied to a user terminal and includes:

[0007] Send a key certificate chain acquisition request, where the key certificate chain acquisition request is used to request the key certificate chain of a target host, where the target host is a host in the cloud platform used to run a target virtual machine, and the key certificate chain includes at least the hardware root key certificate of the target host, where the hardware root key certificate includes a hardware root key public key, and a hardware root key private key corresponding to the hardware root key public key is stored in a processor of the target host and is accessible only to the processor firmware;

[0008] After obtaining the key certificate chain, generating a disk key, and creating an encrypted disk of the target virtual machine based on the disk key;

[0009] Generate a startup parameter file, the startup parameter file including at least a disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key;

[0010] Send the encrypted disk and the startup parameter file to the target host so that the virtual machine firmware in the target host configures and starts the target virtual machine based on the encrypted disk and the startup parameters; wherein the virtual machine firmware used to start the target virtual machine is at least used to obtain a disk key in a preset storage space and mount the encrypted disk based on the disk key.

[0011] Optionally, generating a disk key and creating an encrypted disk of the target virtual machine based on the disk key includes:

[0012] Create a virtual disk for the target virtual machine;

[0013] Loading the operating system of the target virtual machine into the virtual disk;

[0014] generating a disk key corresponding to the virtual disk;

[0015] The virtual disk is encrypted based on the disk key to obtain an encrypted disk of the target virtual machine.

[0016] Optionally, the user terminal generates a startup parameter file, including:

[0017] Generate a first user key and a first user key certificate corresponding to the first user key; wherein the first user key public key is recorded in the first user key certificate, and the first user key private key is retained on the user end;

[0018] Generate a user root key, and encrypt the user root key based on the hardware root key public key to obtain the user root key ciphertext;

[0019] Based on the user root key, generate a second user key;

[0020] Generate a target key, and encrypt the target key based on the second user key to obtain a target key ciphertext;

[0021] Calculate the metric value of the virtual machine firmware to obtain the firmware metric value;

[0022] Signing valid data in the startup parameter file based on the first user key private key, the valid data including: user-side encryption information and virtual machine verification information, the virtual machine verification information including at least a firmware measurement value;

[0023] The disk key is encrypted based on the target key to obtain a disk key ciphertext.

[0024] Optionally, after generating the disk key and creating the encrypted disk of the target virtual machine based on the disk key, and before generating the startup parameter file, the method further includes: creating virtual machine firmware;

[0025] In the step of sending the encrypted disk and the startup parameter file to the target host, the virtual machine firmware is sent at the same time;

[0026] Alternatively, after generating the disk key and creating the encrypted disk of the target virtual machine based on the disk key, and before generating the startup parameter file, the method further includes: obtaining virtual machine firmware created by the target host.

[0027] Optionally, the key certificate chain includes a manufacturer key certificate, a chip key certificate, and a platform key certificate, wherein the manufacturer key certificate includes a public key of the manufacturer key, and the manufacturer key certificate is in a public state; the chip key certificate includes a public key of the chip key, and the chip key certificate is signed based on a private key of the manufacturer key; the platform key certificate includes a public key of the platform key, and the platform key certificate is signed based on a private key of the chip key;

[0028] The manufacturer key is the head key of the key certificate chain, the platform key is the tail key of the key certificate chain, and the platform key is the hardware root key.

[0029] Optionally, the manufacturer key includes a first manufacturer key and a second manufacturer key, and the platform key includes a first platform key and a second platform key; the manufacturer key certificate includes a first manufacturer key certificate and a second manufacturer key certificate, and the platform key certificate includes a first platform key certificate and a second platform key certificate;

[0030] Among them, in the key certificate chain, the first manufacturer key certificate is in a public state, the second manufacturer key certificate is based on the private key signature of the first manufacturer key, the chip key certificate is based on the private key signature of the second manufacturer key, the first platform key certificate is based on the private key signature of the chip key, and the second platform key certificate is based on the private key signature of the first platform key.

[0031] In a second aspect, an embodiment of the present invention provides a virtual machine creation method for creating a target virtual machine, which is applied to a cloud platform of a target host, where the target host is a host in the cloud platform for running the target virtual machine, comprising:

[0032] Obtain a key certificate chain acquisition request, wherein the key certificate chain acquisition request is used to request to obtain the key certificate chain of the target host;

[0033] Based on the key certificate chain acquisition request, obtain a corresponding key certificate chain; wherein the key certificate chain includes at least a hardware root key certificate of the target host, the hardware root key certificate includes a hardware root key public key, and a hardware root key private key corresponding to the hardware root key public key is stored in a processor of the target host and is accessible only to processor firmware;

[0034] Sending the key certificate chain to the user terminal so that the user terminal generates a disk key and a startup parameter file; the startup parameter file at least includes a disk key ciphertext and user terminal encryption information, wherein the disk key ciphertext is a ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user terminal encryption information and the hardware root key public key;

[0035] Obtain the encrypted disk and the startup parameter file so that the virtual machine firmware configures and starts the target virtual machine based on the encrypted disk and the startup parameters, wherein the virtual machine firmware used to start the target virtual machine is at least used to obtain a disk key in a preset storage space and mount the encrypted disk based on the disk key.

[0036] Optionally, the key certificate chain is obtained based on the key certificate chain acquisition request, specifically, based on the position and signature method of each key in the key certificate chain, each key certificate in the key certificate chain is obtained in sequence to generate and obtain the key certificate chain of the target host.

[0037] Optionally, sequentially obtaining each key certificate in the key certificate chain based on the location and signature method of each key in the key certificate chain includes:

[0038] Obtain a platform key certificate from the host operating system, wherein the platform key certificate is signed by a private key in the chip key;

[0039] Obtain the target host's chip ID from the host operating system;

[0040] Based on the chip identification, the chip key certificate and the corresponding manufacturer key certificate of the target host are obtained from the certificate server; wherein, the manufacturer key certificate includes the public key of the manufacturer key, and the manufacturer key certificate is in a public state; the chip key certificate includes the public key of the chip key, and the chip key certificate is signed based on the private key of the manufacturer key.

[0041] Optionally, the manufacturer key includes a first manufacturer key and a second manufacturer key, and the platform key includes a first platform key and a second platform key; the manufacturer key certificate includes a first manufacturer key certificate and a second manufacturer key certificate, and the platform key certificate includes a first platform key certificate and a second platform key certificate;

[0042] Among them, in the key certificate chain, the first manufacturer key certificate is in a public state, the second manufacturer key certificate is based on the private key signature of the first manufacturer key, the chip key certificate is based on the private key signature of the second manufacturer key, the first platform key certificate is based on the private key signature of the chip key, and the second platform key certificate is based on the private key signature of the first platform key.

[0043] In a third aspect, an embodiment of the present invention provides a virtual machine startup configuration method, which is applied to virtual machine firmware of a target virtual machine, where the target virtual machine runs on a target host in a cloud platform, comprising:

[0044] Obtaining an encrypted disk and a startup parameter file of a target virtual machine, wherein the encrypted disk is created based on a disk key, and the startup parameter file includes at least disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key;

[0045] Calculating a disk key of the encrypted disk based on the boot parameter file and a hardware root key private key, wherein the hardware root key private key is stored in a processor of the target host and is accessible only to processor firmware;

[0046] The disk key is stored in a preset storage space, so that during the target virtual machine startup process, the disk key is obtained from the preset storage space, and the encrypted disk is mounted based on the disk key.

[0047] Optionally, after obtaining the encrypted disk and the startup parameter file of the target virtual machine and before calculating the disk key of the encrypted disk based on the startup parameter file and the hardware root key private key, the method further includes:

[0048] Verifying the startup parameter file;

[0049] Wherein, when the valid data in the startup parameter file is signed based on the first user key private key, the user-side encryption information includes the first user key certificate; and verifying the startup parameter file includes: verifying the signature of the valid data in the startup parameter file based on the first user key public key in the first user key certificate;

[0050] The valid data includes: user-side encryption information and virtual machine verification information, and the virtual machine verification information at least includes a firmware measurement value.

[0051] Optionally, the verifying the startup parameter file includes:

[0052] Calculate the metric value based on the virtual machine firmware to obtain the metric value of the firmware to be verified;

[0053] The firmware metric value in the valid data is verified based on the firmware metric value to be verified. If the firmware metric value to be verified is consistent with the firmware metric value, the verification is passed; otherwise, the verification fails.

[0054] Optionally, the user-side encryption information includes a first user key certificate, a target key ciphertext, and a user root key ciphertext; and calculating the disk key of the encrypted disk based on the startup parameter file and the hardware root key private key includes:

[0055] Decrypt the user root key ciphertext based on the hardware root key private key to obtain the user root key;

[0056] generating a second user key based on the user root key;

[0057] decrypting the target key ciphertext based on the second user key to obtain the target key;

[0058] The disk key ciphertext is decrypted based on the target key to obtain the disk key.

[0059] Optionally, the platform key is used as the hardware root key, the hardware root key includes a first platform key and a second platform key, and the user root key is encrypted based on the second platform key;

[0060] The decrypting the user root key ciphertext based on the hardware root key private key to obtain the user root key is specifically, decrypting the user root key ciphertext based on the second platform key private key.

[0061] In a fourth aspect, an embodiment of the present invention provides an identity authentication method, applied to a user terminal, for authenticating a target virtual machine created by the virtual machine creation method described in the first aspect and / or the second aspect, comprising:

[0062] Sending an identity authentication request so that the processor firmware of the target host generates an identity authentication report based on the identity authentication request, wherein the identity authentication report includes at least part of the user-side encrypted information and is signed based on the hardware root key;

[0063] Based on the key certificate chain of the target host, verify whether the identity authentication report is legal.

[0064] Optionally, the identity authentication request includes a random number; and the identity authentication report generated by the processor firmware includes the random number.

[0065] Optionally, verifying whether the identity authentication report is legitimate based on the key certificate chain of the target host includes:

[0066] Verify the signature of the identity authentication report based on the hardware root key public key;

[0067] Verify the random number and virtual machine verification information in the identity authentication report;

[0068] Verify the user-side encrypted information in the identity authentication report;

[0069] Among them, when all the above verifications are passed, the identity authentication report is legal; when any of the above verifications fails, the identity authentication report is illegal.

[0070] Optionally, in the identity authentication report, the user end encryption information is the first user key public key in the first user key certificate;

[0071] The virtual machine verification information in the identity authentication report is one or more of a firmware measurement value, a virtual machine version number, a virtual machine identifier, and user-defined data;

[0072] The identity authentication report is signed based on a first platform key in the hardware root key.

[0073] In a fifth aspect, an embodiment of the present invention provides an identity authentication method, applied to processor firmware, for authenticating a target virtual machine created by the virtual machine creation method described in the first aspect and / or the second aspect, comprising:

[0074] Get the authentication request from the user;

[0075] Generate an identity authentication report based on the identity authentication request, wherein the identity authentication report includes at least part of the user-side encrypted information and is signed based on the hardware root key;

[0076] The identity authentication report is fed back to the user terminal, so that the user terminal verifies whether the identity authentication report is legal based on the key certificate chain of the target host.

[0077] Optionally, the identity authentication request includes a random number; and the step of generating an identity authentication report based on the identity authentication request includes:

[0078] The random number is recorded in the identity authentication report.

[0079] Optionally, the step of generating an identity authentication report based on the identity authentication request includes:

[0080] Writing the first user key public key recorded by the first user key certificate in the user end encrypted information into the identity authentication report;

[0081] Writing one or more of a firmware measurement value, a virtual machine version number, a virtual machine identifier, and user-defined data into the identity authentication report;

[0082] The identity authentication report is signed based on the first platform key in the hardware root key.

[0083] In the sixth aspect, an embodiment of the present invention provides a virtual machine application, applied to a user end, comprising one or more computer executable instructions, which, when executed, are used to create a trusted environment, implementing the virtual machine creation method as described in the first aspect, and / or the identity authentication method as described in the fourth aspect.

[0084] In the seventh aspect, an embodiment of the present invention provides a cloud platform, which is configured with multiple hosts, and the cloud platform is configured to execute the virtual machine creation method as described in the second aspect, and / or call the virtual machine firmware to execute the virtual machine startup configuration method described in the third aspect, and / or call the processor firmware to execute the identity authentication method described in the fifth aspect.

[0085] In an eighth aspect, an embodiment of the present invention provides a storage medium storing one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the virtual machine creation method as described in the first aspect, and / or the virtual machine creation method as described in the second aspect, and / or the virtual machine startup configuration method as described in the third aspect, and / or the identity authentication method as described in the fourth aspect, and / or the identity authentication method as described in the fifth aspect are implemented.

[0086] An embodiment of the present invention provides a virtual machine creation and related startup configuration, identity authentication method and related equipment, the virtual machine creation method comprising: sending a key certificate chain acquisition request, the key certificate chain acquisition request is used to request to obtain the key certificate chain of the target host, the target host is a host in the cloud platform for running the target virtual machine, the key certificate chain includes at least the hardware root key certificate of the target host, the hardware root key certificate includes a hardware root key public key, the hardware root key private key corresponding to the hardware root key public key is stored in the processor of the target host, and only the processor firmware is allowed to access it; after obtaining the key certificate chain, a disk key is generated, and based on the disk key , creating an encrypted disk of the target virtual machine; wherein the virtual machine firmware for starting the target virtual machine is at least used to obtain a disk key in a preset storage space and mount the encrypted disk based on the disk key; generating a startup parameter file, wherein the startup parameter file at least includes a disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is a ciphertext obtained after the disk key is encrypted, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key; sending the encrypted disk and the startup parameter file to the target host, so that the virtual machine firmware configures and starts the target virtual machine in the target host based on the encrypted disk and the startup parameters.

[0087] It can be seen that the disk key described in the embodiment of the present invention is generated based on the user end, and based on the disk key, the encrypted disk of the virtual machine is created, so that the virtual machine generated by the embodiment of the present invention is started and run based on the mounted encrypted disk, that is, the configuration of the disk key is implemented by the user end, thereby avoiding the cloud platform's configuration of the disk key and improving the security of the virtual machine disk data.

[0088] At the same time, embodiments of the present invention further generate a startup parameter file including disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is the ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key, so that when the target host starts and configures the virtual machine, it can decrypt the disk key based on the user-side encryption information and the hardware root key private key stored in the processor of the target host. In other words, the disk key is transmitted to the target host after encryption, thereby preventing the disk key from being leaked during transmission and improving the transmission security of the disk key. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0090] Figure 1 It is an optional architecture for cloud services based on virtualization technology.

[0091] Figure 2 It is a virtualization technology architecture for cloud service scenarios.

[0092] Figure 3 An optional flowchart of a virtual machine creation method provided by an embodiment of the present invention.

[0093] Figure 4 This is an optional flowchart of step S110 provided in an embodiment of the present invention.

[0094] Figure 5 This is an optional flowchart of step S130 provided in an embodiment of the present invention.

[0095] Figure 6 A functional diagram of the virtual machine firmware provided by an embodiment of the present invention.

[0096] Figure 7 This is an optional flowchart of step S140 provided in an embodiment of the present invention.

[0097] Figure 8 An optional flow chart of a virtual machine startup configuration method provided by an embodiment of the present invention.

[0098] Figure 9 An optional flowchart of an identity authentication method provided by an embodiment of the present invention.

[0099] Figure 10 This is an optional flowchart of step S330 provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0100] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0101] With the development of cloud services, virtualization technology has been increasingly widely used in cloud service scenarios. To facilitate understanding of virtualization technology, the following introduces virtualization technology using cloud services based on virtualization technology as an example.

[0102] Reference Figure 1 The cloud service optional architecture based on virtualization technology is shown, and the cloud service architecture may include: a host 10, a network 20, and user terminals 31 to 3n;

[0103] The host 10 is a host device (which may be a server) deployed on the network side by a cloud service provider (such as a cloud service vendor) for providing cloud services. Based on the needs of different users, the host can create one or more virtual machines for different users through virtualization technology. For example, a user can request the host to create several virtual machines that meet their business needs based on their business needs. The user can then run applications on the virtual machines to complete their specific business through the applications running on the virtual machines.

[0104] The network 20 may be considered to be the Internet, or other forms of networks with communication functions, through which the host and the user end achieve communication and data transmission. The embodiment of the present application does not limit the specific network form of the network 20;

[0105] The user terminals 31 to 3n are device terminals of users who use cloud services. Users can interact with the host based on the user terminals 31 to 3n to implement configuration of virtual machines, issuance of service requests, etc.

[0106] To further understand the virtualization technology of cloud service scenarios, refer to Figure 2 The cloud platform architecture (hereinafter referred to as the cloud platform) of the cloud service scenario shown may include: a host, a host operating system running on the host, and cloud platform software configured on the host operating system.

[0107] The host can be understood as the hardware foundation of the secure virtualization architecture, providing hardware resources for the secure virtualization architecture. Optionally, the host can be a confidential computing device. The processor is the host's computing and control core, responsible for interpreting computer instructions and processing data in computer software. During the operation of the processor, it accesses memory to obtain relevant data resources.

[0108] The host operating system runs in the processor and is used to manage and allocate corresponding hardware resources. The host operating system can configure cloud platform software for the cloud platform. In the cloud service scenario, the cloud platform can create one or more virtual machines for users based on the user needs obtained, and allocate corresponding memory resources to the virtual machines.

[0109] To prevent the host operating system and cloud platform from obtaining the memory data in the virtual machine and ensure the security of user cloud computing, refer to Figure 2 In the virtualization technology architecture of the cloud service scenario shown, the memory data and disk data of the virtual machine can be stored after being encrypted.

[0110] To further ensure the independence of data between virtual machines, different virtual machines have different keys. Figure 2 For example, the virtual machine corresponding to asid=1 has memory key 11 and disk key 12, the virtual machine corresponding to asid=2 has memory key 21 and disk key 22, and so on. The virtual machine n corresponding to asid=n has memory key n1 and disk key n2. Asid (Address Space ID) is used to indicate the virtual machine identifier of the virtual machine, and different virtual machines have different asids. Memory keys can be configured and managed based on trusted devices in physical devices to ensure the security of memory data, while disk keys are usually configured and managed based on the cloud platform.

[0111] In an optional example, the virtual machine with the above data encryption mechanism may be a CSV (China Secure Virtualization, China Secure Virtualization Technology) virtual machine.

[0112] However, considering that cloud platforms are prone to vulnerabilities and are easily vulnerable to security risks such as data leakage under attackers' attacks, the disk keys they manage are at risk of leakage, which in turn leads to security risks for the disk data of virtual machines.

[0113] In view of this, an embodiment of the present invention provides a virtual machine creation and related startup configuration, identity authentication method and related equipment, the virtual machine creation method comprising: sending a key certificate chain acquisition request, the key certificate chain acquisition request is used to request to obtain the key certificate chain of the target host, the target host is a host in the cloud platform for running the target virtual machine, the key certificate chain includes at least the hardware root key certificate of the target host, the hardware root key certificate includes a hardware root key public key, the hardware root key private key corresponding to the hardware root key public key is stored in the processor of the target host, and only the processor firmware is allowed to access it; after obtaining the key certificate chain, a disk key is generated, and based on the disk key, a hardware root key certificate is generated. disk key, creating an encrypted disk of the target virtual machine; wherein, the virtual machine firmware for starting the target virtual machine is at least used to obtain the disk key in a preset storage space and mount the encrypted disk based on the disk key; generating a startup parameter file, the startup parameter file at least including a disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is a ciphertext obtained after the disk key is encrypted, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key; sending the encrypted disk and the startup parameter file to the target host, so that the virtual machine firmware configures and starts the target virtual machine in the target host based on the encrypted disk and the startup parameters.

[0114] It can be seen that the disk key described in the embodiment of the present invention is generated based on the user end, and based on the disk key, the encrypted disk of the virtual machine is created, so that the virtual machine generated by the embodiment of the present invention is started and run based on the mounted encrypted disk, that is, the configuration of the disk key is implemented by the user end, thereby avoiding the cloud platform's configuration of the disk key and improving the security of the virtual machine disk data.

[0115] Among them, since the data in the memory is based on the disk data, the embodiment of the present invention improves the security of the virtual machine disk data, and substantially also improves the data security of the memory.

[0116] At the same time, embodiments of the present invention further generate a startup parameter file including disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is the ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key, so that when the target host starts and configures the virtual machine, it can decrypt the disk key based on the user-side encryption information and the hardware root key private key stored in the processor of the target host. In other words, the disk key is transmitted to the target host after encryption, thereby preventing the disk key from being leaked during transmission and improving the transmission security of the disk key.

[0117] The following describes the solution provided by the embodiment of the present invention. Specifically, the solution provided by the embodiment of the present invention can be implemented based on the secure virtualization architecture of the aforementioned cloud service scenario. Unlike the virtual machine creation process in the aforementioned secure virtualization architecture, the disk key in the embodiment of the present invention is configured based on the user end. Figure 3 The following is an optional flow chart of a virtual machine creation method provided by an embodiment of the present invention, wherein the virtual machine creation process is used to create a target virtual machine, which can be understood as a virtual machine to be created. After the target virtual machine is created, the encryption mechanism for memory data and disk data can be configured for the target virtual machine. Figure 3 , the virtual machine creation method includes:

[0118] Step S100: The user terminal sends a key certificate chain acquisition request;

[0119] The key certificate chain acquisition request is used to request the acquisition of the key certificate chain of the target host, and to encrypt relevant data using the key information in the key certificate chain by acquiring the key certificate chain.

[0120] A key certificate chain can be understood as a certificate signed in sequence by multiple keys, wherein the latter key certificate is signed by the private key of the previous key, and the public key in the key certificate at the head end can be confirmed based on public information. Afterwards, based on the public key at the head end, the public keys of the keys corresponding to the key certificate chain can be verified in sequence, thereby finally confirming whether the public key of the key at the tail end is in a trusted state. In an embodiment of the present invention, the key certificate chain includes at least the hardware root key certificate of the target host, and the hardware root key certificate includes the hardware root key public key, so that the key at the tail end can be the hardware root key public key, and then the trusted state of the hardware root key public key is guaranteed based on the key certificate chain.

[0121] In a specific implementation, the hardware root key private key corresponding to the hardware root key public key is stored in the processor of the target host and is only allowed to be accessed by the processor firmware, so that the hardware root key public key is used to participate in the relevant process of encrypting the disk key, so that the encrypted disk key ciphertext can only obtain the corresponding disk key when the hardware root key private key stored in the processor of the target host and only allowed to be accessed by the processor firmware participates in the decryption of the disk key ciphertext, thereby improving the security of the disk key.

[0122] It is understood that there may be multiple hosts in a cloud platform. In the embodiment of the present invention, the host running the target virtual machine is the target host. Different target hosts correspond to different hardware root keys. Accordingly, the key certificate chain obtained in this step includes at least the hardware root key certificate of the target host, which includes the hardware root key public key, and the corresponding hardware root key private key is stored in the processor of the target host.

[0123] In an optional example, the user terminal may first create a trusted environment within the device based on a preset virtual machine application, and then issue the key certificate chain acquisition request within the trusted environment. For example, the preset application's operating environment may be used as the trusted environment, and the preset application may be opened, and the key certificate chain acquisition request may be issued within the preset application environment.

[0124] Correspondingly, the cloud platform can obtain the key certificate chain acquisition request.

[0125] Step S110: The cloud platform obtains the corresponding key certificate chain based on the key certificate chain acquisition request;

[0126] The cloud platform may store key certificate chains corresponding to different hosts in advance, so that when receiving a key certificate chain acquisition request, it can obtain the key certificate chain corresponding to the target host. In other optional implementations, the cloud platform may also sequentially obtain each key certificate in the key certificate chain based on the location and signature method of each key in the key certificate chain, thereby generating and obtaining the key certificate chain of the target host.

[0127] In a specific example, the key certificate chain may include, for example, a manufacturer key certificate, a chip key certificate, and a platform key certificate, wherein the manufacturer key may be used as the head-end key, the manufacturer key certificate includes the manufacturer key's public key, and the manufacturer key's public key may be in a public state, for example, it may be downloaded based on a certificate server, so that the public key in the manufacturer key certificate may be determined to be trusted based on public information, the chip key certificate may include the chip key's public key, and the chip key certificate may be signed based on the manufacturer key's private key, the platform key certificate may include the platform key's public key, and the platform key certificate may be signed based on the chip key's private key. The platform key at the tail end may be stored in the host's processor as a hardware root key, and only the processor firmware is allowed to access it.

[0128] To improve the security of each key in the key certificate chain, the corresponding manufacturer keys can be at least two, for example, including a first manufacturer key and a second manufacturer key. The platform keys can be at least two, for example, including a first platform key and a second platform key. Accordingly, the manufacturer key certificate includes a first manufacturer key certificate and a second manufacturer key certificate, and the platform key certificate includes a first platform key certificate and a second platform key certificate. The key certificate chain can include: a first manufacturer key certificate, a second manufacturer key certificate, a chip key certificate, a first platform key certificate, and a second platform key certificate. A specific implementation can be: the first manufacturer key can serve as the head-end key, the public key of the first manufacturer key can be in a public state, for example, it can be downloaded based on a certificate server, so that the public key in the first manufacturer key certificate can be determined to be trusted based on public information, the second manufacturer key certificate can be signed based on the private key of the first manufacturer key, the chip key certificate can be signed based on the private key of the second manufacturer key, the first platform key certificate can be signed based on the private key of the chip key, and the second platform key certificate can be signed based on the private key of the first platform key. The first platform key and the second platform key at the tail end are both stored as hardware root keys in the host processor and are only accessible to the processor firmware.

[0129] In a specific example, the first manufacturer key may be, for example, HRK (Hygon Root Key, Hygon signature root key, using SM2 algorithm), the second manufacturer key may be, for example, HSK (Hygon CSV Signing Key, Hygon CSV signature key, using SM2 algorithm), the chip key may be, for example, CEK (Chip Endorsement Key, chip signature key, using SM2 algorithm), the first platform key may be, for example, PEK (Platform Endorsement Key, platform signature key, using SM2 algorithm), the second platform key may be, for example, PDH (Platform Diffie-Hellman Key, platform key exchange key, using SM2 algorithm) certificate; in the specific key certificate chain, HRK is the Hyguang root certificate (which can be determined based on public information), and the certificate contains the HRK public key; the HSK certificate contains the HSK public key and is signed by the HRK private key; the CEK certificate contains the CEK public key and is signed by the HSK private key, where the CEK private key is stored in the host chip; the PEK certificate contains the PEK public key and is signed by the CEK private key; the PDH certificate contains the PDH public key and is signed by the PEK private key.

[0130] In a specific example, refer to Figure 4 In the optional flowchart of step S110 shown, sequentially obtaining each key certificate in the key certificate chain based on the location and signature method of each key in the key certificate chain may include:

[0131] Step S111: Obtaining a platform key certificate from the host operating system;

[0132] Among them, the public key of the platform key can be stored in the host and allowed to be accessed by the host operating system. The private key in the chip key is stored in the host chip and allowed to be called by the processor firmware. Since the platform key certificate is signed by the private key of the chip key, the host operating system can call the private key in the chip key based on the processor firmware to sign the platform key certificate, thereby forming a platform key certificate.

[0133] In a specific example, the platform keys can be two, namely the first platform key and the second platform key. The public key of the first platform key and the public key of the second platform key can be stored in the host and allowed to be accessed by the host operating system; the private key in the chip key and the private key of the first platform key can be saved in the chip of the host and allowed to be called by the processor firmware; accordingly, the host operating system can sign the public key of the second platform key based on the processor firmware calling the private key of the first platform key, thereby forming a second platform key certificate, and further sign the public key of the first platform key based on the processor firmware calling the private key in the chip key, thereby forming a first platform key certificate.

[0134] Step S112: Obtain the chip identification of the target host from the host operating system;

[0135] Since the key certificate chain in the embodiment of the present invention includes a chip key certificate, it is necessary to obtain the public key of the corresponding chip key based on the chip identification (eg chip ID) of the target host.

[0136] In a specific example, the chip identification of the target host may be stored in a preset storage location, and the host operating system may retrieve the chip identification of the target host from the storage location.

[0137] Step S113: Based on the chip identification, obtain the chip key certificate and the corresponding manufacturer key certificate of the target host from the certificate server;

[0138] It is understood that the chip key public key can be stored in a certificate server, such as a chip manufacturer server. Based on the chip identifier, the target host's chip key public key can be determined. Since the chip key certificate is signed using the manufacturer's private key, the chip key certificate can be signed using the manufacturer's private key to form a chip key certificate. Furthermore, a manufacturer key certificate can be directly formed based on the manufacturer's public key as the head of a key certificate chain.

[0139] In a specific example, the manufacturer key may be two, namely, a first manufacturer key and a second manufacturer key. The public key of the first manufacturer key, the private key of the first manufacturer key, and the public key of the second manufacturer key and the private key of the second manufacturer key may be recorded in the certificate server.

[0140] The certificate server may record the chip key public key. Based on the chip identifier, the target host's chip key public key may be determined. Given that the chip key certificate may be signed based on the private key of the second manufacturer key, the chip key certificate may be signed based on the private key of the second manufacturer key, thereby forming a chip key certificate. Given that the second manufacturer key certificate may be signed based on the private key of the first manufacturer key, the public key of the second manufacturer key may be signed based on the private key of the first manufacturer key, thereby forming a first manufacturer key certificate. Accordingly, a manufacturer key certificate may be formed based on the public key of the first manufacturer key as the head end of a key certificate chain.

[0141] In a specific example, the cloud platform in this step may download the chip key certificate and the corresponding manufacturer key certificate of the target host from the certificate server.

[0142] It can be understood that, based on the above process, each key certificate in the key certificate chain can be obtained, thereby obtaining the key certificate chain composed of each key certificate.

[0143] Continue to refer Figure 3 , executing step S120: the cloud platform sends the key certificate chain to the user terminal;

[0144] It is understandable that after obtaining the key certificate chain, the key certificate chain can be sent to the user terminal. Accordingly, the user terminal can obtain the key certificate chain.

[0145] Step S130: The user terminal generates a disk key, and creates an encrypted disk of the target virtual machine based on the disk key;

[0146] By generating a disk key, the key configuration of the encrypted disk can be implemented on the user side, thereby avoiding the problem of disk key leakage that may occur on the cloud platform.

[0147] In view of the configuration relationship between the disk and the operating system, when executing step S130, the operating system of the target virtual machine can be installed at the same time. For details, refer to Figure 5 An optional flow chart of step S130 is shown, where step S130 may include:

[0148] Step S131: Create a virtual disk of the target virtual machine.

[0149] The virtual disk can be understood as a virtual disk file vdisk1. In a specific example, the virtual disk can be created using the qemu-img create command.

[0150] Step S132: Load the operating system of the target virtual machine into the virtual disk.

[0151] The operating system of the target virtual machine can be determined based on the user's business needs, that is, the loaded operating needs meet the user's business needs. In a specific example, the operating system can be, for example, an Ubuntu operating system or a CentOS operating system.

[0152] Step S133: Generate a disk key corresponding to the virtual disk.

[0153] In a specific implementation, the user terminal may generate a corresponding disk key based on the user's input, or may generate multiple candidate disk keys for the user to select, and use the selected disk key as the disk key.

[0154] In an optional example, the user terminal may generate a corresponding disk key disk_key1 based on user input.

[0155] Step S134: Encrypting the virtual disk based on the disk key to obtain an encrypted disk of the target virtual machine.

[0156] After the specific disk key is determined, the virtual disk may be encrypted to form an encrypted disk.

[0157] In a specific example, the user terminal may encrypt the virtual disk vdisk1 based on the disk key disk_key1. In an optional example, different encryption algorithms may be selected based on different requirements to encrypt the virtual disk. For example, LUKS2 may be used to encrypt the virtual disk.

[0158] In a specific implementation, the selected encryption algorithm can simultaneously encrypt and protect the integrity of the virtual disk, thereby more comprehensively protecting the disk data. For example, LUKS2 can be used to encrypt and protect the integrity of the virtual disk.

[0159] It can be understood that after the encrypted disk is formed, in the startup process of the target virtual machine, the virtual machine firmware is at least configured to obtain the disk key in the preset storage space and mount the encrypted disk based on the disk key, thereby obtaining the disk key based on the virtual machine firmware and decrypting the encrypted disk to achieve the mounting of the encrypted disk.

[0160] In an optional implementation, the virtual machine firmware can be created by the user end, or by the cloud platform (embodied as created by the cloud platform software), or by the host operating system (embodied as created by the target host). Regardless of which party creates it, the virtual machine firmware only needs to participate in the startup process of the target virtual machine and implement the corresponding functions. Moreover, in the example where the cloud platform or the host operating system creates the virtual machine firmware, after the virtual machine firmware is created, the virtual machine firmware created by the target host is further sent to the user end, so that the user end generates a startup parameter file based on the measurement value of the virtual machine firmware.

[0161] It should be noted that the virtual machine firmware created in the embodiment of the present invention is configured with the functions of obtaining a disk key from a preset storage space and mounting the encrypted disk based on the disk key.

[0162] In a specific example, refer to Figure 6 The functional diagram of the virtual machine firmware is shown. In addition to configuring regular functions, the virtual machine firmware can also specify (which can also be understood as reserving) a memory area as a preset storage space. The preset storage space is used to store the disk key. During the target virtual machine startup process, the virtual machine software (such as qemu) can obtain the address of the preset storage space and inject the disk key in the virtual machine startup parameters into the preset storage space, so that the virtual machine firmware can obtain the disk key in the preset storage space during operation and mount the encrypted disk based on the disk key.

[0163] It is understandable that if the disk key is incorrect, the virtual disk cannot be decrypted, and accordingly, the operating system of the target virtual machine cannot be started.

[0164] Continue to refer Figure 3 , executing step S140: the user terminal generates a startup parameter file;

[0165] The startup parameter file can be understood as a file containing the startup parameters of the target virtual machine. In an embodiment of the present invention, the startup parameter file includes at least disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is the ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key.

[0166] Among them, the disk key is encrypted to protect the disk key in the startup parameter file based on encryption to avoid the possible leakage of related data. At the same time, on the target host side, the disk key can be decrypted based on the hardware root key in the processor and combined with the user-side encryption information, and the relevant decryption process is executed in the processor of the target host, thereby avoiding data security risks caused by possible data leakage problems of the cloud platform and the host operating system.

[0167] The user-side encryption information may include a first user key certificate, a target key (tektik) ciphertext and a user root key (mkey) ciphertext; wherein, the first user key certificate includes a first user key public key, and its corresponding first user key private key is used to sign the data in the startup parameter file, the disk key ciphertext is obtained by encrypting the disk key (disk_key1) based on the target key (tektik), the target key ciphertext is obtained by encrypting the target key based on the second user key (kek and kik), the user root key ciphertext is obtained by encrypting the user root key based on the hardware root key public key, and the user root key is used to generate the second user key.

[0168] Accordingly, in a specific decryption process, the data in the startup parameter file can first be signed based on the first user key public key in the first user key certificate, and after the signature is verified, the disk key decryption process is performed. Specifically, the decryption process can be as follows:

[0169] The user root key ciphertext is decrypted based on the hardware root key private key stored in the processor of the target host and only allowed to be accessed by the processor firmware, thereby obtaining the user root key, and further generating a second user key based on the user root key, and then, decrypting the target key ciphertext based on the second user key to obtain the target key, and further decrypting the disk key ciphertext based on the target key to obtain the disk key.

[0170] In a specific example, refer to Figure 7 An optional flow chart of step S140 is shown, where step S140 may include:

[0171] Step S141: Generate a first user key and a first user key certificate corresponding to the first user key;

[0172] The user terminal may generate a key pair as a first user key, wherein the first user key public key may be recorded in a first user key certificate, and the first user key private key may be retained on the user terminal for retrieval in subsequent steps.

[0173] Step S142: Generate a user root key, and encrypt the user root key based on the hardware root key public key to obtain a user root key ciphertext;

[0174] In an optional implementation, the user terminal may generate a user root key mkey and encrypt the key based on the hardware root key public key in the hardware root key certificate to obtain the user root key ciphertext.

[0175] In an optional example, the hardware root key is a platform key, including a first platform key and a second platform key, wherein the user root key can be encrypted based on the first platform key and / or the second platform key to obtain a user root key ciphertext; in a specific example, the user root key can be encrypted based on the public key of the second platform key to obtain a user root key ciphertext.

[0176] Step S143: Generate a second user key based on the user root key;

[0177] The second user key is used to encrypt the target key, thereby ensuring the data security of the target key. In a specific implementation, the user terminal can derive the second user key from the user root key mkey based on a standard KDF key derivation algorithm.

[0178] In an optional implementation, the second user key may include not only the second user encryption key kek, but also the second user integrity protection key kik, wherein the second user encryption key kek can be used to encrypt data, and the second user integrity protection key kik can be used to calculate the integrity verification code of the data (such as an hmac code).

[0179] Step S144: generating a target key, and encrypting the target key based on the second user key to obtain a target key ciphertext;

[0180] The target key is used to encrypt the disk key. In an optional example, the target key may include a target encryption key tek and a target integrity protection key tik.

[0181] In an optional implementation, the target key (including the target encryption key tek and the target integrity protection key tik) can be encrypted based on the second user encryption key kek to obtain the target key initial ciphertext; when there is a second user integrity protection key kik, this step can also calculate the integrity verification code (hereinafter referred to as the target key integrity verification code) of the target key (including the target encryption key tek and the target integrity protection key tik) based on the second user integrity protection key kik.

[0182] It is understandable that the target key ciphertext may include only the target key initial ciphertext, or may include both the target key initial ciphertext and the target key integrity verification code, thereby providing double protection for the target key and improving the data security of the target key.

[0183] Step S145: Calculate the metric value of the virtual machine firmware to obtain the firmware metric value;

[0184] Specifically, a hash digest of the virtual machine firmware may be calculated as the firmware metric value.

[0185] Step S146: Signing the valid data in the startup parameter file based on the first user key private key;

[0186] Among them, valid data may include: user-side encryption information and virtual machine verification information, and the virtual machine verification information may at least include firmware measurement values, that is, measurement values ​​corresponding to the virtual machine firmware. In a further example, the virtual machine verification information may further include: virtual machine version number, virtual machine identification (ID) and user-defined data.

[0187] By signing the valid data, the data security of the valid data in the startup parameter file is guaranteed.

[0188] Step S147: Encrypting the disk key based on the target key to obtain a disk key ciphertext;

[0189] In an optional implementation, when the target key includes a target encryption key tek and a target integrity protection key tik, the disk key can be encrypted based on the target encryption key tek to obtain a disk key ciphertext, and the integrity verification code of the disk key can be calculated based on the target integrity protection key tik to obtain a disk key integrity verification code.

[0190] In an optional example, the disk key ciphertext and the disk key integrity verification code are also part of the startup parameter file and participate in the corresponding data transmission process and virtual machine startup process.

[0191] Continue to refer Figure 3 , executing step S150: sending the encrypted disk and the startup parameter file to the target host;

[0192] By sending the encrypted disk and the startup parameter file to the target host (the target host is the host for running the target virtual machine in the cloud platform, correspondingly, Figure 3 The sending arrow in the figure points to the cloud platform), so that the virtual machine firmware configures and starts the target virtual machine in the target host based on the encrypted disk and the startup parameters.

[0193] In an optional implementation, the user can send the encrypted disk and the startup parameter file to the cloud platform, which then calls the virtual machine firmware, causing the virtual machine firmware to configure the relevant files on the target host. In response, the cloud platform can obtain the encrypted disk and the startup parameter file.

[0194] In a further optional implementation, step S150 may also simultaneously send the virtual machine firmware to the target host.

[0195] It is understandable that the virtual machine firmware does not involve sensitive data and therefore does not need to be encrypted. The virtual disk has been encrypted by the disk key. The user-side encryption information in the startup parameter file contains relevant encryption information of the disk key. Therefore, the disk key can be decrypted in the target host based on the combination of the hardware root key and the user-side encryption information, and then the startup process of the target virtual machine can be executed based on the disk key.

[0196] In a further example of the present invention, when the target host obtains the encrypted disk and the startup parameter file, the startup configuration process of the target virtual machine can be executed based on the encrypted disk and the startup parameter file. The startup configuration process can be understood as the configuration process before the target virtual machine is started. Figure 8 An optional flow chart of a virtual machine startup configuration method is shown. The virtual machine startup configuration method can be applied to the virtual machine firmware of a target virtual machine, wherein the virtual machine firmware of the target virtual machine can be run based on a target host in a cloud platform. Specifically, the virtual machine firmware can be run based on a processor of the target host. Accordingly, the virtual machine startup configuration method is a process involved in the target host processor running the virtual machine firmware of the target virtual machine. The virtual machine startup configuration method includes:

[0197] Step S200: Obtain the encrypted disk and startup parameter file of the target virtual machine;

[0198] After the user sends the encrypted disk and the startup parameter file to the target host, the target host can obtain the encrypted disk and startup parameter file of the target virtual machine. Correspondingly, the virtual machine firmware can obtain the encrypted disk and startup parameter file of the target virtual machine.

[0199] For the description of the encrypted disk and the startup parameter file, please refer to the above content.

[0200] In an optional example, the virtual machine firmware further verifies the startup parameter file after obtaining the corresponding startup parameter file.

[0201] Among them, in an optional implementation, the valid data in the startup parameter file can be signed based on the private key of the first user key. Accordingly, in the specific verification process, the valid data in the startup parameter file can be verified based on the public key of the first user key in the first user key certificate, and the subsequent process can be carried out after the verification is passed.

[0202] In an optional example, the valid data may include: user-side encryption information and virtual machine verification information, and the virtual machine verification information may include firmware measurement values, that is, measurement values ​​corresponding to the virtual machine firmware. In a further example, the virtual machine verification information may further include: virtual machine version number, virtual machine identification (ID) and user-defined data.

[0203] Accordingly, in a further optional implementation, a metric value may be further calculated based on the virtual machine firmware to obtain a firmware metric value to be verified. The firmware metric value in the valid data may then be verified based on the firmware metric value to be verified. If the firmware metric value to be verified is consistent with the firmware metric value, verification succeeds; if they are inconsistent, verification fails. Subsequent processes are performed only if verification succeeds.

[0204] It is understandable that, in the above-mentioned signature verification or firmware measurement value verification, if any result fails, the verification fails and the startup process of the target virtual machine is terminated.

[0205] Step S210: Calculating the disk key of the encrypted disk based on the startup parameter file and the hardware root key private key;

[0206] In an embodiment of the present invention, the startup parameter file includes at least a disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is the ciphertext obtained after the disk key is encrypted, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key.

[0207] Accordingly, in the corresponding decryption process, decryption calculation can be performed based on the user-side encryption information in the startup parameter file and the hardware root key private key to obtain the disk key.

[0208] In an optional implementation, the user-side encryption information may include a first user key certificate, a target key (tektik) ciphertext and a user root key (mkey) ciphertext; wherein, the first user key certificate includes a first user key public key, the disk key ciphertext is obtained by encrypting the disk key (disk_key1) based on the target key (tektik), the target key ciphertext is obtained by encrypting the target key based on the second user key (kek and kik), the user root key ciphertext is obtained by encrypting the user root key based on the hardware root key public key, and the user root key is used to generate the second user key.

[0209] Correspondingly, the decryption process of the disk key can be as follows:

[0210] The user root key ciphertext is decrypted based on the hardware root key private key stored in the processor of the target host and only allowed to be accessed by the processor firmware, thereby obtaining the user root key, and further generating a second user key based on the user root key, and then, decrypting the target key ciphertext based on the second user key to obtain the target key, and further decrypting the disk key ciphertext based on the target key to obtain the disk key.

[0211] It should be noted that in the example where the platform key is used as the hardware root key, including the first platform key and the second platform key, if the user root key is encrypted with the second platform key to obtain the user root key ciphertext, the virtual machine firmware needs to access the second platform key private key and decrypt the user root key ciphertext based on the second platform key private key.

[0212] Step S220: storing the disk key into a preset storage space;

[0213] By storing the disk key in the preset storage space, the disk key is obtained from the preset storage space during the target virtual machine startup process, and the encrypted disk is mounted based on the disk key.

[0214] The preset storage space can be a memory area reserved in the memory, and the memory segment is configured to specifically store the disk key. Accordingly, the virtual machine firmware in this step can inject the disk key into the memory segment. The memory address of the preset storage space can be configured in the code for starting the target virtual machine (such as qemu). Accordingly, in the startup process of the target virtual machine, the disk key can be obtained from the memory segment and the encrypted disk can be mounted using the disk key.

[0215] It is understandable that if the disk key is incorrect, the disk cannot be decrypted, and accordingly, the target virtual machine cannot start the corresponding operating system.

[0216] In a further optional example, after the target virtual machine is started based on the virtual machine startup process, the embodiment of the present invention further provides an identity authentication process, so that the user end verifies the identity of the target virtual machine. The identity authentication process can be understood as a remote authentication process. In a specific example, refer to Figure 9 An optional flow chart of an authentication method is shown, wherein the virtual machine authentication process includes:

[0217] Step S300: The user terminal sends an identity authentication request;

[0218] The identity authentication request is used to request an identity authentication report, so as to perform identity authentication of the target virtual machine based on the identity authentication report.

[0219] Among them, in an optional example, in order to ensure the security of data transmission, the identity authentication request at least includes a random number generated by the user end, so that based on the random number, it can be confirmed that the subsequently obtained identity authentication report is generated based on the identity authentication request.

[0220] Accordingly, the target host may obtain the authentication request and forward the authentication request to the processor firmware, so that the processor firmware obtains the authentication request.

[0221] Step S310: The processor firmware generates an identity authentication report based on the identity authentication request, where the identity authentication report includes at least part of the user-side encrypted information and is signed based on the hardware root key.

[0222] It is understandable that the user-side encrypted information is information sent by the user side to the target host, and at least part of the user-side encrypted information is fed back through the processor firmware so that the user side confirms that the started target virtual machine is the target virtual machine created by the user side.

[0223] In an optional implementation, the user-side encryption information may include a first user key certificate, a target key ( te ktik) ciphertext and user root key ( m key) ciphertext, wherein the first user key certificate includes a first user key public key, and the first user key private key corresponding to the first user key private key is used to sign data in the startup parameter file; in an optional example, the step of the processor firmware generating an identity authentication report may include writing the first user key public key into the identity authentication report. The generated identity authentication report may include the first user key public key.

[0224] In a further optional implementation, when the identity authentication request sent by the user terminal includes a random number, the random number is further written into the identity authentication report in this step, so that the identity authentication report includes the random number.

[0225] In a further optional implementation, the identity authentication report may further include at least part of the virtual machine verification information, so that the user terminal can confirm that the target virtual machine started by the virtual machine firmware is the target virtual machine created by the user terminal.

[0226] Wherein, the virtual machine verification information may include a firmware measurement value, that is, a measurement value corresponding to the virtual machine firmware. In a further example, the virtual machine verification information may further include: a virtual machine version number, a virtual machine identifier (ID), and user-defined data. In an optional implementation, this step further writes one or more of the firmware measurement value, virtual machine version number, virtual machine identifier (ID), and user-defined data into the identity authentication report, so that at least part of the virtual machine verification information in the identity authentication report may be one or more of the firmware measurement value, virtual machine version number, virtual machine identifier (ID), and user-defined data. In a specific example, at least part of the virtual machine verification information in the identity authentication report may be a firmware measurement value and a virtual machine version number.

[0227] In an embodiment of the present invention, the identity authentication report can be signed based on the hardware root key. Accordingly, the user terminal can obtain the corresponding hardware root key public key based on the key certificate chain obtained in the virtual machine creation process, and thus verify the corresponding identity authentication report based on the hardware root key public key.

[0228] In an optional example, in an example where the platform key is used as the hardware root key, including a first platform key and a second platform key, if the user root key is encrypted with the second platform key to obtain the user root key ciphertext, the identity authentication report described in this step can be signed based on the first platform key.

[0229] Step S320: The processor firmware feeds back the identity authentication report;

[0230] The processor firmware feeds back the identity authentication report to the target virtual machine. Accordingly, the target virtual machine can obtain the identity authentication report and feed back the identity authentication report to the user end, so that the user end obtains the identity authentication report.

[0231] Step S330: The user terminal verifies whether the identity authentication report is legitimate based on the key certificate chain of the target host;

[0232] It can be understood that the virtual machine verification process described in the embodiment of the present invention is used to verify whether the target virtual machine is the target virtual machine created. When the virtual machine creation process is executed on the user side, the key certificate chain of the corresponding target host can be obtained. Accordingly, the identity authentication report is verified based on the key certificate chain of the target host, so that the identity of the target virtual machine can be confirmed.

[0233] Among them, in order to improve the security of information, the verification of this step can be multi-faceted. Accordingly, when all verifications are passed, the identity authentication report is considered legal, and the user-side business commands are allowed to be executed based on the target virtual machine; if any verification fails, the identity authentication report is considered illegal, and the user-side business commands are prohibited from being executed based on the target virtual machine.

[0234] In an optional implementation, refer to Figure 10 In the optional flowchart of step S330 shown, the verification process of the identity authentication report may include:

[0235] Step S331: Verify the signature of the identity authentication report based on the hardware root key public key;

[0236] It can be understood that, based on the key certificate chain including the hardware root key public key, correspondingly, the identity authentication report can be verified based on the hardware root key public key.

[0237] In an optional example, when the platform key is used as the hardware root key, and the platform key includes a first platform key and a second platform key, if the identity authentication report is signed based on the first platform key, accordingly, this step can verify the signature of the identity authentication report based on the public key of the first platform key in the key certificate chain.

[0238] Step S332: Verify the random number and virtual machine verification information in the identity authentication report;

[0239] When there is a random number in the identity authentication report, a comparison can be performed based on the random number generated in step S300 to confirm whether the identity authentication report is an identity authentication report based on the identity authentication request feedback sent by the user terminal in step S300. When the two random numbers are consistent, the random number passes the verification; if they are inconsistent, the random number fails the verification.

[0240] Furthermore, when virtual machine verification information is present in the identity authentication report, the virtual machine verification information in the identity authentication report can be verified based on the startup file parameters of the target virtual machine generated during the creation process. Specifically, a determination can be made as to whether the virtual machine verification information in the identity authentication report is consistent with the virtual machine verification information in the startup file parameters generated when the user end created the target virtual machine. If so, the virtual machine verification information passes verification; if not, the virtual machine verification information fails verification.

[0241] In an optional implementation, at least part of the virtual machine verification information in the identity authentication report may be, for example, one or more of a firmware measurement value, a virtual machine version number, a virtual machine identifier (ID), and user-defined data. In a specific example, at least part of the virtual machine verification information in the identity authentication report may be a firmware measurement value and a virtual machine version number. Accordingly, a comparison is performed between the firmware measurement value and the virtual machine version number in the startup parameter file generated by the user end to determine whether the firmware measurement value and the virtual machine version number have passed the verification.

[0242] Step S333: Verify the user-side encrypted information in the identity authentication report;

[0243] The identity authentication report includes at least part of the user-side encrypted information. Accordingly, the user-side encrypted information in the identity authentication report can be verified based on the user-side encrypted information in the startup parameter file generated in the target virtual machine creation process.

[0244] In an optional implementation, when the identity authentication report includes the first user key public key, correspondingly, based on the user terminal encryption information in the startup parameter file generated by the user terminal, it is determined whether the first user key public key in the identity authentication report passes the verification.

[0245] Specifically, it can be determined whether the first user key public key in the identity authentication report is consistent with the first user key public key in the startup file parameters generated when the user end creates the target virtual machine. If so, the user end encryption information passes the verification; if not, the user end encryption information fails the verification.

[0246] It can be understood that when all the above verifications (steps S331 to S333) are passed, the identity authentication report is legal; and when any of the above verifications fails, the identity authentication report is illegal.

[0247] An embodiment of the present invention also provides a virtual machine application, which can be applied to a user end and includes one or more computer-executable instructions. When the one or more computer-executable instructions are executed, they are used to create a trusted environment, implement the virtual machine creation method provided by an embodiment of the present invention, and / or the identity authentication method provided by an embodiment of the present invention.

[0248] An embodiment of the present invention also provides a cloud platform, which is configured with multiple hosts. The cloud platform is configured to execute the virtual machine creation method provided by the embodiment of the present invention, and / or call the virtual machine firmware to execute the virtual machine startup configuration method provided by the embodiment of the present invention, and / or call the processor firmware to execute the virtual machine startup configuration method provided by the embodiment of the present invention.

[0249] An embodiment of the present invention also provides a storage medium, which can store one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the virtual machine creation method applied to the user end provided by the embodiment of the present invention can be implemented, and / or the virtual machine creation method applied to the cloud platform provided by the embodiment of the present invention, and / or the virtual machine startup configuration method provided by the embodiment of the present invention, and / or the identity authentication method applied to the user end provided by the embodiment of the present invention, and / or the identity authentication method applied to the processor firmware provided by the embodiment of the present invention can be implemented.

[0250] The above describes multiple embodiment schemes provided by the embodiments of the present invention. The various optional methods introduced in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as embodiment schemes disclosed and open in the embodiments of the present invention.

[0251] Although the embodiments of the present invention are disclosed above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope defined by the claims.

Claims

1. A method for creating a virtual machine, characterized in that: Used to create a target virtual machine, applied to the user side, including: Send a key certificate chain acquisition request, where the key certificate chain acquisition request is used to request the key certificate chain of a target host, where the target host is a host in the cloud platform used to run a target virtual machine, and the key certificate chain includes at least the hardware root key certificate of the target host, where the hardware root key certificate includes a hardware root key public key, and a hardware root key private key corresponding to the hardware root key public key is stored in a processor of the target host and is accessible only to the processor firmware; After obtaining the key certificate chain, generating a disk key, and creating an encrypted disk of the target virtual machine based on the disk key; Generate a startup parameter file, the startup parameter file including at least a disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key; Send the encrypted disk and the startup parameter file to the target host so that the virtual machine firmware in the target host configures and starts the target virtual machine based on the encrypted disk and the startup parameters; wherein the virtual machine firmware used to start the target virtual machine is at least used to obtain a disk key in a preset storage space and mount the encrypted disk based on the disk key.

2. The method according to claim 1, characterized in that The generating of the disk key and creating the encrypted disk of the target virtual machine based on the disk key includes: Create a virtual disk for the target virtual machine; Loading the operating system of the target virtual machine into the virtual disk; generating a disk key corresponding to the virtual disk; The virtual disk is encrypted based on the disk key to obtain an encrypted disk of the target virtual machine.

3. The method according to claim 1, characterized in that The user terminal generates a startup parameter file, including: Generate a first user key and a first user key certificate corresponding to the first user key; wherein the first user key public key is recorded in the first user key certificate, and the first user key private key is retained on the user end; Generate a user root key, and encrypt the user root key based on the hardware root key public key to obtain the user root key ciphertext; Based on the user root key, generate a second user key; Generate a target key, and encrypt the target key based on the second user key to obtain a target key ciphertext; Calculate the metric value of the virtual machine firmware to obtain the firmware metric value; Signing valid data in the startup parameter file based on the first user key private key, the valid data including: user-side encryption information and virtual machine verification information, the virtual machine verification information including at least a firmware measurement value; The disk key is encrypted based on the target key to obtain a disk key ciphertext.

4. The method according to any one of claims 1 to 3, characterized in that After generating the disk key and creating the encrypted disk of the target virtual machine based on the disk key, and before generating the startup parameter file, the method further includes: creating virtual machine firmware; In the step of sending the encrypted disk and the startup parameter file to the target host, the virtual machine firmware is sent at the same time; Alternatively, after generating the disk key and creating the encrypted disk of the target virtual machine based on the disk key, and before generating the startup parameter file, the method further includes: obtaining virtual machine firmware created by the target host.

5. The method according to any one of claims 1 to 3, characterized in that The key certificate chain includes a manufacturer key certificate, a chip key certificate, and a platform key certificate, wherein the manufacturer key certificate includes the public key of the manufacturer key and is in a public state; the chip key certificate includes the public key of the chip key and is signed based on the private key of the manufacturer key; the platform key certificate includes the public key of the platform key and is signed based on the private key of the chip key; The manufacturer key is the head key of the key certificate chain, the platform key is the tail key of the key certificate chain, and the platform key is the hardware root key.

6. The method according to claim 5, characterized in that The manufacturer key includes a first manufacturer key and a second manufacturer key, and the platform key includes a first platform key and a second platform key; the manufacturer key certificate includes a first manufacturer key certificate and a second manufacturer key certificate, and the platform key certificate includes a first platform key certificate and a second platform key certificate; Among them, in the key certificate chain, the first manufacturer key certificate is in a public state, the second manufacturer key certificate is based on the private key signature of the first manufacturer key, the chip key certificate is based on the private key signature of the second manufacturer key, the first platform key certificate is based on the private key signature of the chip key, and the second platform key certificate is based on the private key signature of the first platform key.

7. A method for creating a virtual machine, characterized in that: A cloud platform for creating a target virtual machine, applied to a target host, where the target host is a host in the cloud platform used to run the target virtual machine, including: Obtain a key certificate chain acquisition request, wherein the key certificate chain acquisition request is used to request to obtain the key certificate chain of the target host; Based on the key certificate chain acquisition request, obtain a corresponding key certificate chain; wherein the key certificate chain includes at least a hardware root key certificate of the target host, the hardware root key certificate includes a hardware root key public key, and a hardware root key private key corresponding to the hardware root key public key is stored in a processor of the target host and is accessible only to processor firmware; Sending the key certificate chain to the user terminal so that the user terminal generates a disk key and a startup parameter file; the startup parameter file at least includes a disk key ciphertext and user terminal encryption information, wherein the disk key ciphertext is a ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user terminal encryption information and the hardware root key public key; Obtain the encrypted disk and the startup parameter file so that the virtual machine firmware configures and starts the target virtual machine based on the encrypted disk and the startup parameter file, wherein the virtual machine firmware used to start the target virtual machine is at least used to obtain a disk key in a preset storage space and mount the encrypted disk based on the disk key.

8. The method according to claim 7, characterized in that The obtaining of the corresponding key certificate chain based on the key certificate chain obtaining request is specifically, based on the location and signature method of each key in the key certificate chain, obtaining each key certificate in the key certificate chain in sequence to generate and obtain the key certificate chain of the target host.

9. The method according to claim 8, characterized in that The method of sequentially obtaining each key certificate in the key certificate chain based on the location and signature method of each key in the key certificate chain includes: Obtain a platform key certificate from the host operating system, wherein the platform key certificate is signed by a private key in the chip key; Obtain the target host's chip ID from the host operating system; Based on the chip identification, the chip key certificate and the corresponding manufacturer key certificate of the target host are obtained from the certificate server; wherein, the manufacturer key certificate includes the public key of the manufacturer key, and the manufacturer key certificate is in a public state; the chip key certificate includes the public key of the chip key, and the chip key certificate is signed based on the private key of the manufacturer key.

10. The method according to claim 9, characterized in that The manufacturer key includes a first manufacturer key and a second manufacturer key, and the platform key includes a first platform key and a second platform key; the manufacturer key certificate includes a first manufacturer key certificate and a second manufacturer key certificate, and the platform key certificate includes a first platform key certificate and a second platform key certificate; Among them, in the key certificate chain, the first manufacturer key certificate is in a public state, the second manufacturer key certificate is based on the private key signature of the first manufacturer key, the chip key certificate is based on the private key signature of the second manufacturer key, the first platform key certificate is based on the private key signature of the chip key, and the second platform key certificate is based on the private key signature of the first platform key.

11. A virtual machine startup configuration method, characterized in that: The virtual machine firmware applied to the target virtual machine, which runs on the target host in the cloud platform, includes: Obtaining an encrypted disk and a startup parameter file of a target virtual machine, wherein the encrypted disk is created based on a disk key, and the startup parameter file includes at least disk key ciphertext and user-side encryption information, wherein the disk key ciphertext is ciphertext obtained by encrypting the disk key, and the disk key ciphertext is encrypted based on the user-side encryption information and the hardware root key public key; Calculating a disk key of the encrypted disk based on the boot parameter file and a hardware root key private key, wherein the hardware root key private key is stored in a processor of the target host and is accessible only to processor firmware; The disk key is stored in a preset storage space, so that during the target virtual machine startup process, the disk key is obtained from the preset storage space, and the encrypted disk is mounted based on the disk key.

12. The method according to claim 11, characterized in that After obtaining the encrypted disk and the startup parameter file of the target virtual machine, and before calculating the disk key of the encrypted disk based on the startup parameter file and the hardware root key private key, the method further includes: Verifying the startup parameter file; Wherein, when the valid data in the startup parameter file is signed based on the first user key private key, the user-side encryption information includes the first user key certificate; and verifying the startup parameter file includes: verifying the signature of the valid data in the startup parameter file based on the first user key public key in the first user key certificate; The valid data includes: user-side encryption information and virtual machine verification information, and the virtual machine verification information at least includes a firmware measurement value.

13. The method according to claim 12, characterized in that The verifying the startup parameter file includes: Calculate the metric value based on the virtual machine firmware to obtain the metric value of the firmware to be verified; The firmware metric value in the valid data is verified based on the firmware metric value to be verified. If the firmware metric value to be verified is consistent with the firmware metric value, the verification is passed; otherwise, the verification fails.

14. The method according to claim 11, characterized in that The user-side encryption information includes a first user key certificate, a target key ciphertext, and a user root key ciphertext; and the calculation of the disk key of the encrypted disk based on the startup parameter file and the hardware root key private key includes: Decrypt the user root key ciphertext based on the hardware root key private key to obtain the user root key; generating a second user key based on the user root key; decrypting the target key ciphertext based on the second user key to obtain the target key; The disk key ciphertext is decrypted based on the target key to obtain the disk key.

15. The method according to claim 14, characterized in that The platform key is used as the hardware root key, the hardware root key includes a first platform key and a second platform key, and the user root key is encrypted based on the second platform key; The decrypting the user root key ciphertext based on the hardware root key private key to obtain the user root key is specifically, decrypting the user root key ciphertext based on the second platform key private key.

16. An identity authentication method, characterized in that: The method is applied to a user terminal and is used to verify a target virtual machine created by the virtual machine creation method according to any one of claims 1 to 10, comprising: Sending an identity authentication request so that the processor firmware of the target host generates an identity authentication report based on the identity authentication request, wherein the identity authentication report includes at least part of the user-side encrypted information and is signed based on the hardware root key; Based on the key certificate chain of the target host, verify whether the identity authentication report is legal.

17. The method according to claim 16, characterized in that The identity authentication request includes a random number; the identity authentication report generated by the processor firmware includes the random number.

18. The method according to claim 17, characterized in that The verification of whether the identity authentication report is legitimate based on the key certificate chain of the target host includes: Verify the signature of the identity authentication report based on the hardware root key public key; Verify the random number and virtual machine verification information in the identity authentication report; Verify the user-side encrypted information in the identity authentication report; Among them, when all the above verifications are passed, the identity authentication report is legal; when any of the above verifications fails, the identity authentication report is illegal.

19. The method according to claim 16, wherein In the identity authentication report, the user-side encrypted information is the first user key public key in the first user key certificate; The virtual machine verification information in the identity authentication report is one or more of a firmware measurement value, a virtual machine version number, a virtual machine identifier, and user-defined data; The identity authentication report is signed based on a first platform key in the hardware root key.

20. An identity authentication method, characterized in that: Applied to processor firmware, for verifying a target virtual machine created by the virtual machine creation method according to any one of claims 1 to 10, comprising: Get the authentication request from the user; Generate an identity authentication report based on the identity authentication request, wherein the identity authentication report includes at least part of the user-side encrypted information and is signed based on the hardware root key; The identity authentication report is fed back to the user terminal, so that the user terminal verifies whether the identity authentication report is legal based on the key certificate chain of the target host.

21. The method according to claim 20, characterized in that The identity authentication request includes a random number; and the step of generating an identity authentication report based on the identity authentication request includes: The random number is recorded in the identity authentication report.

22. The method according to claim 20, characterized in that The step of generating an identity authentication report based on the identity authentication request includes: Writing the first user key public key recorded by the first user key certificate in the user end encrypted information into the identity authentication report; Writing one or more of a firmware measurement value, a virtual machine version number, a virtual machine identifier, and user-defined data into the identity authentication report; The identity authentication report is signed based on the first platform key in the hardware root key.

23. A virtual machine application, characterized in that: Applied to the user side, it includes one or more computer-executable instructions, which are used to create a trusted environment when executed, and implement the virtual machine creation method according to any one of claims 1-6, and / or the identity authentication method according to any one of claims 16-19.

24. A cloud platform, characterized in that: The cloud platform is configured with multiple hosts, and the cloud platform is configured to execute the virtual machine creation method described in any one of claims 7-10, and / or, call the virtual machine firmware to execute the virtual machine startup configuration method described in any one of claims 11-15, and / or, call the processor firmware to execute the identity authentication method described in any one of claims 20-22.

25. A storage medium, characterized in that The storage medium stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the virtual machine creation method according to any one of claims 1 to 6 is implemented, and / or the virtual machine creation method according to any one of claims 7 to 10, and / or the virtual machine startup configuration method according to any one of claims 11 to 15, and / or the identity authentication method according to any one of claims 16 to 19, and / or the identity authentication method according to any one of claims 20 to 22.