sdk/golang/Standard Library/GoCryptoEd25519
Standard Library

GoCryptoEd25519

Go stdlib package — crypto/ed25519. 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(rand io.Reader) (PublicKey, PrivateKey, error)

GenerateKey generates a public/private key pair using entropy from rand.

.NewKeyFromSeed()Neutral
#
Signature
NewKeyFromSeed(seed []byte) PrivateKey

NewKeyFromSeed calculates a private key from a seed. It will panic if

.Options.HashFunc()Neutral
#
Signature
Options.HashFunc() crypto.Hash

HashFunc returns o.Hash.

.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 [PublicKey] corresponding to priv.

.PrivateKey.Seed()Neutral
#
Signature
PrivateKey.Seed() []byte

Seed returns the private key seed corresponding to priv. It is provided for

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

Sign signs the given message with priv. rand is ignored and can be nil.

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

Equal reports whether pub and x have the same value.

.Sign()Neutral
#
Signature
Sign(privateKey PrivateKey, message []byte) []byte

Sign signs the message with privateKey and returns a signature. It will

.Verify()Neutral
#
Signature
Verify(publicKey PublicKey, message []byte, sig []byte) bool

Verify reports whether sig is a valid signature of message by publicKey. It

Fully-Qualified Names

FQNField
crypto/ed25519fqns[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/ed25519