Skip to content
Snippets Groups Projects
Commit 22361958 authored by Éloïs's avatar Éloïs
Browse files

[RFC17] add regex to quickly recognize if a comment fits this format

parent f69b3823
No related tags found
1 merge request!13Tx comment encrypt
......@@ -23,7 +23,7 @@ Use NaCl function `crypto_sign_ed25519_pk_to_curve25519`.
Let `Pr' = crypto_sign_ed25519_pk_to_curve25519(Pr)`
## Generate symetric encryption key
## Generate symmetric encryption key
We use nacl function [crypto_box_beforenm]. Then use scrypt with a random nonce.
......@@ -46,7 +46,6 @@ With following parameters for scrypt:
|**p** | 1 |
|**dkLen** | message length |
## Encrypt with XOR cipher
Encrypt bit per bit with XOR cipher.
......@@ -112,6 +111,10 @@ The DUBP protocol allows up to 255 characters in the comment field, so it is pos
There are at least 21 bytes of metadata, so the maximum size of a message is **170 bytes**.
## Quickly recognize if a comment fits this format
You can quickly recognize if a comment fits this format with the following regex: `J7YB[0-9a-zA-Z+/]{24,}`
## Encrypt transaction comment (Issuer side)
Let `m` the user message bytes encoded in UTF8.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment