#define M26 0x03ffffffu
#define M25 0x01ffffffu
-#define B26 0x04000000u
#define B25 0x02000000u
#define B24 0x01000000u
((i) == 5 || (i) == 10 || (i) == 15 || (i) == 20 || (i) == 25 ? 9 : 10)
#define NPIECE 26
-#define B10 0x0400
-#define B9 0x200
-#define B8 0x100
#define M10 0x3ff
#define M9 0x1ff
+#define B9 0x200
+#define B8 0x100
#endif
* and lower bounds are achievable.
*
* All of the x_i at this point are positive, so we don't need to do
- * anything wierd when masking them.
+ * anything weird when masking them.
*/
b = x9&B24; c = 19&((b >> 19) - (b >> 24)); x9 -= b << 1;
b = x8&B25; x9 += b >> 25; x8 -= b << 1;
#ifdef TEST_RIG
+#include <mLib/macros.h>
#include <mLib/report.h>
#include <mLib/str.h>
#include <mLib/testrig.h>
}
static int eq(const f25519 *x, dstr *d)
- { octet b[32]; f25519_store(b, x); return (memcmp(b, d->buf, 32) == 0); }
+ { octet b[32]; f25519_store(b, x); return (MEMCMP(b, ==, d->buf, 32)); }
static const test_type
type_f25519 = { cvt_f25519, dump_f25519 },