summary refs log tree commit diff
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
commit703c748d5f2c4f6d2b494405130d61b8275189cf (patch)
treec18473d089a22fd02d5cc7b79de93a30f235ddef /crypto/ecc.c
parent4e6602916bc692ee31ac5b8bd8195fb078556844 (diff)
downloadlinux-703c748d5f2c4f6d2b494405130d61b8275189cf.tar.gz
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 25e79fd70566..f6cef5a7942d 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;
 	}