diff --git a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256.c b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256.c index c57cc58a..7aaead21 100644 --- a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256.c +++ b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/nosse/pwhash_scryptxsalsa208sha256.c @@ -204,7 +204,6 @@ smix(uint8_t * B, size_t r, uint64_t N, uint32_t * V, uint32_t * XY) blkxor(Y, &V[j * (32 * r)], 128 * r); blockmix_salsa8(Y, X, Z, r); } - /* 10: B' <-- X */ for (k = 0; k < 32 * r; k++) le32enc(&B[4 * k], X[k]); @@ -265,7 +264,7 @@ escrypt_kdf_nosse(escrypt_local_t * local, errno = ENOMEM; return -1; } - XY_size = (size_t)256 * r; + XY_size = (size_t)256 * r + 64; need += XY_size; if (need < XY_size) { errno = ENOMEM; diff --git a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256.c b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256.c index 68a81025..4f3e6584 100644 --- a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256.c +++ b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256.c @@ -348,7 +348,7 @@ escrypt_kdf_sse(escrypt_local_t * local, errno = ENOMEM; return -1; } - XY_size = (size_t)256 * r; + XY_size = (size_t)256 * r + 64; need += XY_size; if (need < XY_size) { errno = ENOMEM;