awslabs / aws-encryption-sdk-specification

AWS Encryption SDK Specification
Other
29 stars 27 forks source link

Feature request: add option to immediately validate ciphertext by decrypting it #235

Open farleyb-amazon opened 2 years ago

farleyb-amazon commented 2 years ago

When encrypting data to create an encrypted message, some customers may want to immediately attempt a decryption of the data before returning it in order to confirm that the ciphertext is valid and can be decrypted. We could offer this as a built-in option of the ESDK; during encrypt, we internally decrypt the encrypted message before returning it.

We'll have to think a bit about the API here to come up with something that works for all supported languages. See one possible approach here: https://github.com/aws/aws-encryption-sdk-java/pull/402

See also: https://github.com/aws/aws-encryption-sdk-java/issues/279