Increase maximum allowed PBKDF memory limit.

And also fix physical memory trimming function
to really allow requested value.
This commit is contained in:
Milan Broz
2018-01-20 17:04:02 +01:00
parent 1ca439f4e0
commit 74c914475f
2 changed files with 5 additions and 8 deletions

View File

@@ -52,7 +52,7 @@
#define MAX_ERROR_LENGTH 512
#define MAX_PBKDF_THREADS 4
#define MAX_PBKDF_MEMORY 1024*1024 /* 1GiB */
#define MAX_PBKDF_MEMORY 4*1024*1024 /* 4GiB */
#define MIN_PBKDF2_ITERATIONS 1000 /* recommendation in NIST SP 800-132 */
#define at_least(a, b) ({ __typeof__(a) __at_least = (a); (__at_least >= (b))?__at_least:(b); })