Andreas Auernhammer 2d67c26794
improve multipart decryption (#20324)
This commit simplifies and optimizes the decryption of large (multipart)
objects. This PR does two things:
 
- Re-write the init logic for the decryption reader
- Reduce the number of OEK decryptions

Before, the init logic copied some SSE HTTP request headers to 
parse them later. This is simplified to parsing them right away. This
removes some fields from the decryption reader struct.

Further, the decryption reader decrypted the OEK using the client-provided 
key (SSE-C) or the KMS (SSE-S3 / SSE-KMS) for each part. This is redundant 
since the OEK is the same for all parts. In particular, a KMS call might be a 
network request. Now, the OEK is decrypted once for the entire multipart object.

This should improve latency when reading encrypted multipart objects 
and reduce requests to the KMS.

Signed-off-by: Andreas Auernhammer <github@aead.dev>
2024-08-25 11:07:13 -07:00
..
2024-07-02 01:17:52 -07:00
2024-06-10 08:31:51 -07:00
2024-07-03 11:49:48 -07:00
2024-07-30 15:59:48 -07:00
2024-05-31 22:17:37 -07:00
2024-01-17 23:03:17 -08:00
2024-01-17 23:03:17 -08:00
2023-12-20 20:13:40 -08:00