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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40E47C4360F for ; Wed, 3 Apr 2019 21:40:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B7A42082C for ; Wed, 3 Apr 2019 21:40:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726183AbfDCVku (ORCPT ); Wed, 3 Apr 2019 17:40:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56220 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbfDCVku (ORCPT ); Wed, 3 Apr 2019 17:40:50 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x33LXGnS127157 for ; Wed, 3 Apr 2019 17:40:49 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rn4um09y2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 03 Apr 2019 17:40:49 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Apr 2019 22:40:46 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 3 Apr 2019 22:40:45 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x33LeipY51707918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Apr 2019 21:40:44 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5592F4C04A; Wed, 3 Apr 2019 21:40:44 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD5354C050; Wed, 3 Apr 2019 21:40:43 +0000 (GMT) Received: from dhcp-9-31-103-153.watson.ibm.com (unknown [9.31.103.153]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 3 Apr 2019 21:40:43 +0000 (GMT) Subject: Re: [PATCH 2/2] ima-evm-utils: try to load digest by its alias From: Mimi Zohar To: Vitaly Chikunov Cc: Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org Date: Wed, 03 Apr 2019 17:40:43 -0400 In-Reply-To: <20190403213739.afjtakg5nujke477@altlinux.org> References: <20190323014152.14701-1-vt@altlinux.org> <20190323014152.14701-3-vt@altlinux.org> <1554324064.3839.20.camel@linux.ibm.com> <20190403210435.duptffqlwp6vo66m@altlinux.org> <1554325820.3839.27.camel@linux.ibm.com> <20190403213739.afjtakg5nujke477@altlinux.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19040321-0028-0000-0000-0000035CFAA2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040321-0029-0000-0000-0000241C057D Message-Id: <1554327643.3839.29.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-03_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904030141 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Thu, 2019-04-04 at 00:37 +0300, Vitaly Chikunov wrote: > On Wed, Apr 03, 2019 at 05:10:20PM -0400, Mimi Zohar wrote: > > On Thu, 2019-04-04 at 00:04 +0300, Vitaly Chikunov wrote: > > > Mimi, > > > > > > On Wed, Apr 03, 2019 at 04:41:04PM -0400, Mimi Zohar wrote: > > > > On Sat, 2019-03-23 at 04:41 +0300, Vitaly Chikunov wrote: > > > > > Primary names of the algorithms are different for OpenSSL and Kernel. > > > > > Allow to use both of them. > > > > > > > > Can we add a line here explaining the two names?  Perhaps something > > > > like, "GOST R 34.11-2012 is the Russian national standard based on the > > > > Streebog set of hash functions."  > > > > > > Ok. But, "GOST R 34.11-2012" is not mentioned, and there is other > > > standards with Streebog, such as RFC 6986, ISO/IEC 10118-3:2018, GOST > > > 34.11-2018. > > > > > > Point of this patch is that Kernel calls this hash function by it's > > > proper name "StreebogX", but older version of OpenSSL reference it by > > > acronym "md_gost12_X". (While newer should support Streebog name too.) > > > And we try to be user friendly and allow to use both names. > > > > If "Streebog" will be supported by OpenSSL, then why make md_gost12_x > > the primary name, and the kernel name the alias?  Shouldn't it be the > > reverse (eg. "pkey_hash_algo_alias")? > > Because ima-evm-utils is using OpenSSL and not Kernel's Crypto API, > OpenSSL names are "primary" for ima-evm-utils. It's happened that most > names are the same for both APIs. > > "md_gost12_X" is supported for years by more versions of OpenSSL. While > "StreebogX" name is just committed a few months ago to gost-engine. Thus, > > 1) "md_gost12_x" name could be used on conservative distros. Users > will not need to wait [possible] a few years when new name reach > their distro. > > 2) PKEY_HASH_STREEBOG_X is resolved to "md_gost12_X" names (to the > names that are present in OpenSSL with much more probability). > > `pkey_hash_algo_kern` only contains names that are different between > the Kernel and OpenSSL. > > I used "primary" for the both arrays so that no names are offended by > being not-primary. Could you provide me with a single line or two, with an explanation for the two names.  I'll add it to the commit patch description, before pushing out these patches. Thanks! Mimi