Live data from Hacker News

How I implemented my own crypto

loup-vaillant.fr

351–360 of 409 posts

Re: How I implemented my own crypto

#351
post #329

Earlier quoted context omitted.

The "flying community" does not have the attitude that any random person should take the stick on a 737. Like the cryptography community, the flying community encourages newcomers to learn and get certified. This is a genuinely weird argument you're trying to make.

As a member of both communities I can tell you that I perceive a genuine difference in attitudes. The crypto community says, "Don't write your own crypto." The aviation community says something more analogous to, "Absolutely, write your own crypto! Just don't use the results of your first effort for anything mission-critical until it has been checked out by someone who knows what they are doing. And oh by the way, he…

Yes, but home-built airplanes come with all kinds of limitations that are, to continue the analogy, more like "can't use commercially ever, and any use for non-commercial purposes requires a big disclaimer on every message sent.

http://www.odtug.com/media/tvzzjjck.jpg

My use of commercial aviation in the GP was quite intentional, btw.

Re: How I implemented my own crypto

#352
post #335

Earlier quoted context omitted.

Huh? Did you not read the last sentence? "In fact, the aviation community literally encourages people to build their own airplanes!" https://www.google.com/search?client=safari&rls=en&q=build+y... http://www.kitplanes.com/homebuilders-portal/firsttimebuilde...

I missed the last sentence. But I think this is also misleading. General aviation is obviously far more dangerous than commercial aviation, and home-built planes are, by a factor of 2-3x, more dangerous than the rest of general aviation. If you're telling me that there's a mainstream part of general aviation advocating that random people build planes to take strangers for rides in (or, to complete the analogy to cryp…

No, not random people. Just anyone who wants to.

Re: How I implemented my own crypto

#353
post #352

Earlier quoted context omitted.

I missed the last sentence. But I think this is also misleading. General aviation is obviously far more dangerous than commercial aviation, and home-built planes are, by a factor of 2-3x, more dangerous than the rest of general aviation. If you're telling me that there's a mainstream part of general aviation advocating that random people build planes to take strangers for rides in (or, to complete the analogy to cryp…

No, not random people. Just anyone who wants to.

You're telling me that the general aviation community is, in the mainstream, of the mind that "anyone who wants to" build airplanes to sell to other people should be doing so? With no additional qualifiers?

Re: How I implemented my own crypto

#354
post #351
post #329

Earlier quoted context omitted.

As a member of both communities I can tell you that I perceive a genuine difference in attitudes. The crypto community says, "Don't write your own crypto." The aviation community says something more analogous to, "Absolutely, write your own crypto! Just don't use the results of your first effort for anything mission-critical until it has been checked out by someone who knows what they are doing. And oh by the way, he…

Yes, but home-built airplanes come with all kinds of limitations that are, to continue the analogy, more like "can't use commercially ever, and any use for non-commercial purposes requires a big disclaimer on every message sent. http://www.odtug.com/media/tvzzjjck.jpg My use of commercial aviation in the GP was quite intentional, btw.

Yes, but 1) those are government regulations, not a community policy. As a community aviation is much more welcoming of newcomers than crypto, and in the case of crypto this attitude is entirely community-driven, since crypto is not regulated the way aviation is. And 2) homebrew is often a stepping stone towards professionalism in many fields. But the crypto community actively discourages homebrew with its "Don't build your own crypto, period, end of story" message. The message should be, "Sure, build your own, just don't rely on your first efforts for anything mission critical."

Re: How I implemented my own crypto

#355
post #352

Earlier quoted context omitted.

No, not random people. Just anyone who wants to.

You're telling me that the general aviation community is, in the mainstream, of the mind that "anyone who wants to" build airplanes to sell to other people should be doing so? With no additional qualifiers?

Not to sell. But for their own use, yes, absolutely. Anybody who wants to. It turns out not very many people want to, particularly when they find out how much work it is. But almost certainly the same is true of crypto.

Re: How I implemented my own crypto

#356
post #258

I would like to clarify: The thing that I said was "table stakes" for implementing cryptography was passing the algorithm test vectors , which this author's previous post claimed as a security feature. If you're unfamiliar with the concept, a test vector is a series of strings and intermediate values used to ensure that your (say) OCB3 is the same as everyone else's OCB3. Had he asked, I'd further claim that not havi…

> You just have to know what a carry propagation bug is This is one of the things that drives me nuts about the crypto community. The natural response upon reading, "You just have to know X" if you don't already know is to go search for X. Well, if you go search for "carry propagation bug" you will find lots of examples of carry propagation bugs being found and fixed, but no explanation of what one is. The thing that…

[deleted]

Re: How I implemented my own crypto

#357
post #355

Earlier quoted context omitted.

You're telling me that the general aviation community is, in the mainstream, of the mind that "anyone who wants to" build airplanes to sell to other people should be doing so? With no additional qualifiers?

Not to sell. But for their own use, yes, absolutely. Anybody who wants to. It turns out not very many people want to, particularly when they find out how much work it is. But almost certainly the same is true of crypto.

Not only is that not true, it's demonstrably not true: when people write code, they actively want other people to use it. By way of example, the author of the library we're discussing here, "Monocypher", has declared it "ready for production" and has a web page selling its virtues versus libsodium and NaCl.

People who write crypto code as a rule are not doing it for their own edification, which is why so many more people spend time writing libraries and encryption tools and so few people spend time writing the code to exploit crypto vulnerabilities.

Re: How I implemented my own crypto

#358
post #324

Earlier quoted context omitted.

Give me a fucking break. Sean, Marcin, and I spent the better part of a year individually replying to tens of thousands of emails from people doing the Cryptopals challenges that we wrote and published for free. Do you know how much work that was? Here's a hint: it was a lot of work. There are a lot of charges you can level at me to try to win a dumb message board argument, but the one where I want cryptography to be…

I do sincerely apologize for taking my frustrations out on you, because you have indeed gone above and beyond the call to help make crypto accessible. Nonetheless, I still stand by the substance of my comment: when you (not you specifically, but anyone) say, "You have to know X" you should check that doing a Google search for X yields some reasonable results, and if it doesn't, provide a hint on how to proceed.

> Nonetheless, I still stand by the substance of my comment: when you (not you specifically, but anyone) say, "You have to know X" you should check that doing a Google search for X yields some reasonable results, and if it doesn't, provide a hint on how to proceed.

Do you actually believe you are personally entitled to demand special research tips from domain experts?

Re: How I implemented my own crypto

#359
post #347

Earlier quoted context omitted.

I can't share this kind of personnal information Thomas. I'm sure you understand! I guess you'll have to take my word for it.

Ok, I'll ask Thomas Pornin myself.

I indeed learned a lot, and still learn a lot, by doing implementations. Doing a proper implementation forces me to consider all aspects; when the code runs properly, I know that I have, by definition, been exposed to all the parts. You cannot get that kind of exhaustiveness from simply reading an article.

However, doing implementations is not at all the same thing as publishing implementations! The first one or two attempts are always flawed in some way; only the third one can hope to be reasonably good. I took care to properly kill and dispose of the corpses of all my learning code.

The trick (and it's a difficult one) is to decide in advance that the code you write to learn will have to be deleted -- and stick to it. Developers have trouble letting go of their creations, in general. If you can maintain that discipline, then there is no problem in "writing your own crypto". But that is a big "if".

Re: How I implemented my own crypto

#360
post #299
post #292

Earlier quoted context omitted.

Carry propagation bugs are something that can go wrong in a bignum implementation. Bignum is what you need when you have one number that you're splitting between multiple variables (because it's a 256-bit number, and you want your library to work on 32-bit PCs, for example). Carry propagation is if part of your result is too large for one part of your number and needs to overflow into the next part. Actual carry prop…

Thank you for that constructive response!

More details here: https://news.ycombinator.com/item?id=10898947
Post reply on HN