/// Computes the function f of the paper.
///
/// The bit vector tau must have length lambda_T + lambda_H.
Computes the function f of the paper.
The bit vector tau must have length lambda_T + lambda_H.
Computes the function f of the paper . The bit vector tau must have length lambda_T + lambda_H .
fn ftau(tau: &[Bit], sys: &SysParam) -> Option<ECP2> {
    if tau.len() != sys.lambda_t + sys.lambda_h {
        return None;
    }
    let mut id = sys.f0.clone();
    for (n, t) in tau.iter().enumerate() {
        if *t == Bit::One {
            if n < sys.lambda_t {
                id.add(&sys.f[n]);
            } else {
                id.add(&sys.f_h[n - sys.lambda_t]);
            }
        }
    }
    Some(id)
}
fn ftau ( tau : & [ Bit ] , sys : & SysParam ) -> Option < ECP2 > { if tau . len ( ) != sys . lambda_t + sys . lambda_h { return None ; } let mut id = sys . f0 . clone ( ) ; for ( n , t ) in tau . iter ( ) . enumerate ( ) { if * t == Bit :: One { if n < sys . lambda_t { id . add ( & sys . f [ n ] ) ; } else { id . add ( & sys . f_h [ n - sys . lambda_t ] ) ; } } } Some ( id ) }
Computes the function f of the paper.
Computes the function f of the paper .
tau
&[Bit]
sys
&SysParam