Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4104664pxb; Sun, 24 Oct 2021 20:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/mxQPonj8son3y3kvAow5XNP5dgsKZ4CSPP6tcx5LwXSdBu8VZg6eBPIpOrQVliPXObgg X-Received: by 2002:a17:906:7f89:: with SMTP id f9mr3827958ejr.261.1635131155801; Sun, 24 Oct 2021 20:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635131155; cv=none; d=google.com; s=arc-20160816; b=eSa6iYxmpLWy4d9rJvEGyJisv7CYISla0r6I9qehadbu6bCbcv9yq5vZuS4CCASUvf GbnmfVxtQSQAAc5a7df45bb6cZG2NYL2Bpqh4FwgBir/O9Yn+LxPt93sshdL9VnSm0vS FIQghb5MAN1hk8gtvFfbe2MXYeGLzZ4fGcuU/uBMlHs1sjXvCumbAl9olhxYl8DszJot GL0f46SnMi+aWrsi5eHoagyArq1bTO2xLHGpQSy1cnjHZk+ux6csZZdvVbCJVqS4RHn2 WQ3f5mABBJHuby0GK4lyCLxg4O+EC1e/fie3ghFeWuoRrqY9FkZ32fZsV1Go/JZHb6fh 1B7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=feUnmyssGSQAHbKNSPXf1dFbH3uE6LESurPT2xo6bqs=; b=iqN7+XCwTQbe4cK6DBjYPehi5bJ22eSu/FbhBll+qmD6w047ZzRIEQZJv18Y+lePNG H82PRB4v9kL5YIb0ZZM1PBLNOOOhvpEFn+M4mSsTjAdhFRmo0BCVDtYvJoCy595h92TQ QX3uca2p9oEv18j07Smy30LIWcUz5B8mKDYTn90NpmChx3nPFaFXJUawRahSaAEjnx/R xba5uHoaAIkFtfJ73ZUhfCNsAqZXa01+GQ8tWrAECfGH1TN4B3tesEdt3q6vc83Cghgn 4fENymR/l5S1Ewm1xN/N8ft7h6flXiPO5foh3VRUG8ZE0kJOsWlfP930+zKQmE/kxVu9 zrkg== 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 x19si14319939edd.630.2021.10.24.20.05.15; Sun, 24 Oct 2021 20:05:55 -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 S231912AbhJYDGc (ORCPT + 99 others); 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