mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-23 07:19:10 +00:00
reduce password hash opslimit, tweaks
This commit is contained in:
parent
33007eadea
commit
01b733a704
2 changed files with 7 additions and 4 deletions
2
common.h
2
common.h
|
@ -17,7 +17,7 @@
|
||||||
#define DETERMINISTIC_LOOP_COUNT 1<<24
|
#define DETERMINISTIC_LOOP_COUNT 1<<24
|
||||||
|
|
||||||
// Argon2 hashed passphrase stretching settings
|
// Argon2 hashed passphrase stretching settings
|
||||||
#define PWHASH_OPSLIMIT 256
|
#define PWHASH_OPSLIMIT 128
|
||||||
#define PWHASH_MEMLIMIT 64 * 1024 * 1024
|
#define PWHASH_MEMLIMIT 64 * 1024 * 1024
|
||||||
#define PWHASH_ALG crypto_pwhash_ALG_ARGON2ID13
|
#define PWHASH_ALG crypto_pwhash_ALG_ARGON2ID13
|
||||||
|
|
||||||
|
|
9
main.c
9
main.c
|
@ -937,11 +937,14 @@ int main(int argc,char **argv)
|
||||||
}
|
}
|
||||||
deterministic = 1;
|
deterministic = 1;
|
||||||
fprintf(stderr, "expanding passphrase..."); fflush(stderr);
|
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)) {
|
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++;
|
argv++;
|
||||||
} else
|
} else
|
||||||
e_additional();
|
e_additional();
|
||||||
|
|
Loading…
Add table
Reference in a new issue