5 ms·
No. The strength is only as good as your best algorithm. XOR'ing two mediocre algorithms does not give you a better algorithm. In fact, you might be more lik
by keypusher 13y ago
No. The strength is only as good as your best algorithm. XOR'ing two mediocre algorithms does not give you a better algorithm. In fact, you might be more likely to end up with collisions in the final product if you XOR two results together than you would have had in the primary results themselves, making your random results even worse.
To quote:
in any iterated hash function it is relatively easy to find exponential sized multicollisions, and thus the concatenation of several hash functions does not increase their security.
Source: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.99.9368 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.99.9...
See also discussion of why XOR is often a bad idea for combining hashes: http://stackoverflow.com/questions/5889238/why-is-xor-the-default-way-to-combine-hashes http://stackoverflow.com/questions/5889238/why-is-xor-the-de...
And this question about combining different hashes:
http://crypto.stackexchange.com/questions/270/guarding-against-cryptanalytic-breakthroughs-combining-multiple-hash-functions http://crypto.stackexchange.com/questions/270/guarding-again...
- tptacek 13y agoI think this result may depend on the structure of the compression function of the hash, although I think the general point stands.
- berntb 13y agoUh, I am stressed at work -- but most of that looked like a discussion of cryptological algorithms, not generation of random numbers? Your point is obviously true, then. Sorry if I was unclear?
- keypusher 13y agoI am quite new to both topics as well, but it seems like there are some similarities. That is, from the excerpt in the original article, the PRNG used by /dev/random essentially takes noise from some external input, and runs it through "a cryptographic function that outputs random numbers from the continually internal state". In both cases (cryptography and random numbers,) the goal is to transform known data into something that is indistinguishable from random. The way I understand it is that the entropy in the random number generator doesn't come from the algorithms, entropy comes from noise gathered off the hardware signals. The algorithms just make sure that even if you have biased noise generating the input, attackers will still have a very hard time using that to control the end result. I think this a very interesting question by the way, and hope my previous answer didn't come off as dismissive. I am still a novice in the world of security, and so I wanted to put links in instead of trying to explain this myself, as I probably would get it horribly wrong.
- berntb 13y agoThanks for the time. (I never read the 2nd Knuth book at Univ. :-) ) OK, obviously the obfuscation algorithms using entropy are equivalent to some form of hashing/encryption function. So if I understand this: To just keep every Xth bit (where X varies over time) of the generated data doesn't help (it adds a little obfuscation to the algorithm?). And to combine multiple algorithms with their own sources of entropy is not superior to e.g. just using the three entropy sources to get better data?