Security

An application must encrypt a 20 MB file locally while protecting its encryption key with a symmetric KMS key. Which approach should the developer use?

Show the answer

Correct answerD. Use GenerateDataKey, encrypt locally, and retain the encrypted data key

AWhy not this: The symmetric KMS Encrypt operation accepts at most 4,096 bytes of plaintext per request.

BWhy not this: A KMS key ARN identifies a key; it is not cryptographic key material.

CWhy not this: The ciphertext output is a wrapped key, which must be decrypted before it can be used for local encryption.

DWhy this is right: GenerateDataKey supplies a usable plaintext key and a protected copy for later decryption.

GenerateDataKey returns a plaintext data key for local encryption and an encrypted copy to store with the ciphertext; remove the plaintext key from memory after use. Direct symmetric KMS Encrypt requests accept at most 4,096 bytes, not a 20 MB file.