pub struct Hints<H, const S: usize> { /* private fields */ }Expand description
Batch of Hints that enforces inner vector size as well as shuffling, and also mitigates
potential timing leaks at creation time.
- If fewer
HintSeeditems thanSare supplied during creation, decoyHintSeedwill fill the remaining slots. - A new temporary
K::SecretKeyis generated, which is used as a one-off contribution to the group secrets used to encrypt the respectiveHint’s messages. - In order to make sure passive attackers don’t know which
Hintto brute force, theHintsorder should not be deterministic, so decoy and realHints get shuffled before the result is returned.
In aggregate, this ensures that even if the same HintSeed is used to create multiple Hints
instances, they are indistinguishable to passive observers that want to infer communication
patterns by repeatedly polling a server or other intermediary.
Implementations§
Source§impl<K: KeyPair, A: Aead + KeyInit, L: ArraySize, const S: usize> Hints<Hint<K, A, L>, S>
impl<K: KeyPair, A: Aead + KeyInit, L: ArraySize, const S: usize> Hints<Hint<K, A, L>, S>
Trait Implementations§
Source§impl<H, const S: usize> FromIterator<H> for Hints<H, S>
impl<H, const S: usize> FromIterator<H> for Hints<H, S>
Source§fn from_iter<I: IntoIterator<Item = H>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = H>>(iter: I) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl<H, const S: usize> Freeze for Hints<H, S>
impl<H, const S: usize> RefUnwindSafe for Hints<H, S>where
H: RefUnwindSafe,
impl<H, const S: usize> Send for Hints<H, S>where
H: Send,
impl<H, const S: usize> Sync for Hints<H, S>where
H: Sync,
impl<H, const S: usize> Unpin for Hints<H, S>where
H: Unpin,
impl<H, const S: usize> UnsafeUnpin for Hints<H, S>
impl<H, const S: usize> UnwindSafe for Hints<H, S>where
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more