Commit 104c49ae authored by Éloïs's avatar Éloïs
Browse files

[RFC17] change base z85 -> base 64

parent 3a35fd82
......@@ -32,12 +32,11 @@ Encrypt bit per bit with XOR cipher.
## Serialize encrypted message with meta data
| Prefix | Message type | Message length | Nonce | Encrypted message | Padding |
|:-------:|:------------:|:--------------:|:--------:|:-----------------:|:--------------------------------:|
| 2 bytes | 1 byte | 1 byte | 12 bytes | Any bytes | `4 - (Message length % 4)` bytes |
| Prefix | Message type | Message length | Nonce | Encrypted message |
|:-------:|:------------:|:--------------:|:--------:|:-----------------:|
| 2 bytes | 1 byte | 1 byte | 12 bytes | Any bytes |
The maximum length of a message is 186 bytes.
The padding is used so that the quantity of bytes to be serialized is always a multiple of 4. This is necessary for the encoding in base z85.
The maximum length of a message is 173 bytes.
### Prefix
......@@ -54,10 +53,7 @@ A constant value that indicates the type of format. For the present format defin
## Encodinq in transaction document
Encrypted message in encoded in [base z85] in transaction comment directly.
Encrypted message in encoded in base 64 in transaction comment directly (DUBP protocol already accept all base 64 characters).
DUBP protocol accept all [base z85] characters except `$`. We replace `$` by `_`.
[base z85]: https://rfc.zeromq.org/spec/32/
[crypto_box_beforenm]: https://nacl.cr.yp.to/box.html
[XOR cipher]: https://en.wikipedia.org/wiki/XOR_cipher
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment