From deb547d156b1a15225cac5196a1b71408a761353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= Date: Tue, 19 Mar 2024 16:37:43 +0100 Subject: [PATCH] Increase maximum value of the p cmdline parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upper limit of the value of the `-p` cmdline parameter is 32, which is relatively low. Currently, hashing with logN=20, r=8 and p=32 takes around 90s on my slow CPU (Intel i3-7020U). This is in contrast to the `--logN` parameter, which can be set up to 40, which corresponds to 1TB of RAM. Additionally, the program will automatically pick high values of `p` when given high values of the `-t` (maxtime) parameter. So allow specifying higher values of the `p` parameter in cmdline. Signed-off-by: Mateusz Jończyk --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index ae57450f..d4c106b8 100644 --- a/main.c +++ b/main.c @@ -282,7 +282,7 @@ main(int argc, char * argv[]) } break; GETOPT_OPTARG("-p"): - GETOPT_PARSENUM_WITHIN_UNSIGNED(¶ms.p, 1, 32); + GETOPT_PARSENUM_WITHIN_UNSIGNED(¶ms.p, 1, 2048); break; GETOPT_OPTARG("--passphrase"): if (passphrase_entry != PASSPHRASE_UNSET) {