Deterministic RNG

Wishlists for new functionality and features.
Post Reply
nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Deterministic RNG

Post by nghca » 26 Feb 2019 19:07

Could you consider a re-seeding cycle after a constantly randomized range, e.g., after rand(750-1250)K of data, so that over larger ranges less deterministic randomness is introduced?

Maël
Site Admin
Posts: 1066
Joined: 12 Mar 2005 14:15

Re: Deterministic RNG

Post by Maël » 26 Feb 2019 20:04

Hi, I deleted your other post in support, since it was a duplicate.

For a truly (or at least cryptographically secure) random number generator this probably wont suffice.

Do you want to wipe data or what is the purpose of this change? Because in this case, there might be other points to keep in mind.

If you have any references to algorithms, that would be welcome as well.

nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Re: Deterministic RNG

Post by nghca » 26 Feb 2019 20:45

Purpose is to wipe data but more securely, without too much deterministic number.

There are many prng out there, but according to your method if reseed after randomized range, should be enough for non-deterministic standards without too much coding overhead.

Of course you could adopt a variation of DBAN Mersenne Twister, etc, or use a hybrid (random choice of your current method/Mersenne, randomized range before switching method and reseed) to be really strong.

nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Re: Deterministic RNG

Post by nghca » 26 Feb 2019 21:17

A xoroshiro256+ with randomized range is also good and supposedly fast. [Also, can be used in combination with other algos]

Maël
Site Admin
Posts: 1066
Joined: 12 Mar 2005 14:15

Re: Deterministic RNG

Post by Maël » 11 Mar 2019 12:52

Thanks for the link of this nice compact code.
From what I can tell it is only for floating points numbers, though. I am not sure how well the guarantees transfer to integers.

nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Re: Deterministic RNG

Post by nghca » 15 Mar 2019 20:04

Maël wrote:
11 Mar 2019 12:52
I am not sure how well the guarantees transfer to integers.
A simple mathematical function should do it.

Anyway, my main suggestion is to randomize short ranges and switch/reseed to offset the disadvantage of deterministic numbers.

Maël
Site Admin
Posts: 1066
Joined: 12 Mar 2005 14:15

Re: Deterministic RNG

Post by Maël » 15 Mar 2019 20:38

Note for future implementation:

Another thing that will have to change, is that currently the passes are done only in memory (except if you chose wipe file). This allows for undo, but defeats the purpose of multi-pass wiping a portion of the file/disk, for example.

So a direct mode would be necessary, if you want to do several passes. I started to play around with a tabbed interface with one tab called "Undo enabled", and the other "Direct write".

Related link (German): https://sebastianbrosch.blog/daten-sich ... -mit-dban/
http://eraser.heidi.ie/forum/threads/me ... dban.1209/

Stochastically (not cryptographically) reliable random number generators:
https://de.wikipedia.org/wiki/Liste_von ... eneratoren

Especially KISS is short, compact, and reasonably easy to (re)seed: https://de.wikipedia.org/wiki/KISS_(Zuf ... generator)

But reseeding would not be necessary, since it will generate a non-repeating number sequence, for at least 2^124 numbers (in our case, bytes). The largest possible stream any operating system (and HxD) can handle is 2^64 bytes. So seeding at the beginning of a "fill with bytes" operation would be enough.

The only issue I can think of would be due to reducing the returned 32/64 bit numbers to 8 bit ones (=bytes). This may introduce some more regularity.
Edit: Indeed, it is problematic:
http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx
and
https://stackoverflow.com/questions/419 ... -from-rand

https://stackoverflow.com/questions/116 ... egers-in-c
and
https://code.woboq.org/appleseed/includ ... n.hpp.html

Implementation and other algorithms in Pascal: http://wiki.freepascal.org/Marsaglia%27 ... generators

nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Re: Deterministic RNG

Post by nghca » 15 Mar 2019 21:06

Maël wrote:
15 Mar 2019 20:38
Note for future implementation:

Another thing that will have to change, is that currently the passes are done only in memory
It is comforting that one pass is probably enough. But with higher degree of chaotic randomness.
Last edited by nghca on 15 Mar 2019 21:29, edited 1 time in total.

Maël
Site Admin
Posts: 1066
Joined: 12 Mar 2005 14:15

Re: Deterministic RNG

Post by Maël » 15 Mar 2019 21:15

nghca wrote:
15 Mar 2019 21:06
Maël wrote:
15 Mar 2019 20:38
Note for future implementation:

Another thing that will have to change, is that currently the passes are done only in memory
It is comforting that one pass is probably enough. But with high degree of chaotic randomness.
The "wipe securely" function under tools/extras will use several passes (if you chose them). The limitation just applies to the "fill selection" feature, which does not do a direct write.

I added some points to my previous post as well, regarding a candidate PRNG.

nghca
Posts: 6
Joined: 26 Feb 2019 05:39

Re: Deterministic RNG

Post by nghca » 15 Mar 2019 21:34

Maël wrote:
15 Mar 2019 21:15
nghca wrote:
15 Mar 2019 21:06
Maël wrote:
15 Mar 2019 20:38
Note for future implementation:

Another thing that will have to change, is that currently the passes are done only in memory
It is comforting that one pass is probably enough. But with high degree of chaotic randomness.
The "wipe securely" function under tools/extras will use several passes (if you chose them). The limitation just applies to the "fill selection" feature, which does not do a direct write.

I added some points to my previous post as well, regarding a candidate PRNG.
I agree. But with one-round, you can (with reseeding/switching at random ranges) totally blow out the data. This has been shown in practical experiments. All you need is chaotic (not true) randomness. Here, any one fixed PRNG has slight disadvantage.

Anyway, just a suggestion. Excellent software. Viel Gluck!

Post Reply