4 ms·
I really like this. Cryptography is obviously very hard to get right and complex, and for that reason people have said "don't roll your own crypto" - but really
by staticassertion 5y ago
I really like this. Cryptography is obviously very hard to get right and complex, and for that reason people have said "don't roll your own crypto" - but really, that's stupid. What we need is accessible information to explain cryptography to people, so they know how to make smart crypto decisions, know what pitfalls exist, etc.
I think crypto has done a particularly bad job of providing accessible materials, historically, and has had a terrible attitude towards doing so. Things are changing, and that's nice.
- zgs 5y agoThe skills needed to write good crypto are different to those needed to use it. There is some overlap of course, but less than is implicated here. Probably the best advice for using crypto is to use algorithms for what they were intended. Which will require some reading and the materials aren't as accessible as they ought to be.
- traceroute66 5y ago> people have said "don't roll your own crypto" - but really, that's stupid. What we need is accessible information to explain cryptography to people, so they know how to make smart crypto decisions I disagree. The "crypto is hard" saying is there for a reason. It is scarily easy to make a crypto-breaking mistake in a simple looking piece of code. Yes people need to know "how to make smart crypto decisions", but when you are dealing with sysadmins or other end-users, I put it to you that they could not care less about the mathematical theory, what they really want/need to know is "what settings should I be using with $insert_name_of_crypto_library in my config file". Let me put it to you another way... If we extend your theory, then we would have to teach the world basic chemistry about Sodium hypochlorite so that they can make "smart decisions" about whether or not to drink a bottle of bleach. But maybe its just simpler to use the "crypto library" approach and stick a couple of globally recognised scary looking icons on the bottle along with a short paragraph of generic text in the local language ?
- userbinator 5y agothen we would have to teach the world basic chemistry When I was in high school, they did. Is that not the case anymore?
- jimmygrapes 5y agoIt is still taught from a chemical standpoint, but the second and third order consequences of ingestion are not really addressed. You might get a generic disclaimer somewhere saying "harmful to humans" here and there.
- vladvasiliu 5y agoThe two are not incompatible. Sure, most people are better off using off-the-shelf crypto or chemistry instead of rolling their own. But as a society, we stand to benefit from educating people. Someone has to actually build the off-the-shelf crypto, right? So if strictly everybody is told "nah, don't roll your own", who's going to advance the field? My point is that we should facilitate people understanding things. Sure, this may push some people to figure "meh, I know everything, let me just roll my own" and proceed to build something buggy. But that happens anyway. > Yes people need to know "how to make smart crypto decisions", but when you are dealing with sysadmins or other end-users, I put it to you that they could not care less about the mathematical theory, what they really want/need to know is "what settings should I be using with $insert_name_of_crypto_library in my config file". I'm a sysadmin and very much like to know how the things I deploy and manage work, so I can make decisions about things. That doesn't mean I'm out here writing my own OS or anything. Also, I think being educated allows people to be less susceptible to snake-oil salesmen and the like. A good current-day example is the debate about cryptography backdoors. Maybe if more people understood how things worked, they wouldn't keep parroting the line of "nothing to hide [from the government]", because they'd understand that bad guys are extremely likely to have that very same access.
- traceroute66 5y ago> But as a society, we stand to benefit from educating people. Someone has to actually build the off-the-shelf crypto, right? So if strictly everybody is told "nah, don't roll your own", who's going to advance the field? I'm sorry but I don't buy that argument. The main problem with that line of argument is where do you stop. I mean sure, its great to "educate people" but in the end each person only has so many hours in the day. They also have other constraints on their time (jobs, families etc.). If we take your argument to its logical conclusion then you will tell me that I cannot consider visiting a Chinese Restaurant unless I have educated myself by learning Chinese and the intricacies of Chinese cuisine and cooking techniques so then I can make "smart decisions" about what I eat for dinner when all I really want is some roast duck and some steamed prawn dumplings ? Sheesh.
- deleted 5y ago[deleted]
- oconnor663 5y agoYeah I have mixed feelings about "don't roll your own crypto". On the one hand, I don't like discouraging learning. On the other hand, a culture of putting warnings in our README's like "I rolled this myself so it's probably broken and not suitable for production use" is a good thing. If I could expand our traditional warning a little bit, I might say something like this: If you roll your own crypto, you're going to make mistakes. That's fine; mistakes are how we learn. But crypto mistakes tend to be invisible, and your code will appear to work even when it has no security. So if you want to learn crypto, you need to find a way to get feedback about your invisible mistakes.