ArithmeticSecretSharing<T>

Models & Types · AiDotNet.FederatedLearning.MPC

Implements additive secret sharing over an arithmetic field for efficient linear operations.

Inheritance: FederatedLearningComponentBase<T> → ArithmeticSecretSharing<T>

Implements: ISecretSharingScheme<T>, ISecureComputationProtocol<T>

For Beginners

Additive secret sharing splits a number into random “shares” that add up to the original. For example, to share the number 42 among 3 parties:

How It Works

Operations on shares:

Reference: This implements the standard SPDZ-style additive secret sharing protocol used in production MPC systems.

Constructors

Constructor Summary
ArithmeticSecretSharing(int numberOfParties, int preGenerateTriples, int? seed) Initializes a new instance of ArithmeticSecretSharing.

Properties

Property Summary
int ReconstructionThreshold { get; }
string SchemeName { get; }

Methods

Method Summary
Tensor<T> Combine(Tensor<T>[] shares)
Tensor<T> Reconstruct(Tensor<T>[] shares)
Tensor<T>[] ScalarMultiply(Tensor<T>[] shares, T scalar)
Tensor<T>[] SecureAdd(Tensor<T>[] sharesA, Tensor<T>[] sharesB)
Tensor<T>[] SecureCompare(Tensor<T>[] sharesA, Tensor<T>[] sharesB)
Tensor<T>[] SecureMultiply(Tensor<T>[] sharesA, Tensor<T>[] sharesB)
Tensor<T>[] Share(Tensor<T> value, int numberOfParties)
Tensor<T>[] Split(Tensor<T> secret, int numberOfParties)
void PreGenerateBeaverTriples(int[] shape, int count) Pre-generates Beaver triples for secure multiplication.