crypto/elliptic

Guided tour · Crypto · pkg.go.dev →

Named NIST curves (P-224, P-256, P-384, P-521). Most new code uses crypto/ecdsa or crypto/ecdh instead — this is the lower-level curve API.

Usage

Pick a curve

c := elliptic.P256()
// Pass into ecdsa.GenerateKey / ecdh.P256(), etc.

Point encoding

// Marshal/Unmarshal is deprecated in new code;
// use crypto/ecdh for exchange and crypto/ecdsa for signatures.