Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#16
March 15th, 2013, 06:24 PM
 mah\$us
Contributing User

Join Date: Feb 2009
Posts: 188
Time spent in forums: 3 Days 5 h 45 m 52 sec
Reputation Power: 49
As Richard M. Nixon used to say, "let me say this about that."
Quote:
 There is not a bit of difference in the fundamental logic gates and processes between a hardware RNG and a software PRNG. They are precisely analogous. The difference only lies within the seeding of each implementation of that logic.
I don't think it's productive to carry our philosophical debate much farther, so these will be my last words about it.

To concede your point, both a hardware RNG and a PRNG take some data -- which for crypto purposes, we hope to be unpredictable -- and apply an algorithm to compute a fully deterministic function of the hopefully-unpredictable data. Yes, they have that in common.

Here's an example of a hardware RNG algorithm:

1. find a nickel
2. give it a good spinning toss
3. if it lands heads-up, write '1' in the next position on a strip of paper
4. if it lands heads-down, write '0' in the next position on a strip of paper
5. if it lands on edge, is lost, or otherwise can't be observed, go back to step 1

I won't give an example of a PRNG algorithm, because you are familiar with the concept, and indeed have just proffered one yourself.

Kindly note that the hardware RNG algorithm does not depend in any way on any previous iteration. Unless the coin itself remembers the previous toss, the algorithm is memoryless -- that is, it retains no information whatsoever.

All practical PRNGs do retain information -- in fact, they must, in order to avoid repeating themselves. Now, it is possible to reseed at every iteration as you described, stitching together a half-man half-horse, but that isn't a PRNG. It is a hardware RNG with some postprocessing, and this is something people do in the real world in order to reduce bias that may occur in the hardware RNG.

But in principle, it makes no difference whether a PRNG gets all of its seed a the beginning, or pieces of seed are dribbled in iteratively: it is a fully deterministic function of its seed input.

Maybe you're missing the motivation of PRNGs for cryptography: reliably unpredictable data is traditionally expensive, can be slow to gather, and its unpredictability is difficult to assure. So the whole point of PRNGs is that they should NOT need to be constantly reseeded. With the hardware RNG on new Intel processors, this motivation may be growing obsolete ... if you're happy for your application to work only on certain equipment, and if you trust Intel.

As I tried to explain before, the unpredictability of hardware RNG output depends primarily (but not 100%) on physical structures that are known to exhibit unpredictable behavior. Knowledge or previous outputs is inherently almost useless in the prediction of future outputs. The unpredictability of PRNG output depends primarily (but not 100%) on the difficulty of using known PRNG outputs to infer the generator's internal state.

To me, these cases are not precisely analogous.

#17
March 15th, 2013, 09:04 PM
 nsagames1234
Registered User

Join Date: Mar 2013
Posts: 10
Time spent in forums: 1 h 48 m 16 sec
Reputation Power: 0
Quote:
 the unpredictability of hardware RNG output depends primarily (but not 100%) on physical structures that are known to exhibit unpredictable behavior.

Precisely. My conjecture is that numbers themselves when left to themselves can exhibit such unpredictable behavior given proper fundamental logic. This is the very premise of the PRNG we have developed. At the same time, they can sort themselves.

The method does not depend on any real mathematical formula whatever, excepting XOR. It relies on the fact that an integer within a set has both a position which is relative to the other members of the set and a value which is also relative to the other members of the set. All the algorithm does is measure an elements value and moves it to that position in another set while moving whatever second element was there to wherever the first element was.

For example: Swap(a[0], b[b[1]]); Moves element a[0] to b[n] where n is the measured value of element b[1]. And moves element b[n] to a[0]. Simply by measuring the value of an element we can either sort our array or scramble it, depending on our logic.

#18
March 15th, 2013, 10:46 PM
 mah\$us
Contributing User

Join Date: Feb 2009
Posts: 188
Time spent in forums: 3 Days 5 h 45 m 52 sec
Reputation Power: 49
Maybe we're getting somewhere...
Quote:
 My conjecture is that numbers themselves when left to themselves can exhibit such unpredictable behavior given proper fundamental logic. This is the very premise of the PRNG we have developed.
Their behavior is absolutely predictable ... you already posted some code that predicts them!

http://forums.devshed.com/showpost....906&postcount=8

http://forums.devshed.com/showpost....399&postcount=6

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Crypto Algorithm Evaluation - Non-Math Chaos/RNG