fhelium.backend.ckks.crypto._encryption
Public-key CKKS encryption over supplied keys and arithmetic tables.
NativeEncryptImplementation
class View source
python
NativeEncryptImplementation(name: str = 'native-ckks-encrypt', supports_in_place: bool = False, operation_types: tuple[type[Operation], ...] = (ckks.EncryptOp,))1
Execute encryption with data operands and a bound random stream.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'native-ckks-encrypt' |
supports_in_place | bool | False |
operation_types | tuple[type[Operation], ...] | (ckks.EncryptOp,) |
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
encrypt_tensor
function View source
python
def encrypt_tensor(coefficients: torch.Tensor, public_key: torch.Tensor, tensors: dict[str, torch.Tensor], attributes: dict[str, object], rng: Csprng) -> torch.Tensor: ...1
Sample encryption randomness and evaluate the two ciphertext components.