crypto: ecc - Add nbits field to ecc_curve structure
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 4 Apr 2024 14:18:48 +0000 (10:18 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Apr 2024 07:07:52 +0000 (15:07 +0800)
commitc0d6bd1fd367a5374bff7e3f3bdf47beb84893c8
treee599648a46283c0efbaba045b872648f6d01a757
parent48e8d3a5f4f902f2bcd70cc88ff784aa7d6d2c63
crypto: ecc - Add nbits field to ecc_curve structure

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.

Tested-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ecc_curve_defs.h
crypto/ecrdsa_defs.h
include/crypto/ecc_curve.h