Disable move_conditional_bytes until it can be tested

pull/828/head
Jeffrey Walton 2019-04-30 17:16:41 -04:00
parent 76fc6eccca
commit 4590d98e04
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 12 additions and 4 deletions

View File

@ -927,8 +927,12 @@ curve25519_contract(byte out[32], const bignum25519 in) {
/* out = (flag) ? in : out */
inline void
curve25519_move_conditional_bytes(byte out[96], const byte in[96], word32 flag) {
#if defined(__GNUC__) && defined(__i686__)
curve25519_move_conditional_bytes(byte out[96], const byte in[96], word32 flag)
{
// TODO: enable this code path once we can test and benchmark it.
// It is about 48 insns shorter, it avoids punning which may be UB,
// and it is guaranteed constant time.
#if defined(__GNUC__) && defined(__i686__) && 0
const word32 iter = 96/sizeof(word32);
word32* outl = reinterpret_cast<word32*>(out);
const word32* inl = reinterpret_cast<const word32*>(in);

View File

@ -749,8 +749,12 @@ curve25519_contract(byte *out, const bignum25519 input) {
/* out = (flag) ? in : out */
inline void
curve25519_move_conditional_bytes(byte out[96], const byte in[96], word64 flag) {
#if defined(__GNUC__) && defined(__x86_64__)
curve25519_move_conditional_bytes(byte out[96], const byte in[96], word64 flag)
{
// TODO: enable this code path once we can test and benchmark it.
// It is about 24 insns shorter, it avoids punning which may be UB,
// and it is guaranteed constant time.
#if defined(__GNUC__) && defined(__x86_64__) && 0
const word32 iter = 96/sizeof(word64);
word64* outq = reinterpret_cast<word64*>(out);
const word64* inq = reinterpret_cast<const word64*>(in);