Trait MultiFmdScheme

Source
pub trait MultiFmdScheme<PK, F> {
    // Required methods
    fn flag<R: RngCore + CryptoRng>(
        &mut self,
        public_key: &PK,
        rng: &mut R,
    ) -> F;
    fn detect(&mut self, detection_key: &DetectionKey, flag_ciphers: &F) -> bool;

    // Provided method
    fn multi_extract(
        &self,
        secret_key: &FmdSecretKey,
        num_detection_keys: usize,
        threshold: usize,
        leaked_rate: usize,
        filtering_rate: usize,
    ) -> Option<Vec<DetectionKey>> { ... }
}
Expand description

A trait for a Fuzzy Message Detection (FMD) scheme with multi-key extraction.

Required Methods§

Source

fn flag<R: RngCore + CryptoRng>(&mut self, public_key: &PK, rng: &mut R) -> F

Source

fn detect(&mut self, detection_key: &DetectionKey, flag_ciphers: &F) -> bool

Probabilistic detection based on the false-positive rate associated to detection_key.

Provided Methods§

Source

fn multi_extract( &self, secret_key: &FmdSecretKey, num_detection_keys: usize, threshold: usize, leaked_rate: usize, filtering_rate: usize, ) -> Option<Vec<DetectionKey>>

Returns None if (leaked_rate,filtering_rate) does not constitute a valid pair of rates for the given num_detection_keys and threshold.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§