Trait TakeTheHint

Source
pub trait TakeTheHint<K: KeyPair> {
    // Required method
    fn take_the<A: Aead + KeyInit, const L: usize>(
        &self,
        hint: &Hint<K, A, L>,
        salt: &[u8],
    ) -> Result<[u8; L], Error>;

    // Provided method
    fn take_all_the<A: Aead + KeyInit, const L: usize, const S: usize>(
        &self,
        hints: &Hints<Hint<K, A, L>, S>,
        salt: &[u8],
    ) -> Vec<[u8; L]>
       where Hint<K, A, L>: Hinting<K, L>,
             K::SecretKey: RandomSecretKey { ... }
}
Expand description

Decrypt Hint and Hints. Also a silly pun.

Required Methods§

Source

fn take_the<A: Aead + KeyInit, const L: usize>( &self, hint: &Hint<K, A, L>, salt: &[u8], ) -> Result<[u8; L], Error>

Trial decryption of an individual Hint.

Provided Methods§

Source

fn take_all_the<A: Aead + KeyInit, const L: usize, const S: usize>( &self, hints: &Hints<Hint<K, A, L>, S>, salt: &[u8], ) -> Vec<[u8; L]>
where Hint<K, A, L>: Hinting<K, L>, K::SecretKey: RandomSecretKey,

Trial decryption for a batch of Hints.

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.

Implementations on Foreign Types§

Source§

impl TakeTheHint<X25519> for StaticSecret

Source§

fn take_the<A: Aead + KeyInit, const L: usize>( &self, hint: &Hint<X25519, A, L>, salt: &[u8], ) -> Result<[u8; L], Error>

Source§

impl<C> TakeTheHint<EllipticCurve<C>> for SecretKey<C>

Source§

fn take_the<A: Aead + KeyInit, const L: usize>( &self, hint: &Hint<EllipticCurve<C>, A, L>, salt: &[u8], ) -> Result<[u8; L], Error>

Implementors§