summaryrefslogtreecommitdiff
path: root/cipher/ecc-curves.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-30 21:14:11 +0200
committerWerner Koch <wk@gnupg.org>2013-09-30 21:14:11 +0200
commit1d85452412b65e7976bc94969fc513ff6b880ed8 (patch)
tree288a8367d37f1a4b75785032a3db14d1fbd310ad /cipher/ecc-curves.c
parenta2618c822e666d4121cba29bee3fd50bf70c9743 (diff)
downloadlibgcrypt-1d85452412b65e7976bc94969fc513ff6b880ed8.tar.gz
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>
Diffstat (limited to 'cipher/ecc-curves.c')
-rw-r--r--cipher/ecc-curves.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c
index 74473407..15888a8b 100644
--- a/cipher/ecc-curves.c
+++ b/cipher/ecc-curves.c
@@ -103,7 +103,7 @@ static const ecc_domain_parms_t domain_parms[] =
MPI_EC_TWISTEDEDWARDS, ECC_DIALECT_ED25519,
"0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED",
"-0x01",
- "-0x98412DFC9311D490018C7338BF8688861767FF8FF5B2BEBE27548A14B235EC8FEDA4",
+ "-0x2DFC9311D490018C7338BF8688861767FF8FF5B2BEBE27548A14B235ECA6874A",
"0x1000000000000000000000000000000014DEF9DEA2F79CD65812631A5CF5D3ED",
"0x216936D3CD6E53FEC0A4E231FDD6DC5C692CC7609525A7B2C9562D608F25D51A",
"0x6666666666666666666666666666666666666666666666666666666666666658"