Add comments
This commit is contained in:
parent
ff52bd67ee
commit
769c1d40ed
@ -21,6 +21,8 @@ pub enum KzgRsError {
|
||||
ChunkSizeTooBig(usize),
|
||||
}
|
||||
|
||||
/// Transform chunks of bytes (of size `CHUNK_SIZE`) into `Fr` which are considered evaluations of a
|
||||
/// polynomial.
|
||||
fn bytes_to_evaluations<const CHUNK_SIZE: usize>(
|
||||
data: &[u8],
|
||||
domain: GeneralEvaluationDomain<Fr>,
|
||||
@ -41,6 +43,10 @@ fn bytes_to_evaluations<const CHUNK_SIZE: usize>(
|
||||
)
|
||||
}
|
||||
|
||||
/// Transform chunks of bytes (of size `CHUNK_SIZE`) into `Fr` which are considered evaluations of a
|
||||
/// polynomial. Then use FFT to transform that polynomial into coefficient form.
|
||||
/// `CHUNK_SIZE` needs to be 31 (bytes) or less, otherwise it cannot be encoded.
|
||||
/// The input data need to be padded, so it fits in a len modulus of `CHUNK_SIZE`.
|
||||
pub fn bytes_to_polynomial<const CHUNK_SIZE: usize>(
|
||||
data: &[u8],
|
||||
domain: GeneralEvaluationDomain<Fr>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user