deterministic_func

Function deterministic_func 

Source
pub fn deterministic_func<F>(n: usize, seed: u64, f: F) -> (Vec<u8>, Vec<u8>)
where F: Fn(u8) -> u8,
Expand description

Generate a functionally dependent pair Y = f(X).

X is uniform random bytes. Y is a deterministic transformation of X. I(X;Y) = H(Y). H(Y|X) = 0.

f maps a byte to a byte.