Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp133762lqc; Thu, 29 Feb 2024 12:28:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUCp6R1Rc4zFYPaQc10SfKo/qlTVmAZzKCJz+vFGknhqVvx63lvWi2hU6zwHO5S+KZNHYUkdYXbFWLzUo6fgWEpidbgcBs2Honj8Ub6rA== X-Google-Smtp-Source: AGHT+IFnFrBRiODffHH86eJy+kukR8TW7do5pA5qijaTZAfNokSptFAP95BR37kNo+yW4pc8HNhN X-Received: by 2002:a17:902:ea06:b0:1dc:620f:f175 with SMTP id s6-20020a170902ea0600b001dc620ff175mr3946009plg.38.1709238531576; Thu, 29 Feb 2024 12:28:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709238531; cv=pass; d=google.com; s=arc-20160816; b=AgdIdyKcZ77y7myha1RIb78bRMo+Eq/qGTCoUUyVvrxiIKEOEkr4NvY1vD9t/5YOyY ztfjzBuN/jJZmrqXcdwOA3galCKokKhwvYcSasr9hkcMS6+yh0uoXL2efZrO1QbVk3jk HF8ak3T3YubAJ+3PgxZ6lO2V2OoEdiIW1N/71TktuqlIl13cJ5n9RR7Pb+CEfXozYksi aEjHOmZTKajgmw+f0Ub8eZJBHH/LT4yY3Vx4KKocXa68H6WHZ91nllWS7C0cV9Kq6BtI YRpI/caMbOKBLASIwCqC9wcaNpF0Fms7Xf8ygZJPUW811BB8IazxP8PhgZ6bHU+y8hT3 fPug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=aFSYUu6iOQ75R2cDUfv7WMc6lcFBEd6AFrkiNERi2io=; fh=oaC6g1rvngpUy3NBPUH3HwPaOzR9292cM7qLBeN9XRU=; b=zeATpFc0Zdb7JaBKoyVIl91nKAYP2yJ0dnSOrhRDHYEwIzuBk4sM4gziAl4qxSNlli SavFk1ggx51byNtNq/K3SOXt3bHYiSyQMSD84DfFq0havXH0B0vJ1rh+vA8QQ6vXXhKq TOmw0zHfN8Ezbn3DRW7AR8zPZqeeGmlUh1NPoT0OVFjlGsQ7cdQfXBB5cETr6GqVFGsw z48bEWZKTpKoqNAX1pDiHefINhM5B6rGWBkHH3b5ULAUw1kOWoO5CKZOOhT6xX+bAP5U nEul9vGvnGsH1KrJ6HgcVIPtT/rKyhGpTUPwUz8UORoglSc6Q6enbm6R2CsSES+sqZnd /l0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=E04MSEm8; 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-2404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q7-20020a170902eb8700b001dccdf670c4si2045861plg.403.2024.02.29.12.28.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 12:28:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2404-linux.lists.archive=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=E04MSEm8; 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-2404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2404-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8A6A9B21924 for ; Thu, 29 Feb 2024 20:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6859A1428E9; Thu, 29 Feb 2024 20:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="E04MSEm8" 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 08A6713F447; Thu, 29 Feb 2024 20:28:38 +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=1709238521; cv=none; b=u11JJW1f8AHRzCs3qMRuKj6i5L1w+yEIO7eS82mgh6pafZyW1yKCbwzzGh5Z983T89YgQLccYSw+TvQW1WOmxgNJl+EoDjxPE2+hLsPF6BXrmZaNmOBrdd8IcKVH0h0PxlKnXHe0vmqdEiFzZhJDcYUDPo/tpkWW/bU1NCV0tp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709238521; c=relaxed/simple; bh=VqsCIPtHHNaI9OJXGog4COezsI+ULkRiq4knYU05kVM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gk+YeXdiZdK+ZpJAOWdEjXB8Gi7MNl+N+gDW7HtaPg3F8DVjJdsL7etE4sztjkZ9e+5Dn8O6umKKIl/nc1Awiqb8K3fTVSyCjWn0TjIAFBFkTg+FOONaMH22ym8YHkCjoWvIEkL+dbstBbcy/zk/sHlYPNr1U5zKBatEFq8iaNc= 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=E04MSEm8; 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 (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41TKCwmo028811; Thu, 29 Feb 2024 20:28:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=aFSYUu6iOQ75R2cDUfv7WMc6lcFBEd6AFrkiNERi2io=; b=E04MSEm8hea7TxGMWoKZaAPgtbB/Pyl7thJ8rmgF0R4nJ96Nkuw5rpehrte1LuyPn/ON 3LWfFPSIKxhNOXpE8hkjEpNuiZpv/p8TC1OH2m5VT9NUYSXF56TeiTPSTfC/g3ri15er Ri7ey4hC7ShDcll+OzkHJHGZZ+8CieXVTd0OYN7rLAiXbp77bRncpgIKvFKP3qa/tk0U XD5gDsRrmngRWBO+UMB10eUqJlWrI3GeyCVWs7C8NKnOG/QBQbIItBk9weVYXWUuwKSC UDCb76BH6wblf29NBRl1XNddp3NeOmFOHo4UYdAw3pwJU3j31X67ED/wZhicWKK0tdmM Xw== 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 3wk0rygae8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Feb 2024 20:28:31 +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 41TJrNsC024127; Thu, 29 Feb 2024 20:28:30 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([172.16.1.73]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3wfw0kqpjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Feb 2024 20:28:30 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41TKSRFa7144144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Feb 2024 20:28:29 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41FE858055; Thu, 29 Feb 2024 20:28:27 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EBD15804B; Thu, 29 Feb 2024 20:28:26 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 29 Feb 2024 20:28:26 +0000 (GMT) Message-ID: <122110de-7f54-4b6c-a2aa-cc9d4280a08a@linux.ibm.com> Date: Thu, 29 Feb 2024 15:28:26 -0500 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 02/10] crypto: ecdsa - Adjust tests on length of key parameters 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: <20240223204149.4055630-1-stefanb@linux.ibm.com> <20240223204149.4055630-3-stefanb@linux.ibm.com> <20240229091605.GA11866@wunner.de> From: Stefan Berger In-Reply-To: <20240229091605.GA11866@wunner.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 2Q2Oxr8PaMFkgNpCTwBr4zp0EeTJ2PbJ X-Proofpoint-ORIG-GUID: 2Q2Oxr8PaMFkgNpCTwBr4zp0EeTJ2PbJ 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-29_06,2024-02-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=967 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402290159 On 2/29/24 04:16, Lukas Wunner wrote: > On Fri, Feb 23, 2024 at 03:41:41PM -0500, Stefan Berger wrote: >> @@ -239,7 +239,7 @@ static int ecdsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, unsig >> keylen--; >> digitlen = keylen >> 1; >> >> - ndigits = digitlen / sizeof(u64); >> + ndigits = DIV_ROUND_UP(digitlen, sizeof(u64)); >> if (ndigits != ctx->curve->g.ndigits) >> return -EINVAL; > > This deletes a line inserted by the preceding patch in the series. > I'd prefer just squashing the two patches together. > Hm, I moved this part here into 1/10 and left he other hunk in 2/10 since they deal with slightly different issues. Stefan > Thanks, > > Lukas