Implementation method of trusted confidential virtual machine system combining virtual trusted platform module technology and AMD SEV technology
By combining the virtual trusted platform module technology and AMD SEV technology, the risk of malicious code injection in the virtual machine initialization stage in AMD SEV technology is solved, and the trusted startup and operation of the virtual machine is achieved, ensuring the security of user data and cloud tasks. The credibility of the user enhances the trust of cloud virtual machines.
Patent Information
- Application Number
- CN202411058139.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-13
Smart Images

Figure CN119127387A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology and information security technology, and specifically to a method for implementing a trusted confidential virtual machine system that combines virtual trusted platform module technology with AMD SEV technology. Background Art
[0002] With the rapid development of computer network technology, the traditional local computing model is difficult to meet the growing data processing needs, and more and more applications are deployed in cloud environments. Among them, cloud virtual machine technology has also been gradually widely used. By starting a virtual machine for a user in a cloud computing environment, the isolation of different users or different workloads can be effectively achieved. Existing security solutions mostly focus on protecting static data, but during the execution process, data still faces many security threats. In response to the above problems, AMD SEV (Secure Encrypted Virtualization) technology uses the Trusted Execution Environment (TEE) to propose the concept of confidential virtual machine (Confidential Virtual Machine, CVM), which provides a feasible solution to solve the security problems in cloud computing virtualization. It also makes it possible for users to deploy virtual machines in the cloud and upload confidential data for calculation. However, although CVM technology is widely used, the security of its internal user workloads is not absolutely guaranteed. During the virtual machine initialization phase, there is a risk of attackers or untrusted virtual machine hypervisors injecting malicious programs, which directly threatens the confidentiality and integrity of user data and increases the possibility of data leakage or theft. This risk not only weakens users' trust in CVM, but also inhibits users' willingness to migrate critical tasks to the cloud. In order to achieve effective protection of user workloads by CVM, remote authentication of its credibility is essential. AMDSEV technology provides a solution that enables users to verify the credibility of CVM based on measurement values through measurement and remote authentication mechanisms. However, the measurement scope of SEV technology is limited to the initialization state of CVM. If malicious code is injected during startup or operation, its credibility may be destroyed. Summary of the invention
[0003] In view of the above problems, the present invention proposes an implementation method of a trusted confidential virtual machine (CVM) system that combines virtual trusted platform module technology with AMD SEV technology. The method solves the problem of lack of trusted authentication schemes for confidential virtual machines based on AMD SEV technology. Workloads based on trusted computing can be seamlessly integrated into the system to support secure and efficient execution of workloads based on trusted computing.
[0004] Provided is a method for implementing a trusted confidential virtual machine (CVM) system combining virtual trusted platform module technology and AMD SEV technology, the method steps comprising:
[0005] Step 1: Deploy the TR-Manager component in an entity that the user trusts;
[0006] Step 2: deploy the CN-TPMCVM component in the cloud node and initialize the trusted virtual trusted platform module;
[0007] Step 3: Use TR-Manager and CN-TPMCVM components to trustably boot the AMD SEV confidential virtual machine and generate a complete trusted chain.
[0008] Furthermore, to deploy the TR-Manager component in an entity that the user trusts, the steps are as follows:
[0009] 1) The entity trusted by the user performs static measurement on TR-Manager and stores the measurement value in a secure storage space for remote authentication by the user;
[0010] 2) Create a new key pair as the root key: MRK priv and MRK pub , signed by the root key of an entity that the user trusts;
[0011] 3) The entity trusted by the user requests the certificate authority to be MRK priv and MRK pub Issue of certificates;
[0012] 4) Initialize two special storage structures: TPM-List and VM-List;
[0013] 5) Open two network ports to receive commands and responses from users and from the virtual trusted platform module.
[0014] Furthermore, the steps for deploying the CN-TPMCVM component in the cloud node are as follows:
[0015] 1) TR-Manager first generates a TPM-List entry for CN-TPMCVM, then TR-Manager creates and stores the CN-TPMCVM root key pair, signs it with the root key of the entity trusted by the user, and then requests the certificate authority to issue a certificate;
[0016] 2) TR-Manager verifies the certificate chain of the cloud node’s confidential environment (AMD SEV’s certificate chain);
[0017] 3) TR-Manager generates and stores TLS key pairs and measurement keys, and requests CA to issue certificates;
[0018] 4) TR-Manager creates a minimized virtual machine image of CN-TPMCVM and embeds the TLS key pair and certificate in it;
[0019] 5) TR-Manager creates a virtual machine image key to encrypt the image and sends the image to the cloud node, starting CN-TPMCVM;
[0020] 6) TR-Manager obtains and verifies the initialization measurement value of CN-TPMCVM and stores it in the TPM-List table entry;
[0021] 7) TR-Manager sends the image key and measurement key to CN-TPMCVM through the AMD secret injection scheme, and CN-TPMCVM decrypts the image and continues the boot process;
[0022] 8) The CN-CDriver component in the CN-TPMCVM continuously measures the startup process and transmits it to the TR-Manager after encryption using the measurement key;
[0023] 9) TR-Manager stores the initialization measurements and continuously expands the guidance measurements;
[0024] 10) TR-Manager verifies and stores the final boot measurement in the TPM-List table entry;
[0025] 11) TR-Manager activates the TLS key pair and establishes a secure communication channel with CN-TPMCVM;
[0026] 12) TR-Manager deploys the root key pair and certificate of CN-TPMCVM to CN-TPMCVM.
[0027] Furthermore, for the process of initializing the trusted virtual trusted platform module, the steps are as follows:
[0028] 1) CN-TPMCVM creates a new virtual trusted platform module endorsement key pair and a certificate;
[0029] 2) CN-TPMCVM uses the root key of the component to sign the virtual trusted platform module endorsement key;
[0030] 3) CN-TPMCVM initializes a counter for the virtual trusted platform module and sets the counter to 0;
[0031] 4) CN-TPMCVM opens the port for the virtual trusted platform module and is ready to receive commands.
[0032] Furthermore, the steps to use TR-Manager and CN-TPMCVM components to trust boot the AMD SEV confidential virtual machine and generate a complete trusted chain are as follows:
[0033] 1) TR-Manager obtains the virtual machine image from the VM-List table entry of the AMD SEV CVM that needs to be started, and sends it to the virtualization environment to start the CVM;
[0034] 2) TR-Manager obtains and verifies the initialization measurements of CVM by communicating with the AMD firmware in the cloud node;
[0035] 3) TR-Manager obtains the VM Key and TPM State File that belong to the CVM from the VM-list corresponding to the CVM and sends them to CN-TPMCVM;
[0036] 4) TR-Manager generates a session key between the virtual trusted platform module and the CN-CDriver component in the CVM for this boot process. Then, the key is sent to the virtual trusted platform module and CVM through two secure channels respectively;
[0037] 5) CN-TPMCVM uses VM Key to decrypt TPM State File and sends the decrypted file to the virtual trusted platform module initialized in CN-TPMCVM;
[0038] 6) CN-TPMCVM requests TR-Manager to use VM Key to calculate the HMAC result of the startup metric value of CN-TPMCVM, namely HMAC(CN-TPMCVM startup metric value; VM Key), and extends the result to the platform configuration register 0 (PCR0) of the virtual trusted platform module;
[0039] 7) The virtual trusted platform module extends the initialization measurement value of CVM into PCR0;
[0040] 8) Continue the boot process, the virtual trusted platform module extends the boot measurement into the corresponding PCR.
[0041] The beneficial effects of the embodiments of the present application are as follows:
[0042] The embodiment of the present application deploys a TR-Manager component in an entity trusted by the user, deploys a CN-TPMCVM component in an untrusted cloud node and hosts a virtual trusted platform module that the user can trust, deploys a trusted AMD SEV CVM in the cloud platform for the user, builds a complete trusted chain of the CVM, and provides trusted computing capabilities, ensuring that the user trusts the CVM after verifying the trusted chain and can seamlessly deploy trusted computing-based applications in the CVM using the trusted computing capabilities provided by this embodiment. Thus, the embodiment of the present application safely and efficiently implements a trusted confidential virtual machine (CVM) system that combines virtual trusted platform module technology with AMD SEV technology.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of the system framework provided for an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a system flow provided for an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a trusted chain of the AMD SEV CVM of a user provided in an embodiment of the present application; DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0048] like Figure 1 As shown, it is a schematic diagram of the system framework of an embodiment of the present application, which includes three participants:
[0049] (1) Participant 1 is an entity trusted by the user. This embodiment assumes that the local execution environment of this entity is secure, all local programs and data are well protected, and it can create various files and identifiers, correctly perform encryption / decryption functions, provide network functions, and ensure secure storage;
[0050] (2) Participant 2 is an untrusted cloud node, which is a physical machine with AMD SEV capabilities in the cloud platform. It can provide CVM services to users. It applies for a certificate from the CA, and can obtain the certificate of the remote entity to establish a secure connection through the network. It can also use the image transmitted from the remote entity to start the CVM;
[0051] (3) Participant 3 is the certificate authority, which is the entity responsible for issuing certificates for secure communications.
[0052] It consists of three components:
[0053] (1) TR-Manager component, which runs in an entity trusted by the user and is used to provide management and authentication capabilities for CN-TPMCVM, and to provide users with secure data storage and CVM deployment capabilities;
[0054] (2) The CN-TPMCVM component, which runs in an untrusted cloud node, is a dedicated CVM used to host a secure virtual trusted platform module;
[0055] (3) The CN-CDriver component, which runs in the UEFI and system kernel of the CN-TPMCVM and the user's CVM, is an enhanced virtual trusted platform module driver that supports TPM functions and our system protocol.
[0056] The following content is explained in detail by taking the example that a user wants to deploy a trusted AMD SEV CVM in a cloud node with AMD SEV function on an untrusted cloud platform and seamlessly deploy his own trusted computing-based applications. Figure 2 As shown, it includes six steps, as follows:
[0057] (1) Step 1: The user deploys the TR-Manager component in an entity that the user trusts;
[0058] Step 1 includes:
[0059] (1-1) The entity trusted by the user performs static measurements on the TR-Manager component and stores the measurement values in a secure storage space for remote authentication by the user;
[0060] (1-2) Create a new key pair as the root key: MRK priv and MRK pub , signed by the root key of an entity that the user trusts;
[0061] (1-3) The entity trusted by the user requests that the certificate authority be MRK priv and MRK pub Issue of certificates;
[0062] (1-4) Initialize two special storage structures: TPM-List and VM-List;
[0063] (1-5) Open two network ports to receive commands and responses from users and from the virtual trusted platform module.
[0064] (2) Step 2, the TR-Manager component assists the user in deploying and verifying the CN-TPMCVM component in the cloud node, ensuring that the CN-TPMCVM component is trustworthy and can provide the function of hosting a trusted virtual trusted platform module;
[0065] Step 2 includes:
[0066] (2-1) The TR-Manager component first generates a TPM-List entry for the CN-TPMCVM component. The TR-Manager component then creates and stores the CN-TPMCVM component root key pair and signs it with the root key of the entity that the user trusts. The TR-Manager component then requests the certificate authority to issue a certificate.
[0067] (2-2) The TR-Manager component verifies the certificate chain of the confidential environment of the cloud node (certificate chain of AMD SEV);
[0068] (2-3) The TR-Manager component generates and stores TLS key pairs and measurement keys, and requests the CA to issue a certificate;
[0069] (2-4) The TR-Manager component creates a minimal virtual machine image of CN-TPMCVM and embeds the TLS key pair and certificate in it;
[0070] (2-5) The TR-Manager component creates a virtual machine image key to encrypt the image and sends the image to the cloud node, starting the CN-TPMCVM;
[0071] (2-6) The TR-Manager component obtains and verifies the initialization measurement value of the CN-TPMCVM and stores it in the TPM-List table entry;
[0072] (2-7) The TR-Manager component sends the image key and measurement key to the CN-TPMCVM component through the AMD secret injection scheme. The CN-TPMCVM component decrypts the image and continues the boot process.
[0073] (2-8) The CN-CDriver component in the CN-TPMCVM continuously measures the startup process, encrypts it with the measurement key, and transmits it to the TR-Manager component;
[0074] (2-9) The TR-Manager component stores the initialization measurements and continuously expands the guidance metrics;
[0075] (2-10) The TR-Manager component verifies and stores the final boot measurement in the TPM-List table entry;
[0076] (2-11) The TR-Manager component enables the TLS key pair and establishes a secure communication channel with the CN-TPMCVM component;
[0077] (2-12) The TR-Manager component deploys the root key pair and certificate of CN-TPMCVM into CN-TPMCVM.
[0078] (3) Step 3, initializing the trusted virtual trusted platform module for the user's CVM and hosting it in the CN-TPMCVM component deployed in step 2;
[0079] Step 3 is as follows:
[0080] (3-1) The CN-TPMCVM component creates a new virtual trusted platform module endorsement key pair and a certificate;
[0081] (3-2) The CN-TPMCVM component uses the root key of the component to sign the virtual trusted platform module endorsement key;
[0082] (3-3) The CN-TPMCVM component initializes a counter for the virtual trusted platform module and sets the counter to 0;
[0083] (3-4) The CN-TPMCVM component opens a port for the virtual trusted platform module and is ready to receive commands.
[0084] (4) Use the TR-Manager component and the CN-TPMCVM component to help users trustlessly start an AMD SEV CVM in an untrusted cloud node;
[0085] Step 4 is as follows:
[0086] (4-1) The TR-Manager component obtains the virtual machine image from the VM-List entry of the AMD SEV CVM to be started and sends it to the virtualization environment to start the CVM;
[0087] (4-2) The TR-Manager component obtains and verifies the initialization measurement values of the CVM by communicating with the AMD firmware in the cloud node;
[0088] (4-3) The TR-Manager component obtains the VM Key and TPM State File that are unique to the CVM from the VM-list corresponding to the CVM and sends them to the CN-TPMCVM component;
[0089] (4-4) The TR-Manager component generates a session key between the virtual trusted platform module and the CN-CDriver component in the CVM for this boot process. Then, the key is sent to the virtual trusted platform module and CVM through two secure channels respectively;
[0090] (4-5) The CN-TPMCVM component uses the VM Key to decrypt the TPM State File and sends the decrypted file to the virtual trusted platform module initialized in the CN-TPMCVM component;
[0091] (4-6) The CN-TPMCVM component requests the TR-Manager component to use the VM Key to calculate the HMAC result of the CN-TPMCVM component's startup metric value, i.e., HMAC (CN-TPMCVM startup metric value; VM Key), and extends the result to the platform configuration register 0 (PCR0) of the virtual trusted platform module;
[0092] (4-7) The virtual trusted platform module extends the initialization measurement value of CVM into PCR0.
[0093] (5) The virtual trusted platform module hosted in the CN-TPMCVM component and the CN-CDriver component in the user's CVM's UEFI and kernel jointly measure the CVM's boot process;
[0094] Step 5 is as follows:
[0095] (5-1) The measurement module in the UEFI of the CVM measures the firmware and extends the measurement value to PCR0 of the virtual trusted platform module;
[0096] (5-2) The measurement module in UEFI measures the subsequent BootLoader and extends the measurement;
[0097] (5-3) The trusted measurement module in the BootLoader measures the kernel initialization process and extends the measurement value to the corresponding PCR of the virtual trusted platform module;
[0098] (5-4) The measurement module in the kernel measures the application in user space and extends the measurement to the corresponding PCRs.
[0099] (6) The user remotely authenticates the trusted chain stored in the PCR of the virtual trusted platform module and seamlessly deploys the trusted application in the trusted CVM.
[0100] As a result, users deploy a trusted AMD SEV CVM in a cloud node with AMD SEV function on an untrusted cloud platform and seamlessly deploy their own trusted computing-based applications. The trusted chain of the CVM is as follows: Figure 3 As shown, the trusted chain is introduced below:
[0101] (1) Trust is transferred from the user to the CN-TPMCVM component;
[0102] (1-1) Confidential computing environment of cloud nodes (AMD firmware), remotely verified by users;
[0103] (1-2) Initialize the CN-TPMCVM component, obtain the initialization metrics provided by the previously verified firmware and verify them;
[0104] (1-3) Use AMD SEV secret injection scheme to send the image decryption key to the firmware to decrypt the image and continue the boot process;
[0105] In this way, the user transfers the trust to CN-TPMCVM.
[0106] (2) Trust is transferred from the CN-TPMCVM component to the virtual trusted platform module;
[0107] (2-1) The CN-TPMCVM component creates a virtual trusted platform module for the user's CVM;
[0108] (2-2) The user trusts the CN-TPMCVM component, and the virtual trusted platform module service runs in the CVM, so the user also trusts the virtual trusted platform module;
[0109] In this way, the user's trust will be transferred to the virtual trusted platform module.
[0110] (3) Trust is transferred from the virtual trusted platform module to the user's CVM;
[0111] (3-1) The TR-Manager component uses the VM Key to calculate the HMAC result of the boot measurement of the CN-TPMCVM component, and extends this result as the trust proof of the virtual trusted platform module to the PCR0 of the virtual trusted platform module;
[0112] (3-2) The CN-TPMCVM component obtains the initialization measurement value of the user's CVM and expands it to PCR0, thereby adding the UEFI of the user's CVM to the trust chain;
[0113] (3-3) The user's CVM continues to perform measurement startup and adds the kernel and application to the trust chain;
[0114] In this way, the user's CVM trust chain is built, and the user can trust his or her AMD SEV CVM.
[0115] The above examples are only used to illustrate the technical method of the present invention rather than to limit it. Ordinary technicians in this field can modify or replace the technical solution of the present invention with equivalents without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be based on the claims.
Claims
1. A method for implementing a trusted confidential virtual machine system combining virtual trusted platform module technology and AMD SEV technology, characterized in that: The method comprises: Deploy TR-Manager components in entities that users trust; Deploy the CN-TPMCVM component in the cloud node and initialize the trusted virtual trusted platform module; Use TR-Manager and CN-TPMCVM components to trustably boot the AMD SEV confidential virtual machine (CVM) and generate a complete trusted chain.
2. The method according to claim 1, characterized in that The deployment of the TR-Manager component in an entity trusted by the user includes: The entity trusted by the user performs static measurements on the TR-Manager and stores the measurement values in a secure storage space for remote authentication by the user; Create a new key pair as the root key: MRK priv and MRK pub , signed by the root key of an entity that the user trusts; The entity that the user trusts requests the certificate authority to be MRK priv and MRK pub Issue of certificates; Initialize two special storage structures: TPM-List and VM-List; Two network ports are opened to receive commands and responses from users and from the virtual trusted platform module.
3. The method according to claim 1, characterized in that The method of deploying the CN-TPMCVM component in the cloud node and initializing the trusted virtual trusted platform module includes: For the process of deploying the CN-TPMCVM component in the cloud node, perform the following operations: TR-Manager first generates a TPM-List entry for CN-TPMCVM. Then TR-Manager creates and stores the CN-TPMCVM root key pair and signs it with the root key of the entity trusted by the user. Then it requests the certificate authority to issue a certificate. TR-Manager verifies the certificate chain of the cloud node’s confidential environment (AMD SEV’s certificate chain); TR-Manager generates and stores TLS key pairs and measurement keys, and requests CA to issue certificates; TR-Manager creates a minimal VM image of CN-TPMCVM and embeds the TLS key pair and certificate in it; TR-Manager creates a virtual machine image key to encrypt the image and sends the image to the cloud node, starting CN-TPMCVM; TR-Manager obtains and verifies the initialization measurement value of CN-TPMCVM and stores it in the TPM-List table entry; TR-Manager sends the image key and measurement key to CN-TPMCVM through the AMD secret injection scheme, and CN-TPMCVM decrypts the image and continues the boot process; The CN-CDriver component in the CN-TPMCVM continuously measures the startup process, encrypts it with the measurement key and transmits it to the TR-Manager; TR-Manager stores initialization measurements and continuously expands bootstrap metrics; TR-Manager verifies and stores the final boot measurement in the TPM-List table entry; TR-Manager enables TLS key pair and establishes a secure communication channel with CN-TPMCVM; TR-Manager deploys the root key pair and certificate of CN-TPMCVM to CN-TPMCVM. For the process of initializing the trusted virtual trusted platform module, perform the following operations: CN-TPMCVM creates a new virtual trusted platform module endorsement key pair and a certificate; CN-TPMCVM uses the root key of this component to sign the virtual trusted platform module endorsement key; CN-TPMCVM initializes a counter for the virtual trusted platform module and sets the counter to 0; CN-TPMCVM opens a port for the virtual trusted platform module and is ready to receive commands.
4. The method according to claim 1, characterized in that The method of using TR-Manager and CN-TPMCVM components to trustably start the AMD SEV confidential virtual machine and generate a complete trusted chain includes: TR-Manager obtains the virtual machine image from the VM-List table entry of the AMD SEV CVM that needs to be started, and sends it to the virtualization environment to start the CVM; TR-Manager obtains and verifies the initialization measurements of CVM by communicating with the AMD firmware in the cloud node; TR-Manager obtains the key (VM Key) and TPM state file (TPM State File) that belong to the CVM from the VM-list corresponding to the CVM and sends them to CN-TPMCVM; TR-Manager generates a session key between the virtual trusted platform module and the CN-CDriver component in the CVM for this boot process. Then, the key is sent to the virtual trusted platform module and CVM through two secure channels respectively; CN-TPMCVM uses VM Key to decrypt TPM State File and sends the decrypted file to the virtual trusted platform module initialized in CN-TPMCVM; CN-TPMCVM requests TR-Manager to use VM Key to calculate the HMAC result of the startup metric value of CN-TPMCVM, that is, HMAC(CN-TPMCVM startup metric value; VM Key), and extend the result to the platform configuration register 0 (PCR0) of the virtual trusted platform module; The virtual trusted platform module extends the initialization measurement value of CVM into PCR0; Continuing the boot process, the virtual trusted platform module extends the boot measurements into the corresponding PCRs.
5. A trusted confidential virtual machine (CVM) system combining virtual trusted platform module technology and AMD SEV technology, characterized in that: The system comprises: The TR-Manager component, which runs in an entity trusted by the user, is used to provide management and authentication capabilities for the CN-TPMCVM, and to provide users with secure data storage and CVM deployment capabilities; The CN-TPMCVM component running in the untrusted cloud node is a dedicated CVM used to host a secure virtual trusted platform module; The CN-CDriver component running in the UEFI and system kernel of CN-TPMCVM and the user's CVM is an enhanced virtual trusted platform module driver that supports TPM functions and our system protocols.
6. The system according to claim 5, characterized in that The TR-Manager component running in the user-trusted entity includes: Initialization and authorization authentication scheme, used to initialize TR-Manager and initialize and authenticate TR-Manager in the user trusted entity; A secure storage solution for securely storing the associated data of CN-TPMCVM and user CVM, including two storage structures: TPM-List and VM-List; Secure communication scheme to protect the communication between TR-Manager and other components; Class virtual trusted platform module service, used for trusted startup of CN-TPMCVM components and building a complete trust chain of CN-TPMCVM.
7. The system according to claim 5, characterized in that The CN-TPMCVM component running in the untrusted cloud node includes: Encrypted image solution, used to protect the security of CN-TPMCVM virtual machine image; A secure communication scheme to protect the communication between CN-TPMCVM and other components; Virtual trusted platform module persistent storage protection solution, used to protect the persistent storage of the user's virtual trusted platform module and prevent the leakage of sensitive data of TPM; The trusted virtual trusted platform module binding solution is used to bind the user's CVM with the trusted virtual trusted platform module to provide a trusted virtual trusted platform module service.
8. The system according to claim 5, characterized in that The CN-CDriver component running in the UEFI and system kernel of the CN-TPMCVM and the user's CVM includes: A secure communication scheme to protect the communication security between the CN-CDriver component and the trusted virtual trusted platform module; A secure key acquisition scheme is used to securely obtain the keys required by the CN-CDriver component.
