Skip to main content

Module aead

Module aead 

Source
Expand description

AeadPlugin trait โ€” the Rust-side counterpart of the AEAD v0 wire protocol.

Plugin authors implement this trait on their AEAD state type, then apply #[plugin_interface(name = "aead", version = 0)] to the impl block.

Method โ†’ symbol mapping (see crates/confium-core/src/ffi/aead.rs for the loader-side wire types):

trait methodFFI symbolpurpose
AeadPlugin::create_with_keycfmp_aead_createconstruct a new instance
AeadPlugin::set_noncecfmp_aead_set_nonceset the nonce
AeadPlugin::associated_data_updatecfmp_aead_associated_data_updateabsorb associated data
AeadPlugin::encrypt_updatecfmp_aead_encrypt_updateencrypt a chunk
AeadPlugin::decrypt_updatecfmp_aead_decrypt_updatedecrypt a chunk
AeadPlugin::finalizecfmp_aead_finalizeemit the tag
AeadPlugin::verify_tagcfmp_aead_verify_tagverify the tag
Dropcfmp_aead_destroyreclaim the boxed state

Traitsยง

AeadPlugin
Trait implemented by AEAD plugins.