Go theorytheory 0/50 · 0%
Blockchain · hard

44. Cryptography in Go

Hashes, ECDSA and safe randomness.

crypto/sha256, golang.org/x/crypto/sha3 and the secp256k1 bindings cover chain primitives. Use crypto/rand — never math/rand — for keys and nonces, compare secrets with hmac.Equal, and zero key material when finished.

Check your understanding

  1. 1. Which package generates cryptographic randomness?

  2. 2. Secret comparison should use…