3 ms·
The reason overconfident developers roll their own crypto is because the ‘cryptography experts’ are such asshats about it. Who wants to deal with someone that w
by Aeolun 2y ago
The reason overconfident developers roll their own crypto is because the ‘cryptography experts’ are such asshats about it. Who wants to deal with someone that writes this?
Hell, even identifying which ‘cryptography expert’ actually knows what they’re talking about and which ones are windbags is often more trouble than it’s worth.
- tptacek 2y agoI don't love the post either but getting angry about it doesn't make it less right.
- Aeolun 2y agoI’m not exactly angry at it. Just pointing out the flaw in its argument. It’s never worked to yell at my junior developers and tell them that ‘hell is them doing any kind of development’. It works better when I just show them what they should do instead.
- MarcelOlsz 2y ago>Hell, even identifying which ‘cryptography expert’ actually knows what they’re talking about and which ones are windbags is often more trouble than it’s worth. If they look like they spent too much time in the sun you can't trust them. This criteria has yet to fail me.
- deleted 2y ago[deleted]
- YZF 2y agoThe more nuanced message is maybe don't write crypto code without having spent the right amount of time to understand the challenges. If you don't know about timing attacks, you aren't familiar with the many historical mistakes that are well known, you don't know any theory around ciphers or hashes, then you probably shouldn't be writing crypto code that is used to secure anything important. There are a lot of ways to get up to speed (Coursera's cryptography courses from Stanford, books etc.) to at least wrap your head around why this is a problem. Even the experts go through peer review cycles because they know how easy it is to make mistakes. In other news, don't print yourself a motorcycle helmet on your 3d printer, don't make your own car tires, don't make your own break pads. I mean if you really know what you're doing maybe. EDIT: I have some personal experience with screwing up some crypto code. I won't get into all the details but I was overconfident. And this was after taking graduate level cryptography courses and having spent considerable time keeping up to date. I didn't write anything from scratch but I used existing algorithms/implementations in a problematic way that left some vulnerability. This was a type of system where just using something off the shelf was not an option.
- Aeolun 2y ago> There are a lot of ways to get up to speed None condoned by your employer however. Those tickets need finished yesterday. Security is just a checkmark.
- hn_throwaway_99 2y agoI just skimmed the article, but I generally agree. I mean, I get it - I think it's actually pretty easy to make an argument "Secure crypto code is exceedingly difficult to get right, even for experts. And unlike lots of other areas of code, there is no 'halfway broken' - crackable crypto is 'game over' in a lot of situations, which is why it's so dangerous to roll your own." But there's a huge gulf between that message and "Hell Is Overconfident Developers..." And importantly, I don't think that "overconfident developers" is the biggest problem. If anything, even when I very much don't want to "roll my own" crypto, I've found it difficult to be sure I'm using crypto libraries correctly and securely. Sometimes libraries are too low-level with non-obvious footguns, or they're too "black box" restrictive. I think a great example is the NodeJS crypto library. I think it's a great library, but using it correctly requires people to know and understand a fair amount about crypto. Whenever I use node crypto I pretty much always end up writing some utility methods around it (e.g. "encrypt this string using a key to get cipherText" and "decrypt this ciphertext using this key"). I think it would be better if those standard utility wrappers (that do things like use recommended default encryption algorithms/strengths, etc.) were also included directly in the crypto library. I think most developers are actually scared of rolling their own crypto, but cryptography experts don't make it easy to give them a plug-and-play solution.
- Uptrenda 2y agoBased comment, updooted. Also, I'm pretty sure that if nobody ever "rolled their own crypto" we would never have new innovations in cryptography. By OPs argument everyone in the blockchain industry is in a state of error since using applied cryptography to design new protocols is certainly novel. But I would say that these protocols are what made me interested in applied cryptography in the first place. They are astonishingly clever, novel, and show how beautiful cryptography can be. If everyone was too scared to work with cryptographic constructs than none of the innovation that took place around smart contracts would be possible. I see no problem with it if your work gets peer reviewed. The very last point they made though I kind of agree with. If you end up making a new algorithm from scratch that is dangerously novel and potential crack pot territory. I did like how they went to that trouble to make the hierarchy of what is meant by "rolling your own crypto."
- oefrha 2y agoI kept waiting for actionable advice, like maybe a site somewhere documenting the current best practices on common tasks, say securely implementing the complete lifecycle of encrypted sessions. Got to the end and it seems the advice, if there is one, is to pay some cryptography expert to review my system. And I have no idea if the author is a cryptography expert or an overconfident expert-wanna-be rolling their own crypto advice. So yeah, I agree. Can HN give some actionable advice on dos, not don’ts (I already know all the don’t like don’t use OpenSSL primitives, don’t use AES-CBC, blah blah)?
- fargle 2y agoplenty of "cryptography experts" that you blindingly trust because "don't roll your own crypto" make giant, fatal, mistakes too. i love how the "crypto is so hard, even experts get it wrong" argument both supports the elitist POV and is apologist for when "even" the experts get it wrong. crypto is like many other things in which if you make ONE TINY mistake you are doomed. point taken. do your due diligence. but also don't trust randos. or the NSA and probably NIST. therefore most so-called experts. if hell is "overconfident" developers, then what is "overconfident experts". or "overconfident furry apologists for crypto experts"? also hell. crypto is hard. we get it. you're also no better than anyone else at it.