diff options
Diffstat (limited to '44.md')
| -rw-r--r-- | 44.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -89,7 +89,7 @@ NIP-44 version 2 has the following design characteristics: | |||
| 89 | - Padding algorithm is related to powers-of-two, with min padded msg size of 32 bytes | 89 | - Padding algorithm is related to powers-of-two, with min padded msg size of 32 bytes |
| 90 | - Plaintext length is encoded in big-endian: | 90 | - Plaintext length is encoded in big-endian: |
| 91 | - if smaller than 65536, as a u16 in the first 2 bytes of the padded blob; | 91 | - if smaller than 65536, as a u16 in the first 2 bytes of the padded blob; |
| 92 | - if greater than 65536, the first the first 6 bytes of the padded blob, the first 2 being zero and the other 4 being the actual encoded length as u32 | 92 | - if greater than 65536, the first 6 bytes of the padded blob, the first 2 being zero and the other 4 being the actual encoded length as u32 |
| 93 | 5. Encrypt padded content | 93 | 5. Encrypt padded content |
| 94 | - Use ChaCha20, with key and nonce from step 3 | 94 | - Use ChaCha20, with key and nonce from step 3 |
| 95 | 6. Calculate MAC (message authentication code) | 95 | 6. Calculate MAC (message authentication code) |