package ecdsa

Import Path
	crypto/internal/fips140/ecdsa (on go.dev)

Dependency Relation
	imports 11 packages, and imported by one package


Package-Level Type Names (total 5)
/* sort by: | */
Type Parameters: P: Point[P] N *bigmod.Modulus func P224() *Curve[*nistec.P224Point] func P256() *Curve[*nistec.P256Point] func P384() *Curve[*nistec.P384Point] func P521() *Curve[*nistec.P521Point] func GenerateKey[P](c *Curve[P], rand io.Reader) (*PrivateKey, error) func NewPrivateKey[P](c *Curve[P], D, Q []byte) (*PrivateKey, error) func NewPublicKey[P](c *Curve[P], Q []byte) (*PublicKey, error) func Sign[P, H](c *Curve[P], h func() H, priv *PrivateKey, rand io.Reader, hash []byte) (*Signature, error) func SignDeterministic[P, H](c *Curve[P], h func() H, priv *PrivateKey, hash []byte) (*Signature, error) func Verify[P](c *Curve[P], pub *PublicKey, hash []byte, sig *Signature) error
Type Parameters: P: any Point is a generic constraint for the [nistec] Point types. ( Point[P]) Add(p1, p2 P) P ( Point[P]) Bytes() []byte ( Point[P]) BytesX() ([]byte, error) ( Point[P]) ScalarBaseMult([]byte) (P, error) ( Point[P]) ScalarMult(P, []byte) (P, error) ( Point[P]) SetBytes([]byte) (P, error)
(*PrivateKey) Bytes() []byte (*PrivateKey) PublicKey() *PublicKey func GenerateKey[P](c *Curve[P], rand io.Reader) (*PrivateKey, error) func NewPrivateKey[P](c *Curve[P], D, Q []byte) (*PrivateKey, error) func Sign[P, H](c *Curve[P], h func() H, priv *PrivateKey, rand io.Reader, hash []byte) (*Signature, error) func SignDeterministic[P, H](c *Curve[P], h func() H, priv *PrivateKey, hash []byte) (*Signature, error)
(*PublicKey) Bytes() []byte func NewPublicKey[P](c *Curve[P], Q []byte) (*PublicKey, error) func (*PrivateKey).PublicKey() *PublicKey func Verify[P](c *Curve[P], pub *PublicKey, hash []byte, sig *Signature) error
Signature is an ECDSA signature, where r and s are represented as big-endian byte slices of the same length as the curve order. R []byte S []byte func Sign[P, H](c *Curve[P], h func() H, priv *PrivateKey, rand io.Reader, hash []byte) (*Signature, error) func SignDeterministic[P, H](c *Curve[P], h func() H, priv *PrivateKey, hash []byte) (*Signature, error) func Verify[P](c *Curve[P], pub *PublicKey, hash []byte, sig *Signature) error
Package-Level Functions (total 11)
Type Parameters: P: Point[P] GenerateKey generates a new ECDSA private key pair for the specified curve.
Type Parameters: P: Point[P]
Type Parameters: P: Point[P]
Type Parameters: P: Point[P] H: fips140.Hash Sign signs a hash (which shall be the result of hashing a larger message with the hash function H) using the private key, priv. If the hash is longer than the bit-length of the private key's curve order, the hash will be truncated to that length.
Type Parameters: P: Point[P] H: fips140.Hash SignDeterministic signs a hash (which shall be the result of hashing a larger message with the hash function H) using the private key, priv. If the hash is longer than the bit-length of the private key's curve order, the hash will be truncated to that length. This applies Deterministic ECDSA as specified in FIPS 186-5 and RFC 6979.
TestingOnlyNewDRBG creates an SP 800-90A Rev. 1 HMAC_DRBG with a plain personalization string. This should only be used for ACVP testing. hmacDRBG is not intended to be used directly.
Type Parameters: P: Point[P] Verify verifies the signature, sig, of hash (which should be the result of hashing a larger message) using the public key, pub. If the hash is longer than the bit-length of the private key's curve order, the hash will be truncated to that length. The inputs are not considered confidential, and may leak through timing side channels, or if an attacker has control of part of the inputs.