Table of Contents

Interface IHomomorphicEncryptionProvider<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Provides homomorphic encryption operations for federated learning aggregation.

public interface IHomomorphicEncryptionProvider<T>

Type Parameters

T

Numeric type.

Remarks

For Beginners: The provider hides cryptographic details (keys, ciphertexts, parameters) behind a simple interface.

Methods

AggregateEncryptedWeightedAverage(Dictionary<int, Vector<T>>, Dictionary<int, double>, Vector<T>, IReadOnlyList<int>, HomomorphicEncryptionOptions)

Aggregates selected parameter indices using homomorphic encryption to produce a weighted average.

Vector<T> AggregateEncryptedWeightedAverage(Dictionary<int, Vector<T>> clientParameters, Dictionary<int, double> clientWeights, Vector<T> globalBaseline, IReadOnlyList<int> encryptedIndices, HomomorphicEncryptionOptions options)

Parameters

clientParameters Dictionary<int, Vector<T>>

Per-client parameter vectors.

clientWeights Dictionary<int, double>

Per-client weights.

globalBaseline Vector<T>

Baseline vector used for indices not included in encryptedIndices.

encryptedIndices IReadOnlyList<int>

Indices to aggregate via HE.

options HomomorphicEncryptionOptions

HE options.

Returns

Vector<T>

A vector containing the weighted average for encrypted indices (baseline elsewhere).

GetProviderName()

Gets the provider name.

string GetProviderName()

Returns

string