fhelium.ir.dialects.rns
Logical residue-number-system operations used below CKKS lowering.
A residue number system (RNS) stores a polynomial row modulo each active ciphertext prime in Q. The QP basis appends special P primes used by hybrid key switching. A hybrid digit is one selected group of Q rows lifted together during that procedure. Montgomery representation stores residue
Each operation defines a transformation of an RNS bundle and its representation state. Parameter and table operands carry numerical Tensors supplied by Eager or bound to a Program before execution.
CrtBasisExtendOp
class View source
CrtBasisExtendOp(value, parameters, result_type)Bases: IRDLOperation
Evaluate a supplied CRT lift matrix in target Montgomery form.
Source a_i is coefficient/standard. For D=product(q_i), D_i=D/q_i, and u_i=D_i^{-1} mod q_i, raw lift chooses sum(a_i D_i u_i). A nonempty source-normalizer operand first applies a_iu_i mod q_i, and its matrix chooses sum((a_iu_i mod q_i) D_i). Neither lift promises the least nonnegative representative modulo D.
Numerical operands are source parameters, target parameters, the matrix, target reciprocals, source normalizers and source reciprocals. The matrix contains one target Montgomery factor; output is canonical Montgomery [*batch, target row, coefficient] with fresh storage. Empty normalizers and reciprocals select the raw matrix. All source and table operands are live and read-only. Ordered prime rows and their parameter data belong to the supplied operands, not to an implicit key-switch configuration.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.crt_basis_extend' | |
value | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
verify_
method
def verify_() -> None: ...dependencies
method
def dependencies() -> OperationDependencies: ...CenteredBasisExtendOp
class View source
CenteredBasisExtendOp(value, parameters, result_type, *, attributes=None)Bases: IRDLOperation
Extend each centered CRT coefficient to supplied target prime rows.
Numerical operands specify ordered source/target bases, Garner factors, midpoint digits and source-product correction. Standard residues and all leading component/batch axes are preserved. Output owns new storage.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.centered_basis_extend' | |
value | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
SliceRowsOp
class View source
SliceRowsOp(value, result_type, *, start, count)Bases: IRDLOperation
Return a contiguous interval of prime-row positions as a view.
Result row i aliases source row start+i; coefficients, representations, component and batch axes are unchanged. The result type names those rows.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.slice_rows' | |
value | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
start | attr_def(IntegerAttr) | |
count | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
ScaleAndPadRowsOp
class View source
ScaleAndPadRowsOp(value, row_scales, parameters, result_type, *, pad_rows)Bases: IRDLOperation
Multiply rows by supplied Montgomery scalars and append zero rows.
For input x_i and multiplier m_i R, the retained rows are x_i m_i in the input representation. Additional rows contain zero.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.scale_and_pad_rows' | |
value | operand_def(RnsBundleType) | |
row_scales | operand_def() | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
pad_rows | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
RoundedTrailingQuotientOp
class View source
RoundedTrailingQuotientOp(value, parameters, result_type, *, drop_count, rounding, attributes=None)Bases: IRDLOperation
Reorder coefficient rows and divide by their trailing-prime product D.
Supplied row order, inverse and half-offset tensors define the quotient floor((x+h)/D), with h=0 or (D-1)/2. Output contains the surviving rows; its caller-assigned scale accounts for any combined CKKS rescaling.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.rounded_trailing_quotient' | |
value | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
drop_count | attr_def(IntegerAttr) | |
rounding | attr_def(StringAttr) | |
traits | traits_def(Pure()) |
AddStandardOp
class View source
AddStandardOp(lhs: SSAValue | Operation, rhs: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute, *, attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Add two standard-residue polynomial bundles row by row.
An RNS (residue number system) row stores one polynomial modulo an active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.add_standard' | |
lhs | operand_def(RnsBundleType) | |
rhs | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
AddPlaintextOp
class View source
AddPlaintextOp()Bases: _CiphertextPlaintextOp
Add a prepared plaintext polynomial to ciphertext component zero.
For ciphertext
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.add_plaintext' | |
polynomial_domain | attr_def(StringAttr, default_value=StringAttr('coefficient')) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
SumStandardBatchOp
class View source
SumStandardBatchOp(value: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute, *, dim: int | IntegerAttr)Bases: IRDLOperation
Reduce one leading batch axis of a standard-residue bundle.
The operand is dim selects the reduced axis of length
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.sum_standard_batch' | |
value | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
dim | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
AddMontgomeryLazyOp
class View source
AddMontgomeryLazyOp(lhs: SSAValue | Operation, rhs: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Accumulate two Montgomery bundles without full standard reduction.
For each active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.add_montgomery_lazy' | |
lhs | operand_def(RnsBundleType) | |
rhs | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
CoefficientAutomorphismOp
class View source
CoefficientAutomorphismOp(value: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute, *, galois_element: int | IntegerAttr)Bases: IRDLOperation
Apply the negacyclic ring automorphism
For odd galois_element
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.coefficient_automorphism' | |
value | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
galois_element | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...ExtractComponentOp
class View source
ExtractComponentOp(value: SSAValue | Operation, result_type: Attribute, *, component: int | IntegerAttr)Bases: IRDLOperation
Select one ciphertext-component polynomial without arithmetic.
For an RNS bundle component=j returns
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.extract_component' | |
value | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
component | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...NegateStandardOp
class View source
NegateStandardOp(value: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Negate a standard-residue polynomial bundle row by row.
For every active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.negate_standard' | |
value | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
HybridModUpDigitOp
class View source
HybridModUpDigitOp(source: SSAValue | Operation, parameters: Sequence[SSAValue | Operation], result_type: Attribute, *, attributes: Mapping[str, Attribute] | None=None, digit_index: int=0)Bases: IRDLOperation
Extend one hybrid-RNS digit from active Q rows to active QP rows.
A hybrid digit is a selected group of Q-prime residues used in key switching. For each coefficient, the selected rows are reconstructed as one integer class
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.hybrid_modup_digit' | |
source | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
digit_index | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...KeySwitchDigitProductOp
class View source
KeySwitchDigitProductOp(digit: SSAValue | Operation, key: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute, *, key_digit_index: int, key_row_start: int=0)Bases: IRDLOperation
Multiply one lifted digit by its evaluation-key pair.
For NTT/Montgomery digit
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.key_switch_digit_product' | |
digit | operand_def(RnsBundleType) | |
key | operand_def() | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
key_digit_index | attr_def(IntegerAttr) | |
key_role | opt_attr_def(StringAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...ModDownQpToQOp
class View source
ModDownQpToQOp(value: SSAValue | Operation, parameters: Sequence[SSAValue | Operation], result_type: Attribute, *, rounding: str | StringAttr='nearest', attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Remove the special-prime product P from a key-switch accumulator.
Let
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.moddown_qp_to_q' | |
value | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
rounding | opt_attr_def(StringAttr, default_value=StringAttr('nearest')) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...ModDownNttQpToQOp
class View source
ModDownNttQpToQOp(value: SSAValue | Operation, parameters: Sequence[SSAValue | Operation], result_type: Attribute, *, coefficient_c0: SSAValue | Operation | None=None, rounding: str | StringAttr='nearest', attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Remove P from two QP accumulators and retain NTT/Montgomery Q rows.
The input has shape [2, *batch, |Q|+|P|, N]; the result has shape [2, *batch, |Q|, N]. Parameter and transform-table operands supply numerical data for the same active RNS bases.
Let coefficient_c0 adds
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.moddown_ntt_qp_to_q' | |
value | operand_def(RnsBundleType) | |
coefficient_c0 | opt_operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
irdl_options | (AttrSizedOperandSegments(as_property=True),) | |
result | result_def(RnsBundleType) | |
rounding | opt_attr_def(StringAttr, default_value=StringAttr('nearest')) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
verify_
method
def verify_() -> None: ...ModDownAddRescaleOp
class View source
ModDownAddRescaleOp(value: SSAValue | Operation, base: SSAValue | Operation, parameters: Sequence[SSAValue | Operation], result_type: Attribute, *, output_domain: Literal['coefficient', 'ntt']='coefficient', moddown_rounding: str='nearest', rescale_rounding: str='nearest', attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Divide-round
For
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.moddown_add_rescale' | |
value | operand_def(RnsBundleType) | |
base | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
output_domain | attr_def(StringAttr, default_value=StringAttr('coefficient')) | |
moddown_rounding | opt_attr_def(StringAttr, default_value=StringAttr('nearest')) | |
rescale_rounding | opt_attr_def(StringAttr, default_value=StringAttr('nearest')) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Read matching components and batches, with coefficient/prime mixing.
verify_
method
def verify_() -> None: ...MontgomeryToStandardOp
class View source
MontgomeryToStandardOp()Bases: _ResidueConversionOp
Remove the Montgomery factor from coefficient residues.
For every active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.montgomery_to_standard' |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
MontgomeryMultiplyOp
class View source
MontgomeryMultiplyOp(lhs: SSAValue | Operation, rhs: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Multiply NTT/Montgomery polynomial bundles pointwise.
For active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.montgomery_multiply' | |
lhs | operand_def(RnsBundleType) | |
rhs | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
MontgomeryWeightedSumOp
class View source
MontgomeryWeightedSumOp(parameters: SSAValue | Operation, ciphertexts: tuple[SSAValue | Operation, ...], plaintexts: tuple[SSAValue | Operation, ...], result_type: Attribute, *, plaintext_layouts: Sequence[str]=(), implicit_plaintexts: tuple[SSAValue | Operation, ...]=(), term_chunk_size: int | None=None)Bases: IRDLOperation
Sum ciphertext/plaintext products in NTT/Montgomery representation.
For
Here plaintext_layouts selects dense, cyclic, contiguous or strided-sparse indexing; omitting it means dense. Sparse rows have shape [*batch, limb]. term_chunk_size optionally bounds generated expressions.
Every term uses the same component and batch shape, depth, prime rows, ciphertext scale, and plaintext scale. term_count separates the two equal operand ranges. The result keeps the ciphertext shape, depth, and NTT/Montgomery representation; its CKKS scale is the product of the common ciphertext and plaintext scales.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.montgomery_weighted_sum' | |
terms | var_operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
term_count | attr_def(IntegerAttr) | |
plaintext_layouts | opt_attr_def(ArrayAttr[StringAttr]) | |
term_chunk_size | opt_attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Map dense/compact plaintext coordinates and shared ciphertext components.
verify_
method
def verify_() -> None: ...MontgomeryWeightedSumsOp
class View source
MontgomeryWeightedSumsOp(parameters: SSAValue | Operation, ciphertexts: tuple[SSAValue | Operation, ...], plaintexts: tuple[SSAValue | Operation, ...], result_type: Attribute, *, group_count: int, plaintext_layouts: Sequence[str]=(), implicit_plaintexts: tuple[SSAValue | Operation, ...]=(), term_chunk_size: int | None=None)Bases: IRDLOperation
Apply a represented plaintext matrix to shared ciphertext terms.
For
The inputs and output are stored Montgomery residues, and [*batch, limb] after the plaintext matrix and before parameters, in group-major order. plaintext_layouts describes the matrix entries; omission means dense. term_chunk_size optionally bounds generated expressions.
Operands before parameters contain the term_count and group_count describe the supplied matrix.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.montgomery_weighted_sums' | |
terms | var_operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
term_count | attr_def(IntegerAttr) | |
plaintext_layouts | opt_attr_def(ArrayAttr[StringAttr]) | |
term_chunk_size | opt_attr_def(IntegerAttr) | |
group_count | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Map dense/compact plaintext coordinates and shared ciphertext components.
verify_
method
def verify_() -> None: ...MultiplyPlaintextOp
class View source
MultiplyPlaintextOp()Bases: _CiphertextPlaintextOp
Multiply every ciphertext component by a prepared plaintext.
The ciphertext and plaintext are NTT-domain Montgomery bundles on matching prime rows. For each component
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.multiply_plaintext' |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
OPERATION_SPECS
constant View source
OPERATION_SPECS: tuple[OperationSpec, ...] = tuple((registered_operation_spec(operation_type, 'rns', validator=flat_with_attributes(*_RNS_ATTRIBUTES[operation_type]) if operation_type in _RNS_ATTRIBUTES else flat_without_attributes) for operation_type in _RNS_OPERATION_TYPES))PackTwoComponentsOp
class View source
PackTwoComponentsOp(component0: SSAValue | Operation, component1: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Stack two polynomial bundles as
No residue arithmetic is performed. Both inputs retain their active prime rows and representation; a new leading component axis forms a two-component ciphertext-shaped bundle.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.pack_two_components' | |
component0 | operand_def(RnsBundleType) | |
component1 | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
PackThreeComponentsOp
class View source
PackThreeComponentsOp(component0: SSAValue | Operation, component1: SSAValue | Operation, component2: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Stack three polynomial bundles as
No residue arithmetic is performed. Matching prime rows and representation are preserved while a new leading component axis forms a three-component ciphertext-shaped bundle.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.pack_three_components' | |
component0 | operand_def(RnsBundleType) | |
component1 | operand_def(RnsBundleType) | |
component2 | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
SubtractStandardOp
class View source
SubtractStandardOp(lhs: SSAValue | Operation, rhs: SSAValue | Operation, parameters: SSAValue | Operation, result_type: Attribute)Bases: IRDLOperation
Subtract standard-residue polynomial bundles row by row.
For each active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.subtract_standard' | |
lhs | operand_def(RnsBundleType) | |
rhs | operand_def(RnsBundleType) | |
parameters | operand_def() | |
result | result_def(RnsBundleType) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
FHEliumRns
data View source
FHEliumRns = Dialect('fhelium_rns', [*_RNS_OPERATION_TYPES], [RnsBundleType, RnsParametersType])RescaleDropLeadingPrimesOp
class View source
RescaleDropLeadingPrimesOp(value: SSAValue | Operation, parameters: Sequence[SSAValue | Operation], result_type: Attribute, *, drop_count: int=1, rounding: str | StringAttr='nearest', polynomial_domain: Literal['coefficient', 'ntt']='coefficient', attributes: Mapping[str, Attribute] | None=None)Bases: IRDLOperation
Divide-round by the product of a leading prime group and remove its rows.
For the first drop_count primes, let
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.rescale_drop_leading_primes' | |
value | operand_def(RnsBundleType) | |
parameters | var_operand_def() | |
result | result_def(RnsBundleType) | |
drop_count | attr_def(IntegerAttr, default_value=IntegerAttr(1, 64)) | |
rounding | opt_attr_def(StringAttr) | |
input_domain | attr_def(StringAttr, default_value=StringAttr('coefficient')) | |
output_domain | attr_def(StringAttr, default_value=StringAttr('coefficient')) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe the rounded quotient in its represented polynomial domain.
verify_
method
def verify_() -> None: ...Accept only the represented CKKS quotient-rounding rules.
RestrictDepthOp
class View source
RestrictDepthOp(value: SSAValue | Operation, result_type: Attribute, *, target_depth: int | IntegerAttr)Bases: IRDLOperation
Select the suffix of prime rows belonging to a later depth.
If depth
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.restrict_depth' | |
value | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
target_depth | attr_def(IntegerAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
ReinterpretScaleOp
class View source
ReinterpretScaleOp(value: SSAValue | Operation, result_type: Attribute, *, scale: float | FloatAttr)Bases: IRDLOperation
Replace scale metadata without changing an RNS payload.
The result refers to the same residue classes and polynomial representation but records the supplied actual scale
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.reinterpret_scale' | |
value | operand_def(RnsBundleType) | |
result | result_def(RnsBundleType) | |
scale | attr_def(FloatAttr) | |
traits | traits_def(Pure()) |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.
RnsBundleType
class View source
RnsBundleType()Bases: OpenStateType
RNS components with partial arithmetic, layout, and placement state.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.bundle' |
RnsParametersType
class View source
RnsParametersType()Bases: OpenStateType
CKKS-parameter-specific RNS moduli and Montgomery parameters.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.parameters' |
StandardToMontgomeryOp
class View source
StandardToMontgomeryOp()Bases: _ResidueConversionOp
Convert coefficient residues to Montgomery representation.
For every active prime
Attributes
| Name | Type | Default/value |
|---|---|---|
name | 'fhelium_rns.standard_to_montgomery' |
dependencies
method
def dependencies() -> OperationDependencies: ...Describe result reads in this operation's value coordinates.