Skip to content

Commit 7380c56

Browse files
ambarusherbertx
authored andcommitted
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: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent ad26959 commit 7380c56

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎crypto/ecc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,8 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
927927
return 0;
928928
}
929929

930-
int ecdh_make_pub_key(unsigned int curve_id, unsigned int ndigits,
931-
const u64 *private_key, u64 *public_key)
930+
int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits,
931+
const u64 *private_key, u64 *public_key)
932932
{
933933
int ret = 0;
934934
struct ecc_point *pk;

‎crypto/ecc.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
4444
const u64 *private_key, unsigned int private_key_len);
4545

4646
/**
47-
* ecdh_make_pub_key() - Compute an ECC public key
47+
* ecc_make_pub_key() - Compute an ECC public key
4848
*
4949
* @curve_id: id representing the curve to use
5050
* @ndigits: curve's number of digits
@@ -54,8 +54,8 @@ int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
5454
* Returns 0 if the public key was generated successfully, a negative value
5555
* if an error occurred.
5656
*/
57-
int ecdh_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
58-
const u64 *private_key, u64 *public_key);
57+
int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
58+
const u64 *private_key, u64 *public_key);
5959

6060
/**
6161
* crypto_ecdh_shared_secret() - Compute a shared secret

‎crypto/ecdh.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static int ecdh_compute_value(struct kpp_request *req)
8787

8888
buf = ctx->shared_secret;
8989
} else {
90-
ret = ecdh_make_pub_key(ctx->curve_id, ctx->ndigits,
91-
ctx->private_key, ctx->public_key);
90+
ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits,
91+
ctx->private_key, ctx->public_key);
9292
buf = ctx->public_key;
9393
/* Public part is a point thus it has both coordinates */
9494
nbytes *= 2;

0 commit comments

Comments
 (0)