Live data from Hacker News

Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

nakedsecurity.sophos.com

81–90 of 128 posts

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#81
post #41

I wonder - if you took in aggregate the time people spent complaining about Cryptocat could a more secure alternative have already been built? :-) Anyway, I really enjoyed this article. Informative, interesting, and free of snark.

No, stop trivializing cryptography software.

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#82

Nice article, I can certainly vouch for creating a visualization to clue you in that there may be a problem. One of the things I built out of Java when I was hanging out on the cypherpunks list was a 'Noise Sphere' applet. Basically this is a way of testing a PRNG visually. It was fun to put various ideas through it to see how they panned out (most really sucked) One of the cool things was using the alpha emitter RNG…

turns out that hardware RNGs are very easily biased and usually need some transformation to be useful. see http://en.wikipedia.org/wiki/Hardware_random_number_generato....

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#83
post #71

Wow, someone used <= instead of < and they wrote 5 page report with all those images and charts. The bug is obvious and simple, what is with all those explanations?

this is crypto. there were 'less serious' bugs like initializing arrays to zeros (see debian) that led to catastrophic results, which is what the explanation is about.

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#84
post #22

Earlier quoted context omitted.

Whether Cryptocat programmers suck or not, I've seen worse errors from better programmers. I'm not sure what's the metric to follow here when it comes to correlating these two items.

You are dangerously fooling yourself by minimizing the importance of those bugs. Cryptography software is not like regular software. It is critical software, like the kind used to run planes or nuclear power plants: People's lives depends on it. People with no programming experience should be literally banned by law from writing critical software. You should take those bugs way more seriously. PS: I have seen a progr…

> People with no programming experience should be literally banned by law from writing critical software.

Getting the government involved in who gets to write crypto software...

What could possibly go wrong?

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#86
post #47

I don't understand much of crypto... But I am game developer, and game developers (specially RPG fans) love random numbers. Some games of mine, I suspected something was off with the PRNG, and did something like they did on the ending, I used the random number generator to draw pictures. Biased generators were quite obvious, because they made obvious patterns (one of the worst offenders was C default random function…

Even for RPG games, any given PRNG can often be too random for a game. You can make a lot more realistic and enjoyable behaviors by grabbing your random values from a distribution other than uniform 0.0-1.0. (Like a Gaussian distribution, which is everywhere in models of random things that are the sum of many other individual random processes.)

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#87
post #60

Earlier quoted context omitted.

My condolences to you. Now your product has become a target of mockery. Also I love cats and feel sorry that the name of those lovely animals is used in a discredited entity. The problem is that your product did not have just a security vulnerability, but had a number of blatantly unprofessional mistakes showing off ignorance and carelessness of its authors. This is the worst that can happen with an author of open so…

I feel this is something that many a [insert security software in which critical bug was recently found here] has gone through. We've been following full disclosure principles and fixing bugs as they come for the past couple of years. It's really unfortunate that the comments tend to be so dismissive and personal — a quick look at our codebase or blog shows a serious and professional effort. That said, we definitely…

[deleted]

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#88
post #86
post #47

I don't understand much of crypto... But I am game developer, and game developers (specially RPG fans) love random numbers. Some games of mine, I suspected something was off with the PRNG, and did something like they did on the ending, I used the random number generator to draw pictures. Biased generators were quite obvious, because they made obvious patterns (one of the worst offenders was C default random function…

Even for RPG games, any given PRNG can often be too random for a game. You can make a lot more realistic and enjoyable behaviors by grabbing your random values from a distribution other than uniform 0.0-1.0. (Like a Gaussian distribution, which is everywhere in models of random things that are the sum of many other individual random processes.)

random and uniform are different things. a PRNG isn't "too random", that doesn't make sense.

If it's too uniform, sample from other distributions, but to do so usually requires taking output from a PRNG.

Indeed using the inverse CDF of any distribution is a map from (0,1) to the desired sample space, following the distribution.

As for which PRNG for RPG games, MT is very good because while it isn't cryptographically secure, it otherwise has a very long period and delivers very nicely distributed numbers as well as being very fast.

For non-crypto applications such as monte-carlo, there's little reason to use much else.

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#89

Cryptocat's hacktivist credibility was cemented in 2012 when its Canadian developer, Nadim Kobeissi, was stopped at the US border and interviewed about his Cryptocat-related programming activities. s/was/claimed to be/. This software clearly is not Ft. Knox, and its becoming less and less believable that US intelligence would ever feel the need to interrogate the author of an open source project, and with such brittl…

I believe Nadim is being truthful in that someone at the border asked him about Cryptocat. I think they probably saw his tweets "I'M CROSSING THE BORDER NOW OMG I HOPE THEY DON'T GIVE ME TROUBLE FOR BEING A BIGTIME HACKER ACTIVIST", they Googled him, and asked him about his website.

[deleted]

Re: Anatomy of a pseudorandom number generator – visualising Cryptocat's buggy PRNG

#90
post #32
post #5

Really drives home what many people were saying about the authors not merely being bad at cryptography but programming in general...

Well a fencepost/off-by-one error is hardly unique to bad programmers. There are certainly instances of poor crypto implementation, but I don't think this particular example is worthy of the appellation of poor programming .

I've learned to always run a simple test where I print into the console 1 million iterations of the distribution. Takes about 10 seconds and this is just for games, not crypto.
Post reply on HN