ecc: Support the non-standard 0x40 compression flag for EdDSA.
authorWerner Koch <wk@gnupg.org>
Thu, 24 Jul 2014 10:30:32 +0000 (12:30 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 25 Jul 2014 06:13:56 +0000 (08:13 +0200)
commit4556f9b19c024f16bdf542da7173395c0741b91d
tree5f8785a6cde5043636d65680a9625852c6133178
parent0e10902ad7584277ac966367efc712b183784532
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.
cipher/ecc-common.h
cipher/ecc-curves.c
cipher/ecc-eddsa.c
cipher/ecc.c
doc/gcrypt.texi
tests/keygrip.c
tests/t-ed25519.c
tests/t-ed25519.inp