ecc: CHANGE point representation of Curve25519.
* cipher/ecc-misc.c (_gcry_ecc_mont_decodepoint): Decode point with the prefix 0x40, additional 0x00 by MPI handling, and shorter octets by MPI normalization. * cipher/ecc.c (ecc_generate, ecc_encrypt_raw, ecc_decrypt_raw): Always add the prefix 0x40.
Curve25519 native little-endian point representation is not friendly
to existing practice of OpenPGP code, where MPI is assumed. MPI
handling might insert 0x00 in the beginning to avoid sign confusion.
MPI handling also might remove 0x00s in the front. So, it is safe
to put the prefix 0x40.
While we support old point representation of no prefix in
ecc_mont_decodepoint, new libgcrypt always put the prefix.