[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-290-g3658afd
by NIIBE Yutaka
cvs at cvs.gnupg.org
Thu Nov 26 03:41:00 CET 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 3658afd09c3b03b4398aaa5748387220c93b1a94 (commit)
from 88e1358962e902ff1cbec8d53ba3eee46407851a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3658afd09c3b03b4398aaa5748387220c93b1a94
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Thu Nov 26 11:37:47 2015 +0900
ecc: minor improvement of point multiplication.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Move ec_subm out of the loop.
diff --git a/mpi/ec.c b/mpi/ec.c
index 4d59a7e..40e09be 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -1415,6 +1415,10 @@ _gcry_mpi_ec_mul_point (mpi_point_t result,
point_init (&p2);
point_init (&p1inv);
+ /* Invert point: y = p - y mod p */
+ point_set (&p1inv, &p1);
+ ec_subm (p1inv.y, ctx->p, p1inv.y, ctx);
+
for (i=loops-2; i > 0; i--)
{
_gcry_mpi_ec_dup_point (result, result, ctx);
@@ -1426,9 +1430,6 @@ _gcry_mpi_ec_mul_point (mpi_point_t result,
if (mpi_test_bit (h, i) == 0 && mpi_test_bit (k, i) == 1)
{
point_set (&p2, result);
- /* Invert point: y = p - y mod p */
- point_set (&p1inv, &p1);
- ec_subm (p1inv.y, ctx->p, p1inv.y, ctx);
_gcry_mpi_ec_add_points (result, &p2, &p1inv, ctx);
}
}
-----------------------------------------------------------------------
Summary of changes:
mpi/ec.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits
More information about the Gcrypt-devel
mailing list