Skip to main content

circuit_wots_encode

Function circuit_wots_encode 

Source
pub fn circuit_wots_encode(
    builder: &CircuitBuilder,
    public_param: &[Wire; 2],
    epoch: Wire,
    message: &[Wire; 4],
    randomness: &[Wire; 3],
) -> [Wire; 42]
Expand description

In-circuit form of wots_encode, returning the digits and constraining them to be a valid encoding.

Both validity conditions are asserted rather than returned: an encoding whose leftover bits are set, or whose digits miss the target sum, has no satisfying witness.

ยงReturns

The V digits, each a wire holding a value below CHAIN_LENGTH.