Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RFCs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documents
RFCs
Commits
104c49ae
Commit
104c49ae
authored
4 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[RFC17] change base z85 -> base 64
parent
3a35fd82
Branches
Branches containing commit
No related tags found
1 merge request
!13
Tx comment encrypt
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
rfc/0017_transaction_comment_encryption.md
+5
-9
5 additions, 9 deletions
rfc/0017_transaction_comment_encryption.md
with
5 additions
and
9 deletions
rfc/0017_transaction_comment_encryption.md
+
5
−
9
View file @
104c49ae
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment