round5 0.1.2

Implementation of Round5 post-quantum PKE and KEM algorithms
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::tiny_keccak::cshake::{cshake128, cshake256};


fn hash_customization(output: &mut [u8], input: &[u8], customization: Option<&[u8]>, kappa_bytes: u8) {
    if kappa_bytes > 16 {
        cshake256(output, input, None, customization);
    } else {
        cshake128(output, input, None, customization);
    }
}

pub fn hash(output: &mut [u8], input: &[u8], kappa_bytes: u8) {
    hash_customization(output, input, None, kappa_bytes);
}