CRYPTO_MEMCMP(3MONOCYPHER) 3MONOCYPHER CRYPTO_MEMCMP(3MONOCYPHER)

NAME

crypto_memcmp, crypto_zerocmpdeprecated timing-safe data comparisons

SYNOPSIS

#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);

DESCRIPTION

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.

SEE ALSO

crypto_verify16(3monocypher), intro(3monocypher)

HISTORY

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.
December 28, 2017 Linux 4.15.0-65-generic