lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 21 Mar 2024 13:42:02 -0400
From: Stefan Berger <stefanb@...ux.ibm.com>
To: Jarkko Sakkinen <jarkko@...nel.org>, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, herbert@...dor.apana.org.au,
        davem@...emloft.net
Cc: linux-kernel@...r.kernel.org, saulo.alessandre@....jus.br, lukas@...ner.de,
        bbhushan2@...vell.com
Subject: Re: [PATCH v7 05/13] crypto: ecc - Add nbits field to ecc_curve
 structure



On 3/21/24 13:17, Jarkko Sakkinen wrote:
> On Wed Mar 20, 2024 at 1:47 PM EET, Stefan Berger wrote:
>> Add the number of bits a curve has to the ecc_curve definition to be able
>> to derive the number of bytes a curve requires for its coordinates from it.
>> It also allows one to identify a curve by its particular size. Set the
>> number of bits on all curve definitions.
>>
>> Signed-off-by: Stefan Berger <stefanb@...ux.ibm.com>
>> Tested-by: Lukas Wunner <lukas@...ner.de>
>> ---

>>   		.y = tc512b_g_y,
>> diff --git a/include/crypto/ecc_curve.h b/include/crypto/ecc_curve.h
>> index 70964781eb68..63d5754e7614 100644
>> --- a/include/crypto/ecc_curve.h
>> +++ b/include/crypto/ecc_curve.h
>> @@ -23,6 +23,7 @@ struct ecc_point {
>>    * struct ecc_curve - definition of elliptic curve
>>    *
>>    * @name:	Short name of the curve.
>> + * @nbits:	The number of bits of a curve.
>>    * @g:		Generator point of the curve.
>>    * @p:		Prime number, if Barrett's reduction is used for this curve
>>    *		pre-calculated value 'mu' is appended to the @p after ndigits.
>> @@ -34,6 +35,7 @@ struct ecc_point {
>>    */
>>   struct ecc_curve {
>>   	char *name;
>> +	unsigned int nbits;
> 
> Nit:
> 
> Hmm not strongly opionated here but wouldn't it be more consistent to
> use u32 here as the types below are also exact bitsize types?

I will change this for v8. I will probably delay v8 until this patch 
here has been queued for upstreaming because 11/13 will need a similar 
module alias.

https://lore.kernel.org/linux-crypto/20240321144433.1671394-1-stefanb@linux.ibm.com/T/#u


> 
>>   	struct ecc_point g;
>>   	u64 *p;
>>   	u64 *n;
> 
> BR, Jarkko
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ