go.crypto/curve25519: rewrite generic code to be constant time.

Previously curve25519 contained a constant-time, optimised amd64 implementation and
a generic implemenation that used math/big and that was not constant-time.

This change contains a Go port of the public domain, "ref10" implementation from
SUPERCOP. This has the advantage of being faster and constant-time.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13343045
1 file changed