Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4014193ybv; Mon, 10 Feb 2020 10:36:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxKC9mgnwzF3rzjyNmys/TGCaCLcytsl0cc2y9U3tdRN3Wvn9Fxijf7exrvOCEi4N9DbY3j X-Received: by 2002:a05:6830:18d4:: with SMTP id v20mr2120520ote.29.1581359801417; Mon, 10 Feb 2020 10:36:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581359801; cv=none; d=google.com; s=arc-20160816; b=I+JhMM2OBHg8mG0X+zZ1Of+9MDKjvZO1Q5mfJlvyT74h9Ybtq8nJXHqfF2JLfjjFjX Vv1CXTRNojBy0fjdNejTL5vuBOXPoPwhNndn038mMMhU1spJgqwcDAf4GmD0rXlutLUC 87+2KTC1ONELPOhZJXNL8KBfKG7++ABegeACYCMYPpr3yOV2H8TxTeDkEbu2q6P+u7vL QkBMNBVaDHnxupVb6F/AaP7TmslD7LBrepVeVJtnOpJYVWqpc7hAdsSnwvJ88BoMiM9/ t4p8HzHLx1o/QdI6hXm2tJPUbYG9pT7emLxHpLrPSoeQC3jdS+tKl97/qPmi9hfKX7p7 qYVQ== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=qM2SCEV1bIUGb3/ZWPARpca9/w9ei6/HhDZNp486LIY=; b=p5OzBPPGeV8psUeY2LDCdszTwxgvoRdcZZUE8KuYQV4mZ7VYkpIfQ3TojKTHvliyB5 VlWrZGxNviVOmUWjzsrJrih1QQxKaD22ue4EpiUM76itjcXPeB4eLhVCOZvOYMcbw2v/ 8kVtfDuNX7nFi4GCk2AHNboQyEaDuH1fmWA2kwCWgEjOPGlmcbDO9Oz5DVDXxH3alHB/ gLb4tItRXU0aDWhdsQCYeHly7tU+abblu1yT2lWqwk7nLlFKCoFRMdEvwmPH6UNVgt08 2oRniK5vf5qRrr5ngXefPa02Pce+xdPw3kA8zHxW9KgNUW3GwhSMJid8kpfcmPcUfSm5 oMfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JxsQ+K2z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si572679otk.164.2020.02.10.10.36.29; Mon, 10 Feb 2020 10:36:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JxsQ+K2z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbgBJSgY (ORCPT + 99 others); Mon, 10 Feb 2020 13:36:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:52606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbgBJSgY (ORCPT ); Mon, 10 Feb 2020 13:36:24 -0500 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB4DB20675; Mon, 10 Feb 2020 18:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581359783; bh=YRMERBGZ8987hvH9lRSoazOKWCQx+VOKpk/WDol0H0A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JxsQ+K2zIBVfotr5CTTHqBIGvls/92V7dMI9Q4pd9S/qqXtQzQ/DTiTFJUI3npQ3R PJ2Ck3i7IkeQfROZ3y8tPQE45fTASFlLfqptL7woZj8iC/eKqU2rQ55B20v1zHg1+n PfpB1g2nGA+Rj8i0Ze48HAcJSNKVtPfxYpW5QJ7w= Date: Mon, 10 Feb 2020 10:36:21 -0800 From: Eric Biggers To: Ken Goldman Cc: "Van Leeuwen, Pascal" , James Bottomley , Ken Goldman , Tianjia Zhang , herbert@gondor.apana.org.au, davem@davemloft.net, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] crypto: sm3 - add a new alias name sm3-256 Message-ID: <20200210183620.GA137710@gmail.com> References: <20200207092219.115056-1-tianjia.zhang@linux.alibaba.com> <20200207092219.115056-2-tianjia.zhang@linux.alibaba.com> <20200210031717.GA5198@sol.localdomain> <1a623251-e83a-3b70-9fbd-8e929a23f7d8@linux.ibm.com> <7a496bb15f264eab920bf081338d67af@MN2PR20MB2973.namprd20.prod.outlook.com> <9683f764-c8c7-e123-b5f6-4f155bd1b10b@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9683f764-c8c7-e123-b5f6-4f155bd1b10b@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Please fix your email client; you dropped all non-list recipients from Cc, and I had to manually add them back...] On Mon, Feb 10, 2020 at 01:02:42PM -0500, Ken Goldman wrote: > On 2/10/2020 12:01 PM, Van Leeuwen, Pascal wrote: > > Well, the current specification surely doesn't define anything else and is > > already over a decade old. So what would be the odds that they add a > > different blocksize variant_now_ AND still call that SM3-something? > > I just got a note from a cryptographer who said there were discussions last > year about a future SM3 with 512 bit output. > > Given that, why not plan ahead and use sm3-256? Is there any downside? > Is the cost any more than 4 bytes in some source code? If renaming sm3 to sm3-256 in the crypto API, no. If adding sm3-256 alongside sm3, then yes there is a cost to that because from the crypto API's perspective they will be separate algorithms that each need to be registered, tested, etc. - Eric