From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25ECFC4332F for ; Mon, 25 Oct 2021 03:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A6FD60F4F for ; Mon, 25 Oct 2021 03:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbhJYDGc (ORCPT ); Sun, 24 Oct 2021 23:06:32 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:55363 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbhJYDGc (ORCPT ); Sun, 24 Oct 2021 23:06:32 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0UtUyMKi_1635131045; Received: from 30.240.102.8(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0UtUyMKi_1635131045) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Oct 2021 11:04:06 +0800 Message-ID: <0997d70b-9f28-ba0a-853f-2160922dc722@linux.alibaba.com> Date: Mon, 25 Oct 2021 11:04:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/2] crypto: use SM3 instead of SM3_256 Content-Language: en-US To: Jarkko Sakkinen , James Bottomley , 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: <20211019100423.43615-1-tianjia.zhang@linux.alibaba.com> <20211019100423.43615-2-tianjia.zhang@linux.alibaba.com> From: Tianjia Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Jarkko, On 10/23/21 8:48 AM, Jarkko Sakkinen wrote: > On Tue, 2021-10-19 at 18:04 +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. >> >> Suggested-by: James Bottomley >> Signed-off-by: Tianjia Zhang >> --- >>  Documentation/security/keys/trusted-encrypted.rst | 2 +- >>  crypto/hash_info.c                                | 4 ++-- >>  drivers/char/tpm/tpm2-cmd.c                       | 2 +- >>  include/crypto/hash_info.h                        | 2 +- >>  include/uapi/linux/hash_info.h                    | 3 ++- >>  security/keys/trusted-keys/trusted_tpm2.c         | 2 +- >>  6 files changed, 8 insertions(+), 7 deletions(-) >> >> diff --git a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst >> index 80d5a5af62a1..3292461517f6 100644 >> --- a/Documentation/security/keys/trusted-encrypted.rst >> +++ b/Documentation/security/keys/trusted-encrypted.rst >> @@ -162,7 +162,7 @@ Usage:: >>                       default 1 (resealing allowed) >>         hash=         hash algorithm name as a string. For TPM 1.x the only >>                       allowed value is sha1. For TPM 2.x the allowed values >> -                     are sha1, sha256, sha384, sha512 and sm3-256. >> +                     are sha1, sha256, sha384, sha512 and sm3. > > You cannot remove sm3-256 from uapi. > Thanks for pointing it out, Maybe this fix is more appropriate in patch 2. Best regards, Tianjia