-
Notifications
You must be signed in to change notification settings - Fork 0
Message Format
The ORDO message format provides a minimalistic header which can be prepended to binary-encoded ciphertexts. This header identifies the encryption algorithm(s) used.
Example:
---ORDO MSG v0---
Cipher: ordo.symmetric-encryption:///xsalsa20poly1305
Content-Length: 1048576
Content-Transfer-Encoding: binary
Y<B6>He^N^^^ú<E9>G^M8<82>K<F7>*<E4>UVi<F6><9C>^B<99>^Q<81>w<94>]^];}2^O(<F9>5<BB><DC>F^?<D9>P.<EB><C0>"<C9><F1><80>'C<BC>/<DB>[<E9><F7>(<E0><83><CD>FC>_<E5>T^@&<D6>/<80>^Gsw<FF>j<95><BC>Ƌ<80><8D>.^B<C8>
<C6>em<A2><C1>U<D2><E3><91>(|^?[nڕ^DU(K<F7><93>^8E\<F6><BC><CA><C0>^Z^?^C^Tg<9E>sI<89><FF><A3>^]~a^]^OIkb<9B><A9>(<83>=<8F>^H<80>H<88><B5>$><F2><A8>^D<9B>>/<AD>^G<F6><B2><A2>7C5>+^?<D9>@<D7>U<EB><AC>D<AC><CC>a<F3><DC>p^Gn ^Tګq<CD>^]#<BC>^D<CE>dR$_<91><DC>Nb^Vy<C9><E9>D&I[j^Y<A5><80><EE><A3>^_<FD><E5>Aָ<BD>
The ORDO message header is encoded as US-ASCII. UTF-8 is not supported. All line endings are CRLF
(i.e. 0x0D 0x0A
).
All ORDO messages begin with the ---ORDO MSG v0---
and are followed by one or more Header: value
pairs. The Cipher
header MUST be present containing the cipher URI from the ORDO URI Registry. The header Content-Length
MUST also be included.
The header is terminated by a sequence of two CRLF
s (i.e. CRLFCRLF
) as in HTTP.
Unless otherwise specified by a Content-Transfer-Encoding
header, the remainder of the document is interpreted as binary.
The following header fields are recognized:
- Cipher: (mandatory) encryption cipher used to produce the message
- Content-Length: (mandatory) length of the body of the message in bytes
-
Content-Transfer-Encoding: (optional, default
binary
) inspired by RFC 2045 (MIME). May be one ofbinary
orbase64
.