summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-07 10:06:46 +0200
committerWerner Koch <wk@gnupg.org>2013-09-25 17:06:05 +0200
commitd6683d2a6065986a9198d2d2eaa02c005b68cea4 (patch)
tree20d4f5b0c7512ba955a5e6f9c97d962c989b0a49 /doc
parent9a4447ccd1b90bcd701941e80a7f484a1825fcea (diff)
downloadlibgcrypt-d6683d2a6065986a9198d2d2eaa02c005b68cea4.tar.gz
ecc: Allow the name "q@eddsa" to get/set the public key.
* cipher/ecc-curves.c (_gcry_ecc_get_mpi): Support "q@eddsa". (_gcry_ecc_set_mpi): Support "q". * cipher/ecc.c (eddsa_encodepoint): Rename to ... (_gcry_ecc_eddsa_encodepoint): this and make global. Remove arg MINLEN and take from context. (eddsa_decodepoint): Rename to (_gcry_ecc_eddsa_decodepoint): this and make global. Remove arg LEN and take from context. (sign_eddsa, verify_eddsa): Take B from context. (ecc_sign, ecc_verify): Add hack to set DIALECT. (_gcry_pk_ecc_get_sexp): Use _gcry_ecc_compute_public. Handle EdDSA. * src/ec-context.h (mpi_ec_ctx_s): Add field NBITS. * mpi/ec.c (ec_p_init): Init NBITS. * tests/t-mpi-point.c (test_curve): Add Ed25519. (sample_ed25519_q): New. (context_param): Check new sample key. (hex2buffer, hex2mpiopa): New. (cmp_mpihex): Take care of opaque MPIs. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/gcrypt.texi14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index 5d1be8dd..0590a264 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -4182,10 +4182,16 @@ modified, it is suggested to pass @code{1} to @var{copy}, so that the
function guarantees that a modifiable copy of the MPI is returned. If
@code{0} is used for @var{copy}, this function may return a constant
flagged MPI. In any case @code{gcry_mpi_release} needs to be called
-to release the result. For valid names @ref{ecc_keyparam}. If a
-point parameter is requested it is returned as an uncompressed encoded
-point. If the public key @code{q} is requested but only the private
-key @code{d} is available, @code{q} will be recomputed on the fly.
+to release the result. For valid names @ref{ecc_keyparam}. If the
+public key @code{q} is requested but only the private key @code{d} is
+available, @code{q} will be recomputed on the fly. If a point
+parameter is requested it is returned as an uncompressed
+encoded point unless these special names are used:
+@table @var
+@item q@@eddsa
+Return an EdDSA style compressed point. This is only supported for
+Twisted Edwards curves.
+@end table
@end deftypefun
@deftypefun gcry_mpi_point_t gcry_mpi_ec_get_point ( @