I used the AWS Encryption SDK CLI (2.0.0) to encrypt a text file (hello.txt) using a Customer Managed Key (CMK) in AWS KMS service. After that i uploaded the encrypted text file (hello.txt.encrypted) through the AWS console to S3.
Then i can download this encrypted text file with this usual call:
results, err := s.s3Client.GetObject(&s3.GetObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(item),
})
As a next step i want to then decrypt this text file in Go. But i am unable to find a AWS Encryption SDK for go for decryption that will let me do this.
This is what i would do in AWS Encryption SDK for Java .
AwsCrypto crypto = AwsCrypto.standard();
final KmsMasterKeyProvider prov = KmsMasterKeyProvider.builder().buildDiscovery();
final CryptoResult<byte[], KmsMasterKey> decryptResult = crypto.decryptData(prov, responseBytes);
I am looking for ways to do the same thing in Go. Thanks in advance.