Home GnuPG

ecc: Support Montgomery curve for gcry_mpi_ec_mul_point.
34bb55ee36dfUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

ecc: Support Montgomery curve for gcry_mpi_ec_mul_point.

* mpi/ec.c (_gcry_mpi_ec_get_affine): Support Montgomery curve.
(montgomery_ladder): New.
(_gcry_mpi_ec_mul_point): Implemention using montgomery_ladder.
(_gcry_mpi_ec_curve_point): Check x-coordinate is valid.

Given Montgomery curve: b * y^2 == x^3 + a * x^2 + x
CTX->A has (a-2)/4 and CTX->B has b^-1

Note that _gcry_mpi_ec_add_points is not supported for this curve.

Details

Provenance
gniibeAuthored on Aug 12 2014, 3:03 AM
Parents
rCe6d354865bf8: tests: Add a benchmark for Elgamal.
Branches
Unknown
Tags
Unknown

Event Timeline

NIIBE Yutaka <gniibe@fsij.org> committed rC34bb55ee36df: ecc: Support Montgomery curve for gcry_mpi_ec_mul_point. (authored by NIIBE Yutaka <gniibe@fsij.org>).Aug 12 2014, 3:03 AM