Table of Contents

Class HomomorphicEncryptionOptions

Namespace
AiDotNet.Models.Options
Assembly
AiDotNet.dll

Configuration options for homomorphic encryption (HE) in federated learning.

public class HomomorphicEncryptionOptions
Inheritance
HomomorphicEncryptionOptions
Inherited Members

Remarks

For Beginners: Homomorphic encryption lets the server combine encrypted client updates without seeing them in plaintext. This can enable stronger privacy guarantees, at the cost of compute and bandwidth.

Properties

BfvFixedPointScale

Gets or sets the fixed-point scaling factor for BFV encoding.

public double BfvFixedPointScale { get; set; }

Property Value

double

Remarks

For Beginners: BFV works with integers, so real numbers are multiplied by this scale and rounded to an integer.

BfvPlainModulusBitSize

Gets or sets BFV plain modulus bit size (batching-friendly prime).

public int BfvPlainModulusBitSize { get; set; }

Property Value

int

CkksCoeffModulusBits

Gets or sets CKKS coefficient modulus bit sizes.

public List<int> CkksCoeffModulusBits { get; set; }

Property Value

List<int>

Remarks

This controls precision and security for CKKS. If empty, a safe default is used.

CkksScale

Gets or sets CKKS scale used for encoding.

public double CkksScale { get; set; }

Property Value

double

Enabled

Gets or sets whether homomorphic encryption is enabled.

public bool Enabled { get; set; }

Property Value

bool

EncryptedRanges

Gets or sets which parameter ranges are encrypted when Mode is Hybrid.

public List<ParameterIndexRange> EncryptedRanges { get; set; }

Property Value

List<ParameterIndexRange>

Mode

Gets or sets the HE mode.

public HomomorphicEncryptionMode Mode { get; set; }

Property Value

HomomorphicEncryptionMode

PolyModulusDegree

Gets or sets the polynomial modulus degree.

public int PolyModulusDegree { get; set; }

Property Value

int

Remarks

Typical values: 4096, 8192, 16384 (larger is more secure but slower).

Scheme

Gets or sets the HE scheme.

public HomomorphicEncryptionScheme Scheme { get; set; }

Property Value

HomomorphicEncryptionScheme