by Etzos · 10y ago · 0 comments
You'll notice the "Asymmetric Signature" section mentions using ESDSA on P-256 because "the Go implementation of P-256 is constant time to protect against side-channel attacks." However, someone mentioned that this may not be on all platforms because it is hand-coded assembly. After a quick check of the Go source code, this is indeed true. In fact, the constant time guarantee assembly version is only available on amd64 compatible systems[1]. Just something to take note of.
[1] https://golang.org/src/crypto/elliptic/
Edit: Formatting and grammar and spelling, oh my.
[1] https://github.com/golang/go/blob/master/src/crypto/elliptic...
[2] https://github.com/golang/go/blob/master/src/crypto/elliptic...
Looking into it more I noticed that there's a Go implementation[1] that is noted to be constant-time with a !amd64 build tag. So it isn't just the assembly one.
On that note, how much of a guarantee is there in the Go implementation? I assume in most cases it's going to be constant time, but isn't that a little harder to guarantee when compared to the asm version? And if not why not just use the Go implementation everywhere for consistency?