deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
658 stars 84 forks source link

Do not base64-encode encrypted attachments #1754

Closed link2xt closed 4 years ago

link2xt commented 4 years ago

Currently attachment is base64-encoded, encrypted, and resulting binary is base64-encoded again, resulting in larger message size for encrypted attachments. While binary MIME is not widely supported and can't be used safely, when the message is encrypted, we are free to encode attachments as-is without base64-encoding them.

link2xt commented 4 years ago

Doesn't work with Thunderbird. NUL bytes are silently removed when saving the attachment. Seems the best we can use is yEnc, which is also supported by Thunderbird, but it has its own problems and no RFC specification.

link2xt commented 4 years ago

There is a crate for yEnc support and Thunderbird already supports this encoding.