ECNTT
ECNTT Method​
The ecntt
function computes the Elliptic Curve Number Theoretic Transform (EC-NTT) or its inverse on a batch of points of a curve.
pub fn ecntt<P: Projective>(
input: &(impl HostOrDeviceSlice<P> + ?Sized),
dir: NTTDir,
cfg: &NTTConfig<P::ScalarField>,
output: &mut (impl HostOrDeviceSlice<P> + ?Sized),
) -> Result<(), IcicleError>
Parameters​
input
: The input data as a slice ofProjective
. This represents points on a specific elliptic curve.dir
: The direction of the NTT. It can beNTTDir::kForward
for forward NTT orNTTDir::kInverse
for inverse NTT.cfg
: The NTT configuration object of typeNTTConfig<C::ScalarField>
. This object specifies parameters for the NTT computation, such as the batch size and algorithm to use.output
: The output buffer to write the results into. This should be a slice ofProjective
with the same size as the input.
Return Value​
Result<(), IcicleError>
: This function returns anIcicleError
which is a wrapper type that indicates success or failure of the NTT computation. On success, it containsOk(())
.