summaryrefslogtreecommitdiff
path: root/mpi/ec.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-04-15 11:11:58 +0200
committerWerner Koch <wk@gnupg.org>2013-04-15 11:12:06 +0200
commit71b25a5562f68aad81eae52cc1bab9ca7731a7e9 (patch)
tree82f38bfef90997ca78e41245e9987c57f518c57a /mpi/ec.c
parentaf8a79aea80217a0c85a592db1fa001792a6bf0f (diff)
downloadlibgcrypt-71b25a5562f68aad81eae52cc1bab9ca7731a7e9.tar.gz
Fix addition of EC points.
* mpi/ec.c (_gcry_mpi_ec_add_points): Fix case of P1 given in affine coordinates. -- This was a plain copy and paste error, which was found due to explicit use of affine coordinates by GNUnet's new pseudonyms code. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'mpi/ec.c')
-rw-r--r--mpi/ec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpi/ec.c b/mpi/ec.c
index c7367069..5d2f5c92 100644
--- a/mpi/ec.c
+++ b/mpi/ec.c
@@ -829,7 +829,7 @@ _gcry_mpi_ec_add_points (mpi_point_t result,
ec_mulm (l1, l1, x1, ctx);
}
if (z1_is_one)
- mpi_set (l2, x1);
+ mpi_set (l2, x2);
else
{
ec_powm (l2, z1, mpi_const (MPI_C_TWO), ctx);