Skip to main content

Module rns

Module rns 

Source
Expand description

§Residue Number System (RNS) — Multi-Moduli Decomposition

RNS allows working with large integers by decomposing them into residues modulo several small coprime moduli. Each component can be processed independently, which is perfect for parallelism and avoids multi-precision arithmetic.

For CKKS, the product Q = q₁·q₂·…·q_L defines the precision level. Rescaling removes one modulus per level.

Structs§

RnsContext
RNS context: a set of coprime moduli.
RnsPoly
Polynomial in RNS representation: one component per modulus.