How S3Proxy encryption works
masterS3Proxy provides transparent encryption for S3 clients, allowing secure data writes to various cloud backends. It uses the AES/CFB/NoPadding cipher mode, which enables random access (reading from an offset) by allowing the decryption process to account for the previous 16-byte AES block.
Key and IV Management
- Key: A 128-bit key is derived from a user-provided password and salt.
- IV (Initialization Vector): A random IV is generated for each part and stored within the part's padding to ensure security.
Storage Format
Every uploaded part is appended with a 64-byte padding containing metadata required for decryption. This padding is appended to the encrypted stream before it is passed to the BlobStore.
For a single blob, the structure is:
[ENCRYPTED BYTES] [PADDING]
For multipart uploads, the structure repeats for each part:
[ENCRYPTED BYTES] [PADDING] [ENCRYPTED BYTES] [PADDING] ...