summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-05-23 17:28:46 +0200
committerWerner Koch <wk@gnupg.org>2017-05-23 17:29:43 +0200
commitc1bb3d9fdb6fe5f336af1d5a03fc42bfdc1f8b0b (patch)
treeba52b8ff4fc7156eb3d8d146c55660368bc47fd6
parent4cd94994a9abec9b92fa5972869baf089a28fa76 (diff)
downloadlibgcrypt-c1bb3d9fdb6fe5f336af1d5a03fc42bfdc1f8b0b.tar.gz
doc: Comment fixes
-rw-r--r--cipher/rsa.c2
-rw-r--r--mpi/ec.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/cipher/rsa.c b/cipher/rsa.c
index 895ee04c..7f12ecd6 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -306,7 +306,7 @@ generate_std (RSA_secret_key *sk, unsigned int nbits, unsigned long use_e,
mpi_add_ui (e, e, 2);
}
- /* calculate the secret key d = e^1 mod phi */
+ /* calculate the secret key d = e^-1 mod phi */
d = mpi_snew ( nbits );
mpi_invm (d, e, f );
/* calculate the inverse of p and q (used for chinese remainder theorem)*/
diff --git a/mpi/ec.c b/mpi/ec.c
index 016af005..8a6a656c 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -1255,7 +1255,12 @@ _gcry_mpi_ec_mul_point (mpi_point_t result,
|| (ctx->model == MPI_EC_WEIERSTRASS
&& mpi_is_secure (scalar)))
{
- /* Simple left to right binary method. GECC Algorithm 3.27 */
+ /* Simple left to right binary method. Algorithm 3.27 from
+ * {author={Hankerson, Darrel and Menezes, Alfred J. and Vanstone, Scott},
+ * title = {Guide to Elliptic Curve Cryptography},
+ * year = {2003}, isbn = {038795273X},
+ * url = {http://www.cacr.math.uwaterloo.ca/ecc/},
+ * publisher = {Springer-Verlag New York, Inc.}} */
unsigned int nbits;
int j;