pub struct AesHash { /* private fields */ }Expand description
AES accelerated hashing of Blocks.
Implementations§
Source§impl AesHash
impl AesHash
Sourcepub fn cr_hash_block(&self, x: Block) -> Block
pub fn cr_hash_block(&self, x: Block) -> Block
Compute the correlation robust hash of a block.
§Warning: only secure in semi-honest setting!
See https://eprint.iacr.org/2019/074 for details.
Sourcepub fn cr_hash_blocks<const N: usize>(&self, x: &[Block; N]) -> [Block; N]
pub fn cr_hash_blocks<const N: usize>(&self, x: &[Block; N]) -> [Block; N]
Compute the correlation robust hashes of multiple blocks.
Warning: only secure in semi-honest setting! See https://eprint.iacr.org/2019/074 for details.
Sourcepub fn cr_hash_blocks_b2b<const N: usize>(
&self,
inp: &[Block; N],
out: &mut [Block],
)
pub fn cr_hash_blocks_b2b<const N: usize>( &self, inp: &[Block; N], out: &mut [Block], )
Compute the correlation robust hashes of multiple blocks.
Warning: only secure in semi-honest setting! See https://eprint.iacr.org/2019/074 for details.
§Panics
If N != out.len()
Sourcepub fn cr_hash_slice_mut(&self, x: &mut [Block])
pub fn cr_hash_slice_mut(&self, x: &mut [Block])
Correlation robust hash of a slice of blocks.
Warning: only secure in semi-honest setting! See https://eprint.iacr.org/2019/074 for details.
In most cases, this method will be the most performant, as it can make use of AES instruction level parallelism.
Sourcepub fn tccr_hash_slice_mut(
&self,
x: &mut [Block],
tweak_fn: impl FnMut(usize) -> Block,
)
pub fn tccr_hash_slice_mut( &self, x: &mut [Block], tweak_fn: impl FnMut(usize) -> Block, )
Tweakable circular correlation robust hash function.
See https://eprint.iacr.org/2019/074 for details. This is the TMMO function.