Owner: @Marcin Pawlowski

Reviewers: 🟢@Youngjoon Lee 🟢@Alexander Mozeika 🟢@Álvaro Castro-Castilla

Introduction

This document defines an implementation-friendly specification of the Message Formatting, which is introduced in the Formatting section.

Overview

The message contains a header and a payload. The header informs the protocol about the version of the protocol and the payload type. The message contains a drop or a non-drop payload. The length of a payload is fixed to prevent adversaries from distinguishing types of messages based on their length.

Construction

Message

The Message is a structure that contains a header , public_header, private_header and a payload.

class Message:
  	header: Header,
  	public_header: PublicHeader,
	  private_header: Private_Header,
	  payload: bytes

Header

The Header is a structure that contains a version field.

class Header:
    version: byte

The value of the version field is fixed version=0x01.

Public Header

The public_header must be generated as the outcome of the Message Encapsulation Mechanism.

The public_header is defined as follows:

class PublicHeader:
  	public_key: PublicKey,
	  proof_of_quota: ProofOfQuota,
  	signature: Signature

Where: