Implement Secure Aggregation
This PR brings Secure Aggregation to DecLearn.
Summary
In summary, this PR brings:
- an API for SecAgg:
-
Encrypter
API to encrypt cleartext values (uint, float, numpy array, declearn Vector, declearn Aggregate) -
Decrypter
API to decrypt aggregated encrypted values -
SecaggSetupClient
andSecaggSetupServer
to configure and set up controllers (via some communications)
-
- an integration of SecAgg into
FederatedServer
andFederatedClient
- server and clients must specify compatible SecAgg configurations
- (for current protocols: clients need to have shared identity keys)
- server can prompt clients to set encryption/decryption controllers afresh, and will do so whenever it is required
- clients use their encrypter (and raise if one is missing) to filter and encrypt the data sent after a training or evaluation round
- Shared utils for SecAgg and its setup.
- Quantization utils (to convert floats to unsigned integers in a given field)
- Shamir Secret Sharing, based on Shamir, 1979
- X3DH key-agreement protocol, from Marlinspike & Perrin, 2016
- Utils to handle Ed25519 identity keys and load (or save) them from (to) file(s).
- 2 SecAgg protocols:
- Masking-based SecAgg, based on Bonawitz et al., 2016
- Sum-homomorphic Joye-Libert encryption, based on Joye & Libert, 2013
Roadmap
-
Implement Joye-Libert SecAgg -
Implement X3DH protocol -
Implement Quantization utils -
Implement Masking-based SecAgg -
Abstract away the code into a common API -
Write unit tests for all SecAgg components -
Write SecAgg-counterparts to some existing messages -
Integrate SecAgg to main orchestration classes -
Write integration tests for FL with SecAgg -
Write unit tests for FederatedClient
andFederatedServer
, that notably cover SecAgg features
Closes #34 (closed)
Edited by ANDREY Paul