fhelium.engine.rns.montgomery
MontgomeryParameters
class View source
MontgomeryParameters(ckks_config: CkksConfig)Host-side constants for per-prime Montgomery arithmetic.
Let [Q | P] order, standard residue
therefore maps a product of two Montgomery residues back to Montgomery form. Native kernels accept lazy representatives in RnsRuntime materializes exact integral row tables.
moduli
property
moduli: list[int]Canonical modulus order [Q | P].
twice_modulus
property
twice_modulus: list[int]Return
buffer_bit_length
property
buffer_bit_length: intBit-length of the buffer type (30 or 62).
half_buffer_bit_length
property
half_buffer_bit_length: intReturn
lower_bits_mask
property
lower_bits_mask: intReturn the lower-half mask
full_bits_mask
property
full_bits_mask: intReturn the radix mask
R
property
R: intReturn Montgomery radix
montgomery_r2
property
montgomery_r2: list[int]Return
montgomery_r_inverse
property
montgomery_r_inverse: list[int]Return
neg_inv_modulus
property
neg_inv_modulus: list[int]Return
neg_inv_modulus_lower_bits
property
neg_inv_modulus_lower_bits: list[int]Return the lower
neg_inv_modulus_higher_bits
property
neg_inv_modulus_higher_bits: list[int]Return the higher
modulus_lower_bits
property
modulus_lower_bits: list[int]Return the lower
modulus_higher_bits
property
modulus_higher_bits: list[int]Return the higher