minio / kes

Key Managament Server for Object Storage and more
https://min.io/docs/kes/concepts/
GNU Affero General Public License v3.0
456 stars 94 forks source link

add HMAC API and use KMS secret key crypto #433

Closed aead closed 7 months ago

aead commented 7 months ago

This commit does two closely related things:

The new secret key implementation is located in the internal/crypto package. It is fully backwards compatible with the previous implementation that resided in internal/key and is removed by this PR. In particular, all ciphertexts produced with existing keys can be decrypted with the added implementation.

The new implementation cleans up some design issues in the previous AES-256 and ChaCha20 ciphertext generation:

This has also the side effect of ciphertexts getting significantly smaller (half the size). Since each MinIO object embeds at least one ciphertext in its metadata, this can give be a small perf. improvement when listing a lot of encrypted objects.


The new HMAC API allows clients to compute a deterministic keyed checkusm (MAC) over some data without having direct access to the HMAC key. Clients may use this to verify that messages are authentic or generate the same pseudo-random secret on startup.