Files
doc-exports/docs/kms/umn/dew_01_0016.html
qinweiwei 3e4721c813 KMS UMN 20251111 version
Reviewed-by: Rogal, Marcel <mrogal@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: qinweiwei <qinweiwei@huawei.com>
Co-committed-by: qinweiwei <qinweiwei@huawei.com>
2026-01-19 09:05:54 +00:00

81 lines
9.8 KiB
HTML

<a name="dew_01_0016"></a><a name="dew_01_0016"></a>
<h1 class="topictitle1">Using KMS for Encryption</h1>
<div id="body1558598748162"><div class="section" id="dew_01_0016__section552718133618"><h4 class="sectiontitle">Interacting with Cloud Services</h4><p id="dew_01_0016__p1843818518258">Cloud services use the envelope encryption technology and call KMS APIs to encrypt service resources. Your CMKs are under your own management. With your grant, cloud services use a specific custom key of yours to encrypt data.</p>
<div class="p" id="dew_01_0016__p1733533725610">The encryption process is as follows:<ol id="dew_01_0016__ol183351137175613"><li id="dew_01_0016__li1914417517112">Create a custom key on KMS.</li><li id="dew_01_0016__li19144251151115">Cloud services call the <span class="parmvalue" id="dew_01_0016__parmvalue175261311613"><b>create-datakey</b></span> API of the KMS to create a DEK. Then you get a plaintext DEK and a ciphertext DEK.<div class="note" id="dew_01_0016__note7119521125711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dew_01_0016__p273792210576">Ciphertext DEKs are generated when you use a CMK to encrypt the plaintext DEKs.</p>
</div></div>
</li><li id="dew_01_0016__li554111015386">Cloud services use the plaintext DEK to encrypt a plaintext file, generating a ciphertext file.</li><li id="dew_01_0016__li663714348386">Cloud services store the ciphertext DEK and ciphertext file in a persistent storage device or a storage service.</li></ol>
</div>
<div class="note" id="dew_01_0016__note162711444143610"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dew_01_0016__p187908597468">When users download the data from a cloud service, the service uses the custom key specified by KMS to decrypt the ciphertext DEK, uses the decrypted DEK to decrypt data, and then provides the decrypted data for users to download.</p>
</div></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dew_01_0016__table724313364617" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Cloud services supported by KMS</caption><thead align="left"><tr id="dew_01_0016__row6245203615610"><th align="left" class="cellrowborder" valign="top" width="19.93%" id="mcps1.3.1.5.2.4.1.1"><p id="dew_01_0016__p122453366612">Service</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.199999999999996%" id="mcps1.3.1.5.2.4.1.2"><p id="dew_01_0016__p32456364612">How to Use</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.87%" id="mcps1.3.1.5.2.4.1.3"><p id="dew_01_0016__p5883151918180">Reference</p>
</th>
</tr>
</thead>
<tbody><tr id="dew_01_0016__row624517361619"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p92457362614">Object Storage Service (OBS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p57692822165925">You can upload objects to and download them from OBS in common mode or server-side encryption mode. When you upload objects in encryption mode, data is encrypted at the server side and then securely stored on OBS in ciphertext. When you download encrypted objects, the data in ciphertext is decrypted at the server side and then provided to you in plaintext. OBS supports the server-side encryption with KMS-managed keys (SSE-KMS). In this mode, OBS uses the keys provided by KMS for server-side encryption.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p621125372111"><i><cite id="dew_01_0016__cite1988611011197">Object Storage Service Console Operation Guide</cite></i></p>
</td>
</tr>
<tr id="dew_01_0016__row1124517361262"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p224553614611">Elastic Volume Service (EVS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p5195880517016">If you enable the encryption function when creating an EVS disk, the disk will be encrypted with the DEK generated by using your CMK. Data stored in the EVS disk will be automatically encrypted.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p10587155122318"><i><cite id="dew_01_0016__cite12788565239">Elastic Volume Service User Guide</cite></i></p>
</td>
</tr>
<tr id="dew_01_0016__row924520361862"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p17246136469">Image Management Service (IMS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p2031176417022">When creating a private image using an external image file, you can enable the private image encryption function and select a CMK provided by KMS to encrypt the image.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p1514225482715"><i><cite id="dew_01_0016__cite19478185415278">Image Management Service User Guide</cite></i></p>
</td>
</tr>
<tr id="dew_01_0016__row02465361618"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p9246133619613">Scalable File Service (SFS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p102319261638">When creating a file system on SFS, the CMK provided by KMS can be selected to encrypt the file system, so that files stored in the file system are automatically encrypted.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p13206114443015"><i><cite id="dew_01_0016__cite8697450163018">Scalable File Service User Guide</cite></i></p>
</td>
</tr>
<tr id="dew_01_0016__row32461936262"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p2246936568">Relational Database Service (RDS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p833055014464">When purchasing a database instance, you can enable the disk encryption function of the database instance and select a CMK created on KMS to encrypt the disk of the database instance. Enabling the disk encryption function will enhance data security.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p474318343316"><i><cite id="dew_01_0016__cite9874118193317">Relational Database Service User Guide</cite></i></p>
</td>
</tr>
<tr id="dew_01_0016__row13851202164517"><td class="cellrowborder" valign="top" width="19.93%" headers="mcps1.3.1.5.2.4.1.1 "><p id="dew_01_0016__p685252112459">Document Database Service (DDS)</p>
</td>
<td class="cellrowborder" valign="top" width="58.199999999999996%" headers="mcps1.3.1.5.2.4.1.2 "><p id="dew_01_0016__p2037916913468">When purchasing a DDS instance, you can enable the disk encryption function of the instance and select a CMK created on KMS to encrypt the disk of the instance. Enabling the disk encryption function will enhance data security.</p>
</td>
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.1.5.2.4.1.3 "><p id="dew_01_0016__p1285664023518"><i><cite id="dew_01_0016__cite3332114710353">Document Database Service User Guide</cite></i></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dew_01_0016__section1959717181163"><h4 class="sectiontitle">Working with User Applications</h4><p id="dew_01_0016__p8376171184214">To encrypt plaintext data, a user application can call the necessary KMS API to create a DEK. The DEK can then be used to encrypt the plaintext data. Then the application can store the encrypted data. In addition, the user application can call the KMS API to create CMKs. DEKs can be stored in ciphertext after being encrypted with the CMKs.</p>
<p id="dew_01_0016__p2704191711812">Envelope encryption is implemented, with CMKs stored in KMS and ciphertext DEKs in user applications. KMS is called to decrypt a ciphertext DEK only when necessary.</p>
<div class="p" id="dew_01_0016__p9558114515476">The encryption process is as follows:<ol id="dew_01_0016__ol2558114544718"><li id="dew_01_0016__li12558154594712"><a name="dew_01_0016__li12558154594712"></a><a name="li12558154594712"></a>The application calls the <span class="parmvalue" id="dew_01_0016__parmvalue3443135765110"><b>create-key</b></span> API of KMS to create a custom key.</li><li id="dew_01_0016__li4558104504710">The application calls the <span class="parmvalue" id="dew_01_0016__parmvalue9442115015452"><b>create-datakey</b></span> API of KMS to create a DEK. A plaintext DEK and a ciphertext DEK are generated.<div class="note" id="dew_01_0016__note141636573"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dew_01_0016__p1336319412578">Ciphertext DEKs are generated when you use a CMK to encrypt the plaintext DEKs in <a href="#dew_01_0016__li12558154594712">1</a>.</p>
</div></div>
</li><li id="dew_01_0016__li115596458477">The application uses the plaintext DEK to encrypt a plaintext file. A ciphertext file is generated.</li><li id="dew_01_0016__li555934504716">The application saves the ciphertext DEK and the ciphertext file together in a persistent storage device or a storage service.</li></ol>
</div>
<p id="dew_01_0016__p929410810153">For details, see the <i><cite id="dew_01_0016__cite542720913155">Key Management Service API Usage Guidelines</cite></i>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dew_01_0121.html">KMS</a></div>
</div>
</div>