baml.crypto.DecryptionFailure
A ciphertext was rejected: it did not authenticate under the key, nonce, and associated data it was decrypted with.
Signature
class baml.crypto.DecryptionFailureA ciphertext was rejected: it did not authenticate under the key, nonce, and associated data it was decrypted with.
reason is coarse by design. AEAD authentication is all or nothing, and an
implementation that reported why a tag failed to verify would give an
attacker a decryption oracle. So reason never distinguishes a wrong key
from a wrong nonce, mismatched aad, or tampered ciphertext. It names only
facts the caller already holds, such as the ciphertext being too short to
contain a tag at all.
Source:<builtin>/baml/ns_crypto/errors.bamlbytes 544–805
Fields
algorithm
stringThe algorithm that rejected the ciphertext, such as "AES-256-GCM-SIV".
reason
stringA short description of the failure, never specific enough to identify which input was wrong.
Implementations
baml.Concrete for T
Source:<builtin>/baml/core.bamlbytes 747–779