From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sGJpEKYh8l7ycwAA0tVLHw (envelope-from ) for ; Tue, 23 Jun 2020 15:37:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6HQ3DKYh8l7SLgAAbx9fmQ (envelope-from ) for ; Tue, 23 Jun 2020 15:37:10 +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 913B5940AFA for ; Tue, 23 Jun 2020 15:37:09 +0000 (UTC) Received: from localhost ([::1]:43630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnkyw-00015c-Ii for larch@yhetil.org; Tue, 23 Jun 2020 11:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnkys-00013V-4L for guix-patches@gnu.org; Tue, 23 Jun 2020 11:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnkyr-0005Yt-QO for guix-patches@gnu.org; Tue, 23 Jun 2020 11:37:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jnkyr-0006pn-NR for guix-patches@gnu.org; Tue, 23 Jun 2020 11:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42020] [PATCH 0/4] Add daemon support for SHA3 and BLAKE2s Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Jun 2020 15:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42020 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42020@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159292661026250 (code B ref -1); Tue, 23 Jun 2020 15:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2020 15:36:50 +0000 Received: from localhost ([127.0.0.1]:36970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnkyc-0006pE-5F for submit@debbugs.gnu.org; Tue, 23 Jun 2020 11:36:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:41520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnkyX-0006p2-EA for submit@debbugs.gnu.org; Tue, 23 Jun 2020 11:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnkyX-0000l3-6q for guix-patches@gnu.org; Tue, 23 Jun 2020 11:36:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35589) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnkyW-0005EV-5o; Tue, 23 Jun 2020 11:36:40 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57334 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jnkyV-0004ZF-Bd; Tue, 23 Jun 2020 11:36:39 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 23 Jun 2020 17:36:33 +0200 Message-Id: <20200623153633.15346-1-ludo@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: zBZw6lvfeXlJ Hello! This is a followup to: https://issues.guix.gnu.org/41382 This patch series adds daemon support for a few more cryptographic hash functions, for use by fixed-output derivations (origins) and the likes. We should wait for a year or so before using those algorithms in package definitions so we can assume that the new daemon is widespread. Note that there are still places where SHA256 is hard-coded. For instance, the ‘query-path-hash’ RPC always returns a SHA256 hash. Internally, the ‘ValidPaths’ table of the database can store any hash, but in practice it only ever contains a SHA256 hash (see ‘LocalStore::addValidPath’ and (guix store database)). Feedback welcome! Ludo’. Ludovic Courtès (4): daemon: Map directly to gcrypt hash functions. daemon: Remove OpenSSL hash compatibility wrappers. daemon: Recognize SHA3 and BLAKE2s. packages: Recognize SHA3 and BLAKE2s for 'content-hash'. guix/packages.scm | 5 ++- nix/libutil/gcrypt-hash.cc | 51 ----------------------------- nix/libutil/gcrypt-hash.hh | 50 ---------------------------- nix/libutil/hash.cc | 67 +++++++++++++++++++------------------- nix/libutil/hash.hh | 20 +++++++----- nix/libutil/md5.h | 35 -------------------- nix/libutil/sha1.h | 35 -------------------- nix/libutil/sha256.h | 35 -------------------- nix/libutil/sha512.h | 35 -------------------- nix/local.mk | 12 ++----- tests/packages.scm | 26 +++++++++++++++ tests/store.scm | 4 +-- 12 files changed, 80 insertions(+), 295 deletions(-) delete mode 100644 nix/libutil/gcrypt-hash.cc delete mode 100644 nix/libutil/gcrypt-hash.hh delete mode 100644 nix/libutil/md5.h delete mode 100644 nix/libutil/sha1.h delete mode 100644 nix/libutil/sha256.h delete mode 100644 nix/libutil/sha512.h -- 2.26.2