ecc: Use faster b parameter for Ed25519.
authorWerner Koch <wk@gnupg.org>
Mon, 30 Sep 2013 19:14:11 +0000 (21:14 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 30 Sep 2013 19:14:11 +0000 (21:14 +0200)
commit1d85452412b65e7976bc94969fc513ff6b880ed8
tree288a8367d37f1a4b75785032a3db14d1fbd310ad
parenta2618c822e666d4121cba29bee3fd50bf70c9743
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>
cipher/ecc-curves.c
tests/t-mpi-point.c