sneaker icon indicating copy to clipboard operation
sneaker copied to clipboard

Decrypting KMS encrypted data

Open kenwan12 opened this issue 9 years ago • 1 comments

Hi,

If a got a piece of data encrypted with a KMS key, how can I use sneaker to decrypt it ? Shall I just upload the file to the S3 bucket manually and use

sneaker download s3_path decrypted_file

?

Many thanks

Ken

kenwan12 avatar Nov 17 '16 14:11 kenwan12

The Sneaker algorithm uses the S3 path as part of the KMS encryption context, to encrypt an AES256 encryption key. KMS is used to protect the AES encryption key. So, if you didn't encrypt the data with Sneaker, then you really can't use Sneaker for decrypting it. Try looking at the AWS SDK for Go for guidance on how to use KMS to decrypt.

dskyberg avatar Jan 27 '17 12:01 dskyberg