martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
631 stars 71 forks source link

Implemented Lagged Fibonacci generator PRNG providing high-speed, medium-quality numbers. #556

Closed Knogle closed 3 months ago

Knogle commented 3 months ago

Just presenting one more option. Last one i'd like to implement, is a crypto-secure PRNG like AES-CTR.

47f8bd8a-47a0-441f-aa72-379dfd8d395e efb76e33-705a-4bb2-a33b-383f93306843

Knogle commented 3 months ago

I didn't like the statistical results, so i have implemented the substract-and-carry version of a lagged fibonacci generator.

https://en.wikipedia.org/wiki/Subtract_with_carry

During testing, it has better results than ISAAC-64, it's on par with MT19937. 4591287f-6979-4af8-8a59-d93539069a20 de07b5cb-602f-48d6-b0b5-85cee39f61dd

PartialVolume commented 3 months ago

Looking good, 16 drive test underway. About 5 hrs to completion.

https://github.com/martijnvanbrummelen/nwipe/assets/22084881/df0a3cc9-a7d5-41d5-8ed7-f0bb7bc4967c

PartialVolume commented 3 months ago

Just a couple of errors for correction. Screenshot_20240321_102713

and

Screenshot_20240321_103259

Knogle commented 3 months ago

Thanks a lot, fixed that!

PartialVolume commented 3 months ago

Looks great, thanks. 16 drive test passed.

Screenshot_20240321_160307

PartialVolume commented 3 months ago

Last problem, formatting does not pass.

-/* The global options struct. */
-nwipe_options_t nwipe_options;
+    /* The global options struct. */
+    nwipe_options_t nwipe_options;

 int nwipe_options_parse( int argc, char** argv )
 {

Sorry, if you could fix that. Once corrected are you happy with this branch being merged? I don't see any issues so looks good from my perspective.

PartialVolume commented 3 months ago

opps, another problem that is affecting compile, a stray character in options.c

gcc -DHAVE_CONFIG_H -I. -I..     -O0 -g -Wall -Wextra -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -MT options.o -MD -MP -MF $depbase.Tpo -c -o options.o options.c &&\
mv -f $depbase.Tpo $depbase.Po
options.c:1:1: error: stray ‘\’ in program
    1 | \/*
      | ^
make[2]: *** [Makefile:500: options.o] Error 1
Knogle commented 3 months ago

Sounds good to me! Should be fixed now. Could you run a full test maybe for XORo as well?

PartialVolume commented 3 months ago

Sounds good to me! Should be fixed now. Could you run a full test maybe for XORo as well?

Yes, I'll start the xoro test this evening.