rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
192 stars 54 forks source link

RNP doesn't support mimemode #2198

Closed aeris closed 4 months ago

aeris commented 4 months ago

Hi,

Since few days and upgrade to KDE 6, Kmail/KGPG seem encrypting email with mimemode (m 6D) instead of binarymode (d 62). https://wiki.gnupg.org/rfc4880bis#Literal_data_packet Mimemode is on GPG since 2016 : https://lists.gnupg.org/pipermail/gnupg-commits/2016-July/012351.html

This lead to Thunderbird unable to decrypt such email encrypted with Kmail. https://bugzilla.mozilla.org/show_bug.cgi?id=1884506 https://bugzilla.mozilla.org/show_bug.cgi?id=1884508

https://github.com/rnpgp/rnp/blob/main/src/librepgp/stream-parse.cpp#L1969-L1979

ni4 commented 4 months ago

Hi @aeris, Thanks for reporting this issue. We'll include the fix to the v0.17.1 release which is about to happen.

kaie commented 4 months ago

For Thunderbird, I would prefer to not support this mode at this time, because it's specific to draft-koch. It would be nice if any functionality that is specific to draft-koch or LibrePGP could be wrapped either in a build time flag (as RNP already does with ENABLE_CRYPTO_REFRESH), or by a runtime flag, both would be fine.

kaie commented 4 months ago

I would like to take a step back.

While my general preference remains, I've talked with others, and learned that most implementations accept the 'm' encoding (or maybe just accept any unknown value).

This was hinted by the following interop table: https://tests.sequoia-pgp.org/#Signed__and_encrypted__messages (Thanks a lot to @hko-s for pointing me to that table.)

Apparently most implementations don't have a problem with that format. Given that tolerating the 'm' doesn't specifically require support for LibrePGP, it seems acceptable to tolerate it.