[−][src]Module xaynet::message
The messages of the PET protocol.
The Message
s adhere to the common Header
and Payload
scheme. They are parsed via
MessageBuffer
s which provide a checked access to the raw message, whereas the serialization
and deserialization is implemented via the ToBytes
and FromBytes
traits.
All messages are signed and encrypted in an authenticated encryption scheme via MessageSeal
and MessageOpen
, which employ the wrappers of the crypto module.
The sum message
The Sum
message is an abstraction for the values which a sum participant communicates to
XayNet during the sum phase of the PET protocol. It contains the following values:
- The sum signature proves the eligibility of the participant for the sum task.
- The ephemeral public key is used by update participants to encrypt mask seeds in the update phase for the process of mask aggregation in the sum2 phase.
The update message
The Update
message is an abstraction for the values which an update participant communicates
to XayNet during the update phase of the PET protocol. It contains the following values:
- The sum signature proves the ineligibility of the participant for the sum task.
- The update signature proves the eligibility of the participant for the update task.
- The masked model is the encrypted local update to the global model, which is trained on the local data of the update participant.
- The local seed dictionary stores the encrypted mask seed, which generates the local mask for the local model, which is encrypted by the ephemeral public keys of the sum participants.
The sum2 message
The Sum2
message is an abstraction for the values which a sum participant communicates to
XayNet during the sum2 phase of the PET protocol. It contains the following values:
- The sum signature proves the eligibility of the participant for the sum task.
- The global mask is used by XayNet to unmask the aggregated global model.
Structs
Flags | A bitmask that defines flags for a |
Header | A header common to all |
LengthValueBuffer | A helper for encoding and decoding Length-Value (LV) fields. |
Message | A message. |
MessageBuffer | A wrapper around a buffer that contains a |
MessageOpen | An opener to decrypt |
MessageSeal | A seal to sign and encrypt |
Sum | A high level representation of a sum message. |
Sum2 | A high level representation of a sum2 message. |
Sum2Buffer | A wrapper around a buffer that contains a |
SumBuffer | A wrapper around a buffer that contains a |
Update | A high level representation of an update message. |
UpdateBuffer | A wrapper around a buffer that contains an |
Enums
Payload | The payload of a |
Tag | A tag that indicates the type of the |
Traits
FromBytes | An interface for deserializable message types. |
ToBytes | An interface for serializable message types. |
Type Definitions
DecodeError | An error that signals a failure when trying to decrypt and parse a message. |
HeaderOwned | An owned version of a |
MessageOwned | An owned version of a |
PayloadOwned | An owned version of a |
Sum2Owned | An owned version of a |
SumOwned | An owned version of a |
UpdateOwned | An owned version of an |