diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-06-17 11:53:14 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-06-17 11:53:14 +0900 |
commit | 5585ee4947082f932ee01d93dfe295c769e96671 (patch) | |
tree | ab7897ca32cbc6a8b17fe29d90b7144457867cd7 | |
parent | c1535d0b8797e9b3bbfb5193b6ab23bf788ffd36 (diff) | |
download | libgcrypt-5585ee4947082f932ee01d93dfe295c769e96671.tar.gz |
ecc: Support Ed448 by _gcry_ecc_compute_public.
* cipher/ecc-misc.c (_gcry_ecc_compute_public): Handle Ed448.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r-- | cipher/ecc-misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cipher/ecc-misc.c b/cipher/ecc-misc.c index 94b6decd..e7ccaff2 100644 --- a/cipher/ecc-misc.c +++ b/cipher/ecc-misc.c @@ -245,8 +245,8 @@ _gcry_ecc_compute_public (mpi_point_t Q, mpi_ec_t ec) if (ec->model == MPI_EC_EDWARDS && !ec->b) return NULL; - if (ec->dialect == ECC_DIALECT_ED25519 - && (ec->flags & PUBKEY_FLAG_EDDSA)) + if ((ec->dialect == ECC_DIALECT_ED25519 && (ec->flags & PUBKEY_FLAG_EDDSA)) + || (ec->model == MPI_EC_EDWARDS && ec->dialect == ECC_DIALECT_SAFECURVE)) { gcry_mpi_t a; unsigned char *digest; |