From e6e638c4dc164328ce63dd99d95ace0e6ba33d7c Mon Sep 17 00:00:00 2001 From: Fabian Druschke Date: Thu, 28 Mar 2024 11:51:47 -0300 Subject: [PATCH 1/3] Advocate for PRNG as default option, as well as XORoshiro-256 for 64-Bit systems, and Additive Lagged Fibonacci Generator for 32-Bit legacy systems --- src/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.c b/src/options.c index fd706c9..c78f301 100644 --- a/src/options.c +++ b/src/options.c @@ -129,8 +129,8 @@ int nwipe_options_parse( int argc, char** argv ) /* Set default options. */ nwipe_options.autonuke = 0; nwipe_options.autopoweroff = 0; - nwipe_options.method = &nwipe_dodshort; - nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_isaac64 : &nwipe_isaac; + nwipe_options.method = &nwipe_random; + nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &add_lagg_fibonacci_prng; nwipe_options.rounds = 1; nwipe_options.noblank = 0; nwipe_options.nousb = 0; From 616a2ab2366c66de5986233379c40523a1193eda Mon Sep 17 00:00:00 2001 From: Fabian Druschke Date: Thu, 28 Mar 2024 11:56:54 -0300 Subject: [PATCH 2/3] Forgot nwipe_ in front of add_lagged_fibonacci, leading to compiling error --- src/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.c b/src/options.c index c78f301..134502d 100644 --- a/src/options.c +++ b/src/options.c @@ -130,7 +130,7 @@ int nwipe_options_parse( int argc, char** argv ) nwipe_options.autonuke = 0; nwipe_options.autopoweroff = 0; nwipe_options.method = &nwipe_random; - nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &add_lagg_fibonacci_prng; + nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &nwipe_add_lagg_fibonacci_prng; nwipe_options.rounds = 1; nwipe_options.noblank = 0; nwipe_options.nousb = 0; From 0114ccf93774640dc16be4e72b0154c36cf8143b Mon Sep 17 00:00:00 2001 From: Fabian Druschke Date: Thu, 28 Mar 2024 11:58:07 -0300 Subject: [PATCH 3/3] Fixed formatting using make format for options.c --- src/options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/options.c b/src/options.c index 134502d..903b2dc 100644 --- a/src/options.c +++ b/src/options.c @@ -130,7 +130,8 @@ int nwipe_options_parse( int argc, char** argv ) nwipe_options.autonuke = 0; nwipe_options.autopoweroff = 0; nwipe_options.method = &nwipe_random; - nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &nwipe_add_lagg_fibonacci_prng; + nwipe_options.prng = + ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &nwipe_add_lagg_fibonacci_prng; nwipe_options.rounds = 1; nwipe_options.noblank = 0; nwipe_options.nousb = 0;