SealCkksContext#

class SealCkksContext#

An implementation of HeContext using the SEAL CKKS backend.

get_accurate_scale(self: pyhelayers.SealCkksContext, chain_index: int) float#

Returns the accurate scale to be used for a given chain index. Only supported when accurate scaling mode is enabled. Cannot be called before the context is initialized.

Parameters:

chain_index – The chain index to get the scale of.

get_use_accurate_scaling(self: pyhelayers.SealCkksContext) bool#

Returns whether accurate scaling mode is enabled or not.

init(self: pyhelayers.SealCkksContext, req: pyhelayers.HeConfigRequirement) None#

Initializes this SealCkksContext according the given requirement.

Parameters:

req – an HeConfigRequirement object, indicating the required configuration parameters (e.g. securityLevel, numSlots).

Raises:

RuntimeError – if it is not possible to fulfill the given requirement.

set_use_accurate_scaling(self: pyhelayers.SealCkksContext, use_accurate_scaling: bool) None#

Sets whether to enable the accurate scaling mode or not (default: enabled). Cannot be called after the context is initialized.

Parameters:

use_accurate_scaling – Whether to enable the accurate scaling mode or not.