diff --git a/ChangeLog b/ChangeLog index 50445514..b26f1f8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,6 @@ instructions set. twice as fast as the portable one. - An SSSE3 optimized implementation of ChaCha20 was added, and is twice as fast as the portable one. - - sodium_increment(), crypto_verify_*() also got a speed bump. - New helper functions have been added: `sodium_is_zero()` and `sodium_add()`. - `sodium_runtime_has_aesni()` now properly detects the CPU flag when diff --git a/src/libsodium/crypto_verify/16/ref/verify_16.c b/src/libsodium/crypto_verify/16/ref/verify_16.c index 7d08f385..55080f09 100644 --- a/src/libsodium/crypto_verify/16/ref/verify_16.c +++ b/src/libsodium/crypto_verify/16/ref/verify_16.c @@ -7,16 +7,6 @@ int crypto_verify_16(const unsigned char *x, const unsigned char *y) { -#ifdef CPU_UNALIGNED_ACCESS - uint_fast64_t d = 0U; - int i; - - for (i = 0; i < 16; i += 4) { - d |= *((const uint32_t *) (const void *) &x[i]) ^ - *((const uint32_t *) (const void *) &y[i]); - } - return (1 & ((d - 1) >> 32)) - 1; -#else uint_fast16_t d = 0U; int i; @@ -24,5 +14,4 @@ crypto_verify_16(const unsigned char *x, const unsigned char *y) d |= x[i] ^ y[i]; } return (1 & ((d - 1) >> 8)) - 1; -#endif } diff --git a/src/libsodium/crypto_verify/32/ref/verify_32.c b/src/libsodium/crypto_verify/32/ref/verify_32.c index 4f7a6f84..2ad2560c 100644 --- a/src/libsodium/crypto_verify/32/ref/verify_32.c +++ b/src/libsodium/crypto_verify/32/ref/verify_32.c @@ -7,16 +7,6 @@ int crypto_verify_32(const unsigned char *x, const unsigned char *y) { -#ifdef CPU_UNALIGNED_ACCESS - uint_fast64_t d = 0U; - int i; - - for (i = 0; i < 32; i += 4) { - d |= *((const uint32_t *) (const void *) &x[i]) ^ - *((const uint32_t *) (const void *) &y[i]); - } - return (1 & ((d - 1) >> 32)) - 1; -#else uint_fast16_t d = 0U; int i; @@ -24,5 +14,4 @@ crypto_verify_32(const unsigned char *x, const unsigned char *y) d |= x[i] ^ y[i]; } return (1 & ((d - 1) >> 8)) - 1; -#endif } diff --git a/src/libsodium/crypto_verify/64/ref/verify_64.c b/src/libsodium/crypto_verify/64/ref/verify_64.c index 06e104c4..b6d32cf1 100644 --- a/src/libsodium/crypto_verify/64/ref/verify_64.c +++ b/src/libsodium/crypto_verify/64/ref/verify_64.c @@ -7,16 +7,6 @@ int crypto_verify_64(const unsigned char *x, const unsigned char *y) { -#ifdef CPU_UNALIGNED_ACCESS - uint_fast64_t d = 0U; - int i; - - for (i = 0; i < 64; i += 4) { - d |= *((const uint32_t *) (const void *) &x[i]) ^ - *((const uint32_t *) (const void *) &y[i]); - } - return (1 & ((d - 1) >> 32)) - 1; -#else uint_fast16_t d = 0U; int i; @@ -24,5 +14,4 @@ crypto_verify_64(const unsigned char *x, const unsigned char *y) d |= x[i] ^ y[i]; } return (1 & ((d - 1) >> 8)) - 1; -#endif }