But that's the thing, it's not just my opinion. It's the advice that security experts have been shouting for years with web developers completely ignoring them. Implementing a robust crypto library is an extremely difficult task, you can't just go through a spec, implement it and hope to get it right. Not that long ago Cryptocat got bitten by the same problem. I'd rather we all get our best minds together, focus them on one implementation and have them work together to fix all the problems that appear along the way.but as far as I can see, I see nothing else than your opinion...
I may have no street cred when it comes to security, so don't take my word for it. Rather here's what the experts have to say:
sourceYou can roll your own, but you probably will make a major security mistake if you are not an expert in security/cryptography or have had your scheme analyzed by multiple experts. I'm more willing to bet on an open-source publicly known encryption scheme that's out there for all to see and analyze. More eyes means less likely that the current version doesn't have major vulnerabilities than something developed in-house by non-experts.
sourceBruce Schneier wrote"Anyone can invent an encryption algorithm they themselves can't break; it's much harder to invent one that no one else can break".
source.researchers at IBM wroteThe number one lesson from last time is never to roll your own cryptographic algorithms. The best bet is to borrow liberally from the good ideas that cryptography specialists have invented and tested over the years.
I'm not claiming at all that I came up with the notion of "don't roll your own crypto", instead I only relay advice I've heard. As a spectator and potential victim, I've witnessed too many times developers trying to outsmart their elders by refusing to reuse crypto libs.
Finally, we agree that reuse is not ALWAYS THE RIGHT OPTION, but reimplementation should be an exception, not the rule. And as such, each exception has to be thoroughly justified before creeping into your code.
Interestingly relevant