summaryrefslogtreecommitdiff
path: root/doc/gcrypt.texi
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-03-19 15:12:07 +0100
committerWerner Koch <wk@gnupg.org>2013-03-19 15:12:07 +0100
commit931e409e877d1e444edd53dead327ec8e64daf9a (patch)
tree841c4f30324273512effe06d32af6f36d8da26c8 /doc/gcrypt.texi
parent229f3219f80c9369ed9624242c0436ae6d293201 (diff)
downloadlibgcrypt-931e409e877d1e444edd53dead327ec8e64daf9a.tar.gz
Extend the new EC interface and fix two bugs.
* src/ec-context.h (mpi_ec_ctx_s): Add field NEED_SYNC. * mpi/ec.c (ec_p_sync): New. (ec_p_init): Only set NEED_SYNC. (_gcry_mpi_ec_set_mpi): Set NEED_SYNC for 'p' and 'a'. (_gcry_mpi_ec_dup_point, _gcry_mpi_ec_add_points) (_gcry_mpi_ec_mul_point): Call ec_p_sync. (_gcry_mpi_ec_get_point): Recompute 'q' is needed. (_gcry_mpi_ec_get_mpi): Ditto. Also allow for names 'q', 'q.x', 'q.y', and 'g'. * cipher/ecc.c (_gcry_mpi_ec_ec2os): New. * cipher/ecc.c (_gcry_mpi_ec_new): Fix init from parameters 'Q'->'q', 'G'->'q'. -- Note that the parameter names are all lowercase. This patch fixes an inconsistency. The other bug was that changing the parameters D or A may have resulted in wrong computations because helper variables were not updated. Now we delay the computation of those helper variables until we need them.
Diffstat (limited to 'doc/gcrypt.texi')
-rw-r--r--doc/gcrypt.texi9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index 4d48eb4c..a6b585df 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -3953,7 +3953,10 @@ 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}.
+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.
@end deftypefun
@deftypefun gcry_mpi_point_t gcry_mpi_ec_get_point ( @
@@ -3965,7 +3968,9 @@ 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 point. In any case @code{gcry_mpi_point_release} needs to be
-called to release the result.
+called to release the result. 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.
@end deftypefun
@deftypefun gpg_error_t gcry_mpi_ec_set_mpi ( @