[home]

Thetapack: Type-homogenous, crypto-friendly, auto-padded, compact binary serialization

Introduction

Thetapack is a special-purpose binary serialization format.

Thetapack's main standout feature is built-in support for padded primitives and data structures, allowing for input-independent, constant serialization sizes and operation times.

This is desirable in some cryptographic applications to avoid leaking the length of data structures after encryption.

Type-homogeneous means that data structures' elements are all of the same type. This allows for considerable reduction in serialization size.

If you don't need automatic padding, you probably want MessagePack, Cap'n Proto, Protocol Buffers, or another serialization format instead.

If you do use Thetapack for your sensitive data, using another serialization format for the rest will probably yield smaller results.

Spec

The initial spec is available at git.modalduality.org and GitHub. Comments and suggestions are welcome.