AesCtrSecureAggregationPrg

Models & Types · AiDotNet.FederatedLearning.Cryptography

AES-256 in counter mode as the secure-aggregation pseudorandom generator.

Implements: ISecureAggregationPrg

For Beginners

This turns a 32-byte secret into as many random-looking numbers as the model has parameters. Anyone with the same 32 bytes gets the same numbers; anyone without them sees noise.

How It Works

The 32-byte seed is the AES-256 key and the counter starts at zero. Each ring element takes the next 8 keystream bytes as a little-endian 64-bit integer and keeps its low b bits. Because R = 2^b is a power of two, keeping the low bits of a uniform 64-bit value is exactly uniform in Z_R: no rejection sampling is needed. AES in counter mode is a standard PRG (NIST SP 800-90A CTR_DRBG is built on the same construction), and it is what Bonawitz et al. (2017) name for the PRG in their prototype (section 7.1, alongside ECDH over NIST P-256).

Constructors

Constructor Summary
AesCtrSecureAggregationPrg()

Methods

Method Summary
void Expand(byte[] seed, int bitWidth, ulong[] destination)

Fields

Field Summary
int SeedLength The seed length this PRG requires: an AES-256 key.