From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KI6WJiThYF9EGAAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 15:43:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KMfvICThYF9XEAAA1q6Kng (envelope-from ) for ; Tue, 15 Sep 2020 15:43:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B2F79403EC for ; Tue, 15 Sep 2020 15:43:32 +0000 (UTC) Received: from localhost ([::1]:60252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kID7B-0002dh-EA for larch@yhetil.org; Tue, 15 Sep 2020 11:43:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kID6l-0002Cg-Sw for bug-guix@gnu.org; Tue, 15 Sep 2020 11:43:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kID6j-00058M-T2 for bug-guix@gnu.org; Tue, 15 Sep 2020 11:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kID6j-0003qK-Rk for bug-guix@gnu.org; Tue, 15 Sep 2020 11:43:01 -0400 Subject: bug#43421: Encoding issue in exported archive signatures Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 15:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 43421 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 43421-done@debbugs.gnu.org Mail-Followup-To: 43421@debbugs.gnu.org, ludo@gnu.org, ludovic.courtes@inria.fr Received: via spool by 43421-done@debbugs.gnu.org id=D43421.160018457814759 (code D ref 43421); Tue, 15 Sep 2020 15:43:01 +0000 Received: (at 43421-done) by debbugs.gnu.org; 15 Sep 2020 15:42:58 +0000 Received: from localhost ([127.0.0.1]:60320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kID6S-0003pf-IV for submit@debbugs.gnu.org; Tue, 15 Sep 2020 11:42:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kID6R-0003pS-1O for 43421-done@debbugs.gnu.org; Tue, 15 Sep 2020 11:42:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47642) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kID6L-00057M-AL for 43421-done@debbugs.gnu.org; Tue, 15 Sep 2020 11:42:37 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37392 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kID6J-0005G1-Ba for 43421-done@debbugs.gnu.org; Tue, 15 Sep 2020 11:42:35 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877dsvi67q.fsf@inria.fr> Date: Tue, 15 Sep 2020 17:42:24 +0200 In-Reply-To: <877dsvi67q.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 15 Sep 2020 14:18:17 +0200") Message-ID: <87pn6nrqqn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: wM+QLmHnKzIs Hi, Ludovic Court=C3=A8s skribis: > Following the =E2=80=98guix authenticate=E2=80=99 in commit > 64cf660f872fb7aaf0d2b463e45b4c756297f743=C2=B9, I=E2=80=99m observing enc= oding > issues: > > guix archive --export \ > /gnu/store/3p5wcw2a0844rbcmlrqfjx8bx7b7gq34-r-rvest-0.3.6-guile-build= er > > yield an archive with this signature: > > (signature > (data > (flags rfc6979) > (hash sha256 #1DEE0418AF5FD8A05D2142290BA03735176FA27BB68B3A02977C774EA= 3DBDAEC#) > ) > (sig-val > (ecdsa > (r #072B8E5C6B84D4ED469EC2CF63103621602E9AF3902E454CAD49CFA6BDE2FBF0#) > (s "~%*=C3=98w2%YZ=C2=BB+yvc*=C2=A4=C3=8C44C;RM\t3EQIp<=C3=BC") > ) > ) > (public-key > (ecc > (curve Ed25519) > (q #8D156F295D24B0D9A86FA5741A840FF2D24F60F7B6C4134814AD55625971B394#) > ) > ) > ) > > Notice the =E2=80=98s=E2=80=99 field of the signature. > > The problem does not occur systematically: it depends on the byte string > (libgcrypt encodes Latin-1ish strings as strings and other strings as > hex sequences.) The problem is similar to . Fixed in b911d6547444b5f8d17b224bafa5ee1b5aafaff5! > The interesting bit is that this archive can be correctly ingested by a > new daemon, but it fails signature verification with an older daemon. This is because when using the new daemon on both sides, we were encoding/decoding strings as UTF-8, which made no sense but worked well. Older implementations rightfully expect =E2=80=9Craw strings=E2=80=9D aka. ISO-8859-1. Ludo=E2=80=99.