Skip to main content

TakeTheHint

Trait TakeTheHint 

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

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

Decrypt Hint and Hints. Also a silly pun.

Required Methods§

Source

fn take_the<A: Aead + KeyInit, L: ArraySize>( &self, hint: &Hint<K, A, L>, context: &[u8], ) -> Result<Array<u8, L>, Error>
where Hint<K, A, L>: HintSized<K, A, L>,

Trial decryption of an individual Hint.

Provided Methods§

Source

fn take_all_the<A: Aead + KeyInit, L: ArraySize, const S: usize>( &self, hints: &Hints<Hint<K, A, L>, S>, context: &[u8], ) -> Vec<Array<u8, L>>
where Hint<K, A, L>: HintSized<K, A, L> + Hinting<K, L>,

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<DalekX25519> for StaticSecret

Source§

fn take_the<A: Aead + KeyInit, L: ArraySize>( &self, hint: &Hint<DalekX25519, A, L>, context: &[u8], ) -> Result<Array<u8, L>, Error>
where Hint<DalekX25519, A, L>: HintSized<DalekX25519, A, L>,

Source§

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

Available on crate feature rustcrypto-ec only.
Source§

fn take_the<A: Aead + KeyInit, L: ArraySize>( &self, hint: &Hint<EllipticCurve<C>, A, L>, context: &[u8], ) -> Result<Array<u8, L>, Error>
where Hint<EllipticCurve<C>, A, L>: HintSized<EllipticCurve<C>, A, L>,

Implementors§

Source§

impl TakeTheHint<DalekRistretto255> for ecdh_omr::dalek_ristretto255::StaticSecret