4 ms·
Some people used to claim that you should never use your own crypto code because the libraries are designed by people infinitely smarter than you who thought of
by im2w1l 11y ago
Some people used to claim that you should never use your own crypto code because the libraries are designed by people infinitely smarter than you who thought of everything.
That is starting to ring hollow to me.
- anon1385 11y agoJust because they don't get things perfect doesn't mean they don't do a much better job than you or I could do.
- im2w1l 11y agoIt is very useful to know how good the state of the art is to get a feel for if you could contribute or not. And I think that the state of the art has been exaggerated and that has discouraged contribution. We can not just trust that these libraries are higher level esoteric magic that no mortal could understand. It is time to shine light on exactly what guarantees different libraries are providing, and how.
- jerf 11y agoBut we also know the state of the art of people who don't really know what they are doing going to write crypto, and that state of the art is "laughable". You're being pointed straight at the problems discovered by other people. Of course they're obvious to you now. The question is, can you just pick up some OpenSSH code, read it and run it, and find a new problem yourself when nobody is pointing you straight at it? Because I'm sure there's at least one in there for you to find. (Note I did not ask you if you could find this problem. Too easy to imagine that you can now, too hard to realistically pretend you don't already know about it. I'm asking you about new problems that nobody currently knows about.)
- Xylakant 11y agoapart from the fact that the current openssh issues are pretty much unrelated to crypto code, I'll still stick with not implementing my own crypto, just because a) I would not have thought of the issue of using a standard library call to load data. b) nobody would have checked my code and fixed it so in the end, I'd still be vulnerable while openssh is now fixed.
- passive 11y agoI think this is a very key point. OpenSSH gets targeted for vulnerability analysis by very talented people, on a regular basis. I would be surprised if there are more than a dozen organizations on the planet that can deploy those kind of resources against their homegrown code.
- someguydave 11y agohow many of those dozen organizations would actually release the results of their analysis?
- Xylakant 11y agoGiven the number of CVEs filed a nonzero number. In any case more organization than the number of orgs that would bother to check my code.
- nextw33k 11y ago"you should never use your own crypto code" The sentiment behind that is to keep out those that don't know how to code. If everybody followed that advice there wouldn't be crypto code. If you have the ability to create good code and are confident you can understand the maths of cryptography then by all means contribute to the community. If the past year has taught us anything it's that the crypto community needs more good engineers.
- creshal 11y agoThe sentiment should be "write your own code, but don't use it without independent audit". There's another recent discussion about it here: https://www.reddit.com/r/crypto/comments/418nyl/write_crypto_code_dont_publish_it/ https://www.reddit.com/r/crypto/comments/418nyl/write_crypto...
- rhinoceraptor 11y agoPeople write their own toy kernels or malloc()s all the time, and there's never the assumption that they would actually try to use them for real, and the security implications are just as real there as for toy crypto.
- static_noise 11y agoIt is kind of true that you should not _only_ rely on homegrown and not well-tested solutions because they may contain pretty trivial bugs. When using several layers of security, adding non-standard or home-grown layers may add significantly to the security considering widespread exploits of well-known software. E.g. use VPN and password protection and encrypted volumes which are pretty standard. Add in a custom hardware switch that physically disconnects the power/network of a server containing sensitive data which is rarely needed and you will be protected against many exploits.
- Klathmon 11y agoActually using home-grown layers may compromise the entire system. An easily exploitable buffer overflow or an extremely easily overlooked crypto blunder in a second layer can easily allow a way in. I agree with the example given, but it's a rule that's wrong more often than it's right.