3 ms·
agl (https://news.ycombinator.com/user?id=agl https://news.ycombinator.com/user?id=agl) knows better, as he wrote most crypto in Go, but here's what I know. AES
by dchest 14y ago
agl (https://news.ycombinator.com/user?id=agl https://news.ycombinator.com/user?id=agl) knows better, as he wrote most crypto in Go, but here's what I know. AES and RC4 in Go standard library are not constant time. AES should be timing safe when used on amd64 CPU with AES instructions. RSA is blinded, but not constant time, and ECC is not constant time (amd64 implementation of curve25519 in go.crypto is constant time, though). The linked hash functions (MD5 and SHA1) shouldn't be used for cryptography, but they and SHA-2 should be safe as there are no loads or branches that depend on secret data.
If you want a timing safe cipher, use (X)Salsa20 from go.crypto repository.