An application needs to decrypt a large dataset () that was previously encrypted client-side using envelope encryption with an AWS KMS Customer Managed Key (CMK). The encrypted dataset consists of the ciphertext data and the encrypted data key, both of which are stored in an Amazon S3 bucket. The application's IAM role has been granted `kms:Decrypt` permissions.
Which of the following steps must the developer implement in the application code to successfully decrypt the dataset? (Select TWO.)
- Call the AWS KMS `Decrypt` API operation, passing the encrypted data key to retrieve the plaintext data key.Answer
- Decrypt the ciphertext data locally using the plaintext data key and a symmetric decryption algorithm.Answer
- CCall the AWS KMS `Decrypt` API operation, passing the entire ciphertext dataset to retrieve the decrypted plaintext data directly.
- DCall the AWS KMS `GenerateDataKey` API operation, passing the KMS key identifier to generate a new plaintext key for decrypting the data.
- ECall the AWS KMS `ReEncrypt` API operation, passing the encrypted data key and the ciphertext dataset to decrypt it in a single request.
Answer
To decrypt a large dataset encrypted client-side with envelope encryption, the application must call the KMS Decrypt API operation, passing the encrypted data key to obtain the plaintext data key, and then decrypt the ciphertext data locally using the plaintext data key and a symmetric decryption algorithm.
In client-side envelope encryption, the Customer Managed Key (CMK) in AWS KMS is only used to decrypt the encrypted data key. The application must first send the encrypted data key to KMS via the `Decrypt` API to retrieve the plaintext data key. Once retrieved, the actual decryption of the large dataset (in this case, ) is performed locally on the client side using a symmetric decryption algorithm (like AES) with the plaintext data key. This avoids sending large files over the network to KMS and bypasses KMS API payload limits.
Step-by-Step Solution
Key Concept
Client-side envelope encryption relies on using a local plaintext data key (retrieved by decrypting the encrypted data key via KMS) to perform symmetric decryption on the actual dataset locally, rather than sending the large dataset to KMS.
Estimated Time:3m 0s