Realm

oa::crypto::ntt

Module published by the oa::crypto module.

MdRust public API

Public Types

Public Functions

pub fn forward(input: &Matrix, parameters: &NttParameters) -> Result<Matrix>
pub fn inverse(input: &Matrix, parameters: &NttParameters) -> Result<Matrix>
pub fn pointwise_multiply( left: &Matrix, right: &Matrix, parameters: &NttParameters, ) -> Result<Matrix>
pub fn prepare(engine: &Engine, config: &NttConfig) -> Result<NttParameters>

Function Documentation

pub fn forward( input: &Matrix, parameters: &NttParameters ) -> Result<Matrix>
Compute a natural-order forward cyclic NTT, preserving field representation. Records staged GPU work with two reusable private buffers. It performs no tensor host reads, waits or per-stage host initialization. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.
pub fn inverse( input: &Matrix, parameters: &NttParameters ) -> Result<Matrix>
Compute a natural-order inverse cyclic NTT, preserving field representation. Records staged GPU work with two reusable private buffers. It performs no tensor host reads, waits or per-stage host initialization. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.
pub fn pointwise_multiply( left: &Matrix, right: &Matrix, parameters: &NttParameters ) -> Result<Matrix>
Multiply pointwise in the configured prime field, preserving representation. Errors Rejects dtype, shape, ownership, address limits, allocation or recording failures.
pub fn prepare( engine: &Engine, config: &NttConfig ) -> Result<NttParameters>
Prepare forward/inverse Montgomery twiddles on the supplied Engine. Errors Rejects allocation, queried workgroup limits, ABI or recording failures.