-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Secure Aggregation functionalities #2159
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* update validator.py & serde.py for SA add serde functions fix type checking errors fix check errors fix check err in serde.py fix validation for TaskRes * init * init SA * fix format * fix mypy check errors * add SA demo * add unit tests for SA serde * fix pylint errors * ignore plint no-member error for numpy * rename to secaggplus_utils.py * fix bug in quantization, update secagg+ handler * update secagg example * update files from main * update secaggplus * fix a bug is type hint
danieljanes
requested changes
Jul 30, 2023
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
panh99
changed the title
Add Secure Aggregation functionalities and Secaggplus demo
Add Secure Aggregation functionalities
Aug 2, 2023
danieljanes
requested changes
Aug 14, 2023
src/py/flwr/client/secure_aggregation/secaggplus_handler_test.py
Outdated
Show resolved
Hide resolved
src/py/flwr/client/secure_aggregation/secaggplus_handler_test.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
danieljanes
approved these changes
Aug 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! 🎉
alessiomora
pushed a commit
to alessiomora/flower
that referenced
this pull request
Aug 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Description
The current Flower framework does not have intrinsic support for Secure Aggregation (SA).
Related issues/PRs
This PR is copied from #2132 , to change the source branch to
secaggplus
in adap/flower other than the forked repo.This PR is based on the following PRs:
Add SecureAggregation field to Task message #1893
Adopt TaskIns/TaskRes-based communications on the client side #2007
Update serde.py for Secure Aggregation #2008
Update validator.py for SA #2151
Add PyCryptoDome and Cryptograhpy dependencies #2154
Proposal
Explanation
> Structure
Add the following python files and modules for SA functionalities.
> Message Handler for the SecAgg+ protocol
Add abstract class
SecureAggregationHandler
inclient/secure_aggregation/handler.py
. To enable SA, a client class can inherit a subclass ofSecureAggregationHandler
.Add subclass
SecAggPlusHandler
inclient/secure_aggregation/secaggplus_handler.py
for the SecAgg+ protocol.> Utils
Modify
message_handler.py
to route aTask
message to SA message handler if itssa
field is set.Add basic quantization utils in
common/secure_aggregation/quantization.py
Add weights operations in
common/secure_aggregation/weights_arithmetic.py
Add wrapper functions for Shamir's secret sharing APIs from
PyCryptoDome
incommon/secure_aggregation/crypto/shamir.py
Add wrapper functions for ECDH key agreement and symmetric encryption APIs from
Cryptography
incommon/secure_aggregation/crypto/symmetric_encryption.py
> Constants
Constants for the secagg/secagg+ protocols are all stored in
common/secure_aggregation/secaggplus_constants.py
.Blocker
ThePyCryptoDome
package and theCryptography
package are not in the dependencies.No blockers
Checklist
#contributions
)Any other comments?