From 893b7c4f17fbb005894553807002e2a74f1163b8 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 15 Nov 2017 16:21:42 +0000 Subject: [PATCH] Remove some unneeded code Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/5105) --- crypto/ec/curve448/decaf/common.h | 6 ------ crypto/ec/curve448/utils.c | 14 -------------- 2 files changed, 20 deletions(-) diff --git a/crypto/ec/curve448/decaf/common.h b/crypto/ec/curve448/decaf/common.h index a9d10cffa8..71f8795e6e 100644 --- a/crypto/ec/curve448/decaf/common.h +++ b/crypto/ec/curve448/decaf/common.h @@ -94,12 +94,6 @@ void decaf_bzero ( size_t size ) DECAF_NONNULL DECAF_API_VIS; -/** Compare two buffers, returning DECAF_TRUE if they are equal. */ -decaf_bool_t decaf_memeq ( - const void *data1, - const void *data2, - size_t size -) DECAF_NONNULL DECAF_WARN_UNUSED DECAF_API_VIS; #ifdef __cplusplus } /* extern "C" */ diff --git a/crypto/ec/curve448/utils.c b/crypto/ec/curve448/utils.c index 0ab0172369..80a6ea5b5b 100644 --- a/crypto/ec/curve448/utils.c +++ b/crypto/ec/curve448/utils.c @@ -27,17 +27,3 @@ void decaf_bzero ( *destroy = 0; #endif } - -decaf_bool_t decaf_memeq ( - const void *data1_, - const void *data2_, - size_t size -) { - const unsigned char *data1 = (const unsigned char *)data1_; - const unsigned char *data2 = (const unsigned char *)data2_; - unsigned char ret = 0; - for (; size; size--, data1++, data2++) { - ret |= *data1 ^ *data2; - } - return (((decaf_dword_t)ret) - 1) >> 8; -} -- 2.25.1