News for hackers. Stuff that matters.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by Perceptes on Tuesday May 03, 2016 @11:32PM (#11625983)
This is sad and embarrassing for every involved party. The people leaving rude, entitled, hyperbolic comments in the thread, the Ruby developers who refuse to look into the best practice suggested by experts in the field, and the man page maintainer who refuses to update the man page in accordance with similar information.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by azet on Wednesday May 04, 2016 @06:20AM (#11627339)
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 comments as best as I could.

I'm also only a human and since this bug has been open for 2 years, I've used SecureRandom extensively in the past, this was a very frustrating experience for myself and all the commenters involved. I certainly do not have the most "diplomatic" approach (as a friend put it). I know that. But I'm not really sorry about that either, it's just who I am. I'm a nice guy IRL people tell me, but I can get obnoxious when people don't listen to severe security issues and always refer to upstream, have been so in quite a few projects and standards processes.

I'll work on that, promise ;)

Aaron

Re:Ruby Bug: SecureRandom should try /dev/urandom first by kangar00 on Wednesday May 04, 2016 @07:10AM (#11627517)
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 lacks people skills. Whether it is a result of cultural problems that are a result of terrible things happening there, I can't say, but it really does Ruby a disservice.

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

Re:Ruby Bug: SecureRandom should try /dev/urandom first by azet on Wednesday May 04, 2016 @07:33AM (#11627594)
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 cypherpunk lists since I was 15). I'm certainly not an academic cryptographer nor among the best engineers in the field, but I think I know a fair bit about the topic by now. I've contributed to many security projects, academic publications and standards processes -- this was certainly among the worst experiences I've had so far (you'd think IETF is worse, no. heated discussions all the time, but people stay focused and technical, listen to comments made by domain experts et cetera and act on them).

The Ruby community even has their own acronym for being nice to other developers: MINASWAN (https://en.wikipedia.org/wiki/Yukihiro_Matsumoto). I'm puzzled by the outcome of this discussion, but am assured by other security engineers and cryptographers that bugs they opened were treated equally badly, often ignored, even if they were non-disclosed, heavy security issues.

No idea. I'm not part of Ruby-core, neither Japanese. In my travels I've encountered many cultures and peoples, Japanese are amongst the most polite and friendly people I've met. Often very shy in that regard, like many asians (this is indeed a culture thing & certainly not a bad one). Some are xenophobic, but I wouldn't say that they all are, that's just false, I've met so many open-minded Japanese that I'd never generalise in that regard.

Aaron

Re:Ruby Bug: SecureRandom should try /dev/urandom first by nabla9 on Wednesday May 04, 2016 @09:57AM (#11628362)
>I'm puzzled by the outcome of this discussion, but am assured by other security engineers and cryptographers that bugs they opened were treated equally badly, often ignored, even if they were non-disclosed, heavy security issues.

If you have organization with strict good manners policy and problems arise, this kind of passive-aggressive behavior is exactly what you should expect. "company policy" and PC rules can't make people better persons.

NOTE: This is not my opinion about Ruby-core team. I just want to point out that being polite does not mean that you interact well with others.

Re:Ruby Bug: SecureRandom should try /dev/urandom first by kijin on Wednesday May 04, 2016 @11:37AM (#11629093)
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 by tptacek on Wednesday May 04, 2016 @11:51AM (#11629189)
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 by shevy on Wednesday May 04, 2016 @11:31AM (#11629046)
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 by azet on Wednesday May 04, 2016 @12:12PM (#11629359)
I'd usually not even consider replying to such a post as you clearly have neither read nor tried to understand my comment.

I replied to a post made above, and expressed deepest sympathy for the Japanese people. While I was born in central Europe, I'd rather not be a citizen of any nation. I spend more time abroad than in the country I was born in. Speaking of which: central Europe currently has a huge resurgence of facist ideologies and xenophobia due to migrants from war-torn countries. Something which is utterly inconceivable to most people able to read a history book, given Europe's not so distant past with genocide. Unfortunately, xenophobia and right-wing sentiment is something that every democracy and thus nation faces, Japan isn't exempt from that [0] [1] [2].

(I currently live in Asia and spend a lot of time in Arabic countries, you may reconsider educating me on the subject with references to the bboy scene.)

Aaron

[0] https://en.wikipedia.org/wiki/Category:Far-right_politics_in...

[1] https://en.wikipedia.org/wiki/Political_extremism_in_Japan#R...

[2] https://en.wikipedia.org/wiki/Uyoku_dantai

[dead]
Re:Ruby Bug: SecureRandom should try /dev/urandom first by tptacek on Wednesday May 04, 2016 @11:52AM (#11629201)
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 by azet on Wednesday May 04, 2016 @12:01PM (#11629271)
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).
Re:Ruby Bug: SecureRandom should try /dev/urandom first by educar on Wednesday May 04, 2016 @02:53AM (#11626665)
Agreed that tensions are running high. But I think the ruby devs are in the right here. They are just following the man page. What else is the authoritarian source?

How is one supposed to know who wrote those blog posts? Just because it is linuxexpert.com does not mean they are linux experts. It's funny, if people changed it randomly following blogs then people will claim this is some NSA conspiracy :-) How does one verify the person behind the blogs?

node has similar https://github.com/nodejs/node/issues/5798

Re:Ruby Bug: SecureRandom should try /dev/urandom first by lifthrasiir on Wednesday May 04, 2016 @04:47AM (#11627059)
> They are just following the man page.

I think Ruby devs' position is more than this. By keeping the faulty man page, Linux maintainers are implicitly communicating that they intended `/dev/urandom` to be a limited and less recommended way of doing things. The intention is important: even though `/dev/urandom` is actually better in the current kernel it may not in the future. It is not the only answer, as other languages did another choice, but it is perfectly reasonable to be conservative like this.

We badly need to change that intention, really.

Re:Ruby Bug: SecureRandom should try /dev/urandom first by tptacek on Wednesday May 04, 2016 @11:24AM (#11628996)
Exactly what, do you imagine, Linux could do to make urandom less secure? I'm sorry, but the word for that concern is "nonsensical". Linus Torvalds has world-shattering conniption fits when developers make changes that hurt performance. Can you imagine breaking every one of the many security applications --- for instance, every Go program ever written --- that depend on urandom?

No, that is not a legitimate concern.

Re:Ruby Bug: SecureRandom should try /dev/urandom first by onli on Wednesday May 04, 2016 @08:44AM (#11627895)
> What else is the authoritarian source?

Basically everything else. If you see how manpages are written, or just how often they are out of date, you quickly arrive at the conclusion that they are not authoritative source at all. Add in the political plays done in this area. Being stubborn over a wrong manpage is very frightening, especially in a security context. This thread shakes my believe in ruby as a language.

Re:Ruby Bug: SecureRandom should try /dev/urandom first by binkert on Wednesday May 04, 2016 @05:21AM (#11627172)
The authoritative source in Linux is the code and always has been.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by disposeofnick9 on Wednesday May 04, 2016 @06:07AM (#11627310)
Code is useless if no one knows how to use it properly and it's not communicated clearly. Users certainly can't be expected to read every line of code. That's like shipping a car with no user manuals and saying "take the engine apart and see how it works." Arrogance.

Clearly document system behavior or code is essentially useless.

Re:Ruby Bug: SecureRandom should try /dev/urandom first by azet on Wednesday May 04, 2016 @07:59AM (#11627700)
Users of languages can't be expected to. Therefore the language designers and maintainers themselves, especially if they're working on the stdlib, should do so, IMO. It's not only education for a proficient programmer, it helps to understand the underlying system you're building on and it's security assumptions.

The random char device code isn't that hard to understand, and if you're not a strong C programmer (the Ruby-core people are good C programmers, I suppose) - there's a paper explaining how it works: https://eprint.iacr.org/2012/251.pdf

Aaron

Re:Ruby Bug: SecureRandom should try /dev/urandom first by batiste on Wednesday May 04, 2016 @10:57AM (#11628775)
Then I have a little quiz for you:

According to this documentation:

http://ruby-doc.org/core-2.1.2/Float.html#method-i-round

How do you explain?

2.1.2 :011 > 15.round(-1) => 20

Re:Ruby Bug: SecureRandom should try /dev/urandom first by nilved on Wednesday May 04, 2016 @09:33AM (#11628173)
I think that's hardly the case. If Linux users were reading the source code, we wouldn't have such an embarrassing track record when it comes to security. Major security issues like Heartbleed existed in code for years.
Re:Ruby Bug: SecureRandom should try /dev/urandom first by torrent-of-ions on Wednesday May 04, 2016 @10:58AM (#11628786)
Agreed. The problem is the man page. Suggesting that one should read the source code instead of the man page is ridiculous. Might as well write your own kernel while you're at it if that's the case.