Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp412690ybl; Wed, 11 Dec 2019 01:43:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxZ8z/fJH2oQ0fhaZXVXoVsgh/KH9AH5WUAj8yT9pL7HmFy+RrQ2dVpyS/PnbgkBhuQn0u9 X-Received: by 2002:a05:6830:18e6:: with SMTP id d6mr1655134otf.170.1576057380193; Wed, 11 Dec 2019 01:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576057380; cv=none; d=google.com; s=arc-20160816; b=mNiST+xYIw/3nRbSo4BvdjIJAq6j3nv6lm2uEuX4hPoFaZ7V2nkC0NnEUSKjJov7j0 weC5Jritp3gZaaaoIc1FxmFBECSeuIDJc5vmd/H5FL/RtIe/XT5NLWx/nWTY03gf3QkM uS+s1K8XOhD16KDW5TYLysOoOIP+lDy1oLqf37ecqdhHnudtpQnOIaLyzxVxOfgsccPq 52mJkXr/tnxMnmdI2RtoNs37HpumrbC6SFUnhKd2xfKhrm7d6XtDrDRq1mW9t17C6OtK 5WuySWDVJRgCe/GrZA9lbOMBlwCXwl/FJmDQVhHiLkC5e6wzA0DDAxkkjJQGrprd8V7e dylg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date; bh=GEDQEKdgfuL2Mw+M/pgZcM2tnDheusTAspR8PZ0/iQw=; b=tMLZCo0QPJPIfUoob2u21HyG/FpalJy1Vyg/cwVbr7mF/82fMs11G/zJIJ29rJlm/G A6kLpHcY6iyhCOCpBK5r6GzgEe/ab6hAFG9X/ozB2wfP6dJHnan/gVyjYeG2nYFvaomr /kJFL8tW2aYE08N0YSXr5Sb/JFiSPqgFC5uaY+lcjMwGV8sYwOolsqgTu1QXA3BDpBSE 0Rnd6lKEB84lcwoGmE4ucy7f+Zr+kc4Fu4IL9vB7VR7vZ3dKilo9Lv1FSukIotjVDLMw DqJmiParaqs94+JervKDtuMpsUPKaXhaH/qyaRZjBMvOds19JQSPpMIwj+DIvDgVRCiq AUbg== 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 z203si802132oia.124.2019.12.11.01.42.26; Wed, 11 Dec 2019 01:43:00 -0800 (PST) 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 S1728030AbfLKJmZ (ORCPT + 99 others); Wed, 11 Dec 2019 04:42:25 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:54636 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728512AbfLKJmZ (ORCPT ); Wed, 11 Dec 2019 04:42:25 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1ieyVj-0000Km-Ri; Wed, 11 Dec 2019 17:42:23 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1ieyVj-0000CL-Jk; Wed, 11 Dec 2019 17:42:23 +0800 Date: Wed, 11 Dec 2019 17:42:23 +0800 From: Herbert Xu To: Eric Biggers Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH] crypto: shash - allow essiv and hmac to use OPTIONAL_KEY algorithms Message-ID: <20191211094223.rhtnupwkgidjla2m@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191129193522.52513-1-ebiggers@kernel.org> X-Newsgroups: apana.lists.os.linux.cryptoapi Organization: Core User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Eric Biggers wrote: > From: Eric Biggers > > The essiv and hmac templates refuse to use any hash algorithm that has a > ->setkey() function, which includes not just algorithms that always need > a key, but also algorithms that optionally take a key. > > Previously the only optionally-keyed hash algorithms in the crypto API > were non-cryptographic algorithms like crc32, so this didn't really > matter. But that's changed with BLAKE2 support being added. BLAKE2 > should work with essiv and hmac, just like any other cryptographic hash. > > Fix this by allowing the use of both algorithms without a ->setkey() > function and algorithms that have the OPTIONAL_KEY flag set. > > Signed-off-by: Eric Biggers > --- > crypto/essiv.c | 2 +- > crypto/hmac.c | 4 ++-- > crypto/shash.c | 3 +-- > include/crypto/internal/hash.h | 6 ++++++ > 4 files changed, 10 insertions(+), 5 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt