Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1199983pxb; Mon, 11 Oct 2021 00:07:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdt87kCk7bZTAuCqjAH0T2RXvqf+V/nSXoGgPCfJyDi5ctoWK8NDRNVSuwWn0uqxgk7FjE X-Received: by 2002:a17:906:1dc4:: with SMTP id v4mr23740680ejh.282.1633936043908; Mon, 11 Oct 2021 00:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633936043; cv=none; d=google.com; s=arc-20160816; b=z/y6+sT+7iWK0rC6UCraihDLftKXV3gp7isfWNGwGbJUmPj9G4vAGbtX5YActu9n67 i3cLMfCWxxLZND0+HhfTEMa33AVOvaTFbGjZJhFEWaumSZkBb01gr0fpANGpYnwoyBuB vQLO9aQQkeVrzK6c9RPnWyZPtAjcwa5LbM+YKakfa8DbXi2fdS+Ngm/WX3HAavtfdLOU FA7D/ziy+ocWamw3HNllphykArFXlWG/IbRIH7XkexSebDvtE9NX1w7uobO4Vrzg/swL 1dfrUII0KY9mYk34b0C9eZKmhTegLGh5C41CaNA6sTUHjFTWF9BfvgwdrgdZoOIpfnSG h5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=VJJpt7SHwSCcB8uTIg4qmznA+/tZZrmhSsva4WCSHTo=; b=NvKQEuoQavtmv0nEQgfr3xoT3PIKO1Vj5O63n6BL4LRWpE7lZZ5PIKLBgdr8duayb3 xATQ59t7MFkEyxWHHu+/snGzmUoZLKOFq2ZZXLxDZ9uzHS1RSbStmrk0qfs6PRb2Hy6h PYVRats9RuRI0q7DcZujr7NoZTvHE9DQemVI07Oq28Sr0Yl0kk8Vo8gsDvei70CLAnLh 3kwZG11ce6P+auVZ0LyetC6BbQgF5OcAricALuKiqFwik5i67jjBf8kHKEZa+dtDOdHq tSDeKdZmVpYbgmhJdtZTFfVo7JeyS6iaEXawWxPEaWosmjUflDW7Ap58nNynuEFN7TXG DTsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si11481514edp.528.2021.10.11.00.06.51; Mon, 11 Oct 2021 00:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234413AbhJKHEa (ORCPT + 99 others); Mon, 11 Oct 2021 03:04:30 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:55958 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234415AbhJKHEa (ORCPT ); Mon, 11 Oct 2021 03:04:30 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R601e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0UrMTA8C_1633935745; Received: from B-455UMD6M-2027.local(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0UrMTA8C_1633935745) by smtp.aliyun-inc.com(127.0.0.1); Mon, 11 Oct 2021 15:02:27 +0800 Subject: Re: [PATCH 0/2] tpm: use SM3 instead of SM3_256 To: jejb@linux.ibm.com, Jarkko Sakkinen , Mimi Zohar , Jonathan Corbet , Herbert Xu , "David S. Miller" , Peter Huewe , Jason Gunthorpe , David Howells , James Morris , "Serge E. Hallyn" , Jerry Snitselaar , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org References: <20211009130828.101396-1-tianjia.zhang@linux.alibaba.com> <1749e7c3b528d361c09b40e5758b92c7386ffe1f.camel@linux.ibm.com> From: Tianjia Zhang Message-ID: Date: Mon, 11 Oct 2021 15:02:24 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1749e7c3b528d361c09b40e5758b92c7386ffe1f.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi James, On 10/9/21 9:29 PM, James Bottomley wrote: > On Sat, 2021-10-09 at 21:08 +0800, Tianjia Zhang wrote: >> According to https://tools.ietf.org/id/draft-oscca-cfrg-sm3-01.html, >> SM3 always produces a 256-bit hash value and there are no plans for >> other length development, so there is no ambiguity in the name of >> sm3. > > For the TPM we're following the TPM Library specification > > https://trustedcomputinggroup.org/resource/tpm-library-specification/ > > Which is very clear: the algorithm name is TPM_ALG_SM3_256 > > We're using sm3 as our exposed name because that's what linux crypto > uses, so there should be no problem in what the end user sees, but > changing to non standard TPM definitions is only going to cause > confusion at the kernel level. > > James > Thanks for your attention. This is really tricky. I will contact trustedcomputinggroup first and give some suggestions, It would be best if a more standard algorithm name can be used from the source of the specification. I think the macro definition of the crypto directory can remove this suffix first, that is, apply patch 1. What's your opinion? Best regards, Tianjia