[Curve25519] Enabled 64-bit implementation
This commit is contained in:
parent
33ed954fbe
commit
aa7269c6dc
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* Fix basepoint for Ed448
|
* Fix basepoint for Ed448
|
||||||
|
|
||||||
|
* Enable 64-bit Curve25519 implementation
|
||||||
|
|
||||||
## 0.15
|
## 0.15
|
||||||
|
|
||||||
* Fix serialization of DH and ECDH
|
* Fix serialization of DH and ECDH
|
||||||
|
|||||||
@ -427,10 +427,8 @@ crecip(felem out, const felem z) {
|
|||||||
/* 2^255 - 21 */ fmul(out, t0, a);
|
/* 2^255 - 21 */ fmul(out, t0, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
int curve25519_donna(u8 *, const u8 *, const u8 *);
|
|
||||||
|
|
||||||
int
|
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];
|
limb bp[5], x[5], z[5], zmone[5];
|
||||||
uint8_t e[32];
|
uint8_t e[32];
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@ -199,7 +199,6 @@ Library
|
|||||||
, cbits/cryptonite_salsa.c
|
, cbits/cryptonite_salsa.c
|
||||||
, cbits/cryptonite_rc4.c
|
, cbits/cryptonite_rc4.c
|
||||||
, cbits/cryptonite_cpu.c
|
, cbits/cryptonite_cpu.c
|
||||||
, cbits/curve25519/curve25519-donna.c
|
|
||||||
, cbits/ed25519/ed25519.c
|
, cbits/ed25519/ed25519.c
|
||||||
, cbits/ed448/x448.c
|
, cbits/ed448/x448.c
|
||||||
, cbits/p256/p256.c
|
, cbits/p256/p256.c
|
||||||
@ -225,6 +224,11 @@ Library
|
|||||||
, cbits/cryptonite_scrypt.c
|
, cbits/cryptonite_scrypt.c
|
||||||
include-dirs: cbits cbits/ed25519
|
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.
|
-- FIXME armel or mispel is also little endian.
|
||||||
-- might be a good idea to also add a runtime autodetect mode.
|
-- might be a good idea to also add a runtime autodetect mode.
|
||||||
-- ARCH_ENDIAN_UNKNOWN
|
-- ARCH_ENDIAN_UNKNOWN
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user