reduce password hash opslimit, tweaks

This commit is contained in:
cathugger 2019-02-13 23:35:36 +00:00
parent 33007eadea
commit 01b733a704
No known key found for this signature in database
GPG key ID: 9BADDA2DAF6F01A8
2 changed files with 7 additions and 4 deletions

View file

@ -17,7 +17,7 @@
#define DETERMINISTIC_LOOP_COUNT 1<<24
// Argon2 hashed passphrase stretching settings
#define PWHASH_OPSLIMIT 256
#define PWHASH_OPSLIMIT 128
#define PWHASH_MEMLIMIT 64 * 1024 * 1024
#define PWHASH_ALG crypto_pwhash_ALG_ARGON2ID13

9
main.c
View file

@ -937,11 +937,14 @@ int main(int argc,char **argv)
}
deterministic = 1;
fprintf(stderr, "expanding passphrase..."); fflush(stderr);
if (crypto_pwhash(determseed, sizeof(determseed), phrase, strlen(phrase), salt,
if (crypto_pwhash(determseed, sizeof(determseed),
phrase, strlen(phrase), salt,
PWHASH_OPSLIMIT, PWHASH_MEMLIMIT, PWHASH_ALG)) {
fprintf(stderr, "out of memory\n");
fprintf(stderr, " out of memory!\n");
exit(1);
}
fprintf(stderr, "ok\n");
fprintf(stderr, " done.\n");
argv++;
} else
e_additional();