diff options
author | Werner Koch <wk@gnupg.org> | 2013-11-11 11:07:56 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-11-11 19:15:20 +0100 |
commit | 8b3eecee2d89179297e43de7d650f74759c61a58 (patch) | |
tree | d66c4c6bd224b74c107dbb1ae475fc179c59d39f /cipher/ecc-curves.c | |
parent | 7b26586e35a6d407ca31b41528b0810b1408fd4b (diff) | |
download | libgcrypt-8b3eecee2d89179297e43de7d650f74759c61a58.tar.gz |
mpi: Add special format GCRYMPI_FMT_OPAQUE.
* src/gcrypt.h.in (GCRYMPI_FMT_OPAQUE): New.
(_gcry_sexp_nth_opaque_mpi): Remove.
* src/sexp.c (gcry_sexp_nth_mpi): Add support for GCRYMPI_FMT_OPAQUE.
(_gcry_sexp_vextract_param): Replace removed function by
GCRYMPI_FMT_OPAQUE.
--
Using a new formatting mode is easier than to add a dedicated
extraction function for opaque MPIs.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/ecc-curves.c')
-rw-r--r-- | cipher/ecc-curves.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index 12f539a4..98fbf0c3 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -599,7 +599,7 @@ point_from_keyparam (gcry_mpi_point_t *r_a, { gcry_mpi_t a; - a = _gcry_sexp_nth_opaque_mpi (l1, 1); + a = gcry_sexp_nth_mpi (l1, 1, GCRYMPI_FMT_OPAQUE); gcry_sexp_release (l1); if (!a) return GPG_ERR_INV_OBJ; @@ -831,7 +831,7 @@ _gcry_mpi_ec_new (gcry_ctx_t *r_ctx, n = NULL; } - /* Now that we now the curve name we can look for the public key + /* Now that we know the curve name we can look for the public key Q. point_from_keyparam needs to know the curve parameters so that it is able to use the correct decompression. Parsing the private key D could have been done earlier but it is less |