scrypt_nosse: Remove the 64-bit version of blkxor()

It broke strict aliasing.

Also remove ARCH_BITS that is not required any longer.

Fixes #1301
This commit is contained in:
Frank Denis
2023-08-31 23:23:30 +02:00
parent b828df51dd
commit 0ea62015f2
2 changed files with 0 additions and 14 deletions
@@ -36,12 +36,6 @@
#include "private/quirks.h"
#if SIZE_MAX > 0xffffffffULL
#define ARCH_BITS 64
#else
#define ARCH_BITS 32
#endif
#define crypto_pwhash_scryptsalsa208sha256_STRPREFIXBYTES 14
#define crypto_pwhash_scryptsalsa208sha256_STRSETTINGBYTES 57
#define crypto_pwhash_scryptsalsa208sha256_STRSALTBYTES 32
@@ -49,17 +49,9 @@ blkxor(uint32_t *dest, const uint32_t *src, size_t len)
{
size_t i;
#if ARCH_BITS == 32
for (i = 0; i < len * 16; i++) {
dest[i] ^= src[i];
}
#else
uint64_t *dest_ = (uint64_t *) (void *) dest;
const uint64_t *src_ = (const uint64_t *) (const void *) src;
for (i = 0; i < len * 8; i++) {
dest_[i] ^= src_[i];
}
#endif
}
/*