Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp35037ybp; Thu, 3 Oct 2019 14:23:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFnpaPNrzRUxgywm1A5gJSRopsTAJWqNOzWRHK7Cg4kpMnZwSjtNJUzXHWlNia3edNB6Hx X-Received: by 2002:a17:907:20a2:: with SMTP id pw2mr9412167ejb.163.1570137780378; Thu, 03 Oct 2019 14:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570137780; cv=none; d=google.com; s=arc-20160816; b=lpYsMENaP0h3WgLwrviQOlXEhoPTkuYZz6YdgpbsjAAXgaRv9dIAYY3psLiu/tvgWs DF37FLp2zmIcyeC34RVIBS7yLbhfVrzGANuFxZKXuncLprDjKZYMSbKl+wVMa5C7i9Wp 2WtQT+rsazMPQfLFNIsnKPWdDd+1P3W+ouie0dTVLvfWclZFCqgHbMjuJtTPDfcCsmLi 4/L4vJThj2liMwc1G9Hryf+M6CGWN/FjNUk7+4JzTDazviExoMpzswds8g2l2wOBerYU ejvjy1mHGWOZXe+MkC44VbjlXf6C7IPR+10R4rXNtbJfyOlkSXnO56CQRpZXabhc91Fs TZ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=E8moL27WIDCeyAvfjyuFN0HR5AGk/AUUOQkFuno5C3s=; b=xcrUL9nAHP8hQ+rmzlcNxPTU22JY3EMRJkfEgh41HpxPJTrHqr/mi1f8H1N4lzdSNg d2FdoT69U5ZqV9/nXxKWMqMplWujIY0LSpC7hTFftEMjUd4c1PHEzR1QECwdlJqNf0gs G6K+63Bv7tchnURkdHYoENxqlCGGJGOVjnWAuWcM0MXnL7S+/qtD64COAB3vC42/Uy6x 27s15TzUMQvplLjZ18iJqiEp2KQ69foQTNuZXLZCPW/j3sngXD414k5EkY/NHp8WyvbM 0m3roIbqM+GoKiNuON89BvC+fOZqatBEdhARMxB64J5AGQPWN2UE9EmW5PR0X2KJJFc3 X8kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si1773558eju.311.2019.10.03.14.22.10; Thu, 03 Oct 2019 14:23:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730020AbfJCVUr (ORCPT + 99 others); Thu, 3 Oct 2019 17:20:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:40600 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727789AbfJCVUr (ORCPT ); Thu, 3 Oct 2019 17:20:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7475AB87; Thu, 3 Oct 2019 21:20:45 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 50844DA890; Thu, 3 Oct 2019 23:21:01 +0200 (CEST) Date: Thu, 3 Oct 2019 23:21:01 +0200 From: David Sterba To: Ard Biesheuvel Cc: David Sterba , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" Subject: Re: [PATCH] crypto: BLAKE2 reference implementation Message-ID: <20191003212101.GV2751@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Ard Biesheuvel , David Sterba , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" References: <8087a8b358b5f97304963a38a17433a416d1382b.1569849051.git.dsterba@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, thanks for the review. On Thu, Oct 03, 2019 at 02:18:55PM +0200, Ard Biesheuvel wrote: > On Mon, 30 Sep 2019 at 15:12, David Sterba wrote: > > The patch brings support of several BLAKE2 algorithms (2b, 2s, various > > digest lengths). The in-tree user will be btrfs (for checksumming), > > we're going to use the BLAKE2b-256 variant. It would be ideal if the > > patches get merged to 5.5, thats our target to release the support of > > new hashes. > > So this will be used as an alternative to crc32c, and plugged in at > runtime depending on the algo described in the fs superblock? Yes, exactly like that. One checksum for the whole filesystem, specificed by a number in the superblock item. > Is it performance critical? I'd put it that performance is important and blake2 has been selected as the fastest from the modern hashes (ie. sha3 was rejected for that reason). We're going to add cryptographically strong hashes (blake2, sha256) and a fast one (xxhash). So the users should choose what's the best for their usecase given the trade-offs. If the question is inspired by the current discussions around wireguard and library versions, we're fine with using the current API as it's reasonable for the hash algorithms. Improvements regarding reduction of the overhead would be welcome but is not important at the moment. I'll send v2 with the review comments addressed. Thanks. d.