From unknown Tue Jun 24 06:52:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14232 <14232@debbugs.gnu.org> To: bug#14232 <14232@debbugs.gnu.org> Subject: Status: 24.3; PGP signatures in base64 encoded mail are incompatible with some MUAs. Reply-To: bug#14232 <14232@debbugs.gnu.org> Date: Tue, 24 Jun 2025 13:52:21 +0000 retitle 14232 24.3; PGP signatures in base64 encoded mail are incompatible = with some MUAs. reassign 14232 gnus,emacs submitter 14232 Mikhail Kryshen severity 14232 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 18 23:59:25 2013 Received: (at submit) by debbugs.gnu.org; 19 Apr 2013 03:59:25 +0000 Received: from localhost ([127.0.0.1]:59530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UT2Ts-0000rQ-GJ for submit@debbugs.gnu.org; Thu, 18 Apr 2013 23:59:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57657) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UT1qu-0007oQ-GF for submit@debbugs.gnu.org; Thu, 18 Apr 2013 23:19:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT1mS-0006ra-0V for submit@debbugs.gnu.org; Thu, 18 Apr 2013 23:14:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:35533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1mR-0006rT-Tv for submit@debbugs.gnu.org; Thu, 18 Apr 2013 23:14:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1mO-0001IN-Mc for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2013 23:14:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT1mL-0006qE-Sz for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2013 23:14:28 -0400 Received: from mail.cs.karelia.ru ([194.85.173.9]:58197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT1mL-0006oV-Fr for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2013 23:14:25 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.karelia.ru (Postfix) with ESMTP id 85DD8A360E; Fri, 19 Apr 2013 07:14:12 +0400 (MSK) X-Virus-Scanned: amavisd-new at cs.karelia.ru Received: from mail.cs.karelia.ru ([127.0.0.1]) by localhost (mail.cs.karelia.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SAc7NVCssYuE; Fri, 19 Apr 2013 07:14:10 +0400 (MSK) Received: from localhost (epsilon.cs.prv [192.168.112.5]) by mail.cs.karelia.ru (Postfix) with ESMTP id 1E8C2A3608; Fri, 19 Apr 2013 07:14:10 +0400 (MSK) From: Mikhail Kryshen To: bug-gnu-emacs@gnu.org Subject: 24.3; PGP signatures in base64 encoded mail are incompatible with some MUAs. Date: Fri, 19 Apr 2013 07:14:09 +0400 Message-ID: <874nf3dxfi.fsf@kryshen.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 18 Apr 2013 23:59:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I use compose-mail and mml-secure-message-sign to send signed email. For messages that contain cyrillic characters Emacs by default uses utf-8 charset and base64 encoding. For such messages some MUAs (Mutt, Notmuch) report good signature and some (Sylpheed, Evolution) show bad signature for the same message. When quoted-printable encoding is used all MUAs show good signature (workaround: add (utf-8 . quoted-printable) to mm-body-charset-encoding-alist). When base64 encoding is used, the encoded data is separated from part boundary delimiter by a single (which is part of the delimiter) missing an additional to terminate the last line of the encoded data. I verified by manually editing raw email files and appropriately updating signatures that mentioned MUAs handle messages with a single between signed data and delimiter differently. This seems to be the cause of the problem. From=20RFC 2015 "MIME Security with PGP", page 4: When the PGP digital signature is generated: [skip] (2) An appropriate Content-Transfer-Encoding is then applied. Each line of the encoded data MUST end with the canonical sequence. From=20RFC 3156 "MIME Security with OpenPGP", page 5: When the OpenPGP digital signature is generated: [skip] (2) An appropriate Content-Transfer-Encoding is then applied; see section 3. In particular, line endings in the encoded data MUST use the canonical sequence where appropriate (note that the canonical line ending may or may not be present on the last line of encoded data and MUST NOT be included in the signature if absent). [skip] Note: The accepted OpenPGP convention is for signed data to end with a sequence. Note that the sequence immediately preceding a MIME boundary delimiter line is considered to be part of the delimiter in [3], 5.1. Thus, it is not part of the signed data preceding the delimiter line. An implementation which elects to adhere to the OpenPGP convention has to make sure it inserts a pair on the last line of the data to be signed and transmitted (signed message and transmitted message MUST be identical). So it seems to be correct and better for compatibility with other email clients to terminate the last line of base64 encoded data with . =2D- Mikhail In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4) of 2013-04-19 on home Windowing system distributor `Fedora Project', version 11.0.11303000 Configured using: `configure '--host=3Dx86_64-redhat-linux-gnu' '--build=3Dx86_64-redhat-linux-gnu' '--program-prefix=3D' '--disable-dependency-tracking' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=3Dgtk3' '--with-gpm=3Dno' 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_alias=3Dx86_64-redhat-linux-gnu' 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g'' Important settings: value of $LANG: ru_RU.utf8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEARECAAYFAlFwtoEACgkQlfZPsJRTN+OvBQCglipOt00ZQBGlneOBXGLAX/06 /1sAmQEgb27FrZl7nWkQaZZSFWbRDbKS =zr5/ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 01:34:42 2013 Received: (at 14232) by debbugs.gnu.org; 19 Apr 2013 05:34:42 +0000 Received: from localhost ([127.0.0.1]:59606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UT3y5-0005A2-41 for submit@debbugs.gnu.org; Fri, 19 Apr 2013 01:34:42 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:36248) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UT3y1-00059r-MZ; Fri, 19 Apr 2013 01:34:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+LAd/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kE4gRwS2NDxCDawOkeoFegxOBUw X-IPAS-Result: Av4EABK/CFHO+LAd/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kE4gRwS2NDxCDawOkeoFegxOBUw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="7771719" Received: from 206-248-176-29.dsl.teksavvy.com (HELO ceviche.home) ([206.248.176.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Apr 2013 01:30:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 91660660E8; Fri, 19 Apr 2013 01:30:04 -0400 (EDT) From: Stefan Monnier To: Mikhail Kryshen Subject: Re: bug#14232: 24.3; PGP signatures in base64 encoded mail are incompatible with some MUAs. Message-ID: References: <874nf3dxfi.fsf@kryshen.net> X-debbugs-cc: bugs@gnus.org Date: Fri, 19 Apr 2013 01:30:04 -0400 In-Reply-To: <874nf3dxfi.fsf@kryshen.net> (Mikhail Kryshen's message of "Fri, 19 Apr 2013 07:14:09 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14232 Cc: 14232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) reassign 14232 gnus,emacs thanks >>>>> "Mikhail" == Mikhail Kryshen writes: > I use compose-mail and mml-secure-message-sign to send signed email. > For messages that contain cyrillic characters Emacs by default uses > utf-8 charset and base64 encoding. For such messages some MUAs (Mutt, > Notmuch) report good signature and some (Sylpheed, Evolution) show bad > signature for the same message. [...] > So it seems to be correct and better for compatibility with other email > clients to terminate the last line of base64 encoded data with . I forwarded this to the Gnus guys who know more about these issues. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 03:23:16 2013 Received: (at 14232-done) by debbugs.gnu.org; 22 May 2013 07:23:16 +0000 Received: from localhost ([127.0.0.1]:55692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf3OA-0001GL-DR for submit@debbugs.gnu.org; Wed, 22 May 2013 03:23:15 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:38349 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf3O1-0001Fq-NK for 14232-done@debbugs.gnu.org; Wed, 22 May 2013 03:23:06 -0400 Received: from [2001:e41:db5e:fb14::1] (port=47717 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Uf3NJ-00040f-Ko; Wed, 22 May 2013 03:22:17 -0400 Message-ID: From: Daiki Ueno To: Mikhail Kryshen Subject: Re: bug#14232: 24.3; PGP signatures in base64 encoded mail are incompatible with some MUAs. References: <874nf3dxfi.fsf@kryshen.net> Date: Wed, 22 May 2013 16:22:14 +0900 In-Reply-To: <874nf3dxfi.fsf@kryshen.net> (Mikhail Kryshen's message of "Fri, 19 Apr 2013 07:14:09 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 14232-done Cc: 14232-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -8.0 (--------) Mikhail Kryshen writes: > So it seems to be correct and better for compatibility with other email > clients to terminate the last line of base64 encoded data with . Thanks for the report and helpful information. I've just pushed a fix to the Gnus git master: http://git.gnus.org/cgit/gnus.git/commit/?id=28b637bda13bd93678d2ea85f8f7fcbe7a49d862 Regards, -- Daiki Ueno From unknown Tue Jun 24 06:52:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Jun 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator