Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5376083ybv; Mon, 17 Feb 2020 18:43:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwqLf+YX5ek0FMaVvpUw1ao+QNG3lnzgzPtugtlh8pSkj6n/k3IFHziKGbcXiBYNet6gpW2 X-Received: by 2002:a9d:6548:: with SMTP id q8mr12231783otl.356.1581993825051; Mon, 17 Feb 2020 18:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581993825; cv=none; d=google.com; s=arc-20160816; b=wgqyK3aTbuQHrRAcNEUJsTttQYjHMTmEUsayX6TIjJ2WTBba0MTI6eUH+/2YSJykPy Ox6Ys2Ii8awJcwLG7xYh3gmflERURRErYXau3FBzinyFfHysm8UBbIqkH3grN2NPg9ES umkOpYBlH3kpvM6Y/AOBljXebCs/J5SK11EYnodUoe2Icy0KNN47V0RuMNCF7UhQoGms Bjyz3WRIzI1nZ+ALxoDOuV09KJVVwAXBQ1e/J/iBM0D+NENxkZp/SM4o9y8kud9263uj udhenesB7AMIE1/XDS0/gyl2jaTHkn8lU1jTFT+BIW/pYk85AHt6e6f5hgsMINeVsOR9 oCbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=oYBtgDFBgjcdjm2NaTQyoDZxjOIaRkUK9ImVYb6NjFA=; b=L7vBAVQjSNXYg/ytUWlzy/0Tz6NBx+Y3NgyqFSYVn56TYEcYxZr7DE4/gJA1IaOV/N MByJqKn0OzrHFmuKhJo/2989iOO9qQzD3sk53kG9kBuFv87ZuEhBPRa7tAHKQABeEOrd QS4WHl2OAEPoYw4u6BHWHeBePy9qaaLKGNBgrYtG44JNwwd3eFCVjRO6R1W96jXRjbqS 1JypC8IlAajMZYIF/eE0wQiKMVE+A4/OHhv9XaVQ2/Ws9xGtY88kZPiBWSkvyIRfg3Eo NwedaPMAor26ScDVJl66v4rXcuegUc+wKoYnwEhdmMF35XZfwvhffHJG9z2qqOotTkjw MOOA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si1088537otn.192.2020.02.17.18.43.23; Mon, 17 Feb 2020 18:43:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726171AbgBRCnQ (ORCPT + 99 others); Mon, 17 Feb 2020 21:43:16 -0500 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:40439 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbgBRCnQ (ORCPT ); Mon, 17 Feb 2020 21:43:16 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0TqCIusF_1581993788; Received: from 30.27.234.229(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0TqCIusF_1581993788) by smtp.aliyun-inc.com(127.0.0.1); Tue, 18 Feb 2020 10:43:11 +0800 Subject: Re: [PATCH v2 1/2] crypto: fix mismatched hash algorithm name sm3-256 to sm3 To: Mimi Zohar , herbert@gondor.apana.org.au, davem@davemloft.net, jarkko.sakkinen@linux.intel.com, ebiggers@kernel.org, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com Cc: linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200217093649.97938-1-tianjia.zhang@linux.alibaba.com> <20200217093649.97938-2-tianjia.zhang@linux.alibaba.com> <1581989598.8515.233.camel@linux.ibm.com> From: Tianjia Zhang Message-ID: Date: Tue, 18 Feb 2020 10:43:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <1581989598.8515.233.camel@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2020/2/18 9:33, Mimi Zohar wrote: > On Mon, 2020-02-17 at 17:36 +0800, Tianjia Zhang wrote: >> The name sm3-256 is defined in hash_algo_name in hash_info, but the >> algorithm name implemented in sm3_generic.c is sm3, which will cause >> the sm3-256 algorithm to be not found in some application scenarios of >> the hash algorithm, and an ENOENT error will occur. For example, >> IMA, keys, and other subsystems that reference hash_algo_name all use >> the hash algorithm of sm3. >> >> 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. >> >> Signed-off-by: Tianjia Zhang >> Cc: Jarkko Sakkinen > > The previous version of this patch set is queued in the next- > integrity-testing branch.  That version of this patch didn't > change TPM_ALG_SM3_256.  Unless the TPM standard was modified, the TPM > spec refers to it as TPM_ALG_SM3_256.  Has that changed? > > Mimi > The definition in the TPM specification is still TPM_ALG_SM3_256, please ignore the modification to the TPM definition in this patch. Thanks, Tianjia