Skip to main content

AlgorithmExt

Trait AlgorithmExt 

Source
pub trait AlgorithmExt {
    // Required methods
    fn key_length(&self) -> usize;
    fn nonce_length(&self) -> usize;
    fn tag_length(&self) -> usize;
    fn is_authenticated(&self) -> bool;
    fn security_level_bits(&self) -> usize;
    fn is_timing_attack_resistant(&self) -> bool;
    fn is_cache_timing_resistant(&self) -> bool;
    fn is_post_quantum_secure(&self) -> bool;
    fn algorithm_family(&self) -> AlgorithmFamily;
}
Expand description

Extension trait for algorithm properties and security characteristics

Required Methods§

Source

fn key_length(&self) -> usize

Get the key length in bytes

Source

fn nonce_length(&self) -> usize

Get the nonce/IV length in bytes

Source

fn tag_length(&self) -> usize

Get the authentication tag length in bytes

Source

fn is_authenticated(&self) -> bool

Check if this is an authenticated encryption algorithm

Source

fn security_level_bits(&self) -> usize

Get the security level in bits (minimum of key size and tag size)

Source

fn is_timing_attack_resistant(&self) -> bool

Check if the algorithm is resistant to timing attacks

Source

fn is_cache_timing_resistant(&self) -> bool

Check if the algorithm is resistant to cache-timing attacks

Source

fn is_post_quantum_secure(&self) -> bool

Check if the algorithm is believed to be post-quantum secure

Source

fn algorithm_family(&self) -> AlgorithmFamily

Get algorithm family (stream cipher, block cipher, etc.)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§