Closed david-a-wheeler closed 8 years ago
"The project SHOULD support multiple cryptographic algorithms, so users can quickly switch if one is broken" Again with the binary choice that isn't binary in the real world. That's of course good if the underlying protocol supports that. If we support stuff that somone else designed ages ago with a fixed algorithm AND we support modern protocols with pluggable ciphers, what do we pick? For TLS we can say "Met". For NTLM we cannot.
There's been argument about this criterion, so we're dropping this one entirely. One problem gone :-).
A question about the original intent of this requirement - wasn't it to provide crypto agility in the same way that, for example, SSLCipherSuite gives the ability to be selective in the ciphers available? If that is the case I respectfully disagree with the point that it is a binary choice, and that legacy protocols break it; the final product should be able to specify which ciphers it will work with, and it becomes a decision of the user if they will then accept the risk of using a known-weak cipher in their deployment. So in the case of a project that uses pluggable ciphers and fixed ones (like md4 for NTLM) then the answer is "Met", since the software does support multiple crypto algorithms, but the choice is left to the final user in what to implement. If the user disables md4 but tries to implement NTLM functionality, then an error message should inform that those two decisions are incompatible.
@izar - for details about removing the requirement for supporting alternative crypto algorithms (crypto_alternatives), see issue #215.
You're quite right that a project that uses pluggable ciphers absolutely does meet the old crypto_alternatives requirement. However, there were objections, e.g., some cryptographers do not agree that agility is a good thing. I think agility is a good thing, but if there's that much pushback, then this kind of requirement doesn't really belong in an entry-level badge. We hope to add higher badge levels in the future, and we can re-discuss it then.
That said, do other crypto requirements need to removed? Downgraded? Changed? If so, how?
I definitely think we need to loosen the rule about including your own crypto algorithm. https://github.com/linuxfoundation/cii-best-practices-badge/blob/master/doc/criteria.md#crypto_call
As an example, libgit2 seems to rely on OpenSSL while git includes its own SHA1 implementation, which is originally from Mozilla. We might want to distinguish between protocols and algorithms, or just make it a suggested.
There are many ways to loosen the rule about including your own crypto implementation, which is currently: "If the project software is an application or library, and its primary purpose is not to implement cryptography, then it MUST only call on software specifically designed to implement cryptographic functions; it MUST NOT re-implement its own. [crypto_call]"
We could try to problem is in implementations that handle secret keys. It's really tricky to implement crypto algorithms in ways that don't leak secret keys via timing, electromagnetic leakage, etc. So perhaps if you handle secret keys, you want to call out to external libraries, otherwise it's not a big deal.
But on further reflection, that isn't enough either. Oftentimes you hash a password (e.g., as part of a salted iterated hash).
We could say it's okay to use your own hash functions (they're small!). But some other implementations are small also.
At this point, I think it might be best to just downgrade "crypto_call" to SHOULD. It allows alternatives without the complexity.
Also: It seems to me that it'd be okay to get a badge if you make an assertion about its conditions. E.G., "These answers require an x86_64; answers may be different on other platforms."
Okay, I'm convinced, let's just downgrade "crypto_call" to SHOULD. This is a typical example of a SHOULD: Something you SHOULD normally do, but there are special cases where it's not. We've dropped the "switchable crypto" requirement, and hopefully it's clear that the keylength requirements are for the defaults - users can configure for worse if needed (e.g., to support insecure legacy protocols). We can add "by default" in a few other places to make it clear that you CAN support insecure legacy protocols, just don't support them by default.
I think with those changes we'll have addressed this issue.
On 2016-02-16 Daniel Stenberg posted curl-related comments on the mailing list. Many of them asked about the crypto requirements, possibly suggesting that the requirements are too hard. Here are his initial comments and my initial responses; not sure how to address them.
If you open the details (click the "show details" button), the intent is for this to not be vague. You simply have to be able to point to a primary developer who knows the specific bullet list given in the details. The bigger problem is that figuring out who a "primary developer" can be tricky; we did try to define that too...!
Lots of security flaws is obviously not desirable - but that isn't disqualifying. If we required that people never make mistakes, we'd have a really short list of projects :-). In my mind, what's more important is if you're learning, but that's hard to put into a criterion. But we can require some educational knowledge - that, at least, is checkable and (I think) a useful start.
I suspect that our "Show details" button isn't obvious enough to do its job. We're going to do some UI cleanups, and I hope that'll make this easier to understand.
I would think the answer is "yes" if I understand you correctly.
The goal is to encourage people to call on other crypto libraries, instead of embedding one, because people get them wrong so often. For example, most re-implementations don't counter timing attacks at all. But we could reduce that to SHOULD NOT, SUGGEST NOT, reword it, or even remove it.
Not at all. The goal here is to prevent depending on cryptography that COULDN'T be legally implemented by OSS. This is basically a patent issue.
If you call Windows on a Windows platform, that's a good thing. But if your system's crypto protocol depends on something patented that CANNOT be reimplemented by FLOSS, that's a problem.
Agreed. The intent was that the defaults would be the minimums, but it could be configured or told to accept worse than that.
The problem of legacy services is sadly a big problem. Do you have suggested improved wording?
Hmm, again, the challenge of legacy services.
We may need to change the text to make it clear that it's okay to support legacy services. My thinking is that there needs to be some way to warn users, or require user configuration, to accept broken/highly weakened algorithms.
There's been argument about this criterion, so we're dropping this one entirely. One problem gone :-).
Hmm... so it's safe in normal circumstances, but not in specialized ones, right? Hmm. That's tricky. Many formal certification systems document the required conditions. We hadn't planned on doing that, but maybe we can't avoid that.