Struct scuttlebutt::AesHash
source · pub struct AesHash { /* private fields */ }
Expand description
AES-based correlation-robust hash function.
This hash function supports the correlation-robust variants given in https://eprint.iacr.org/2019/074.
Implementations§
source§impl AesHash
impl AesHash
sourcepub fn cr_hash(&self, _i: Block, x: Block) -> Block
pub fn cr_hash(&self, _i: Block, x: Block) -> Block
Correlation-robust hash function for 128-bit inputs (cf. https://eprint.iacr.org/2019/074, §7.2).
The function computes π(x) ⊕ x
.
sourcepub fn ccr_hash(&self, i: Block, x: Block) -> Block
pub fn ccr_hash(&self, i: Block, x: Block) -> Block
Circular correlation-robust hash function (cf. https://eprint.iacr.org/2019/074, §7.3).
The function computes H(σ(x))
, where H
is a correlation-robust hash
function and σ(x₀ || x₁) = (x₀ ⊕ x₁) || x₁
.
Auto Trait Implementations§
impl Freeze for AesHash
impl RefUnwindSafe for AesHash
impl Send for AesHash
impl Sync for AesHash
impl Unpin for AesHash
impl UnwindSafe for AesHash
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