I love the README, it's very modest and I enjoy reading things like "if a function is longer than, say, 5 lines, I didn't write it myself." and "While you probably shouldn't trust random security code from the Internet, I'm reasonably confident that this code is secure. I did not implement any of the hard math (poly1305, XSalsa20, curve25519) myself - I call into golang.org/x/crypto for all of those functions. I also ported over every test I could find from the C/C++ code, and associated RFC's, and ensured that these libraries passed those tests."
I will wait for other companies to use it first - but it looks like a very level-headed implementation that won't be hard for the author to maintain - and a very useful tool.
Thanks! I've been wondering why the golang crypto repo contains only half an implementation for so long. I guess people are not generally eager to take responsibility for crypto implementations, especially semi-official ones...
It would be nice if the golang devs would pick an Argon2 implementation too (Blake2 hash is already there); it always feels prudent not to use any crypto libraries lest they receive some sort of semi-official blessing from the either language's own creators or renowned cryptographers.
Did a quick ctrl + F in the readme to look for how they handle timing attacks in Go. As this is a pure Go implementation, I'm curious - how are these attacks mitigated, or is that left to consumers of the library?
I'll clarify - it _is_ vulnerable to timing attacks (except where explicitly mentioned otherwise) - and you should take care of that in your code.
It is pretty trivial to defend from timing attacks in a language like go (just race a goroutine with a delay). I agree that it's a good point to bring up though.
I'm confused - does this have anything to do with Google's NaCL plug-in architecture for Chrome? Or is it only a set of crypto routines that have an unfortunate name collision with the former?
I had that thought as well... wasn't sure if it was meant to present an NaCL capable runtime.. then the readme pretty much cleared it up. Naming things is hard.
Sort of expected being a Google project but Istio [1] is being built using Envoy. Google is involved but Envoy [2] is owned by Lyft and is also using Bazel.
for the record - this is not a Google project, I'm not a Google employee. I just put the Go license on it because I borrowed some of the code and didn't want to deal with the hassle of relicensing etc.
I'm interested in Bazel because of the speed/caching parts, and because Go might be headed in that direction soon.
I'd love if I could just make a BUILD file for bazel and be able to just have $MAGIC happen. Especially since it looks like the bazel c target has 'linkstatic' for building a static binary.
it's getting there... see the Travis CI config for getting bazel for this repo specifically, or, https://github.com/bazelbuild/rules_go has go-specific instructions
I will wait for other companies to use it first - but it looks like a very level-headed implementation that won't be hard for the author to maintain - and a very useful tool.