Live data from Hacker News

Cracking Random Number Generators Using Machine Learning

research.nccgroup.com

71–80 of 100 posts

Re: Cracking Random Number Generators Using Machine Learning

#72

I'd like to see a neural net have a go at a DRBG, such as one using an HMAC/SHA256 and PBDKF2, a cryptographically strong pseudo-random bit generator. Is it possible there's something that analytic methods of this RFC didn't catch that a neural net could?

There's been over a decade of research into machine learning cryptanalysis. It's not a new idea.

Re: Cracking Random Number Generators Using Machine Learning

#73
post #70
post #48

Earlier quoted context omitted.

A fundamentally entropic phenomenon is discovered to be patterened. It would be like looking through a microscope and seeing voxels. How is this not strong evidence for simulation?

Intellectually the simulation hypothesis is creationism’s hipster cousin. It’s not a falsifiable hypothesis. It makes so many implicit assumptions it’s scarcely worth talking about. It’s fake smart and not interesting.

Have you heard the one about the rat in the glove? Looks like a hand. Wiggles like a hand. All rat.

Re: Cracking Random Number Generators Using Machine Learning

#74
post #34
post #26

Earlier quoted context omitted.

None. This has been trivial to break for a long time. It is not considered a cryptographically secure random number generator.

Is it potentially useful for something outside of cryptography? I was watching a video on speedrunning where they were gaming the RNG somehow to improve their times

Predictable bit streams that look random are useful for communications. Satellite navigation systems like GPS for instance use such streams where the whole idea is for a receiver to sync up on on the bitstream.

An example where no one even cares exactly what the bitsream is can be found on motherboards where a bitstream is used to jitter the system clock to spread out any radio interference caused by the motherboard.

Re: Cracking Random Number Generators Using Machine Learning

#75

Earlier quoted context omitted.

There are CSPRNGs like Fortuna that contain an entropy accumulator, so even if the secret part of the state is compromised, it can recover.

True, but they belong to a different class, which are used for applications like key generation, where there is no need to ever reproduce a certain output sequence. Such RNGs are used instead of true RNGs, which might not be able to provide the required random numbers fast enough. They cannot be used instead of normal PRNGs in most of their applications. Unpredictable cryptographic PRNGs can be used instead of any ot…

Wrong as we can see with x64's new rdrand which relies on a fast aesna, but is terribly broken.

Re: Cracking Random Number Generators Using Machine Learning

#76
post #34

Earlier quoted context omitted.

Is it potentially useful for something outside of cryptography? I was watching a video on speedrunning where they were gaming the RNG somehow to improve their times

Predictable bit streams that look random are useful for communications. Satellite navigation systems like GPS for instance use such streams where the whole idea is for a receiver to sync up on on the bitstream. An example where no one even cares exactly what the bitsream is can be found on motherboards where a bitstream is used to jitter the system clock to spread out any radio interference caused by the motherboard.

> to jitter the system clock to spread out any radio interference caused by the motherboard

Fascinating! That seems very counterintuitive, where can I learn more about this?

Re: Cracking Random Number Generators Using Machine Learning

#77

Earlier quoted context omitted.

> What they are doing is essentially encoding the binary circuit of the xorshift128 PRNG as a neutal network. The fact that you can encode abritrary binary circuits as neural networks is well-known, so it's not surprising that it is possible to do this. Mcullough-Pitts aside, I think this is unfair. What's interesting to me is that they can predict a recurrent algorithm with internal state using with a trivial NON-re…

It looks like this specific algorithm can easily be deterministically reversed - the XORs and bitwise shifts mean that, given four output numbers, you can completely determine what state it was in before the numbers were generated - and, in fact, that there is probably a simple series of bit shifts and XORs you can perform on the last four outputs that produces the next number. Bit shifts and XORs are very much the k…

XOR is not linear in the inputs. I mention this, because Minsky's paper used that fact to show that perceptrons could never work as AI. This pretty much started the first AI winter in 1973.

It's an interesting story: https://towardsdatascience.com/history-of-the-first-ai-winte...

Re: Cracking Random Number Generators Using Machine Learning

#79
post #77

Earlier quoted context omitted.

It looks like this specific algorithm can easily be deterministically reversed - the XORs and bitwise shifts mean that, given four output numbers, you can completely determine what state it was in before the numbers were generated - and, in fact, that there is probably a simple series of bit shifts and XORs you can perform on the last four outputs that produces the next number. Bit shifts and XORs are very much the k…

XOR is not linear in the inputs. I mention this, because Minsky's paper used that fact to show that perceptrons could never work as AI. This pretty much started the first AI winter in 1973. It's an interesting story: https://towardsdatascience.com/history-of-the-first-ai-winte...

Linearity is actually relative to the algebra you are using. Xor is not linear in real arithmetic but it is in GF(2). This is useful because some of the algorithms work across many algebras, and are useful for different problems. Eg, the tropical algebra.

But you are quite correct about the AI winter.

Re: Cracking Random Number Generators Using Machine Learning

#80
post #27

What they are doing is essentially encoding the binary circuit of the xorshift128 PRNG as a neutal network. The fact that you can encode abritrary binary circuits as neural networks is well-known, so it's not surprising that it is possible to do this. The interesting and perhaps surprising result is the demonstration that it is possible to train this network using standard gradient methods, when choosing the proper l…

So would this model be able to predict any imperfect PRNG with some degree of accuracy, or just xorshift128? For the purposes I'm thinking, even 1% accuracy above purely random would suffice.

Financial market prediction is where my mind went too.
Post reply on HN