Encrypting and Decrypting Small-size Data Online Using a Custom Key
This section describes how to use the online tool to encrypt or decrypt small-size data (4 KB or smaller) on the KMS console.
Prerequisites
The custom key is in Enabled status.
Constraints
- Default keys cannot be used to encrypt or decrypt such data with the tool.
- Asymmetric keys cannot be used to encrypt or decrypt such data with the tool.
- You can call an API to use a default key to encrypt or decrypt small volumes of data. For details, see the Data Encryption Workshop API Reference.
- Use the current CMK to encrypt the data.
- Exercise caution when you delete a CMK. The online tool cannot decrypt data if the CMK used for encryption has been deleted.
- After an API is called to encrypt data, the online tool cannot be used to decrypt the data.
Encrypting Data
- Log in to the DEW console.
- Click
in the upper left corner and select a region or project.
- Click the name of the target custom key to access the key details page. Click the Tool tab.
- Click Encrypt. In the text box on the left, enter the data to be encrypted, as shown in Figure 1.
- Click Execute. The encrypted data is displayed in the Encryption/Decryption Result area.
- Use the current CMK to encrypt the data.
- To clear your input, click Clear.
- In the Encryption result area, click
to copy the encrypted data and save it to a local file.
Decrypting Data
- Click a non-default key in the Enabled state and go to the Tool tab.
- Click Decrypt and enter the data to be decrypted in the text box, as shown in Figure 2.
- The tool will identify the original encryption CMK and use it to decrypt the data.
- If the key has been deleted, the decryption will fail.
- Click Execute. The decrypted data is displayed in the Encryption/Decryption Result area.
- In the Decryption result area, click
to copy the decrypted data and save it to a local file.
-
The information to be encrypted using commands or APIs cannot contain special characters. Otherwise, the decryption result may fail to be displayed on the console.
- Enter the plaintext on the console, the text will be encoded to Base64 format before encryption.
The decryption result returned via API will be in Base64 format. Perform Base64 decoding to obtain the plaintext entered on the console.
- In the Decryption result area, click
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot