Interface IHomomorphicEncryptionProvider<T>
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Provides homomorphic encryption operations for federated learning aggregation.
public interface IHomomorphicEncryptionProvider<T>
Type Parameters
TNumeric 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
clientParametersDictionary<int, Vector<T>>Per-client parameter vectors.
clientWeightsDictionary<int, double>Per-client weights.
globalBaselineVector<T>Baseline vector used for indices not included in
encryptedIndices.encryptedIndicesIReadOnlyList<int>Indices to aggregate via HE.
optionsHomomorphicEncryptionOptionsHE options.
Returns
- Vector<T>
A vector containing the weighted average for encrypted indices (baseline elsewhere).
GetProviderName()
Gets the provider name.
string GetProviderName()