Skip to content

Commit

Permalink
crypto: ecc - rename ecdh_make_pub_key()
Browse files Browse the repository at this point in the history
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: Tudor Ambarus <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ambarus authored and herbertx committed Jun 10, 2017
1 parent ad26959 commit 7380c56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crypto/ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,8 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
return 0;
}

int ecdh_make_pub_key(unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key)
int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key)
{
int ret = 0;
struct ecc_point *pk;
Expand Down
6 changes: 3 additions & 3 deletions crypto/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
* 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
* @ndigits: curve's number of digits
Expand All @@ -54,8 +54,8 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
* Returns 0 if the public key was generated successfully, a negative value
* if an error occurred.
*/
int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key);
int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
const u64 *private_key, u64 *public_key);

/**
* crypto_ecdh_shared_secret() - Compute a shared secret
Expand Down
4 changes: 2 additions & 2 deletions crypto/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ static int ecdh_compute_value(struct kpp_request *req)

buf = ctx->shared_secret;
} else {
ret = ecdh_make_pub_key(ctx->curve_id, ctx->ndigits,
ctx->private_key, ctx->public_key);
ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits,
ctx->private_key, ctx->public_key);
buf = ctx->public_key;
/* Public part is a point thus it has both coordinates */
nbytes *= 2;
Expand Down

0 comments on commit 7380c56

Please sign in to comment.