summaryrefslogtreecommitdiff
path: root/crypto/ecc.c
diff options
context:
space:
mode:
authorSaulo Alessandre <saulo.alessandre@tse.jus.br>2021-03-16 17:07:33 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2021-03-26 19:41:58 +1100
commit9f8a901b7ebf10355faa58f017be1bb26841b4b5 (patch)
treed26ac03d31d03699e87083828f7c1b4606372dd1 /crypto/ecc.c
parentef4af956b9d00ac14d554ace5d9d2f517af2d42b (diff)
downloadlinux-crypto-9f8a901b7ebf10355faa58f017be1bb26841b4b5.tar.gz
linux-crypto-9f8a901b7ebf10355faa58f017be1bb26841b4b5.zip
crypto: ecc - Add NIST P384 curve parameters
Add the parameters for the NIST P384 curve and define a new curve ID for it. Make the curve available in ecc_get_curve. Summary of changes: * crypto/ecc_curve_defs.h - add nist_p384 params * include/crypto/ecdh.h - add ECC_CURVE_NIST_P384 * crypto/ecc.c - change ecc_get_curve to accept nist_p384 Signed-off-by: Saulo Alessandre <saulo.alessandre@tse.jus.br> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc.c')
-rw-r--r--crypto/ecc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ecc.c b/crypto/ecc.c
index 25e79fd7..f6cef5a7 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -50,6 +50,8 @@ const struct ecc_curve *ecc_get_curve(unsigned int curve_id)
return fips_enabled ? NULL : &nist_p192;
case ECC_CURVE_NIST_P256:
return &nist_p256;
+ case ECC_CURVE_NIST_P384:
+ return &nist_p384;
default:
return NULL;
}