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§
Sourcefn key_length(&self) -> usize
fn key_length(&self) -> usize
Get the key length in bytes
Sourcefn nonce_length(&self) -> usize
fn nonce_length(&self) -> usize
Get the nonce/IV length in bytes
Sourcefn tag_length(&self) -> usize
fn tag_length(&self) -> usize
Get the authentication tag length in bytes
Sourcefn is_authenticated(&self) -> bool
fn is_authenticated(&self) -> bool
Check if this is an authenticated encryption algorithm
Sourcefn security_level_bits(&self) -> usize
fn security_level_bits(&self) -> usize
Get the security level in bits (minimum of key size and tag size)
Sourcefn is_timing_attack_resistant(&self) -> bool
fn is_timing_attack_resistant(&self) -> bool
Check if the algorithm is resistant to timing attacks
Sourcefn is_cache_timing_resistant(&self) -> bool
fn is_cache_timing_resistant(&self) -> bool
Check if the algorithm is resistant to cache-timing attacks
Sourcefn is_post_quantum_secure(&self) -> bool
fn is_post_quantum_secure(&self) -> bool
Check if the algorithm is believed to be post-quantum secure
Sourcefn algorithm_family(&self) -> AlgorithmFamily
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".