Message ID | 20240208221840.3665874-9-stefanb@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-58785-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp501572dyd; Thu, 8 Feb 2024 14:59:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDtEKjBV+qHfI1qcCQWvVDnQ2f99Mf21rAW7X8jOy8UqZTOc8fzOfn1TFDV70uRhFfWjR9 X-Received: by 2002:a05:6870:b86:b0:206:573:ec62 with SMTP id lg6-20020a0568700b8600b002060573ec62mr1036975oab.54.1707433181478; Thu, 08 Feb 2024 14:59:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707433181; cv=pass; d=google.com; s=arc-20160816; b=u6UsahPUrNlT8dCEzBW+pUeCaXNJtyRCI0VdYxREFCL5Ba50IjwfI7vXKSwyX+5lvZ lbzgwQ/4mLj3OfgqPjuaoeEFLIykPU9Egj0N+J3DNNVakR2pdWjAbzB86dmthmUpkz/H LX4iOdm3iESy5Ii1C/fiP+EGSGvCbS3RSGOHDXanfogusN7AbBTkfe+5nxJSnuaAt3rq aIMC485pcajQgy9KTp63f48ul8n+pN9xRx9RhR4hChGE/NU11ktl+i4QviizT2Ok80MI sWCq45jI9GNm2+Q5v/glDpJd88vbuuxmv6Fvudl2gpzTpcMhpu41v/0ZHfVMiqqpo6j/ 4dYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=oMikrV2Be8nChSoWAP37zjvL3Jd3Ki9N5SP4cHk5r8Y=; fh=QXa1wpeWGZPxr7Uu+nKejQzp7IWO+0ILhwSNoI6i8wc=; b=jmP6Si6lcKE6dn5osV0DAV8pICqGHVZsNBYTP2KOPobydgFwNBwCDxnNeb4qe3TPB9 KQaxW5FX5YZA//m3dnVM/Ou7FlUwG/x2tP6rJAOp4TIC2QCNCZhk12T8RW+1DUJ7egC8 6OYtlXyBj+ZAYX6vaN+xXiWAYcJof7JZPXkMSb0U2+/VD4GsHOE6T0y7YZMhUyW7iY1F J8FccA//D1hiucBMiIeYAiGiqqJf4KApwsGpSL2StdM4pQ34juYtY+e1p/ECflZmAwUv sNkwww9PlJk3HIY4wuJTBt7mYlLax+GWuup72qeWVQOuSIAwYtnssWMFaVtNWAM4PpLi 5MkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="PZkj/cjx"; 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-kernel+bounces-58785-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58785-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com X-Forwarded-Encrypted: i=2; AJvYcCXW2fry+VC4qDxm5Ri5Pr5/GQ0ma39xDkwwiPP+pMatjmUA5IUud4Cm5570IoPYc1i79Y90LpYVzc2tfMr1T61oVk9SVg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005dc14a304ffsi526898pgb.782.2024.02.08.14.59.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 14:59:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58785-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="PZkj/cjx"; 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-kernel+bounces-58785-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58785-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C0244B2C9AA for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 22:23:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA12A54BE8; Thu, 8 Feb 2024 22:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="PZkj/cjx" 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 7CF0650A6F; Thu, 8 Feb 2024 22:19:12 +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=1707430754; cv=none; b=b1rYeXgAr4cLllZRsrbkzs+ditxuP7zojzeaNa5lVKPexgk4HNHj9Xvrg7C38dsawwq9b0JP8Ew68QZdOOiYRQ50S+ESCQUdUiJI8YjHcY4rTyhxT3o6aNfCNfjBCN06krQ7B1AGwt6kYzjwpZDZ1X5bq2XDnFn6xrjuisxvDuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707430754; c=relaxed/simple; bh=3YD2nLoVeWDrWiPNpx65a68F+wXSuNVNDDyl/CAP0AY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tDjUVOaQnnCOzTVANAW5g8BG6KhNQgQvE4JW8i2LszDzT8JXzZ/8o+Ppm6mNBpbRwgUXdfPOiospMMg4ogqWJ+UY1hg6FSVUZPk9GTbm/k3X2mZ1H5pC93mj3zSk0dQAWu5Vi2kQ03ijvZ0eaUAu+pfnk4+omWImhirCjXi7qdY= 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=PZkj/cjx; 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 (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 418KvEbA019278; Thu, 8 Feb 2024 22:19:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=oMikrV2Be8nChSoWAP37zjvL3Jd3Ki9N5SP4cHk5r8Y=; b=PZkj/cjxuX7Dh7rKn+ohsf93KL0Qz+OMipAGK668DyPtNOP0LyaQjlSJKfJMug+Si8e6 HJAKhU1kNw3ifY73g6uzDurhkc10JK8PFCY6L9NKWzBP5CJFqTBb/STK5cDTF56ldvQC xx9rktFmhoMnINStOlcgfUJWerqcB2IrEsgWinPmj1w4TuBWUYQYvdLfCoIvXMhuxNtc WDTk7rZrB6yFen/w12W5gQ7DWEkZkeJYOE1AjXtQuKj4TGCmg3ozR/prbLnAZW+Twidp BVpD2iCrkrNHaz4wyaz2LeFfZOHakOpU03hoPc5lWbEYRg24YORzi6z036tDkU3LaQts vA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w52xqpvu4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Feb 2024 22:19:06 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 418Lp6SJ002677; Thu, 8 Feb 2024 22:19:06 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w52xqpvtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Feb 2024 22:19:06 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 418MAAq7020383; Thu, 8 Feb 2024 22:19:05 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w1yttfsmg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Feb 2024 22:19:05 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 418MJ4TU58327484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Feb 2024 22:19:04 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D3DE58063; Thu, 8 Feb 2024 22:19:04 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AB0058060; Thu, 8 Feb 2024 22:19:04 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 8 Feb 2024 22:19:03 +0000 (GMT) From: Stefan Berger <stefanb@linux.ibm.com> To: keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net Cc: linux-kernel@vger.kernel.org, saulo.alessandre@tse.jus.br, Stefan Berger <stefanb@linux.ibm.com>, David Howells <dhowells@redhat.com> Subject: [PATCH 08/14] x509: Add OID for NIST P521 and extend parser for it Date: Thu, 8 Feb 2024 17:18:34 -0500 Message-ID: <20240208221840.3665874-9-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208221840.3665874-1-stefanb@linux.ibm.com> References: <20240208221840.3665874-1-stefanb@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: W_Fr-mUnw-uvYENa8pYib9h_E_vWfWLL X-Proofpoint-GUID: sKRHfqmgssZN_XwynBvEDM008AsONium 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-02-08_11,2024-02-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=821 impostorscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 phishscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402080124 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790373455682546952 X-GMAIL-MSGID: 1790373455682546952 |
Series |
Add support for NIST P521 to ecdsa and ecdh
|
|
Commit Message
Stefan Berger
Feb. 8, 2024, 10:18 p.m. UTC
Prepare the x509 parser to accept NIST P521 certificates and add the
OID for ansip521r1, which is the identifier for NIST P521.
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
crypto/asymmetric_keys/x509_cert_parser.c | 3 +++
include/linux/oid_registry.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c index 487204d39426..99f809b7910b 100644 --- a/crypto/asymmetric_keys/x509_cert_parser.c +++ b/crypto/asymmetric_keys/x509_cert_parser.c @@ -538,6 +538,9 @@ int x509_extract_key_data(void *context, size_t hdrlen, case OID_id_ansip384r1: ctx->cert->pub->pkey_algo = "ecdsa-nist-p384"; break; + case OID_id_ansip521r1: + ctx->cert->pub->pkey_algo = "ecdsa-nist-p521"; + break; default: return -ENOPKG; } diff --git a/include/linux/oid_registry.h b/include/linux/oid_registry.h index 3921fbed0b28..af16d96fbbf2 100644 --- a/include/linux/oid_registry.h +++ b/include/linux/oid_registry.h @@ -65,6 +65,7 @@ enum OID { OID_Scram, /* 1.3.6.1.5.5.14 */ OID_certAuthInfoAccess, /* 1.3.6.1.5.5.7.1.1 */ OID_id_ansip384r1, /* 1.3.132.0.34 */ + OID_id_ansip521r1, /* 1.3.132.0.35 */ OID_sha256, /* 2.16.840.1.101.3.4.2.1 */ OID_sha384, /* 2.16.840.1.101.3.4.2.2 */ OID_sha512, /* 2.16.840.1.101.3.4.2.3 */