Z85 Encoding
Z85 (ZeroMQ Base85) is the 85-character Base85 variant defined by ZeroMQ that encodes 4 bytes as 5 characters, used for the textual form of CurveZMQ keys.
Purpose
It expresses fixed-length binary keys and certificates compactly in printable characters, convenient for configuration files and command lines.
Mechanism
Each 4-byte (32-bit) group is treated as a big integer, repeatedly divided by 85 to yield five character indices, which are mapped onto the dedicated Z85 alphabet. Only inputs whose length is a multiple of 4 are accepted.
Use cases
- ZeroMQ CURVE key representation
- Binary tokens in configuration files
- Passing keys on the command line