Owner: @Marcin Pawlowski
Reviewers: 🟢@Youngjoon Lee 🟢@Alexander Mozeika 🟢@Álvaro Castro-Castilla
This document defines an implementation-friendly specification of the Message Formatting, which is introduced in the Formatting section.
In this document we are reusing notation from Notation.
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.
The Message
is a structure that contains a public_header
, private_header
and a payload
.
class Message:
public_header: PublicHeader,
private_header: Private_Header,
payload: bytes
The public_header
must be generated as the outcome of the Message Encapsulation Mechanism.
The public_header
is defined as follows:
class PublicHeader:
version: byte,
public_key: PublicKey,
proof_of_quota: ProofOfQuota,
signature: Signature
Where:
version=0x01
is version of the protocol.public_key
is $K^{n}_i$, a public key from the set $\mathbf K^n_h$ as defined in the Message Encapsulation spec.proof_of_quota
is $\pi^{K^{n}i}{Q}$, a corresponding proof of quota for the key $K^{n}_i$ from the $\mathbf K^n_h$ it also contains the key nullifier.signature
is $\sigma_{K^{n}_{i}}(\mathbf {h|P}i)$, a signature of the concatenation of the $i$-th encapsulation of the payload $\mathbf P$ and the private header $\mathbf h$, that can be verified by the public key $K^{n}{i}$.