-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security assessment in docs? #89
Comments
yes, the security documentation is not as much written as I would want. You're more than welcome to start such a document listing potential problems (generic tls one or more specific one), that would help me getting this documentation started |
Thanks for the positive reply. And sorry I won't start this document myself: I prefer somebody with more of a clue doing that. I'd add a statement to the README pointing "this has not been subject to a full security auditing" or some such disclaimer, but I'm not sure I should propose a phrasing. From the other comment:
Sorry about any of that, and I'm sorry it's not very constructive, FUD and so on. I'm not advocating for openssl: I'm at most a user of cryptography, so I can at most evaluate discussions of existing libraries. And the result here is "I can't use this library currently without analyzing the threat model myself - do I care about timing attacks, X, Y and Z?". However, I mostly liked the code I've seen, FWIW; my sincere impression is that you are competent enough. After learning about timing attacks against memcmp, I've examined it. I've seen your constant-time comparison function, and I've seen the many instances of The only suspicious
Is there a comparison which leaks IV before it is used so that an attacker can do such an attack? It sounds extremely unlikely, but I'm not sure. It certainly deserves a comment. |
the IV is never a secret value (so leaking something public through side channel is not a problem), however most of the time (including in the case you're talking about), the attacker shouldn't be able to guess the IV we're going to use. Otherwise he can try to tweak its input to be able to "counter" the future IV for example. |
Thanks for the answer. There would only be a problem if the code uses the AESIV "too early" enabling the attacker to guess (which sounds unlikely, but what do I know?). Either one uses SecureMem "just so" to be safer, or checks against this attack, or drops the Eq instance if possible. |
I'm interested as well. But regarding timing attacks, wouldn't it be easier and safer if we wrapped computations in (tweakable) timeouts for now? It won't thwart side-channel attacks on the same machine, but it looks like a very straightforward, blanket fix. |
I was looking for a secure SSL implementation for Haskell (while investigating the best fix for ndmitchell/hoogle#92), and this looks like a good candidate.
However, I don't find sufficient documentation on the security of this library. I don't want to attack you, I appreciate the work, but the README does not explicitly discuss the security of the library, so I thought I'd ask. Moreover, while without docs I'd assume the library is insecure, less security-conscious user might assume it's secure if there's no warning against that, so it would be nice if you were explicit about it.
I've skimmed the README on Github, the main hackage page and the docs of the main module, and came back empty.
Some commenters ask whether such an implementation is safe against timing attacks. I found your answer, but:
The only other example of such an effort I've found is one in Ocaml. I've skimmed the page, and they seem to document explicitly what has been audited, which attacks have been mitigated and what hasn't — for instance, they write "for the time being we suggest to not use the stack on a multi-tenant shared host or on a shared host which malicious users might have access to."
The text was updated successfully, but these errors were encountered: