linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <horia.geanta@nxp.com>,
	Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: [PATCH v5 04/14] crypto: ecc - rename ecdh_make_pub_key()
Date: Tue, 30 May 2017 15:37:56 +0300	[thread overview]
Message-ID: <1496147876-3616-1-git-send-email-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <260d4e89-76a5-6566-829a-4e95529dd556@microchip.com>

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>
---
v5 updates the description of the function by replacing
"ecdh_make_pub_key()" with "ecc_make_pub_key()". I also
updated the commit message.

Herbert, do I need to resend a new series for this change or
having the updated patch like this is ok for you?

 crypto/ecc.c  | 4 ++--
 crypto/ecc.h  | 6 +++---
 crypto/ecdh.c | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/crypto/ecc.c b/crypto/ecc.c
index e3a2b8f..6c33c43 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -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;
diff --git a/crypto/ecc.h b/crypto/ecc.h
index af2ffdb..e13fe88 100644
--- a/crypto/ecc.h
+++ b/crypto/ecc.h
@@ -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
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index c1f0163..ed1464a 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -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;
-- 
2.7.4

  reply	other threads:[~2017-05-30 12:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25  7:18 [PATCH v4 00/14] fixes for kpp and akcipher Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 01/14] crypto: kpp, (ec)dh - fix typos Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 02/14] crypto: ecc - remove unused function arguments Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 03/14] crypto: ecc - remove unnecessary casts Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 04/14] crypto: ecc - don't be selfish on pubkeys Tudor Ambarus
2017-05-28 17:22   ` Horia Geantă
2017-05-29 14:11     ` Tudor Ambarus
2017-05-30 12:37       ` Tudor Ambarus [this message]
2017-05-25  7:18 ` [PATCH v4 05/14] crypto: dh - fix memleak in setkey Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 06/14] crypto: kpp: maxsize() - assume key is already set Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 07/14] crypto: dh - comply with crypto_kpp_maxsize() Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 08/14] crypto: ecdh " Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 09/14] crypto: qat " Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 10/14] crypto: akcipher: maxsize() - assume key is already set Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 11/14] crypto: rsa - comply with crypto_akcipher_maxsize() Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 12/14] crypto: caampkc " Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 13/14] crypto: qat " Tudor Ambarus
2017-05-25  7:18 ` [PATCH v4 14/14] crypto: pkcs1pad " Tudor Ambarus
2017-06-10  4:17 ` [PATCH v4 00/14] fixes for kpp and akcipher Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496147876-3616-1-git-send-email-tudor.ambarus@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).