"Don't roll your own crypto" - an advice with a muddy purpose and a clear outcome:
- people treating cryptography like an arcane magic and a scarce pool of experts
- no pressure to make standards that are secure _and_ easy to implement
I guess the point is that cryptography is both difficult and dangerous, but you two are making the excellent point that popular vendors are not obviously reliable at succeeding to do a better job than an expert's bespoke one.
At the industrial scale, I suppose openbsd's funding exists because Theo is personally infinitely more reliable than any major trillion dollar company, or an industry consortium of rich companies.
jd do you know context about sharplispers ironclad?
@screwlisp @kirtai @jackdaniel i guess a better saying would be "know when rolling your own is ok"?
and often you shouldnt, but sometimes its the right choice?
Many complex domains require experience that is gathered by "rolling your own", preferably by adhering to existing standard - and then fixing it.
I think that emphasizing challenges like Crypto Pals and working on intelligible standards is the way to make rolling your own crypto more secure, and raising the bar of security universally.
To rephrase: "if it is interesting to you, go ahead and roll your own - but mind these gotchas. If you are not interested, then here are off-the-shelf known solutions." -- less arrogant with better outcome.
EDIT and there are of course use cases, where failures are critical. And that applies to cryptography and, say, databases -- you'd use known battle-proof crypto and database engines in these projects. But nobody says without any context "don't roll your own database".
Edit2:
1. make educational challenges like Crypto Pals
2. work on intelligible standards
3. work on adversarial test suites
@jackdaniel
Actually, "don't roll your own database" is a common adage.
I kind of take your point- like seeing people (possibly yourself) Do Fourier Transforms signifiantly wrong is a comparably big deal to doing crypto wrong, but crypto is treated as worse because people trust password protection.
Viz openssl, while openbsd created openssl, its development was taken over by Industry, and then after heartbleed, openbsd created its own openssl implementation, libressl.
@jackdaniel
However the existence and licensing of libressl basically means big improvements from libressl get upstreamed into the openssl implementation it deprecated anyway, and then it appears to be very hard to even know what is happening in the crypto space.
A failure example would be that wordpress shopping plugin's Troubles a few years ago.
@4censord @kirtai
As noted earlier:
- simpler standards
- adversarial test suites
- education
That's the way for better crypto. Not "the holy church of security experts".
And the context matters. "goto considered harmful" - esque advices without context are slogans.
@jackdaniel Indeed. Yesterday''s "trust the experts" has been mutating into "trust the tech bros" for a while already.
@screwlisp @4censord @kirtai@tech.lgbt
@jackdaniel A question I'd like to see explored is: How can we reduce the need for crypto? How else can we establish trust between parties communicating digitally?
I guess banks will always need crypto, but they also have the means to hire crypto experts. But why does my blog need HTTPS? Could we have simpler tech to establish trust between my blog and its readers?
The argument goes as follows: between you and the server there is ISP. What follows:
1) If you can't ascertain that the message was not tampered with, then ISP can inject ads, or MITM can inject malware
2) if you don't have your communication encrypted, then ISP (or MITM) can learn more about you - listen to your passwords, build a profile for your preferences etc
And both points are valid in untrusted network (internet is very much that). IMO cryptography is not the problem. As noted in sibling messages, crypto should be easier to implement and easier to test against known attack vectors; relevant math is often not that hard (to implement); the problem comes from the dressing.
Take as an example the Heartbleed attack - it was exploited by using a feature of the protocol that nobody uses in practice (heartbeat).
@jackdaniel That's the engineering answer, which presumes a certain level of abstraction (server/client, independently of content and user) and the quest for a universal solution.
My blog requires less protection than a bank because the threat model is very different. No big entity cares about my blog. They would envisage MITM attacks or injecting malware only if my blog is one out of many sites they could attack at the same time.
I agree that there are different threat models for a bank and for a blog, where the former is far more critical.
That said, the latter also has issues, most notably injecting ads and tracking users. They don't have to care explicitly about your blog if they can do that for "all unencrypted traffic".
I think that the universal solution is better than maintaining separate compatibility bridges (your sibling post). You may have one standard (that ensures compatibility) and multiple implementations.
But all that hangs on the requirement, that the standard must be reasonably easy to implement and reasonably easy to test against known malicious vectors.
Alternative (interoperable stacks) kind of defeats the point, because now you have:
[n implementations] - [1 standard]
and then you'd have
[n A implementations]
-
[n A-B bridges]
-
[n B implementations]
_I don't think_ that this would be a good outcome.
@jackdaniel It's not an obvious trade-off for me. One aspect is efficiency vs. robustness through diversity. The first one is much easier to quantify than the second, so efficiency usually wins.
Diversity is possible at the protocol level and at the implementation level, with different trade-offs. You seem to favor the implementation level. Fine with me!