summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-07-24 12:30:32 +0200
committerWerner Koch <wk@gnupg.org>2014-07-25 08:13:56 +0200
commit4556f9b19c024f16bdf542da7173395c0741b91d (patch)
tree5f8785a6cde5043636d65680a9625852c6133178 /doc
parent0e10902ad7584277ac966367efc712b183784532 (diff)
downloadlibgcrypt-4556f9b19c024f16bdf542da7173395c0741b91d.tar.gz
ecc: Support the non-standard 0x40 compression flag for EdDSA.
* cipher/ecc.c (ecc_generate): Check the "comp" flag for EdDSA. * cipher/ecc-eddsa.c (eddsa_encode_x_y): Add arg WITH_PREFIX. (_gcry_ecc_eddsa_encodepoint): Ditto. (_gcry_ecc_eddsa_ensure_compact): Handle the 0x40 compression prefix. (_gcry_ecc_eddsa_decodepoint): Ditto. * tests/keygrip.c: Check an compresssed with prefix Ed25519 key. * tests/t-ed25519.inp: Ditto.
Diffstat (limited to 'doc')
-rw-r--r--doc/gcrypt.texi12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index d59c0958..23efc526 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -2162,7 +2162,9 @@ The private key @math{d}
All point values are encoded in standard format; Libgcrypt does in
general only support uncompressed points, thus the first byte needs to
be @code{0x04}. However ``EdDSA'' describes its own compression
-scheme which is used by default.
+scheme which is used by default; the non-standard first byte
+@code{0x40} may optionally be used to explicit flag the use of the
+algorithm’s native compression method.
The public key is similar with "private-key" replaced by "public-key"
and no @var{d-mpi}.
@@ -2232,9 +2234,11 @@ are known:
If supported by the algorithm and curve the @code{comp} flag requests
that points are returned in compact (compressed) representation. The
@code{nocomp} flag requests that points are returned with full
-coordinates. The default depends on the the algorithm and curve.
-The compact representation requires a small overhead before a point
-can be used but halves the size of a to be conveyed public key.
+coordinates. The default depends on the the algorithm and curve. The
+compact representation requires a small overhead before a point can be
+used but halves the size of a to be conveyed public key. If
+@code{comp} is used with the ``EdDSA'' algorithm the key generation
+prefix the public key with a @code{0x40} byte.
@item pkcs1
@cindex PKCS1