mailchain / mailchain-legacy

Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address.
https://mailchain.xyz
Apache License 2.0
143 stars 51 forks source link

cipher/nacl does not include the encryption method in the encrypted data. #366

Closed robdefeo closed 4 years ago

robdefeo commented 4 years ago

Is your feature request related to a problem? Please describe. The encrypted data must indicated what encrypted method was used. Mailchain allows multiple encryption methods, the first byte of encrypted data is used to select the correct encryption protocol. This byte is not set in cypto/cipher/nacl.

Describe the solution you'd like

Additional context

cipher/aes256cbc has this an implementation of this

u5surf commented 4 years ago

@robdefeo Also,I will catch this issue

robdefeo commented 4 years ago

Thanks @u5surf :) let me know if you need anything