Commit 8adbde73 authored by Tudor-Dan Ambarus's avatar Tudor-Dan Ambarus Committed by Stefan Bader

crypto: ecc - rename ecdh_make_pub_key()

Rename ecdh_make_pub_key() to ecc_make_pub_key().
ecdh_make_pub_key() is not dh specific and the reference
to dh is wrong.
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>

CVE-2018-5383

(cherry picked from commit 7380c56d)
Signed-off-by: default avatarPaolo Pisati <paolo.pisati@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 8ab4f148
...@@ -927,7 +927,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, ...@@ -927,7 +927,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
return 0; return 0;
} }
int ecdh_make_pub_key(unsigned int curve_id, unsigned int ndigits, int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key) const u64 *private_key, u64 *public_key)
{ {
int ret = 0; int ret = 0;
......
...@@ -44,7 +44,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, ...@@ -44,7 +44,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, unsigned int private_key_len); const u64 *private_key, unsigned int private_key_len);
/** /**
* ecdh_make_pub_key() - Compute an ECC public key * ecc_make_pub_key() - Compute an ECC public key
* *
* @curve_id: id representing the curve to use * @curve_id: id representing the curve to use
* @ndigits: curve's number of digits * @ndigits: curve's number of digits
...@@ -54,7 +54,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits, ...@@ -54,7 +54,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
* Returns 0 if the public key was generated successfully, a negative value * Returns 0 if the public key was generated successfully, a negative value
* if an error occurred. * if an error occurred.
*/ */
int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits, int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key); const u64 *private_key, u64 *public_key);
/** /**
......
...@@ -86,7 +86,7 @@ static int ecdh_compute_value(struct kpp_request *req) ...@@ -86,7 +86,7 @@ static int ecdh_compute_value(struct kpp_request *req)
buf = ctx->shared_secret; buf = ctx->shared_secret;
} else { } else {
ret = ecdh_make_pub_key(ctx->curve_id, ctx->ndigits, ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits,
ctx->private_key, ctx->public_key); ctx->private_key, ctx->public_key);
buf = ctx->public_key; buf = ctx->public_key;
/* Public part is a point thus it has both coordinates */ /* Public part is a point thus it has both coordinates */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment