[Curve25519] Enabled 64-bit implementation

This commit is contained in:
John Galt 2016-04-20 11:22:02 -07:00
parent 33ed954fbe
commit aa7269c6dc
3 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,8 @@
* Fix basepoint for Ed448
* Enable 64-bit Curve25519 implementation
## 0.15
* Fix serialization of DH and ECDH

View File

@ -427,10 +427,8 @@ crecip(felem out, const felem z) {
/* 2^255 - 21 */ fmul(out, t0, a);
}
int curve25519_donna(u8 *, const u8 *, const u8 *);
int
curve25519_donna(u8 *mypublic, const u8 *secret, const u8 *basepoint) {
cryptonite_curve25519_donna(u8 *mypublic, const u8 *secret, const u8 *basepoint) {
limb bp[5], x[5], z[5], zmone[5];
uint8_t e[32];
int i;

View File

@ -199,7 +199,6 @@ Library
, cbits/cryptonite_salsa.c
, cbits/cryptonite_rc4.c
, cbits/cryptonite_cpu.c
, cbits/curve25519/curve25519-donna.c
, cbits/ed25519/ed25519.c
, cbits/ed448/x448.c
, cbits/p256/p256.c
@ -225,6 +224,11 @@ Library
, cbits/cryptonite_scrypt.c
include-dirs: cbits cbits/ed25519
if arch(x86_64)
C-sources: cbits/curve25519/curve25519-donna-c64.c
else
C-sources: cbits/curve25519/curve25519-donna.c
-- FIXME armel or mispel is also little endian.
-- might be a good idea to also add a runtime autodetect mode.
-- ARCH_ENDIAN_UNKNOWN