SP18 Item 02: add secagg negotiation framework for secure aggregation
Researcher contacts a set of nodes to trigger setup a secagg context (shared biprime, secret parts of server key) for secure aggregation. This task does not include real setup of secagg context (null payload, always returns true).
-
extend Experiment()
interface- setter
set_use_secagg(self, use_secagg: bool = False) -> bool
. When set to True, negotiate a new crypto context with nodes from this experiment (if no context) usingSecaggContext
or reuse existing context + use secagg for next rounds. When False, don't use secagg for next rounds. - getter
use_secagg(self) -> bool
- setter
-
extend Experiment()
breakpoints to support secagg -
create SecaggContext
class: handle one element from secagg context: biprime or server key-
__init__(self, element: Enum, parties: List[str])
- generate random unique
crypto_id
to identify this secagg context (used by nodes) -
element
is an enum: biprime or server key - example: parties = [ 'researcher_id', 'node1_id', 'node2_id'] means 3 parties in this context, with
researcher_id
being player 0,node1_id
being player 1, etc.-
parties[0]
must be theresearcher_id
of "this" researcher - there must be at least 3 parties (res + 2 nodes)
-
- generate random unique
-
setup(self) -> bool
: requests parties (nodes) to negotiate a secagg context element, store locally, then return True/False on success/failure + launch local party for negotiation. For now, parties just return True. Implies modifyingJob()
andRequest()
-
context(self) -> Any
returns context element for the researcher (or None if no context)- [TODO] return value
Any
? return biprime or key share for this party, can be better typed
- [TODO] return value
-
delete(self) -> bool
: requests parties (nodes) to remove this secagg crypto context (from database) + remove local crypto context (researcher). For now, parties just return True.- returns status: response for each party ``
-
-
add SecaggRequest
andSecaggReply
messages for negotiation of a secagg context element -
on nodes when receiving SecaggRequest
, launch a synchronous task (similar toRound()
) to negotiate secagg context element. Currently no payload, only returns True withSecaggReply
message. -
on researcher when sending SecaggRequest
launch a task for local negotiation party -
add SecaggDeleteRequest
andSecaggDeleteReply
messages for deleting a secagg context element -
on nodes when receiving SecaggDeleteRequest
message, reply True withSecaggDeleteReply
message (no payload currently) -
unit tests -
documentation - notebook (with current "functionality")
- no user documentation on gitlabpages, as there is no "real" user functionality yet