crypto_memcmp,
crypto_zerocmp —
deprecated timing-safe data comparisons
#include
<monocypher.h>
int
crypto_memcmp(
const
uint8_t *p1,
const uint8_t *p2,
size_t n);
int
crypto_zerocmp(
const
uint8_t *p,
size_t n);
crypto_memcmp() and
crypto_zerocmp() were meant to provide
timing-safe data comparison. They have been removed from Monocypher because
they could not uphold those guarantees when compiled with
-O3 on common compilers. Use
crypto_verify16(3monocypher),
crypto_verify32(3monocypher)
and
crypto_verify64(3monocypher)
instead.
crypto_verify16(3monocypher),
intro(3monocypher)
The
crypto_memcmp() function first appeared in
Monocypher 0.1.
crypto_zerocmp() was introduced
in Monocypher 0.6. These functions were removed in Monocypher 1.1.0.