summaryrefslogtreecommitdiff
path: root/cipher/ecc-misc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-07 10:06:46 +0200
committerWerner Koch <wk@gnupg.org>2013-09-07 10:16:45 +0200
commit4d8c8c7aa88cddb1624301957e6245405f46d027 (patch)
treec8b7e7550a0beccfaa547e241bcbfda3417f3c4b /cipher/ecc-misc.c
parentddfefe429660cc5d798f3517208936449247ae5c (diff)
downloadlibgcrypt-4d8c8c7aa88cddb1624301957e6245405f46d027.tar.gz
mpi: Improve support for non-Weierstrass support.
* mpi/ec.c (ec_p_init): Add args MODEL and P. Change all callers. (_gcry_mpi_ec_p_internal_new): Ditto. (_gcry_mpi_ec_p_new): Ditto. * cipher/ecc-curves.c (_gcry_ecc_fill_in_curve): Return GPG_ERR_UNKNOWN_CURVE instead of invalid value. Init curve model. * cipher/ecc.c (ecc_verify, ecc_encrypt_raw): Ditto. * cipher/pubkey.c (sexp_data_to_mpi): Fix EDDSA flag error checking. -- (fixes commit c26be7a337d0bf98193bc58e043209e46d0769bb)
Diffstat (limited to 'cipher/ecc-misc.c')
-rw-r--r--cipher/ecc-misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cipher/ecc-misc.c b/cipher/ecc-misc.c
index 5c86121a..6c34902c 100644
--- a/cipher/ecc-misc.c
+++ b/cipher/ecc-misc.c
@@ -53,6 +53,7 @@ _gcry_ecc_curve_copy (elliptic_curve_t E)
{
elliptic_curve_t R;
+ R.model = E.model;
R.p = mpi_copy (E.p);
R.a = mpi_copy (E.a);
R.b = mpi_copy (E.b);