]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ecc - Add math to support fast NIST P384
authorSaulo Alessandre <saulo.alessandre@tse.jus.br>
Tue, 16 Mar 2021 21:07:34 +0000 (17:07 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Mar 2021 08:41:58 +0000 (19:41 +1100)
commit317a5622ae058a889b282a5662d76c4c6fa70243
tree40742486f2b9f2733eb933a00c1934852214ebe0
parent0a362dd375585c1c1a6e4c7322b9fbcf53218c69
crypto: ecc - Add math to support fast NIST P384

Add the math needed for NIST P384 and adapt certain functions'
parameters so that the ecc_curve is passed to vli_mmod_fast. This
allows to identify the curve by its name prefix and the appropriate
function for fast mmod calculation can be used.

Summary of changes:

* crypto/ecc.c
  - add vli_mmod_fast_384
  - change some routines to pass ecc_curve forward until vli_mmod_fast

* crypto/ecc.h
  - add ECC_CURVE_NIST_P384_DIGITS
  - change ECC_MAX_DIGITS to P384 size

Signed-off-by: Saulo Alessandre <saulo.alessandre@tse.jus.br>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ecc.c
crypto/ecc.h