Skip to main content

RomulusNAead

Struct RomulusNAead 

Source
pub struct RomulusNAead { /* private fields */ }
Expand description

Romulus-N (nonce-based AEAD) for the lib-Q AEAD registry.

Implementations§

Source§

impl RomulusNAead

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Aead for RomulusNAead

Source§

fn encrypt( &self, key: &AeadKey, nonce: &Nonce, plaintext: &[u8], associated_data: Option<&[u8]>, ) -> Result<Vec<u8>>

Encrypt data
Source§

fn decrypt( &self, key: &AeadKey, nonce: &Nonce, ciphertext: &[u8], associated_data: Option<&[u8]>, ) -> Result<Vec<u8>>

Decrypt data
Source§

impl AeadDecryptSemantic for RomulusNAead

Source§

fn decrypt_semantic( &self, key: &AeadKey, nonce: &Nonce, ciphertext: &[u8], associated_data: Option<&[u8]>, ) -> Result<DecryptSemanticOutcome>

Decrypt and classify the outcome without overloading Result for auth failure.
Source§

impl AeadPlugin for RomulusNAead

Source§

fn algorithm(&self) -> Algorithm

Get the algorithm identifier for this plugin
Source§

fn create(&self) -> Result<Box<dyn AeadWithMetadata>>

Create a new AEAD instance
Source§

fn metadata(&self) -> &'static AeadMetadata

Get algorithm metadata
Source§

fn name(&self) -> &'static str

Get plugin name
Source§

fn version(&self) -> &'static str

Get plugin version
Source§

fn description(&self) -> &'static str

Get plugin description
Source§

fn info(&self) -> PluginInfo

Get detailed plugin information including dependencies
Source§

fn check_dependencies( &self, _available_plugins: &BTreeMap<String, String>, ) -> Result<()>

Check if plugin dependencies are satisfied
Source§

impl AeadWithMetadata for RomulusNAead

Source§

fn metadata(&self) -> &'static AeadMetadata

Get the algorithm metadata
Source§

fn algorithm(&self) -> Algorithm

Get the algorithm identifier
Source§

fn key_size(&self) -> usize

Get the key size in bytes
Source§

fn nonce_size(&self) -> usize

Get the nonce size in bytes
Source§

fn tag_size(&self) -> usize

Get the tag size in bytes
Source§

fn security_level(&self) -> u32

Get the security level
Source§

fn algorithm_name(&self) -> &'static str

Get the algorithm name
Source§

fn algorithm_description(&self) -> &'static str

Get the algorithm description
Source§

fn supports_semantic_decrypt(&self) -> bool

Whether this algorithm’s reference stack implements lib_q_core::AeadDecryptSemantic (Layer B), per AeadMetadata::supports_semantic_decrypt. Read more
Source§

fn validate_key(&self, key: &AeadKey) -> Result<()>

Validate key size
Source§

fn validate_nonce(&self, nonce: &Nonce) -> Result<()>

Validate nonce size
Source§

fn validate_ciphertext_size(&self, ciphertext_size: usize) -> Result<()>

Validate ciphertext size (must be at least tag size)
Source§

impl Default for RomulusNAead

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more