Cloud hard disk processing method and device, equipment, storage medium and program product
By using the SM2 national secret asymmetric encryption algorithm for encryption and decryption in cloud disk key transmission, the problem of data security risks during the cloud disk key transmission process is solved, and the overall security of the cloud disk and cloud service system is improved.
Patent Information
- Application Number
- CN202310341622.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
There are potential data security risks during the transmission process of cloud hard disk keys, and it is difficult to effectively ensure their security through simple coding in the existing technology.
The cloud disk key is encrypted using an asymmetric encryption algorithm (such as the SM2 National Secret Asymmetric Encryption Algorithm), the encrypted key is transmitted in the key management system, and the private key is used for decryption to ensure security during the transmission process. .
It significantly improves the security of cloud disk keys during transmission, enhances the overall security of cloud disks and cloud service systems, and avoids the risk of data leakage.
Smart Images

Figure CN118733188A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment, storage medium and program product for processing a cloud hard disk. Background Art
[0002] Cloud Block Storage (CBS) is a virtual block storage device that uses a network storage architecture and supports elastic expansion. It can be used as an independent and expandable hard disk. In related technologies, a cloud hard disk key is required when mounting a cloud hard disk. When the cloud hard disk key is transmitted between the terminals (for example, from the cloud service terminal to the host terminal), the cloud hard disk key is simply encoded, and the encoded cloud hard disk key is transmitted, which poses a great data security risk. Summary of the invention
[0003] The embodiments of the present application provide a cloud hard disk processing method, device, electronic device, computer-readable storage medium and computer program product, which can improve the data security of the cloud hard disk.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a method for processing a cloud hard disk, including:
[0006] A mount request for the cloud hard disk is received, wherein the mount request is used to request to mount the cloud hard disk to a virtual machine of a host machine, and the cloud hard disk has been encrypted by a cloud hard disk key;
[0007] In response to the mount request, encrypting the cloud hard disk key by using the first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key;
[0008] The encrypted cloud hard disk key is sent to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on a second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
[0009] The present application also provides a method for processing a cloud hard disk, including:
[0010] The host receives the encrypted cloud hard disk key sent in response to the mount request for the cloud hard disk;
[0011] The mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine, the cloud hard disk has been encrypted by the cloud hard disk key, and the encrypted cloud hard disk key is obtained by encrypting the cloud hard disk key by using the first key;
[0012] Decrypting the encrypted cloud hard disk key based on the second key corresponding to the first key to obtain the cloud hard disk key;
[0013] Based on the cloud hard disk key, the cloud hard disk is mounted to the virtual machine.
[0014] The present application also provides a cloud hard disk processing device, including:
[0015] A first receiving module is used to receive a mount request for the cloud hard disk, wherein the mount request is used to request to mount the cloud hard disk to a virtual machine of a host machine, and the cloud hard disk has been encrypted by a cloud hard disk key;
[0016] an encryption module, configured to, in response to the mount request, encrypt the cloud hard disk key by using a first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key;
[0017] The first sending module is used to send the encrypted cloud hard disk key to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
[0018] In the above scheme, the first receiving module is also used to receive the cloud hard disk creation request before receiving the mount request for the cloud hard disk, and the cloud hard disk creation request includes the cloud hard disk parameters of the cloud hard disk; in response to the cloud hard disk creation request, based on the cloud hard disk parameters, create an initial cloud hard disk and generate the cloud hard disk key; using the cloud hard disk key, encrypt the initial cloud hard disk to obtain the cloud hard disk.
[0019] In the above scheme, the first sending module is also used to encrypt the initial cloud hard disk by using the cloud hard disk key, and after obtaining the cloud hard disk, send a first key acquisition request, and the first key acquisition request is used to request to obtain the target key corresponding to the host machine and used to encrypt the cloud hard disk key; the first receiving module is also used to receive the target key returned based on the first key acquisition request, and use the target key as the first key, and the target key is the public key in the encryption key pair generated by the host machine.
[0020] In the above scheme, the first receiving module is also used to associate the first key with the identification information of the host machine after the target key is used as the first key, and store the associated first key and the identification information of the host machine; the first receiving module is also used to receive a mount request for the cloud hard disk when the first key is stored successfully.
[0021] In the above scheme, the first receiving module is also used to receive a virtual machine migration request for the cloud hard disk after sending the encrypted cloud hard disk key to the host machine, and the virtual machine migration request is used to request that the virtual machine mounted with the cloud hard disk be migrated from the host machine to the target host machine; in response to the virtual machine migration request, the target host machine is controlled to create a target virtual machine, and clone the cloud hard disk to obtain a target cloud hard disk, and the target cloud hard disk has been encrypted by the target cloud hard disk key; the encryption module is also used to obtain a third key for encrypting the target cloud hard disk key, and encrypt the target cloud hard disk key by the third key to obtain a target encrypted cloud hard disk key; the first sending module is also used to send the target encrypted cloud hard disk key to the target host machine, so that the target host machine decrypts the target encrypted cloud hard disk key based on the fourth key corresponding to the third key, and mounts the target cloud hard disk to the target virtual machine based on the decrypted target cloud hard disk key.
[0022] In the above scheme, the first sending module is also used to send a second key acquisition request, and the second key acquisition request is used to request to obtain the target key corresponding to the target host machine and used to encrypt the target cloud hard disk key; the first receiving module is also used to receive the target key returned based on the second key acquisition request, and use the target key as the third key, and the target key is the public key in the encryption key pair generated by the target host machine.
[0023] In the above solution, the first sending module is also used to control the host machine to destroy the virtual machine and the cloud hard disk after sending the target encrypted cloud hard disk key to the target host machine.
[0024] In the above scheme, the first receiving module is also used to obtain the virtual machine configuration parameters set for the target virtual machine in response to the virtual machine migration request; based on the virtual machine configuration parameters, generate a virtual machine creation request for the target virtual machine, and send the virtual machine creation request to the target host machine, so that when the target host machine receives the virtual machine creation request, it creates the target virtual machine in the target host machine based on the virtual machine configuration parameters.
[0025] The present application also provides a cloud hard disk processing device, which is applied to a host machine and includes:
[0026] A second receiving module is used to receive an encrypted cloud hard disk key sent in response to a mount request for the cloud hard disk; wherein the mount request is used to request that the cloud hard disk be mounted to the virtual machine of the host machine, the cloud hard disk has been encrypted by the cloud hard disk key, and the encrypted cloud hard disk key is obtained by encrypting the cloud hard disk key by using the first key;
[0027] a decryption module, configured to decrypt the encrypted cloud hard disk key based on a second key corresponding to the first key to obtain the cloud hard disk key;
[0028] The mounting module is used to mount the cloud hard disk to the virtual machine based on the cloud hard disk key.
[0029] In the above scheme, the mounting module is also used to decrypt the cloud hard disk through the cloud hard disk key to obtain a decrypted cloud hard disk, and initialize the decrypted cloud hard disk so that when the initialization operation is completed, the cloud hard disk can be mounted to the virtual machine.
[0030] In the above scheme, the device also includes a key generation module, which is used to generate an encryption key pair for encrypting the cloud hard disk key before the host machine receives the encrypted cloud hard disk key sent by the mount request for the cloud hard disk; use the public key in the encryption key pair as the first key, and use the private key in the encryption key pair as the second key; the device also includes a second sending module, which is used to send the first key when receiving a request to obtain the first key.
[0031] The present application also provides an electronic device, including:
[0032] A memory for storing computer executable instructions;
[0033] The processor is used to implement the cloud hard disk processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0034] The embodiment of the present application also provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the cloud hard disk processing method provided in the embodiment of the present application is implemented.
[0035] The embodiment of the present application also provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the cloud hard disk processing method provided in the embodiment of the present application is implemented.
[0036] The embodiments of the present application have the following beneficial effects:
[0037] By applying the above embodiment of the present application, when a mount request is received from a virtual machine to mount a cloud hard disk to a host machine, the cloud hard disk key is encrypted by using the first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key, thereby sending the encrypted cloud hard disk to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key. In this way, the security of the cloud hard disk key during transmission between the terminals is guaranteed, thereby improving the data security of the cloud hard disk and the overall security of the cloud service system in which the cloud hard disk is located. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 1 is a schematic diagram of the architecture of a cloud hard disk processing system 100 provided in an embodiment of the present application;
[0039] Figure 2 It is a structural diagram of an electronic device 500 for implementing a cloud hard disk processing method provided in an embodiment of the present application;
[0040] Figure 3 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application;
[0041] Figure 4 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application;
[0042] Figure 5 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application;
[0043] Figure 6 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application;
[0044] Figure 7 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application;
[0045] Figure 8 It is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0047] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0048] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0050] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0051] 1) Client: an application running in the terminal to provide various services, such as a cloud service client.
[0052] 2) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0053] 3) Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing resources and storage resources.
[0054] Cloud technology also includes cloud storage. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0055] Cloud storage involves cloud hard disks. Cloud hard disks are virtual block storage devices that use network storage architecture and support elastic expansion. They can be used as independent expandable hard disks. Cloud hard disks are usually used as primary storage devices for data that requires frequent and fine-grained updates (such as file systems, databases, etc.). Cloud hard disks can provide block-level data storage and use a multi-copy distributed mechanism to provide data reliability guarantees for cloud server instances (such as cloud virtual machines (CVMs)). Cloud hard disks support automatic replication within the availability zone and back up data on different machines, thereby eliminating problems such as data loss caused by a single machine failure and improving data availability and durability. Cloud hard disks can be mounted to any running cloud server instance in the same availability zone.
[0056] 4) Host machine is a physical server with a virtualized environment deployed. Cloud servers can be allocated on the host machine for use, allowing users to independently plan the use of host machine resources and customize the configuration of virtual machines on the host machine.
[0057] The embodiments of the present application provide a cloud hard disk processing method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the data security of the cloud hard disk.
[0058] It should be noted that when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0059] The following describes a cloud hard disk processing system provided by an embodiment of the present application. Figure 1 , Figure 1 It is an architectural diagram of the processing system 100 of the cloud hard disk provided in an embodiment of the present application. To support an exemplary application, the terminal 600 and the host machine 400 are connected to the cloud service end 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and wireless or wired links are used to realize data transmission.
[0060] The terminal 600 (which may be provided with a cloud service client) is used to send a mount request for the cloud hard disk to the cloud service end 200 in response to a mount instruction for the cloud hard disk, wherein the mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine 400, and the cloud hard disk has been encrypted by the cloud hard disk key;
[0061] The cloud service end 200 is used to receive a mount request for a cloud hard disk sent by the terminal 600; in response to the mount request, encrypt the cloud hard disk key by using a first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key; and send the encrypted cloud hard disk key to the host machine 400;
[0062] The host machine 400 is used to receive the encrypted cloud hard disk key sent by the cloud server 200; decrypt the encrypted cloud hard disk key based on the second key corresponding to the first key to obtain the cloud hard disk key; mount the cloud hard disk to the virtual machine based on the cloud hard disk key; and return a notification of successful mounting to the cloud server 200;
[0063] The cloud service end 200 is further used to forward the notification of successful mounting returned by the host machine 400 to the terminal 600; the terminal 600 is further used to receive and display the notification of successful mounting.
[0064] In some embodiments, the cloud hard disk processing method provided in the embodiments of the present application can be implemented by various electronic devices. For example, it can be implemented by the cloud service end alone, or it can be implemented by the terminal and the cloud service end in collaboration. In some embodiments, the cloud hard disk processing method provided in the embodiments of the present application is implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model application, which can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing resources and storage resources.
[0065] Among them, the cloud service end 200 can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The host machine 400 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal 600 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The terminal, the host machine and the cloud service end can be directly or indirectly connected via wired or wireless communication, and the embodiments of the present application are not limited to this.
[0066] In some embodiments, the cloud hard disk processing method provided in the embodiment of the present application can be implemented with the help of blockchain technology. Multiple servers can form a blockchain, and the servers are nodes on the blockchain. There can be information connections between each node in the blockchain, and information can be transmitted between nodes through information connections. Among them, the data related to the cloud hard disk processing method provided in the embodiment of the present application (such as cloud hard disk keys, etc.) can be stored on the blockchain.
[0067] The following describes an electronic device for implementing a cloud hard disk processing method provided by an embodiment of the present application. Figure 2 , Figure 2 It is a structural diagram of an electronic device 500 for implementing a cloud hard disk processing method provided in an embodiment of the present application. The electronic device 500 provided in an embodiment of the present application may be a cloud service end. The electronic device 500 provided in an embodiment of the present application includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It can be understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 540 .
[0068] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0069] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0070] The memory 550 may be removable, non-removable, or a combination thereof. The memory 550 may include one or more storage devices physically located away from the processor 510. The memory 550 includes a volatile memory or a non-volatile memory, and may also include both a volatile memory and a non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.
[0071] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0072] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0073] A network communication module 552, used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0074] a presentation module 553 for enabling presentation of information via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripherals and displaying content and information);
[0075] The input processing module 554 is used to detect one or more user inputs or interactions from one of the one or more input devices 532 and translate the detected inputs or interactions.
[0076] In some embodiments, the cloud hard disk processing device provided in the embodiments of the present application can be implemented in a software manner. Figure 2A processing device 555 of a cloud hard disk stored in a memory 550 is shown, which may be software in the form of a program and a plug-in, including the following software modules: a first receiving module 5551, an acquisition module 5552, and a first sending module 5553. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0077] The following describes the processing method of the cloud hard disk provided in the embodiment of the present application. In some embodiments, the processing method of the cloud hard disk provided in the embodiment of the present application can be applied to the cloud service end. Figure 3 , Figure 3 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0078] Step 101: The cloud server receives a mount request for a cloud hard disk.
[0079] The mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine, and the cloud hard disk has been encrypted by the cloud hard disk key.
[0080] In actual applications, the mount request may be sent by a cloud service client corresponding to the cloud server. The cloud service client may be set on a user terminal, and the user may trigger a mount instruction for the cloud hard disk on the cloud service client on the user terminal, so that the cloud service client sends a mount request for the cloud hard disk to the cloud server.
[0081] Based on this, in step 101, the cloud service end receives a mount request for the cloud hard disk. Here, the mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine, so the mount request can actually include the identification information of the host machine and the identification information of the virtual machine, so that the cloud service end can mount the cloud hard disk on the virtual machine of the host machine indicated by the mount request. Here, the virtual machine runs in the host machine, and the virtual machine can provide the required computing resources for the cloud service supported by the virtual machine. In an embodiment of the present application, the cloud hard disk is an encrypted cloud hard disk that has been encrypted by a cloud hard disk key, which can ensure the security of the data in the cloud hard disk.
[0082] In actual applications, the cloud service end may include a cloud hard disk service end and a cloud computing service end. The cloud hard disk service end may be used for the management and services of the cloud hard disk, such as the creation of a cloud hard disk. The cloud computing service end may be used to support the relevant calculations of cloud services, while supporting the management of the host machine (such as the management and services of the virtual machines in the host machine) and services. In this way, a virtual machine may be created in the host machine through the cloud service end. For example, the virtual machine configuration parameters configured by the user for the virtual machine may be obtained, and then based on the virtual machine configuration parameters, the host machine may be controlled to create the corresponding virtual machine. For example, the cloud service end may send a creation request for the virtual machine (which may carry the virtual machine configuration parameters) to the host machine, and the host machine receives and responds to the creation request for the virtual machine, and creates the corresponding virtual machine based on the virtual machine configuration parameters carried in the creation request.
[0083] In some embodiments, before receiving a mount request for a cloud hard disk, the cloud service end may also perform the following processing: receive a cloud hard disk creation request, the cloud hard disk creation request including cloud hard disk parameters of the cloud hard disk; in response to the cloud hard disk creation request, create an initial cloud hard disk based on the cloud hard disk parameters, and generate a cloud hard disk key; encrypt the initial cloud hard disk using the cloud hard disk key to obtain a cloud hard disk.
[0084] Here, the cloud hard disk creation request may be sent by the cloud service client corresponding to the cloud service end. The cloud service client may be set on the user terminal, and the user may trigger the cloud hard disk creation instruction for the cloud hard disk on the user terminal through the cloud service client, so that the cloud service client sends the cloud hard disk creation request for the cloud hard disk to the cloud service end. Based on this, the cloud service end receives the cloud hard disk creation request. In actual applications, the cloud hard disk creation request carries the cloud hard disk parameters of the cloud hard disk, such as the name, description, type, storage space size, source path, etc. of the cloud hard disk. The cloud hard disk parameters may be set by the user on the cloud service client. Continuing, the cloud service end responds to the cloud hard disk creation request and creates an initial cloud hard disk based on the cloud hard disk parameters. The initial cloud hard disk is unencrypted; at the same time, a cloud hard disk key for encrypting the initial cloud hard disk may also be generated, for example, the cloud hard disk key may be generated by a key generation algorithm. Finally, the initial cloud hard disk is encrypted by the cloud hard disk key to obtain a cloud hard disk.
[0085] In some embodiments, after the cloud server encrypts the initial cloud hard disk through the cloud hard disk key and obtains the cloud hard disk, it can also perform the following processing: send a first key acquisition request, which is used to request to obtain the target key corresponding to the host machine and used to encrypt the cloud hard disk key; receive the target key returned based on the first key acquisition request, and use the target key as the first key, which is the public key in the encryption key pair generated by the host machine.
[0086] Here, after creating the cloud hard disk, the cloud server can obtain the target key corresponding to the host machine for encrypting the cloud hard disk key. At this time, the cloud server sends a first key acquisition request to the host machine to request to obtain the target key corresponding to the host machine for encrypting the cloud hard disk key based on the first key acquisition request. After receiving the first key acquisition request, the host machine responds to the first key acquisition request and sends the target key to the cloud server. The cloud server receives the target key returned based on the first key acquisition request, and uses the target key as the first key. In actual applications, the target key can be the public key in the encryption key pair generated by the host machine, and the host machine also stores the private key corresponding to the public key (that is, the second key in the embodiment of the present application). In this way, the cloud server obtains the first key used to encrypt the cloud hard disk key.
[0087] In some embodiments, after using the target key as the first key, the cloud server may also perform the following processing: associating the first key with the identification information of the host machine, and storing the associated first key and identification information of the host machine; accordingly, the cloud server may receive a mount request for the cloud hard disk in the following manner: when the first key is stored successfully, a mount request for the cloud hard disk is received.
[0088] Here, in order to avoid obtaining the first key every time the cloud hard disk is mounted to the host, the cloud server can save the first key. For example, it can be stored directly in the cloud server, or it can be stored in a preset storage area (such as a database), or it can be stored in a key management server specifically used to manage keys. Specifically, when storing the first key, the first key and the identification information of the host can be associated, and then the associated first key and the identification information of the host are stored. In this way, the storage of the first key is achieved. Continuing, after the first key is stored successfully, the cloud server can also receive a mount request for the cloud hard disk. In this way, after successfully creating the cloud hard disk and storing the first key, the mount instruction for the cloud hard disk can be automatically triggered, realizing an automated process from creating a cloud hard disk to mounting a cloud hard disk.
[0089] Step 102: In response to the mount request, the cloud hard disk key is encrypted using the first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key.
[0090] In step 102, after receiving the mount request for the cloud hard disk, the cloud server obtains the first key used to encrypt the cloud hard disk key in response to the mount request. For example, the first key can be stored in a key management server specifically used to store keys. The key management server can store the first key of at least one host machine. For example, the identification information of the host machine and the first key can be stored in association. Then, the cloud server can obtain the first key of the host machine from the key management server according to the identification information of the host machine; for another example, the cloud server can also directly obtain the first key from the host machine, for example, the cloud server sends a request to obtain the first key to the host machine, and then receives the first key returned by the host machine in response to the acquisition request. Continuing, after the cloud server obtains the first key, it encrypts the cloud hard disk key by using the first key to obtain an encrypted cloud hard disk key.
[0091] In practical applications, the first key can be a key generated by a symmetric encryption algorithm or a key generated by an asymmetric encryption algorithm. When an asymmetric encryption algorithm is used to generate the first key, the first key is a public key in an encryption key pair generated by the asymmetric encryption algorithm, and the second key used in the host to decrypt the encrypted cloud hard disk key is a private key in an encryption key pair generated by the asymmetric encryption algorithm. When a symmetric encryption algorithm is used to generate the first key, the second key used in the host to decrypt the encrypted cloud hard disk key is the same as the first key. Among them, the use of an asymmetric encryption algorithm can relatively well ensure the security of the cloud hard disk key.
[0092] Step 103: Send the encrypted cloud hard disk key to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
[0093] In step 103, after obtaining the encrypted cloud hard disk key encrypted by the first key, the cloud service end sends the encrypted cloud hard disk key to the host machine. Correspondingly, the host machine can obtain the second key corresponding to the first key, and then decrypt the encrypted cloud hard disk key by the second key to obtain the cloud hard disk key, thereby mounting the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key. In actual applications, the cloud hard disk can be decrypted by the cloud hard disk key to obtain the decrypted cloud hard disk, and then the decrypted cloud hard disk can be initialized (for example, according to the partition, formatting, mount path, drive letter and other information set by the user for the cloud hard disk, and after the initialization is completed, the purpose of mounting the cloud hard disk to the virtual machine is achieved.
[0094] In some embodiments, after sending the encrypted cloud hard disk key to the host machine, the cloud service end may also perform the following processing: receiving a virtual machine migration request for the cloud hard disk, the virtual machine migration request is used to request that the virtual machine with the cloud hard disk mounted on it be migrated from the host machine to the target host machine; in response to the virtual machine migration request, controlling the target host machine to create a target virtual machine, and clone the cloud hard disk to obtain a target cloud hard disk, which has been encrypted by the cloud hard disk key; obtaining a third key for encrypting the cloud hard disk key, and encrypting the cloud hard disk key by the third key to obtain a target encrypted cloud hard disk key; sending the target encrypted cloud hard disk key to the target host machine, so that the target host machine decrypts the target encrypted cloud hard disk key based on the fourth key corresponding to the third key, and mounts the target cloud hard disk to the target virtual machine based on the decrypted cloud hard disk key.
[0095] Here, after the cloud hard disk is mounted to the virtual machine of the host machine, the virtual machine mounted with the cloud hard disk can also be migrated from the host machine to the target host machine. At this time, the user can trigger the virtual machine migration instruction for the cloud hard disk on the cloud service client, and the cloud service client responds to the virtual machine migration instruction and sends a virtual machine migration request to the cloud service end. Based on this, the cloud service end receives the virtual machine migration request for the cloud hard disk, and based on the virtual machine migration request, requests to migrate the virtual machine mounted with the cloud hard disk from the host machine to the target host machine. Continuing, the cloud service end can respond to the virtual machine migration request and control the target host machine to create a target virtual machine. For example, the cloud service end can send a virtual machine creation request to the target host machine, and the target host machine receives and responds to the virtual machine creation request to create a target virtual machine on the target host machine. Specifically, the user can set the target virtual machine parameters, and the virtual machine creation request carries the target virtual machine creation parameters. Based on this, the target host machine can create a target virtual machine on the target host machine based on the target virtual machine creation parameters. At the same time, the cloud service end can also clone the cloud hard disk to obtain the target cloud hard disk. Then, by mounting the target cloud hard disk to the target virtual machine, the virtual machine with the cloud hard disk mounted thereon can be migrated from the host machine to the target host machine.
[0096] When mounting the target cloud hard disk to the target virtual machine, the cloud hard disk can be mounted to the virtual machine. That is, the third key used to encrypt the cloud hard disk key is obtained, and the cloud hard disk key is encrypted by the third key to obtain the target encrypted cloud hard disk key, and then the target encrypted cloud hard disk key is sent to the target host machine; after receiving the target encrypted cloud hard disk key, the target host machine decrypts the target encrypted cloud hard disk key based on the fourth key corresponding to the third key, and mounts the target cloud hard disk to the target virtual machine based on the decrypted cloud hard disk key.
[0097] In practical applications, the third key can be a key generated by a symmetric encryption algorithm or a key generated by an asymmetric encryption algorithm. When an asymmetric encryption algorithm is used to generate the third key, the third key is a public key in an encryption key pair generated by an asymmetric encryption algorithm, and the fourth key used in the host to decrypt the encrypted cloud hard disk key is a private key in an encryption key pair generated by an asymmetric encryption algorithm. When a symmetric encryption algorithm is used to generate the third key, the fourth key used in the host to decrypt the encrypted cloud hard disk key is the same as the third key. Among them, the use of an asymmetric encryption algorithm can relatively well ensure the security of the cloud hard disk key.
[0098] In some embodiments, the cloud service end may obtain a third key used to encrypt the cloud hard disk key in the following manner: sending a second key acquisition request, where the second key acquisition request is used to request the target key corresponding to the target host machine and used to encrypt the cloud hard disk key; receiving the target key returned based on the second key acquisition request, and using the target key as the third key, where the target key is the public key in the encryption key pair generated by the target host machine.
[0099] Here, when the cloud service end obtains the target key corresponding to the target host machine for encrypting the cloud hard disk key, it can send a second key acquisition request to the target host machine to request to obtain the target key corresponding to the target host machine for encrypting the cloud hard disk key based on the second key acquisition request. After receiving the second key acquisition request, the target host machine responds to the second key acquisition request and sends the target key to the cloud service end. The cloud service end receives the target key returned based on the second key acquisition request, and at the same time, uses the target key as the third key. In actual applications, the target key can be the public key in the encryption key pair generated by the target host machine, and the target host machine also stores the private key corresponding to the public key (that is, the fourth key in the embodiment of the present application). In this way, the cloud service end obtains the third key corresponding to the target host machine for encrypting the cloud hard disk key.
[0100] In some embodiments, after sending the target encrypted cloud hard disk key to the target host, the cloud service end may also perform the following processing: control the host to destroy the virtual machine and destroy the cloud hard disk. In this way, the occupation of the host hardware resources is reduced, the utilization rate of the host hardware resources is improved, and the occupation of the cloud hard disk is reduced at the same time.
[0101] By applying the above embodiment of the present application, when a mount request is received from a virtual machine to mount a cloud hard disk to a host machine, the cloud hard disk key is encrypted by using the first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key, thereby sending the encrypted cloud hard disk to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key. In this way, the security of the cloud hard disk key during transmission between the terminals is guaranteed, thereby improving the data security of the cloud hard disk and the overall security of the cloud service system in which the cloud hard disk is located.
[0102] The following describes a method for processing a cloud hard disk provided in an embodiment of the present application. In some embodiments, the method for processing a cloud hard disk provided in an embodiment of the present application can be applied to a host machine. Figure 4 , Figure 4 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0103] Step 201: The host receives the encrypted cloud hard disk key sent in response to a mount request for the cloud hard disk.
[0104] The mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine. The cloud hard disk has been encrypted by the cloud hard disk key. The encrypted cloud hard disk key is obtained by encrypting the cloud hard disk key by the first key.
[0105] In actual applications, the mount request may be sent by the cloud service client corresponding to the cloud service end. The cloud service client may be set on the user terminal, and the user may trigger the mount instruction for the cloud hard disk on the cloud service client on the user terminal, so that the cloud service client sends a mount request for the cloud hard disk to the cloud service end. Based on this, the cloud service end receives a mount request for the cloud hard disk. Here, the mount request is used to request that the cloud hard disk be mounted to the virtual machine of the host machine, so the mount request may actually include the identification information of the host machine and the identification information of the virtual machine, so that the cloud service end can mount the cloud hard disk on the virtual machine of the host machine indicated by the mount request. Here, the virtual machine runs in the host machine, and the virtual machine can provide the required computing resources for the cloud service supported by the virtual machine. In an embodiment of the present application, the cloud hard disk is an encrypted cloud hard disk that has been encrypted by the cloud hard disk key, which can ensure the security of the data in the cloud hard disk. After the cloud server receives the mount request for the cloud hard disk, in response to the mount request, it first obtains the first key used to encrypt the cloud hard disk key, then encrypts the cloud hard disk key using the first key used to encrypt the cloud hard disk key to obtain the encrypted cloud hard disk key, and then sends the encrypted cloud hard disk key to the host machine.
[0106] Based on this, in step 201, the host receives the encrypted cloud hard disk key sent in response to the cloud hard disk mount request.
[0107] In some embodiments, before receiving the encrypted cloud hard disk key sent in response to a mount request for the cloud hard disk, the host machine may also perform the following processing: generate an encryption key pair for encrypting the cloud hard disk key; use the public key in the encryption key pair as the first key, and use the private key in the encryption key pair as the second key; accordingly, when the host machine receives a request to obtain the first key, it sends the first key.
[0108] Here, the host machine can also pre-generate an encryption key pair for encrypting the cloud hard disk key. The public key in the encryption key pair is the first key, and the private key in the encryption key pair is the second key. Based on this, when the host machine receives a request to obtain the first key, it sends the first key.
[0109] Step 202: Decrypt the encrypted cloud hard disk key based on the second key corresponding to the first key to obtain the cloud hard disk key.
[0110] In step 202, the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key to obtain the cloud hard disk key.
[0111] Step 203: Based on the cloud hard disk key, mount the cloud hard disk to the virtual machine.
[0112] In step 203, the host machine mounts the cloud hard disk to the virtual machine based on the cloud hard disk key obtained by decryption. In some embodiments, based on the cloud hard disk key, the host machine can mount the cloud hard disk to the virtual machine in the following manner: decrypt the cloud hard disk using the cloud hard disk key to obtain a decrypted cloud hard disk, and initialize the decrypted cloud hard disk to mount the cloud hard disk to the virtual machine when the initialization operation is completed.
[0113] Here, the host machine can decrypt the cloud hard disk through the cloud hard disk key to obtain the decrypted cloud hard disk, and then initialize the decrypted cloud hard disk (for example, perform initialization operations according to the partition, formatting, mount path, drive letter and other information set by the user for the cloud hard disk), and after the initialization is completed, the cloud hard disk is mounted to the virtual machine.
[0114] By using the above embodiment of the present application, when the cloud hard disk is mounted to the virtual machine of the host machine, the encrypted cloud hard disk key obtained by encrypting with the first key is received, so the encrypted cloud hard disk key needs to be decrypted with the second key corresponding to the first key to obtain the cloud hard disk key, and the cloud hard disk key is mounted to the virtual machine based on the decrypted cloud hard disk key. In this way, the security of the cloud hard disk key during transmission between the terminals is guaranteed, thereby improving the data security of the cloud hard disk and the overall security of the cloud service system in which the cloud hard disk is located.
[0115] The following describes a method for processing a cloud hard disk provided by an embodiment of the present application. In some embodiments, the method for processing a cloud hard disk provided by an embodiment of the present application is implemented by interaction between a host machine and a cloud server.
[0116] First, see Figure 5 , Figure 5 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0117] Step 301: In response to a cloud hard disk creation instruction, the cloud service client sends a cloud hard disk creation request to the cloud service end, where the cloud hard disk creation request includes cloud hard disk parameters of the cloud hard disk.
[0118] Step 302: The cloud server creates an initial cloud hard disk in response to the cloud hard disk creation request based on the cloud hard disk parameters, and encrypts the initial cloud hard disk using the cloud hard disk key to obtain the cloud hard disk.
[0119] Step 303: Send a first key acquisition request to the host machine, where the first key acquisition request is used to request to obtain a public key corresponding to the host machine and used to encrypt the cloud hard disk key.
[0120] Step 304: The host generates an encryption key pair for encrypting the cloud hard disk key, returns the public key in the encryption key pair to the cloud server, and saves the private key in the encryption key pair.
[0121] Step 305: The cloud server receives and saves the public key of the host machine, and when the public key of the host machine is successfully saved, receives a mount request for the cloud hard disk.
[0122] Step 306: In response to the mount request, the cloud hard disk key is encrypted using the host's public key to obtain an encrypted cloud hard disk key.
[0123] Step 307: Send the encrypted cloud hard disk key to the host machine.
[0124] Step 308: The host receives the encrypted cloud hard disk key, and decrypts the encrypted cloud hard disk key based on the private key corresponding to the public key to obtain the cloud hard disk key.
[0125] Step 309: Decrypt the cloud hard disk using the cloud hard disk key to obtain a decrypted cloud hard disk.
[0126] Step 310: Initialize the decrypted cloud hard disk, so that when the initialization operation is completed, the cloud hard disk is mounted to the virtual machine.
[0127] Then, see Figure 6 , Figure 6 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0128] Step 401: In response to a virtual machine migration instruction for a cloud hard disk, the cloud service client sends a virtual machine migration request for the cloud hard disk to the cloud service end.
[0129] The virtual machine migration request is used to request that the virtual machine with the cloud hard disk mounted thereon be migrated from the host machine to the target host machine.
[0130] Step 402: In response to the virtual machine migration request, the cloud server sends a creation instruction for the target virtual machine to the target host machine, and clones the cloud hard disk to obtain a target cloud hard disk, which has been encrypted using the target cloud hard disk key.
[0131] Step 403: The target host machine responds to the creation instruction for the target virtual machine, creates the target virtual machine in the target host machine, and returns a notification of successful creation to the cloud server.
[0132] Step 404: The cloud server receives the notification of successful creation and sends a second key acquisition request to the target host. The second key acquisition request is used to request the public key corresponding to the target host and used to encrypt the cloud hard disk key.
[0133] Step 405: The target host generates an encryption key pair for encrypting the target cloud hard disk key, returns the public key in the encryption key pair to the cloud server, and saves the private key in the encryption key pair.
[0134] Step 406: The cloud server receives and saves the public key of the target host, and encrypts the target cloud hard disk key using a third key to obtain a target encrypted cloud hard disk key.
[0135] Step 407: Send the target encrypted cloud hard disk key to the target host machine.
[0136] Step 408: The target host receives the target encrypted cloud hard disk key, and decrypts the target encrypted cloud hard disk key based on the private key corresponding to the public key to obtain the target cloud hard disk key.
[0137] Step 409: decrypt the target cloud hard disk using the target cloud hard disk key to obtain a target decrypted cloud hard disk.
[0138] Step 410: Initialize the target decrypted cloud hard disk, so that when the initialization operation is completed, the target cloud hard disk is mounted to the target virtual machine.
[0139] In this way, the virtual machine with the cloud hard disk mounted on it can be migrated from the host machine to the target host machine.
[0140] By applying the above-mentioned embodiments of the present application, when processing the cloud hard disk (including cloud hard disk mounting and cloud hard disk virtual machine migration), the security of the cloud hard disk key during transmission between the various ends is guaranteed, thereby improving the data security of the cloud hard disk and at the same time improving the overall security of the cloud service system in which the cloud hard disk is located.
[0141] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.
[0142] In the related art, when the cloud hard disk key is transmitted between the ends (for example, from the cloud service end to the host end), the cloud hard disk key is simply encoded, and the encoded cloud hard disk key is then transmitted, which poses a huge data security risk.
[0143] Based on this, the embodiment of the present application provides a method for processing a cloud hard disk to at least solve the above-mentioned problems. In the embodiment of the present application, a cloud hard disk key transmission method based on national secret cloud hard disk encryption in a private cloud environment is proposed. In the transmission process of the cloud hard disk key, the SM2 national secret asymmetric encryption algorithm can be used for encryption, so as to ensure the security of the cloud hard disk key of the SM4 national secret encrypted cloud hard disk during the transmission process, greatly improving the overall security and reliability of the system. Of course, in actual applications, the encryption of the cloud hard disk (i.e., the cloud hard disk key) can not only adopt the SM4 national secret algorithm, but also other encryption algorithms. Similarly, the encryption of the cloud hard disk key can not only adopt the SM2 national secret asymmetric encryption algorithm, but also other encryption algorithms, which are not limited in the embodiment of the present application.
[0144] First, see Figure 7 , Figure 7 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0145] 1. Start; 2. Produce SM4 National Secret Encrypted Cloud Hard Drive; 3. Obtain the public key of SM2 National Secret Asymmetric Encryption Key; 4. Query the public key of SM2 National Secret Asymmetric Encryption Key; 5. Use the activated National Secret SDK to generate SM2 asymmetric encryption key pair; 6. Return the public key in the encryption key pair; 7. Obtain the public key and transfer it to the key management system; 8. Save the public key of SM2 asymmetric encryption key; 9. Mount SM4 National Secret Cloud Hard Drive; 10. Virtual Machine Data Query Operation; 11. Query the key of SM4 Encrypted Cloud Hard Drive; 12. From the key The management system queries the key of the SM4 national secret encrypted cloud hard disk; 13. Query the key corresponding to the SM4 national secret encrypted cloud hard disk; 14. Use the public key of the SM2 asymmetric key to encrypt the key of the SM4 national secret encrypted cloud hard disk; 15. Obtain the encrypted key of the SM4 national secret encrypted cloud hard disk; 16. Obtain the encrypted key of the SM4 national secret encrypted cloud hard disk; 17. Use the local SM2 national secret encrypted private key to decrypt the encrypted SM4 key; 18. Obtain the plaintext key of the SM4 national secret encrypted cloud hard disk; 19. Perform initialization and other tasks.
[0146] Here, 1) the private cloud customer requests the cloud hard disk server to create a cloud hard disk encrypted by SM4 national secrets on the cloud service client, and mounts the cloud hard disk on the virtual machine for use. First, the cloud hard disk server will request the computing server to obtain the SM2 national secret asymmetric encryption public key generated on the host machine. 2) The cloud hard disk server transmits the obtained public key to the key management system for storage, and after obtaining the return value of the key management system, initiates the SM4 national secret encrypted cloud hard disk mounting action. 3) When the cloud hard disk mounting task is initiated, the cloud hard disk server will initiate a cloud hard disk mounting request to the computing server. After the computing server completes a series of operations such as virtual machine data query, it will request the cloud hard disk server to query the key information of the SM4 national secret encrypted cloud hard disk to be mounted, and the cloud hard disk server requests the key management system to obtain the key of the corresponding cloud hard disk. 4) The key management system uses the saved national secret SM2 asymmetric encryption public key to encrypt the key of the corresponding SM4 national secret encrypted cloud hard disk, and then transmits it to the computing server in ciphertext form. 5) The computing server transfers the ciphertext data to the host machine, decrypts the ciphertext information locally using the private key of the SM2 asymmetric encryption of the national secret, obtains the plaintext of the SM4 national secret key, and then uses the relevant data to perform operations such as initializing the cloud hard disk. After the operation is completed, the cloud hard disk is mounted on the virtual machine.
[0147] Then, see Figure 8 , Figure 8 : is a flowchart of a method for processing a cloud hard disk provided in an embodiment of the present application. The method for processing a cloud hard disk provided in an embodiment of the present application includes:
[0148] 1. Start; 2. Initiate hot migration of virtual machines; 3. Create a virtual machine at the destination; 4. Initiate a request to clone the SM4 national secret encrypted cloud hard disk; 5. Clone the SM4 national secret cloud hard disk; 6. Mount the new SM4 national secret cloud hard disk to the destination virtual machine; 7. Query virtual machine data; 8. Query the information of the new SM4 encrypted cloud hard disk; 9. Query the key of the new SM4 national secret encrypted cloud hard disk from the key management system; 10. Query the key corresponding to the new SM4 national secret encrypted cloud hard disk; 11. Encrypt the new SM4 national secret encrypted cloud hard disk using the public key of the SM2 asymmetric key generated by the destination host. 4. Obtain the key of the encrypted new SM4 national secret encrypted cloud hard disk; 12. Obtain the key of the encrypted new SM4 national secret encrypted cloud hard disk; 13. Obtain the key of the encrypted new SM4 national secret encrypted cloud hard disk; 14. Use the local SM2 national secret encrypted private key to decrypt the encrypted new SM4 national secret encrypted cloud hard disk key; 15. Obtain the plaintext key of the new SM4 national secret encrypted cloud hard disk; 16. Perform initialization and other tasks; 17. The new SM4 national secret cloud hard disk is mounted successfully; 18. Destroy the source virtual machine; 19. Destroy the source SM4 national secret encrypted cloud hard disk; 20. End.
[0149] Here, 1) the private cloud customer initiates a hot migration task of a virtual machine with an SM4 national secret encrypted cloud hard disk on the computing server. First, the computing server will create a virtual machine based on various data on the target host, and then request the cloud hard disk server to initiate an SM4 national secret encrypted cloud hard disk clone request. The cloud hard disk server clones the corresponding cloud hard disk according to the request, and returns the status to the computing server after the cloning is successful. 2) After receiving the successful return status, the computing server initiates the operation of mounting the SM4 national secret encrypted cloud hard disk to the target virtual machine. First, the computing server will perform a data query operation on the virtual machine, and then request the cloud hard disk server to query the information of the SM4 national secret encrypted cloud hard disk on the target virtual machine. 3) After receiving the request, the cloud hard disk server queries the key corresponding to the SM4 national secret encrypted cloud hard disk from the key management system. After the key management system queries the key corresponding to the cloud hard disk, it uses the SM2 national secret asymmetric encryption public key generated by the target host stored in the key management system to encrypt the SM4 national secret encryption key of the cloud hard disk, and returns it to the cloud hard disk server. 4) The ciphertext of the SM4 national secret encryption key encrypted by the SM2 asymmetric encryption algorithm is transmitted to the destination host through the computing server. The ciphertext of the SM4 national secret encryption key is decrypted on the host using the SM2 national secret encryption private key to obtain the key plaintext, and perform operations such as initializing the SM4 national secret encrypted cloud hard disk. 5) After the SM4 national secret encrypted cloud hard disk is successfully mounted, the computing server performs other operations, then destroys the source virtual machine, and finally destroys the source SM4 national secret encrypted cloud hard disk.
[0150] Applying the above embodiments of the present application, 1) In the process of cloud hard disk mounting, the cloud hard disk key information encrypted by SM4 national secret is stored in the key management system. The transmission of the cloud hard disk key is encrypted in the key management system using SM2 national secret asymmetric encryption and then transmitted to the host machine. The private key is used on the host machine for decryption, which guarantees the security of the data during transmission to a greater extent. 2) In the process of hot migration of the virtual machine, the transmission of the key encrypted by SM4 national secret between the source host and the destination host is avoided. The key management system is still requested to obtain the cloud hard disk key information encrypted by SM4 national secret. At the same time, the entire transmission process uses SM2 national secret asymmetric encryption for encrypted transmission, which improves the security of the key during transmission. 3) In the process of data encryption and key encryption transmission of the cloud hard disk, the embodiment of the present application not only ensures the national secret encryption of the cloud hard disk data, but also ensures the secure transmission of the data key under national secret encryption. The entire encryption and transmission process greatly improves the security of data in the private cloud scenario.
[0151] The following is a description of an exemplary structure of a cloud hard disk processing device 555 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the processing device 555 of the cloud hard disk of the memory 550 may include:
[0152] The first receiving module 5551 is used to receive a mount request for the cloud hard disk, wherein the mount request is used to request that the cloud hard disk be mounted to the virtual machine of the host machine, and the cloud hard disk has been encrypted by the cloud hard disk key; the encryption module 5552 is used to respond to the mount request, encrypt the cloud hard disk key by using the first key used to encrypt the cloud hard disk key, and obtain an encrypted cloud hard disk key; the first sending module 5553 is used to send the encrypted cloud hard disk key to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
[0153] In some embodiments, the first receiving module 5551 is also used to receive the cloud hard disk creation request before receiving the mount request for the cloud hard disk, and the cloud hard disk creation request includes the cloud hard disk parameters of the cloud hard disk; in response to the cloud hard disk creation request, based on the cloud hard disk parameters, create an initial cloud hard disk and generate the cloud hard disk key; and encrypt the initial cloud hard disk by using the cloud hard disk key to obtain the cloud hard disk.
[0154] In some embodiments, the first sending module 5553 is also used to encrypt the initial cloud hard disk by using the cloud hard disk key, and after obtaining the cloud hard disk, send a first key acquisition request, wherein the first key acquisition request is used to request to obtain a target key corresponding to the host machine and used to encrypt the cloud hard disk key; the first receiving module 5551 is also used to receive a target key returned based on the first key acquisition request, and use the target key as the first key, wherein the target key is a public key in the encryption key pair generated by the host machine.
[0155] In some embodiments, the first receiving module 5551 is further used to associate the first key with the identification information of the host machine after the target key is used as the first key, and store the associated first key and the identification information of the host machine; the first receiving module 5551 is further used to receive a mount request for the cloud hard disk when the first key is stored successfully.
[0156] In some embodiments, the first receiving module 5551 is also used to receive a virtual machine migration request for the cloud hard disk after sending the encrypted cloud hard disk key to the host machine, the virtual machine migration request being used to request that the virtual machine mounted with the cloud hard disk be migrated from the host machine to the target host machine; in response to the virtual machine migration request, the target host machine is controlled to create a target virtual machine, and clone the cloud hard disk to obtain a target cloud hard disk, and the target cloud hard disk has been encrypted by the target cloud hard disk key; the encryption module 5552 is also used to obtain a third key for encrypting the target cloud hard disk key, and encrypt the target cloud hard disk key by the third key to obtain a target encrypted cloud hard disk key; the first sending module 5553 is also used to send the target encrypted cloud hard disk key to the target host machine, so that the target host machine decrypts the target encrypted cloud hard disk key based on the fourth key corresponding to the third key, and mounts the target cloud hard disk to the target virtual machine based on the decrypted target cloud hard disk key.
[0157] In some embodiments, the first sending module 5553 is also used to send a second key acquisition request, and the second key acquisition request is used to request to obtain the target key corresponding to the target host machine and used to encrypt the target cloud hard disk key; the first receiving module 5551 is also used to receive the target key returned based on the second key acquisition request, and use the target key as the third key, and the target key is the public key in the encryption key pair generated by the target host machine.
[0158] In some embodiments, the first sending module 5553 is further used to control the host machine to destroy the virtual machine and the cloud hard disk after sending the target encrypted cloud hard disk key to the target host machine.
[0159] In some embodiments, the first receiving module 5551 is also used to obtain virtual machine configuration parameters set for the target virtual machine in response to the virtual machine migration request; generate a virtual machine creation request for the target virtual machine based on the virtual machine configuration parameters, and send the virtual machine creation request to the target host machine, so that the target host machine creates the target virtual machine in the target host machine based on the virtual machine configuration parameters when receiving the virtual machine creation request.
[0160] By applying the above embodiment of the present application, when a mount request is received for mounting a cloud hard disk to a virtual machine of a host machine, the cloud hard disk key is encrypted by using the first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key, thereby sending the encrypted cloud hard disk to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key. In this way, the security of the cloud hard disk key during transmission between the terminals is guaranteed, thereby improving the data security of the cloud hard disk and the overall security of the cloud service system in which the cloud hard disk is located.
[0161] The following is a description of a cloud hard disk processing device provided by an embodiment of the present application. The present application also provides a cloud hard disk processing device, which is applied to a host machine, and the cloud hard disk processing device includes:
[0162] A second receiving module is used to receive the encrypted cloud hard disk key sent in response to a mount request for the cloud hard disk; wherein the mount request is used to request that the cloud hard disk be mounted to the virtual machine of the host machine, and the cloud hard disk has been encrypted by the cloud hard disk key, and the encrypted cloud hard disk key is obtained by encrypting the cloud hard disk key by using a first key; a decryption module is used to decrypt the encrypted cloud hard disk key based on a second key corresponding to the first key to obtain the cloud hard disk key; and a mounting module is used to mount the cloud hard disk to the virtual machine based on the cloud hard disk key.
[0163] In some embodiments, the mounting module is also used to decrypt the cloud hard disk through the cloud hard disk key to obtain a decrypted cloud hard disk, and to initialize the decrypted cloud hard disk so that the cloud hard disk can be mounted to the virtual machine when the initialization operation is completed.
[0164] In some embodiments, the device also includes a key generation module, which is used to generate an encryption key pair for encrypting the cloud hard disk key before the host machine receives the encrypted cloud hard disk key sent by the mount request for the cloud hard disk; using the public key in the encryption key pair as the first key, and using the private key in the encryption key pair as the second key; the device also includes a second sending module, which is used to send the first key when receiving a request to obtain the first key.
[0165] By using the above embodiment of the present application, when the cloud hard disk is mounted to the virtual machine of the host machine, the encrypted cloud hard disk key obtained by encrypting with the first key is received, so the encrypted cloud hard disk key needs to be decrypted with the second key corresponding to the first key to obtain the cloud hard disk key, and the cloud hard disk key is mounted to the virtual machine based on the decrypted cloud hard disk key. In this way, the security of the cloud hard disk key during transmission between the terminals is guaranteed, thereby improving the data security of the cloud hard disk and the overall security of the cloud service system in which the cloud hard disk is located.
[0166] The embodiment of the present application also provides a computer program product, which includes computer executable instructions or computer programs, and the computer executable instructions or computer programs are stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instructions or computer program from the computer-readable storage medium, and the processor executes the computer executable instructions or computer program, so that the electronic device executes the cloud hard disk processing method provided in the embodiment of the present application.
[0167] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the cloud hard disk processing method provided in the embodiment of the present application.
[0168] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0169] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0170] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0171] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0172] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for processing a cloud hard disk, characterized in that: The method comprises: A mount request for the cloud hard disk is received, wherein the mount request is used to request to mount the cloud hard disk to a virtual machine of a host machine, and the cloud hard disk has been encrypted by a cloud hard disk key; In response to the mount request, encrypting the cloud hard disk key by using a first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key; The encrypted cloud hard disk key is sent to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on a second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
2. The method according to claim 1, characterized in that Before receiving the mount request for the cloud hard disk, the method further includes: Receive the cloud hard disk creation request, where the cloud hard disk creation request includes cloud hard disk parameters of the cloud hard disk; In response to the cloud hard disk creation request, based on the cloud hard disk parameters, create an initial cloud hard disk and generate the cloud hard disk key; The initial cloud hard disk is encrypted by using the cloud hard disk key to obtain the cloud hard disk.
3. The method according to claim 2, characterized in that After encrypting the initial cloud hard disk by using the cloud hard disk key to obtain the cloud hard disk, the method further includes: Sending a first key acquisition request, where the first key acquisition request is used to request to obtain a target key corresponding to the host machine and used to encrypt the cloud hard disk key; A target key returned based on the first key acquisition request is received, and the target key is used as the first key, wherein the target key is a public key in an encryption key pair generated by the host machine.
4. The method according to claim 3, characterized in that After the target key is used as the first key, the method further includes: Associating the first key with the identification information of the host machine, and storing the associated first key and the identification information of the host machine; The receiving a mount request for the cloud hard disk includes: When the first key is stored successfully, a mount request for the cloud hard disk is received.
5. The method according to claim 1, characterized in that After sending the encrypted cloud hard disk key to the host machine, the method further includes: receiving a virtual machine migration request for the cloud hard disk, wherein the virtual machine migration request is used to request that the virtual machine mounted with the cloud hard disk be migrated from the host machine to a target host machine; In response to the virtual machine migration request, control the target host machine to create a target virtual machine, and clone the cloud hard disk to obtain a target cloud hard disk, where the target cloud hard disk has been encrypted using a target cloud hard disk key; Obtaining a third key used to encrypt the target cloud hard disk key, and encrypting the target cloud hard disk key by using the third key to obtain a target encrypted cloud hard disk key; The target encrypted cloud hard disk key is sent to the target host machine, so that the target host machine decrypts the target encrypted cloud hard disk key based on the fourth key corresponding to the third key, and mounts the target cloud hard disk to the target virtual machine based on the decrypted target cloud hard disk key.
6. The method according to claim 5, characterized in that The obtaining of a third key for encrypting the target cloud hard disk key includes: Sending a second key acquisition request, where the second key acquisition request is used to request to obtain a target key corresponding to the target host machine and used to encrypt the target cloud hard disk key; A target key returned based on the second key acquisition request is received, and the target key is used as the third key, wherein the target key is a public key in the encryption key pair generated by the target host.
7. The method according to claim 5, characterized in that After sending the target encrypted cloud hard disk key to the target host machine, the method further includes: The host machine is controlled to destroy the virtual machine and the cloud hard disk.
8. The method according to claim 5, characterized in that The step of controlling the target host machine to create a target virtual machine in response to the virtual machine migration request includes: In response to the virtual machine migration request, obtaining virtual machine configuration parameters set for the target virtual machine; Based on the virtual machine configuration parameters, a virtual machine creation request for the target virtual machine is generated, and the virtual machine creation request is sent to the target host machine, so that When receiving the virtual machine creation request, the target host machine creates the target virtual machine in the target host machine based on the virtual machine configuration parameters.
9. A method for processing a cloud hard disk, characterized in that: The method comprises: The host receives the encrypted cloud hard disk key sent in response to the mount request for the cloud hard disk; The mount request is used to request to mount the cloud hard disk to the virtual machine of the host machine, the cloud hard disk has been encrypted by the cloud hard disk key, and the encrypted cloud hard disk key is obtained by encrypting the cloud hard disk key by using the first key; Decrypting the encrypted cloud hard disk key based on the second key corresponding to the first key to obtain the cloud hard disk key; Based on the cloud hard disk key, the cloud hard disk is mounted to the virtual machine.
10. The method according to claim 9, characterized in that The step of mounting the cloud hard disk to the virtual machine based on the cloud hard disk key includes: Decrypt the cloud hard disk using the cloud hard disk key to obtain a decrypted cloud hard disk, and An initialization operation is performed on the decrypted cloud hard disk, so that when the initialization operation is completed, the cloud hard disk is mounted to the virtual machine.
11. The method according to claim 9, characterized in that Before the host receives the encrypted cloud hard disk key sent in response to the mount request for the cloud hard disk, the method further includes: Generate an encryption key pair for encrypting the cloud hard disk key; Using the public key in the encryption key pair as the first key, and using the private key in the encryption key pair as the second key; The method further comprises: When the acquisition request for the first key is received, the first key is sent.
12. A cloud hard disk processing device, characterized in that: The device comprises: A first receiving module is used to receive a mount request for the cloud hard disk, wherein the mount request is used to request to mount the cloud hard disk to a virtual machine of a host machine, and the cloud hard disk has been encrypted by a cloud hard disk key; an encryption module, configured to, in response to the mount request, encrypt the cloud hard disk key by using a first key used to encrypt the cloud hard disk key to obtain an encrypted cloud hard disk key; The first sending module is used to send the encrypted cloud hard disk key to the host machine, so that the host machine decrypts the encrypted cloud hard disk key based on the second key corresponding to the first key, and mounts the cloud hard disk to the virtual machine based on the decrypted cloud hard disk key.
13. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; The processor is configured to implement the cloud hard disk processing method according to any one of claims 1 to 11 when executing the computer executable instructions stored in the memory.
14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the cloud hard disk processing method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer programs are executed by a processor, the cloud hard disk processing method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Bare metal cloud hard disk data encryption device, method and equipment based on national cryptographic algorithm and medium
CN119227112A
