math/f25519.[ch]: More field operations.
[catacomb] / progs / cc-sig.c
index 14f5e10..e157e8d 100644 (file)
@@ -37,6 +37,7 @@
 #include "sha.h"
 #include "has160.h"
 
+#include "ct.h"
 #include "ec.h"
 #include "ec-keys.h"
 #include "dh.h"
@@ -634,7 +635,7 @@ static int mac_vrfdoit(sig *s, dstr *d)
   const octet *t;
 
   t = GH_DONE(m->s.h, 0);
-  if (d->len != m->mc->hashsz || memcmp(d->buf, t, d->len) != 0)
+  if (d->len != m->mc->hashsz || !ct_memeq(d->buf, t, d->len))
     return (-1);
   return (0);
 }