Live data from Hacker News

Ruby Bug: SecureRandom should try /dev/urandom first

bugs.ruby-lang.org

111–120 of 138 posts

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#111
post #67

Earlier quoted context omitted.

The manpages for syscalls and device nodes are basically their API specifications. They tell you what behaviours can be guaranteed (i.e. what properties are a part of the interface contract) and what behaviours cannot (i.e. what properties are implementation details of the current implementation, and could change at any time.) Just because the implementation of /dev/urandom has good properties that make usable as a s…

> They try not to break userland code, yes, but userland code only relies on things the docs say it can, so... Judging from the odd Torvalds-yelling-at-people mail getting linked on HN, it doesn't sound like "it's ok to break userland here because clearly they didn't read the docs" would fly.

The proposed change --- unify urandom/random and permanently lose blocking behavior --- can't possibly break userland. There is no way to write a program that depends on /dev/random blocking, because it does so at random.

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#112
post #83

Earlier quoted context omitted.

Some of this is certainly my own fault (context: I'm the rude guy in the thread). There were two comments made by myself that were considered "rude": one early on, where I actually didn't even mean to be. And my last reply was bascially a rage-quit. But I put all relevant information, academic and engineering-wise in the thread to try to convince Ruby-core to change their opinion. I replied to false assumptions and c…

Every interaction I've had with the Ruby core team has involved rudeness on their part. I understand that Japanese culture is really different and that as a country they've really had horrible things done to them over the last hundred years that are inexcusable to say the absolute very least. But just like any country, there are people with great people skills and people with no people skills. The Ruby core team lack…

That is total rubbish.

I never had a problem with any of them.

Shugo is one of the coolest people about, similar to matz and nobu.

It may be because you don't have anything meaningful to suggest or because the way you word your suggestion in a way that is not ruby-esque.

The Ruby core team does not "lack" any of what you insinuate. And your ad hominem attempt to claim that something horrible must have happened - dude, stop with it.

Something horrible must have happened to you. Were you an unwanted child?

"All they need to do is listen and consider, but they don't, really."

And they do. Testimonies to this are countless other suggestions that were made.

I have been using ruby since about 13 years. As a language, ruby is awesome.

Perhaps go to the php bugtracker and ask them what kind of problems they had in their childhood or something?

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#113

Is there a good random library that's not the giant ball of death that's OpenSSL?

ISAAC ( http://burtleburtle.net/bob/rand/isaacafa.html ) for a CSPRNG. But what is your use-case for something non-standard? Just use /dev/urandom

ISAAC is a DRBG. It's like 1/3rd of a complete CSPRNG, and it's the easiest third to build. To use ISAAC securely on Linux, if for some reason you actually wanted to do that, you'd swap out the hash DRBG inside the kernel LRNG with ISAAC, and then continue using /dev/urandom.

Simply replacing the OpenSSL RNG or /dev/urandom in userland code with the ISAAC routines is likely to blow your app up.

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#114
post #89

Earlier quoted context omitted.

Every interaction I've had with the Ruby core team has involved rudeness on their part. I understand that Japanese culture is really different and that as a country they've really had horrible things done to them over the last hundred years that are inexcusable to say the absolute very least. But just like any country, there are people with great people skills and people with no people skills. The Ruby core team lack…

I don't think it's a culture thing at all. Japanese people are usually extremely polite and sincere. I also don't think this has anything to do with their history. If you look at replies I got from Ruby-core: some people would consider them to be rude as well; I'm constantly told I do not understand what I'm doing, and I've been in engineering for more than 12 years, into crypto for more than five (and been reading c…

Precisely.

"The Ruby community even has their own acronym for being nice to other developers: MINASWAN"

No, that is not true. That was coined, if I remember correctly, by the pickaxe.

Matz is nice, but how does this translate to any other bad suggestion out there? I don't understand that logic.

It's also not as if it is ... impossible to make suggestions to ruby core that are accepted?

Like hundreds other people manage? Why does the dude above fail?

Here is the issue tracker:

https://bugs.ruby-lang.org/projects/ruby-trunk/issues?set_fi...

You'll see a lot of assignee's done to matz, nobu, koichi etc... I mean they don't have 50 arms each and infinite time so they have to prioritize on what they work.

"Some are xenophobic"

That is so totally rubbish.

Just go to the japanese bboy scene. They are not xenophobic AT ALL.

https://www.youtube.com/watch?v=f5Y75Rjl6UU

They are people like YOU AND ME. Assuming that there is a huge, insurmountable cultural difference is just c-r-a-p.

Or do you think that every japanese loves video games? Or loves ninjas and samurai? Or knows karate?

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#115
post #105

Earlier quoted context omitted.

No, there are not [1]. [1]: http://sockpuppet.org/blog/2014/02/25/safely-generate-random...

It must be possible for a computer to simply not have an adequate supply of randomness though, no? Sure, urandom will use hardware sources of randomness if they're available - but what if they're not?

No, this is a misconception. Once the LRNG is seeded, it can generate a more or less unbounded amount of high-quality random bytes from that seed. Entropy can't be "depleted".

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#116
post #89

Earlier quoted context omitted.

Every interaction I've had with the Ruby core team has involved rudeness on their part. I understand that Japanese culture is really different and that as a country they've really had horrible things done to them over the last hundred years that are inexcusable to say the absolute very least. But just like any country, there are people with great people skills and people with no people skills. The Ruby core team lack…

I don't think it's a culture thing at all. Japanese people are usually extremely polite and sincere. I also don't think this has anything to do with their history. If you look at replies I got from Ruby-core: some people would consider them to be rude as well; I'm constantly told I do not understand what I'm doing, and I've been in engineering for more than 12 years, into crypto for more than five (and been reading c…

Insofar as Japanese culture has anything to do with the way these people replied to you, I suspect that it might be a combination of (1) deference to authority and (2) relative isolation from the Western CS scene.

Absolute deference to man pages and insistence on getting things fixed upstream are textbook examples of, well, following the textbook. And they won't accept blog posts and presentations as authoritative because they are not familiar with the authors and presenters. Had they been even a casual reader of HN, they wouldn't dismiss names like tptacek so easily. They simply have no idea who the heck he is, so they stick to TFM as they were taught to do.

So it's neither malice nor xenophobia. I think they're just following rules, and maybe a little annoyed that everyone is telling them to ignore their rules.

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#117
post #116
post #89

Earlier quoted context omitted.

I don't think it's a culture thing at all. Japanese people are usually extremely polite and sincere. I also don't think this has anything to do with their history. If you look at replies I got from Ruby-core: some people would consider them to be rude as well; I'm constantly told I do not understand what I'm doing, and I've been in engineering for more than 12 years, into crypto for more than five (and been reading c…

Insofar as Japanese culture has anything to do with the way these people replied to you, I suspect that it might be a combination of (1) deference to authority and (2) relative isolation from the Western CS scene. Absolute deference to man pages and insistence on getting things fixed upstream are textbook examples of, well, following the textbook. And they won't accept blog posts and presentations as authoritative be…

This debate has virtually nothing to do with me. If you want to put names to it, use Thomas Pornin and Daniel J. Bernstein.

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#118
post #112

Earlier quoted context omitted.

Every interaction I've had with the Ruby core team has involved rudeness on their part. I understand that Japanese culture is really different and that as a country they've really had horrible things done to them over the last hundred years that are inexcusable to say the absolute very least. But just like any country, there are people with great people skills and people with no people skills. The Ruby core team lack…

That is total rubbish. I never had a problem with any of them. Shugo is one of the coolest people about, similar to matz and nobu. It may be because you don't have anything meaningful to suggest or because the way you word your suggestion in a way that is not ruby-esque. The Ruby core team does not "lack" any of what you insinuate. And your ad hominem attempt to claim that something horrible must have happened - dude…

As a language, Ruby is awesome. As a host for cryptographic applications, Ruby is hobbled by a very serious error that they refuse to correct.

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#119

Earlier quoted context omitted.

Actually it's still kind of an issue. The qemu virtio device reads only from the hosts /dev/random device (not urandom) so you can still starve the hypervisor. Also the guest -- even though is properly seeded -- can entropy starve because who knows what is installed on it. And clearly there's still confusion about using /dev/random. I don't even think the solution is to point everything to /dev/urandom. Why maintain…

It's configurable. You can even forward host's /dev/urandom as guest's /dev/random.

Actually it's not supported with virtio-rng. Here[0] is a proposed patch to add support.

[0] http://www.redhat.com/archives/libvir-list/2016-March/msg010...

Re: Ruby Bug: SecureRandom should try /dev/urandom first

#120
post #112

Earlier quoted context omitted.

That is total rubbish. I never had a problem with any of them. Shugo is one of the coolest people about, similar to matz and nobu. It may be because you don't have anything meaningful to suggest or because the way you word your suggestion in a way that is not ruby-esque. The Ruby core team does not "lack" any of what you insinuate. And your ad hominem attempt to claim that something horrible must have happened - dude…

As a language, Ruby is awesome. As a host for cryptographic applications, Ruby is hobbled by a very serious error that they refuse to correct.

Yea, I always liked Ruby's implicitness and style of writing code. For crypto I'd prefer to use Sage or Python's cryptography.io framework (a lot of other good options for performance critical code of course).
Post reply on HN