mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
* fix(kms): apply real RSAES-OAEP for RSA keys in Encrypt and Decrypt Encrypt on an RSA key now produces raw RSA-OAEP ciphertext of the modulus length. Decrypt accepts a ciphertext made locally with the public key from GetPublicKey, so the normal envelope pattern works. Encrypt, Decrypt, and ReEncrypt read the EncryptionAlgorithm request fields and return them in responses. Validate plaintext length between 1 and 4096 bytes on every encrypt path. Turn a malformed blob payload into InvalidCiphertextException instead of a 500. GenerateDataKey now names itself in key usage errors and rejects non symmetric keys like real AWS. Error codes and messages for algorithm mismatch, wrong key usage, missing KeyId, encryption context on asymmetric keys, and oversized plaintext were measured against real AWS KMS in us-east-1 and match. Fixes #3024 * test(kms): rename a GenerateDataKey test to state the thrown exception