Encrypt and decrypt data

Last updated:2020-11-20 17:20:01

Encrypt and decrypt data

Kingsoft Cloud Key Management Service (KKMS) provides API operations and online tools for you to encrypt and decrypt data with a maximum size of 4 KB based on your business needs.

Online tools for encryption and decryption

Online tools are suitable for encrypting and decrypting a small amount of data at a time. For example, you can use the tools to generate a certificate key in ciphertext for the first time.

1.Select a customer master key (CMK).

2.Click Encrypt or Decrypt.

3.Enter the data to be encrypted or decrypted.

4.Click Start.

5.Click Download to save the encryption or decryption result to your local PC.

image.png

Envelope encryption

  • Introduction

Envelope encryption is an encryption method similar to digital envelope technology. Envelope encryption allows you to store, transfer, and use encrypted data by encapsulating their data keys in an envelope, instead of directly encrypting or decrypting data with a CMK.

  • Scenarios

1.Encrypt and decrypt large files: The KKMS API allows you to encrypt and decrypt data with a maximum size of 4 KB.

2.Encrypt and decrypt local files.

  • Encryption and decryption processes

Icon description

image.png

Encryption process

image.png

1.Create a CMK.

2.Call the GenerateDataKey API operation of KKMS to generate data keys, including a plaintext data key and a ciphertext data key.

3.Encrypt a file by using the plaintext data key to generate a ciphertext file.

4.Store the ciphertext data key and ciphertext file together in a persistent storage device or service.

Decryption process

image.png

1.Read the ciphertext data key and ciphertext file from the persistent storage device or service.

2.Call the Decrypt API operation of KKMS to decrypt the ciphertext data key. A plaintext data key is generated.

3.Decrypt the ciphertext file by using the plaintext data key.

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

Insufficient
Outdated
Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈