mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add padding to compressed+encrypted files (#15282)
Add up to 256 bytes of padding for compressed+encrypted files. This will obscure the obvious cases of extremely compressible content and leave a similar output size for a very wide variety of inputs. This does *not* mean the compression ratio doesn't leak information about the content, but the outcome space is much smaller, so often *less* information is leaked.
This commit is contained in:
@@ -71,6 +71,11 @@ func IsRequested(h http.Header) (Type, bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// Requested returns whether any type of encryption is requested.
|
||||
func Requested(h http.Header) bool {
|
||||
return S3.IsRequested(h) || S3KMS.IsRequested(h) || SSEC.IsRequested(h)
|
||||
}
|
||||
|
||||
// UnsealObjectKey extracts and decrypts the sealed object key
|
||||
// from the metadata using the SSE-Copy client key of the HTTP headers
|
||||
// and returns the decrypted object key.
|
||||
|
||||
Reference in New Issue
Block a user