1 /* $OpenBSD: verify.c,v 1.3 2013/12/09 11:03:45 markus Exp $ */
4 * Public Domain, Author: Daniel J. Bernstein
5 * Copied from nacl-20110221/crypto_verify/32/ref/verify.c
10 #include "crypto_api.h"
12 int crypto_verify_32(const unsigned char *x
,const unsigned char *y
)
14 unsigned int differentbits
= 0;
15 #define F(i) differentbits |= x[i] ^ y[i];
48 return (1 & ((differentbits
- 1) >> 8)) - 1;