diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2014-11-19 15:48:12 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2014-11-19 16:03:51 +0900 |
commit | e6130034506013d6153465a2bedb6fb08a43f74d (patch) | |
tree | bd1a881ffac12ab5c413c84406d7aa4a9fc07acb /cipher/ecc-curves.c | |
parent | 95eef21583d8e998efc48f22898c1ae31b77cb48 (diff) | |
download | libgcrypt-e6130034506013d6153465a2bedb6fb08a43f74d.tar.gz |
ecc: Improve Montgomery curve implementation.
* cipher/ecc-curves.c (_gcry_ecc_fill_in_curve): Support
MPI_EC_MONTGOMERY.
* cipher/ecc.c (test_ecdh_only_keys): New.
(nist_generate_key): Call test_ecdh_only_keys for MPI_EC_MONTGOMERY.
(check_secret_key): Handle Montgomery curve of x-coordinate only.
* mpi/ec.c (_gcry_mpi_ec_mul_point): Resize points before the loop.
Simplify, using pointers of Q1, Q2, PRD, and SUM.
--
Diffstat (limited to 'cipher/ecc-curves.c')
-rw-r--r-- | cipher/ecc-curves.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index fd47c1dc..9975bb42 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -530,9 +530,8 @@ _gcry_ecc_fill_in_curve (unsigned int nbits, const char *name, { case MPI_EC_WEIERSTRASS: case MPI_EC_EDWARDS: - break; case MPI_EC_MONTGOMERY: - return GPG_ERR_NOT_SUPPORTED; + break; default: return GPG_ERR_BUG; } |