Home GnuPG

ecc: Fix EdDSA encoding for Ed448.

Description

ecc: Fix EdDSA encoding for Ed448.

* cipher/ecc-curves.c (mpi_ec_setup_elliptic_curve): Fix point/scalar
length condition.
* cipher/ecc-eddsa.c (eddsa_encodempi): The second argument is NBITS.
(eddsa_encode_x_y): Likewise.
(_gcry_ecc_eddsa_encodepoint): Follow the change.
(_gcry_ecc_eddsa_ensure_compact): Likewise.
(_gcry_ecc_eddsa_decodepoint): Likewise.
(_gcry_ecc_eddsa_sign): Likewise.  Remove restriction of 256 bits.

In EdDSA with Ed448, point size / scalar size is 57-byte with last
octet which represents sign.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jun 11 2020, 6:55 AM
Parents
rCdb7b2c591004: ecc: Fix NBITS in domain_parms.
Branches
Unknown
Tags
Unknown