pub trait AeadDecryptSemantic: Aead {
// Required method
fn decrypt_semantic(
&self,
key: &AeadKey,
nonce: &Nonce,
ciphertext: &[u8],
associated_data: Option<&[u8]>,
) -> Result<DecryptSemanticOutcome, Error>;
}Expand description
AEAD implementations that expose a semantic decrypt API (Layer B).
Implementors must also implement Aead. Operational errors (invalid sizes, keys,
nonces, configuration) are returned as Err. Only post-decrypt authentication
failure is reported as DecryptSemanticOutcome::AuthenticationFailed inside Ok.
This trait is separate from Aead so dyn AeadOperations and other object-safe
surfaces can remain Result-only (crate::api::AeadOperations) without forcing every
backend to expose semantic decrypt.
Required Methods§
Sourcefn decrypt_semantic(
&self,
key: &AeadKey,
nonce: &Nonce,
ciphertext: &[u8],
associated_data: Option<&[u8]>,
) -> Result<DecryptSemanticOutcome, Error>
fn decrypt_semantic( &self, key: &AeadKey, nonce: &Nonce, ciphertext: &[u8], associated_data: Option<&[u8]>, ) -> Result<DecryptSemanticOutcome, Error>
Decrypt and classify the outcome without overloading Result for auth failure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl AeadDecryptSemantic for RomulusMAead
impl AeadDecryptSemantic for RomulusMAead
Source§impl AeadDecryptSemantic for RomulusNAead
impl AeadDecryptSemantic for RomulusNAead
Source§impl AeadDecryptSemantic for SaturninAead
impl AeadDecryptSemantic for SaturninAead
Source§impl AeadDecryptSemantic for Shake256Aead
impl AeadDecryptSemantic for Shake256Aead
Source§impl AeadDecryptSemantic for TweakAead
impl AeadDecryptSemantic for TweakAead
Source§impl AeadDecryptSemantic for DuplexSpongeAead
Available on crate feature alloc only.
impl AeadDecryptSemantic for DuplexSpongeAead
Available on crate feature
alloc only.Source§impl AeadDecryptSemantic for RomulusMAead
impl AeadDecryptSemantic for RomulusMAead
Source§impl AeadDecryptSemantic for RomulusNAead
impl AeadDecryptSemantic for RomulusNAead
Source§impl AeadDecryptSemantic for SaturninAead
impl AeadDecryptSemantic for SaturninAead
Source§impl AeadDecryptSemantic for TweakAead
Available on crate feature alloc only.
impl AeadDecryptSemantic for TweakAead
Available on crate feature
alloc only.