pub fn encode_interleaved<F, P, NTT, A>(
params: &FRIParams<F>,
oracle_index: usize,
ntt: &NTT,
message: FieldBuffer<P, FieldSliceData<'_, P>>,
alloc: &A,
) -> FieldBuffer<P, <A as Allocator>::Vec<P>>Expand description
Reed-Solomon encodes one input oracle’s interleaved message.
params are the (possibly batched) FRI parameters and oracle_index selects which oracle of
FRIParams::input_oracles is encoded. The oracle is Reed–Solomon encoded at its own
dimension — which may be smaller than the batched code’s reduced dimension — over the same
subspace and rate; the lift to the reduced dimension is applied later during the combined fold.
The returned codeword is committed by sending it over a Merkle channel (via
MerkleIPProverChannel::send_merkle_commitment) with one interleaved coset of
2^log_batch_size scalars per leaf.
§Arguments
params- the (possibly batched) FRI protocol parameters.oracle_index- the index intoFRIParams::input_oraclesof the oracle being encoded.ntt- the additive NTT for Reed-Solomon encoding.message- the interleaved message to encode.alloc- the allocator the codeword is drawn from.
§Preconditions
message.log_len()must equal the oracle’s committed message length,params.rs_code().log_dim() - log_lift + log_batch_size.