Home GnuPG

ecc: Introduce new dialect: ECC_DIALECT_SAFECURVE.

Description

ecc: Introduce new dialect: ECC_DIALECT_SAFECURVE.

* src/mpi.h (ECC_DIALECT_SAFECURVE): New.
* cipher/ecc-misc.c (_gcry_ecc_dialect2str): Support the new dialect.
* cipher/ecc-curves.c (mpi_ec_setup_elliptic_curve): Support opaque
MPI handling of secret 'd' for ECC_DIALECT_SAFECURVE.
* cipher/ecc.c (nist_generate_key): Support opaque secret for
ECC_DIALECT_SAFECURVE.
(test_ecdh_only_keys): Likewise.
(ecc_generate): Support native point representation for
ECC_DIALECT_SAFECURVE.
(ecc_encrypt_raw): Support opaque MPI handling of secret and
native point representation for ECC_DIALECT_SAFECURVE.
(ecc_decrypt_raw): Support native point representation for
ECC_DIALECT_SAFECURVE.
(_gcry_pk_ecc_get_sexp): Likewise.

Possibly, in future, when we will change Ed25519 support
by ECC_DIALECT_SAFECURVE, for backward compatibility, we
will add left-padding zeros in mpi_ec_setup_elliptic_curve.

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

Details

Provenance
gniibeAuthored on Oct 25 2019, 4:18 AM
Parents
rC2dfedafe08ac: ecc: Make _gcry_mpi_ec_mul_point friendly to X25519 computation.
Branches
Unknown
Tags
Unknown