[][src]Module xaynet::message

The messages of the PET protocol.

The Messages adhere to the common Header and Payload scheme. They are parsed via MessageBuffers 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 Message.

Header

A header common to all Messages.

LengthValueBuffer

A helper for encoding and decoding Length-Value (LV) fields.

Message

A message.

MessageBuffer

A wrapper around a buffer that contains a Message.

MessageOpen

An opener to decrypt Messages and to verify their signatures.

MessageSeal

A seal to sign and encrypt Messages.

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 Sum2 message.

SumBuffer

A wrapper around a buffer that contains a Sum message.

Update

A high level representation of an update message.

UpdateBuffer

A wrapper around a buffer that contains an Update message.

Enums

Payload

The payload of a Message.

Tag

A tag that indicates the type of the Message.

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 Header.

MessageOwned

An owned version of a Message.

PayloadOwned

An owned version of a Payload.

Sum2Owned

An owned version of a Sum2.

SumOwned

An owned version of a Sum.

UpdateOwned

An owned version of an Update.