Home GnuPG

ecc: Use faster b parameter for Ed25519.
1d85452412b6Unpublished

Unpublished Commit · Learn More

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

Description

ecc: Use faster b parameter for Ed25519.

* cipher/ecc-curves.c (domain_parms): Replace b.
* tests/t-mpi-point.c (test_curve): Ditto.

This change has been suggested by NIIBE Yutaka:

Here,

  0x98412DFC9311D490018C7338BF8688861767FF8FF5B2BEBE27548A14B235EC8FEDA4

is: (121666^-1 mod q)*121665.

(121666^-1) * 121665 mod q is:

  0x2DFC9311D490018C7338BF8688861767FF8FF5B2BEBE27548A14B235ECA6874A

While it works for both, I think that shorter is better.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Sep 30 2013, 9:14 PM
Parents
rCa2618c822e66: ecc: Prepare for future Ed25519 optimization.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC1d85452412b6: ecc: Use faster b parameter for Ed25519. (authored by Werner Koch <wk@gnupg.org>).Sep 30 2013, 9:14 PM