~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/asm-common.h (x86), and knock-on: Add macros for full-size regs.
[catacomb]
/
pub
/
x25519.c
diff --git
a/pub/x25519.c
b/pub/x25519.c
index
f897129
..
cfdfea6
100644
(file)
--- a/
pub/x25519.c
+++ b/
pub/x25519.c
@@
-111,6
+111,7
@@
void x25519(octet zz[X25519_OUTSZ],
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
+#include <mLib/macros.h>
#include <mLib/report.h>
#include <mLib/testrig.h>
#include <mLib/report.h>
#include <mLib/testrig.h>
@@
-131,7
+132,7
@@
static int vrf_x25519(dstr dv[])
(const octet *)dv[0].buf,
(const octet *)dv[1].buf);
ct_remedy(dz.buf, dz.len);
(const octet *)dv[0].buf,
(const octet *)dv[1].buf);
ct_remedy(dz.buf, dz.len);
- if (
memcmp(dz.buf, dv[2].buf, X25519_OUTSZ) != 0
) {
+ if (
MEMCMP(dz.buf, !=, dv[2].buf, X25519_OUTSZ)
) {
ok = 0;
fprintf(stderr, "failed!");
fprintf(stderr, "\n\t k = "); type_hex.dump(&dv[0], stderr);
ok = 0;
fprintf(stderr, "failed!");
fprintf(stderr, "\n\t k = "); type_hex.dump(&dv[0], stderr);
@@
-167,7
+168,7
@@
static int vrf_mct(dstr dv[])
}
memcpy(d.buf, k, d.len);
}
memcpy(d.buf, k, d.len);
- if (
memcmp(d.buf, dv[3].buf, d.len) != 0
) {
+ if (
MEMCMP(d.buf, !=, dv[3].buf, d.len)
) {
ok = 0;
fprintf(stderr, "failed...");
fprintf(stderr, "\n\tinitial k = "); type_hex.dump(&dv[0], stderr);
ok = 0;
fprintf(stderr, "failed...");
fprintf(stderr, "\n\tinitial k = "); type_hex.dump(&dv[0], stderr);