How to Decrypt Aws Ruby Client-Side Encryption in Python

Python Cryptography module to decrypt Client-side Encrypted data in s3

Looks like I had to use ECB() mode to decrypt the x-amz-key while creating first ciphercontext object

cipher = Cipher(algorithms.AES(sym_key), modes.ECB(), backend=default_backend())

This solved the problem

AWS S3 Data Protection Using Client-Side Encryption

Client-side encryption means that you are encrypting the file prior to uploading it to S3. You can accomplish that using any programming language along with any encryption tool. For that matter, you could just use a tool like gpg and the AWS CLI to encrypt and upload files to S3. You manage the encryption keys on your side. The referenced SDKs just include a wrapper that simplify some of the client-side encryption operations.



Related Topics



Leave a reply



Submit