Standard Library

GoCryptoEcdsa

Go stdlib package — crypto/ecdsa. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.GenerateKey()Neutral
#
Signature
GenerateKey(c elliptic.Curve, rand io.Reader) (*PrivateKey, error)

GenerateKey generates a new ECDSA private key for the specified curve.

.PrivateKey.ECDH()Neutral
#
Signature
PrivateKey.ECDH() (*ecdh.PrivateKey, error)

ECDH returns k as a [ecdh.PrivateKey]. It returns an error if the key is

.PrivateKey.Equal()Neutral
#
Signature
PrivateKey.Equal(x crypto.PrivateKey) bool

Equal reports whether priv and x have the same value.

.PrivateKey.Public()Neutral
#
Signature
PrivateKey.Public() crypto.PublicKey

Public returns the public key corresponding to priv.

.PrivateKey.Sign()Neutral
#
Signature
PrivateKey.Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

Sign signs digest with priv, reading randomness from rand. The opts argument

.PublicKey.ECDH()Neutral
#
Signature
PublicKey.ECDH() (*ecdh.PublicKey, error)

ECDH returns k as a [ecdh.PublicKey]. It returns an error if the key is

.PublicKey.Equal()Neutral
#
Signature
PublicKey.Equal(x crypto.PublicKey) bool

Equal reports whether pub and x have the same value.

.Sign()Neutral
#
Signature
Sign(rand io.Reader, priv *PrivateKey, hash []byte) (*big.Int, *big.Int, error)

Sign signs a hash (which should be the result of hashing a larger message)

.SignASN1()Neutral
#
Signature
SignASN1(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error)

SignASN1 signs a hash (which should be the result of hashing a larger message)

.Verify()Neutral
#
Signature
Verify(pub *PublicKey, hash []byte, r *big.Int, s *big.Int) bool

Verify verifies the signature in r, s of hash using the public key, pub. Its

Fully-Qualified Names

FQNField
crypto/ecdsafqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # crypto/ecdsa