[][src]Module xaynet_core::message

The messages of the PET protocol.

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

Chunk

A message chunk.

ChunkBuffer
Flags

A bitmask that defines flags for a Message.

LengthValueBuffer

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

Message

A header common to all messages.

MessageBuffer

A wrapper around a buffer that contains a Message.

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.

Constants

MESSAGE_HEADER_LENGTH

Length in bytes of a message header

MIN_SUM_COUNT

The minimum number of accepted sum/sum2 messages for the PET protocol to function correctly.

MIN_UPDATE_COUNT

The minimum number of accepted update messages for the PET protocol to function correctly.

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.