lkml.org 
[lkml]   [2021]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 3/7] crypto: move curve_id of ECDH from the key to algorithm name
From
Date


在 2021/2/23 18:44, Tudor.Ambarus@microchip.com 写道:
> Hi,
>
> On 2/23/21 9:10 AM, Meng Yu wrote:
>> --- a/drivers/crypto/atmel-ecc.c
>> +++ b/drivers/crypto/atmel-ecc.c
>> @@ -104,7 +104,7 @@ static int atmel_ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
>> return -EINVAL;
>> }
>>
>> - ctx->n_sz = atmel_ecdh_supported_curve(params.curve_id);
>> + ctx->n_sz = atmel_ecdh_supported_curve(ctx->curve_id);
>> if (!ctx->n_sz || params.key_size) {
>> /* fallback to ecdh software implementation */
>> ctx->do_fallback = true;
>
> Now that you moved the curve id info into the alg name, and it is
> no longer dynamically discovered when decoding the key, does it
> still make sense to keep the curve id, the key size checks, and
> the fallback to the software implementation?
>
Yes, I think we can keep this code if 'atmel-ecc' may support
new other curves at future, and if you're sure P256 is the only curve
'atmel-ecc' uses, and it will never be changed, we can delete it.

> I don't have an atecc508 at hand to test the changes, but I expect
> your changes won't affect the functionality.
>
OK, when you or your team members have an atecc508, please help test.

\
 
 \ /
  Last update: 2021-02-24 02:26    [W:0.199 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site