]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
crypto: ecc - rename ecdh_make_pub_key()
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Tue, 30 May 2017 12:37:56 +0000 (15:37 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Jun 2017 04:04:26 +0000 (12:04 +0800)
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>
crypto/ecc.c
crypto/ecc.h
crypto/ecdh.c

index e3a2b8f78a388d4bce82908421e9c69cc74d18f7..6c33c4323d6aed8aee2cf86fdde7fafb1aa93156 100644 (file)
@@ -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;
index af2ffdb2dcd64be187191b81edb5e42d319702ba..e13fe8800ee8dde50879c558d3bc67b8cb1ac5c1 100644 (file)
@@ -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
@@ -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
index c1f01630faad1504081b3ffa57a24220aac3c7f5..ed1464a5ce1b2864666d4cf9b17d0f8b3e0bece9 100644 (file)
@@ -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;