#include <mLib/sub.h>
#include "buf.h"
+#include "ct.h"
#include "rand.h"
#include "noise.h"
#include "mprand.h"
exit(EXIT_FAILURE);
}
GH_HASH(h, BCUR(&b), BLEFT(&b));
- if (memcmp(tag, GH_DONE(h, 0), GM_CLASS(m)->hashsz) != 0) {
+ if (!ct_memeq(tag, GH_DONE(h, 0), GM_CLASS(m)->hashsz)) {
if (f & f_progress) fprogress_done(&ff);
if (verb)
printf("FAIL bad ciphertext chunk: authentication failure\n");