fhelium.backend.ckks.crypto._decryption
Registered CKKS decryption and centered Q-basis reconstruction.
NativeDecryptImplementation
class View source
python
NativeDecryptImplementation(name: str = 'native-ckks-decrypt', supports_in_place: bool = False, operation_types: tuple[type[Operation], ...] = (ckks.DecryptOp,))1
Execute decryption with Tensor key, transform, and reconstruction operands.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'native-ckks-decrypt' |
supports_in_place | bool | False |
operation_types | tuple[type[Operation], ...] | (ckks.DecryptOp,) |
resource_requirements
method
python
def resource_requirements(invocation: OperationInvocation) -> tuple[ResourceRequirement, ...]: ...1
execute
method
python
def execute(invocation: OperationInvocation, inputs: tuple[torch.Tensor, ...], resources: tuple[BoundResource, ...], *, in_place: bool) -> tuple[torch.Tensor, ...]: ...1
decrypt_tensor
function View source
python
def decrypt_tensor(ciphertext: torch.Tensor, secret_key: torch.Tensor, tensors: dict[str, torch.Tensor], attributes: dict[str, object]) -> torch.Tensor: ...1
Decrypt Tensor payloads and reconstruct their centered Q coefficients.
reconstruct_q_coefficients_tensor
function View source
python
def reconstruct_q_coefficients_tensor(plaintext_rns: torch.Tensor, source_params: torch.Tensor, normalizers: torch.Tensor, propagation: torch.Tensor, half_digits: torch.Tensor) -> torch.Tensor: ...1
Reconstruct the centered class modulo the complete supplied Q product.