package ecdsa

Import Path
	crypto/ecdsa (on golang.org and go.dev)

Dependency Relation
	imports 11 packages, and imported by 2 packages

Involved Source Files
	d-> ecdsa.go
	    ecdsa_noasm.go

Exported Type Names

type PrivateKey (struct) PrivateKey represents an ECDSA private key. D *big.Int PublicKey PublicKey PublicKey.Curve elliptic.Curve PublicKey.X *big.Int PublicKey.Y *big.Int (T) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int) (T) Double(x1, y1 *big.Int) (x, y *big.Int) (*T) Equal(x crypto.PrivateKey) bool (T) IsOnCurve(x, y *big.Int) bool (T) Params() *elliptic.CurveParams (*T) Public() crypto.PublicKey (T) ScalarBaseMult(k []byte) (x, y *big.Int) (T) ScalarMult(x1, y1 *big.Int, k []byte) (x, y *big.Int) (*T) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) *T : crypto.Signer T : crypto/elliptic.Curve func GenerateKey(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) func crypto/x509.ParseECPrivateKey(der []byte) (*PrivateKey, error) func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) func SignASN1(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error) func crypto/x509.MarshalECPrivateKey(key *PrivateKey) ([]byte, error)
type PublicKey (struct) PublicKey represents an ECDSA public key. Curve elliptic.Curve X *big.Int Y *big.Int (T) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int) (T) Double(x1, y1 *big.Int) (x, y *big.Int) (*T) Equal(x crypto.PublicKey) bool (T) IsOnCurve(x, y *big.Int) bool (T) Params() *elliptic.CurveParams (T) ScalarBaseMult(k []byte) (x, y *big.Int) (T) ScalarMult(x1, y1 *big.Int, k []byte) (x, y *big.Int) T : crypto/elliptic.Curve func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool func VerifyASN1(pub *PublicKey, hash, sig []byte) bool
Exported Values
func GenerateKey(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) GenerateKey generates a public and private key pair.
func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) Sign signs a hash (which should be the result of hashing a larger message) 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. It returns the signature as a pair of integers. The security of the private key depends on the entropy of rand.
func SignASN1(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error) SignASN1 signs a hash (which should be the result of hashing a larger message) 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. It returns the ASN.1 encoded signature. The security of the private key depends on the entropy of rand.
func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool Verify verifies the signature in r, s of hash using the public key, pub. Its return value records whether the signature is valid.
func VerifyASN1(pub *PublicKey, hash, sig []byte) bool VerifyASN1 verifies the ASN.1 encoded signature, sig, of hash using the public key, pub. Its return value records whether the signature is valid.