From c322b1a63c3d377dcf7cdeeaa5bffb4403137a3a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 1 Jun 2019 15:33:51 +0200 Subject: [PATCH] Revert "scrypt: reject r == 0 and p == 0" This reverts commit 00c8ecd1c492cf5c6599ff5b8c28ed35d54cf2a1. --- .../nosse/pwhash_scryptsalsa208sha256_nosse.c | 4 ---- .../sse/pwhash_scryptsalsa208sha256_sse.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index 5bf0d704..b1c1bd84 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -305,10 +305,6 @@ escrypt_kdf_nosse(escrypt_local_t *local, const uint8_t *passwd, uint32_t i; /* Sanity-check parameters. */ - if (r == 0 || p == 0) { - errno = EINVAL; - return -1; - } #if SIZE_MAX > UINT32_MAX if (buflen > (((uint64_t)(1) << 32) - 1) * 32) { errno = EFBIG; diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c index 688f2d30..754a19fd 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c @@ -317,10 +317,6 @@ escrypt_kdf_sse(escrypt_local_t *local, const uint8_t *passwd, size_t passwdlen, uint32_t i; /* Sanity-check parameters. */ - if (r == 0 || p == 0) { - errno = EINVAL; - return -1; - } # if SIZE_MAX > UINT32_MAX /* LCOV_EXCL_START */ if (buflen > (((uint64_t)(1) << 32) - 1) * 32) {