~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/mpx-mul4-*.S: Use more portable type syntax for ambiguous instructions.
[catacomb]
/
symm
/
hmac-def.h
diff --git
a/symm/hmac-def.h
b/symm/hmac-def.h
index
e3f12ce
..
76d578d
100644
(file)
--- a/
symm/hmac-def.h
+++ b/
symm/hmac-def.h
@@
-68,12
+68,11
@@
/* --- Useful constants --- */ \
\
const octet pre##_hmackeysz[] = \
/* --- Useful constants --- */ \
\
const octet pre##_hmackeysz[] = \
- { KSZ_ANY | KSZ_16BIT, PRE##_
STATESZ/256, PRE##_STATESZ%256 };
\
+ { KSZ_ANY | KSZ_16BIT, PRE##_
HASHSZ/256, PRE##_HASHSZ%256 };
\
const octet pre##_sslmackeysz[] = \
const octet pre##_sslmackeysz[] = \
- { KSZ_ANY | KSZ_16BIT, PRE##_
STATESZ/256, PRE##_STATESZ%256 };
\
+ { KSZ_ANY | KSZ_16BIT, PRE##_
HASHSZ/256, PRE##_HASHSZ%256 };
\
const octet pre##_nmackeysz[] = \
const octet pre##_nmackeysz[] = \
- { KSZ_SET | KSZ_16BIT, \
- 2*PRE##_STATESZ/256, 2*PRE##_STATESZ%256, 0, 0 }; \
+ { KSZ_SET | KSZ_16BIT, 2*PRE##_HASHSZ/256, 2*PRE##_HASHSZ%256, 0, 0 }; \
\
/* --- @pre_nmacinit@ --- * \
* \
\
/* --- @pre_nmacinit@ --- * \
* \
@@
-360,6
+359,7
@@
HMAC_TESTX(PRE, pre, name, fname)
#include <stdio.h>
#include <stdio.h>
+#include <mLib/macros.h>
#include <mLib/dstr.h>
#include <mLib/quis.h>
#include <mLib/testrig.h>
#include <mLib/dstr.h>
#include <mLib/quis.h>
#include <mLib/testrig.h>
@@
-400,7
+400,7
@@
static int macverify(dstr *v) \
csz -= i; \
} \
pre##_macdone(&cctx, d.buf); \
csz -= i; \
} \
pre##_macdone(&cctx, d.buf); \
- if (
memcmp(d.buf, v[2].buf, PRE##_HASHSZ) != 0) {
\
+ if (
MEMCMP(d.buf, !=, v[2].buf, PRE##_HASHSZ)) {
\
printf("\nfail:\n\tstep = %i\n\tinput = `%s'\n\tkey = ", \
*ip, v[0].buf); \
type_hex.dump(&v[1], stdout); \
printf("\nfail:\n\tstep = %i\n\tinput = `%s'\n\tkey = ", \
*ip, v[0].buf); \
type_hex.dump(&v[1], stdout); \