summaryrefslogtreecommitdiff
path: root/cipher/ecc-common.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-10-22 14:26:53 +0200
committerWerner Koch <wk@gnupg.org>2013-12-06 20:59:24 +0100
commit405021cb6d4e470337302c65dec5bc91491a89c1 (patch)
treefa9b5b6b98c2f37aac1d80ac8e0c035030513ac7 /cipher/ecc-common.h
parent4cf2c65fe15173c8d68a141a01b34fc1fb9080b7 (diff)
downloadlibgcrypt-405021cb6d4e470337302c65dec5bc91491a89c1.tar.gz
ecc: Merge partly duplicated code.
* cipher/ecc-eddsa.c (_gcry_ecc_eddsa_sign): Factor A hashing out to ... (_gcry_ecc_eddsa_compute_h_d): new function. * cipher/ecc-misc.c (_gcry_ecc_compute_public): Use new function. (reverse_buffer): Remove. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/ecc-common.h')
-rw-r--r--cipher/ecc-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cipher/ecc-common.h b/cipher/ecc-common.h
index dc4a9d03..c407c744 100644
--- a/cipher/ecc-common.h
+++ b/cipher/ecc-common.h
@@ -115,6 +115,8 @@ gpg_err_code_t _gcry_ecc_eddsa_decodepoint (gcry_mpi_t pk, mpi_ec_t ctx,
mpi_point_t result,
unsigned char **r_encpk,
unsigned int *r_encpklen);
+gpg_err_code_t _gcry_ecc_eddsa_compute_h_d (unsigned char **r_digest,
+ gcry_mpi_t d, mpi_ec_t ec);
gpg_err_code_t _gcry_ecc_eddsa_genkey (ECC_secret_key *sk,
elliptic_curve_t *E,