type nistCurve … type nistPoint … func (c *nistCurve[Point]) String() string { … } var errInvalidPrivateKey … func (c *nistCurve[Point]) GenerateKey(rand io.Reader) (*PrivateKey, error) { … } func (c *nistCurve[Point]) NewPrivateKey(key []byte) (*PrivateKey, error) { … } func newBoringPrivateKey(c Curve, bk *boring.PrivateKeyECDH, privateKey []byte) (*PrivateKey, error) { … } func (c *nistCurve[Point]) privateKeyToPublicKey(key *PrivateKey) *PublicKey { … } // isZero returns whether a is all zeroes in constant time. func isZero(a []byte) bool { … } // isLess returns whether a < b, where a and b are big-endian buffers of the // same length and shorter than 72 bytes. func isLess(a, b []byte) bool { … } func (c *nistCurve[Point]) NewPublicKey(key []byte) (*PublicKey, error) { … } func (c *nistCurve[Point]) ecdh(local *PrivateKey, remote *PublicKey) ([]byte, error) { … } // P256 returns a [Curve] which implements NIST P-256 (FIPS 186-3, section D.2.3), // also known as secp256r1 or prime256v1. // // Multiple invocations of this function will return the same value, which can // be used for equality checks and switch statements. func P256() Curve { … } var p256 … var p256Order … // P384 returns a [Curve] which implements NIST P-384 (FIPS 186-3, section D.2.4), // also known as secp384r1. // // Multiple invocations of this function will return the same value, which can // be used for equality checks and switch statements. func P384() Curve { … } var p384 … var p384Order … // P521 returns a [Curve] which implements NIST P-521 (FIPS 186-3, section D.2.5), // also known as secp521r1. // // Multiple invocations of this function will return the same value, which can // be used for equality checks and switch statements. func P521() Curve { … } var p521 … var p521Order …