From 75e7ddea02599443f99dc23aec0913d28fb22719 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 1 Mar 2020 20:37:09 +0000 Subject: [PATCH] cmdgen: add help for the --primes option. There's always something. I added the actual option, but forgot to advertise it in the online help. While I'm here, I've also allowed the word 'proven' as an alternative spelling for 'provable', because having the approved spellings be 'probable' and 'provable' is just asking for hilarious typos. --- cmdgen.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmdgen.c b/cmdgen.c index 21e7b0e5..a429d77e 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -142,6 +142,10 @@ void help(void) " specify file containing new key passphrase\n" " --random-device device\n" " specify device to read entropy from (e.g. /dev/urandom)\n" + " --primes select prime-generation method:\n" + " probable conventional probabilistic prime finding\n" + " proven numbers that have been proven to be prime\n" + " proven-even also try harder for an even distribution\n" ); } @@ -338,10 +342,12 @@ int main(int argc, char **argv) !strcmp(val, "probabilistic")) { primegen = &primegen_probabilistic; } else if (!strcmp(val, "provable") || + !strcmp(val, "proven") || !strcmp(val, "simple") || !strcmp(val, "maurer-simple")) { primegen = &primegen_provable_maurer_simple; } else if (!strcmp(val, "provable-even") || + !strcmp(val, "proven-even") || !strcmp(val, "even") || !strcmp(val, "complex") || !strcmp(val, "maurer-complex")) {