summaryrefslogtreecommitdiff
path: root/cipher/ecc-common.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-12-02 16:18:25 +0100
committerWerner Koch <wk@gnupg.org>2013-12-02 16:21:45 +0100
commit14ae6224b1b17abbfc80c26ad0f4c60f1e8635e2 (patch)
treec783cf16f3a1e69943b7fa2d76e9487dbf4325b9 /cipher/ecc-common.h
parent485f35124b1a74af0bad321ed70be3a79d8d11d7 (diff)
downloadlibgcrypt-14ae6224b1b17abbfc80c26ad0f4c60f1e8635e2.tar.gz
ecc: Make gcry_pk_testkey work for Ed25519.
* cipher/ecc-misc.c (_gcry_ecc_compute_public): Add optional args G and d. Change all callers. * cipher/ecc.c (gen_y_2): Remove. (check_secret_key): Use generic public key compute function. Adjust for use with Ed25519 and EdDSA. (nist_generate_key): Do not use the compliant key thingy for Ed25519. (ecc_check_secret_key): Make parameter parsing similar to the other functions. * cipher/ecc-curves.c (domain_parms): Zero prefix some parameters so that _gcry_ecc_update_curve_param works correctly. * tests/keygen.c (check_ecc_keys): Add "param" flag. Check all Ed25519 keys.
Diffstat (limited to 'cipher/ecc-common.h')
-rw-r--r--cipher/ecc-common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/ecc-common.h b/cipher/ecc-common.h
index 0cecdc34..74adaece 100644
--- a/cipher/ecc-common.h
+++ b/cipher/ecc-common.h
@@ -91,7 +91,8 @@ const char *_gcry_ecc_dialect2str (enum ecc_dialects dialect);
gcry_mpi_t _gcry_ecc_ec2os (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t p);
gcry_error_t _gcry_ecc_os2ec (mpi_point_t result, gcry_mpi_t value);
-mpi_point_t _gcry_ecc_compute_public (mpi_point_t Q, mpi_ec_t ec);
+mpi_point_t _gcry_ecc_compute_public (mpi_point_t Q, mpi_ec_t ec,
+ mpi_point_t G, gcry_mpi_t d);
/*-- ecc.c --*/