Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2047723lqg; Mon, 4 Mar 2024 11:07:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXyyiVf6VDg5VW3poDjSjLFQZwzyYkqZ5ZqZcMgu4MApesTAIfRkmYGTBO+rdmOBwc67baLyppqTPo0mFE17VfGfP0VtTTwvfwOz/uvuw== X-Google-Smtp-Source: AGHT+IFVtohAUCsHgO76ktEma2SPIs3cwRnTmfWejOx3u+3LA95aCdJ6FpGk2T6iESd+yc7MsHRt X-Received: by 2002:a17:906:d8c:b0:a43:afff:ca13 with SMTP id m12-20020a1709060d8c00b00a43afffca13mr6991968eji.57.1709579266878; Mon, 04 Mar 2024 11:07:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709579266; cv=pass; d=google.com; s=arc-20160816; b=T47XmYuV/kHzr1KVRlQ1cc5lflUcTk1fdnQ6H4TEVhGX/dPkLh1ky3fYFEVD0tYXnf 8CCIChqEscO58r4xL+oL+rBjXbKqPkD6ghHYZ4sMkYHlNjrazAIlwogWNhXVsM5Z91j4 PDzHY3GKmxyoeVw9gV6n03UZEmsc8A56Gdh8WQvPsJq1DdxKBJ2Pbat0MEaP63PNp2MA u+GzeLrC/8jhdpxuYGEYrEGc2/yob/0g75/iyGmBf+sFYIN1zHxImCBKXlOYgWxGI2Pf ubl6fpeibmFbbVJWWS0JwL7TPVWRUuPC6HnEpZs9q955LmhhZrhOJUXiWPNlpXzp7t+k GiZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:date:message-id:dkim-signature; bh=wG+AkWFsLk0LGbkTfh6JMlER9PxzsT9H1kUw5NpdIwI=; fh=oaC6g1rvngpUy3NBPUH3HwPaOzR9292cM7qLBeN9XRU=; b=ybO6dnHOz8bSxdPHD2AoD5Min6PyWakHIRzT3df2sx4j+fR7VGplCgwY7qnp5Bwowx igG9NJyfjjhacOMmrHMDDVTj1kfGonKPQN2QhRHlTI3jaovIlbXx7i610c7iVx/Lcwlb HI5v/bBY2ZZroLepOWqviV2ntkjcSUXj3kFf9okIuRqiczV7keDxMEQFJvL58ujNh487 szoCaVEAFFFsqLEcausOXMRrwbpLvCQU8OzpkXVPfXa3dHTgQk1XEOTMQx9/XpDeRdSR Eq/P3spzpT8hjhCqSUnJ/NqibQahnOCXSlUT2ufar8xOItbvt96o0couuD8scytKLOQL o19g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=pxqBZ2Qy; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-crypto+bounces-2485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j3-20020a170906474300b00a45322c32f0si1333830ejs.485.2024.03.04.11.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:07:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=pxqBZ2Qy; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-crypto+bounces-2485-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EF3141F22F5F for ; Mon, 4 Mar 2024 19:07:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 610F078B63; Mon, 4 Mar 2024 19:07:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="pxqBZ2Qy" X-Original-To: linux-crypto@vger.kernel.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E76DC78B50; Mon, 4 Mar 2024 19:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709579220; cv=none; b=CDJ8uiVYfeEdPslJ8Y+sTBQKaqTDg3ge7HU8IPZPWPeiafgKCnNzF5+NUoXVq4xJhsyvXg+kwr8vh/+nGBvKI23EU2SZN04JIN7eydzANs4WXJxhKl+LFx1eaEdF/WJvEhfWVLgqwBV/XgkqMxmMklIjHJiqpdaqHQSPOZH0Agc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709579220; c=relaxed/simple; bh=z/+FJbtOYKoJjdt5JqfxQAUYtcZcb/bgxSsuxmnc7MQ=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=CbfZsDO2OaxLjq3rHPDoaOEeeWGkpbEDpNp3IKL53hdGKvGlZf8IhSqyxV/0xpNa8RE14nUuALNW4oIW91HUgAMYBbKf4gy8s6xqVjIhbutlF68we2XdxvGIHdoq9OBVzwmYYNY+Nfd5dwVGQ3Tf+zErNjA+p19sGLALzs7Wm8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=pxqBZ2Qy; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 424Ir4HG032625; Mon, 4 Mar 2024 19:06:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=wG+AkWFsLk0LGbkTfh6JMlER9PxzsT9H1kUw5NpdIwI=; b=pxqBZ2QywGfs5OfpEbTrv8t12fuzJ4gWxu09DJHBzcb2a2lH8lya5rLyqgfzH9l7s4oi pQWqkVpDVbkMCggiMzUzlQM/PhH1SLvMgHr9FlRyzznHeN7Y8erSDxNUGxsh9studt+a l2o5Qj8N6FB3h+Rn6l+wdst4LkP0XbZPxttOL0qgTn7zp6goZCPnV7+z/UIsvsP4OJEj sdlyfE8XmTdlVSvx1PMe33UJd7geY3xpPrMJxRYB4AX0DDSCtSDRvNhBMmudeD4RYKZo ZvxU5YpEE3Atp8c4UjBgmDcdPMF3uloqiyTUh7BdOL8DfsMKBrbkyO0p8vXV7hFe21zz FQ== Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wnkyg0ct0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Mar 2024 19:06:50 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 424H2lht031533; Mon, 4 Mar 2024 19:01:42 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3wmgnjt9tv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Mar 2024 19:01:42 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 424J1dKb27394678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2024 19:01:41 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 57E4758068; Mon, 4 Mar 2024 19:01:39 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E191158056; Mon, 4 Mar 2024 19:01:38 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 4 Mar 2024 19:01:38 +0000 (GMT) Message-ID: <3740c569-9dd2-448d-bcac-16ca5203b206@linux.ibm.com> Date: Mon, 4 Mar 2024 14:01:38 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 00/12] Add support for NIST P521 to ecdsa Content-Language: en-US To: Lukas Wunner Cc: keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, linux-kernel@vger.kernel.org, saulo.alessandre@tse.jus.br References: <20240301022007.344948-1-stefanb@linux.ibm.com> <20240304181004.GA14180@wunner.de> From: Stefan Berger In-Reply-To: <20240304181004.GA14180@wunner.de> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: e0MzAC8-aT97XANG7sA5IsTleu0lLLob X-Proofpoint-GUID: e0MzAC8-aT97XANG7sA5IsTleu0lLLob Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-04_14,2024-03-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2403040145 On 3/4/24 13:10, Lukas Wunner wrote: > On Thu, Feb 29, 2024 at 09:19:55PM -0500, Stefan Berger wrote: >> This series adds support for the NIST P521 curve to the ecdsa module >> to enable signature verification with it. >> >> An issue with the current code in ecdsa is that it assumes that input >> arrays providing key coordinates for example, are arrays of digits >> (a 'digit' is a 'u64'). This works well for all currently supported >> curves, such as NIST P192/256/384, but does not work for NIST P521 where >> coordinates are 8 digits + 2 bytes long. So some of the changes deal with >> converting byte arrays to digits and adjusting tests on input byte >> array lengths to tolerate arrays not providing multiples of 8 bytes. > > When respinning this series as v5, feel free to add my > > Tested-by: Lukas Wunner Thanks. > > > I cherry-picked the commits from your nist_p521.v5 branch... > > https://github.com/stefanberger/linux-ima-namespaces/commits/nist_p521.v5/ > > ...onto my development branch for PCI device authentication... > > https://github.com/l1k/linux/commits/doe > > ...and tested against qemu+libspdm that an emulated NVMe drive > is able to present a valid signature using NIST P521 + SHA384 > which can be verified correctly by the kernel. FYI: I have a PR for a test suite here as well: https://github.com/stefanberger/eckey-testing/pull/1 > > I needed to fix up two of my patches, one which adds P1363 > signature format support to the kernel and another fixup to > add NIST P521 support to the in-kernel SPDM library > (two top-most commits on my above-linked development branch). > > I performed this test against your f81547267725 head and notice > that you pushed a new version today (with "curve->nbits == 521" > instead of strcmp), but I'm confident those two small changes > wouldn't alter the outcone, hence my Tested-by stands. > > Thanks, > > Lukas >