2024-02-29 09:16:22

by Lukas Wunner

[permalink] [raw]
Subject: Re: [PATCH v3 02/10] crypto: ecdsa - Adjust tests on length of key parameters

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.

Thanks,

Lukas


2024-02-29 20:28:52

by Stefan Berger

[permalink] [raw]
Subject: Re: [PATCH v3 02/10] crypto: ecdsa - Adjust tests on length of key parameters



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