Involved Source Files Package crypto collects common cryptographic constants.
Package-Level Type Names (total 7)
/* sort by: | */
Decrypter is an interface for an opaque private key that can be used for
asymmetric decryption operations. An example would be an RSA key
kept in a hardware module. Decrypt decrypts msg. The opts argument should be appropriate for
the primitive used. See the documentation in each implementation for
details. Public returns the public key corresponding to the opaque,
private key.
*crypto/rsa.PrivateKey
PrivateKey represents a private key using an unspecified algorithm.
Although this type is an empty interface for backwards compatibility reasons,
all private key types in the standard library implement the following interface
interface{
Public() crypto.PublicKey
Equal(x crypto.PrivateKey) bool
}
as well as purpose-specific interfaces such as [Signer] and [Decrypter], which
can be used for increased type safety within applications.
func crypto/ecdh.(*PrivateKey).Equal(x PrivateKey) bool
func crypto/ecdsa.(*PrivateKey).Equal(x PrivateKey) bool
func crypto/ed25519.PrivateKey.Equal(x PrivateKey) bool
func crypto/rsa.(*PrivateKey).Equal(x PrivateKey) bool
PublicKey represents a public key using an unspecified algorithm.
Although this type is an empty interface for backwards compatibility reasons,
all public key types in the standard library implement the following interface
interface{
Equal(x crypto.PublicKey) bool
}
which can be used for increased type safety within applications.
func Decrypter.Public() PublicKey
func Signer.Public() PublicKey
func crypto/ecdh.(*PrivateKey).Public() PublicKey
func crypto/ecdsa.(*PrivateKey).Public() PublicKey
func crypto/ed25519.PrivateKey.Public() PublicKey
func crypto/rsa.(*PrivateKey).Public() PublicKey
func crypto/ecdh.(*PublicKey).Equal(x PublicKey) bool
func crypto/ecdsa.(*PublicKey).Equal(x PublicKey) bool
func crypto/ed25519.PublicKey.Equal(x PublicKey) bool
func crypto/internal/hpke.SetupSender(kemID, kdfID, aeadID uint16, pub PublicKey, info []byte) ([]byte, *hpke.Sender, error)
func crypto/rsa.(*PublicKey).Equal(x PublicKey) bool
Signer is an interface for an opaque private key that can be used for
signing operations. For example, an RSA key kept in a hardware module. Public returns the public key corresponding to the opaque,
private key. Sign signs digest with the private key, possibly using entropy from
rand. For an RSA key, the resulting signature should be either a
PKCS #1 v1.5 or PSS signature (as indicated by opts). For an (EC)DSA
key, it should be a DER-serialised, ASN.1 signature structure.
Hash implements the SignerOpts interface and, in most cases, one can
simply pass in the hash function used as opts. Sign may also attempt
to type assert opts to other types in order to obtain algorithm
specific values. See the documentation in each package for details.
Note that when a signature of a hash of a larger message is needed,
the caller is responsible for hashing the larger message and passing
the hash (as digest) and the hash function (as opts) to Sign.
*crypto/ecdsa.PrivateKey
crypto/ed25519.PrivateKey
*crypto/rsa.PrivateKey
func crypto/x509.CreateRevocationList(rand io.Reader, template *x509.RevocationList, issuer *x509.Certificate, priv Signer) ([]byte, error)
SignerOpts contains options for signing with a [Signer]. HashFunc returns an identifier for the hash function used to produce
the message passed to Signer.Sign, or else zero to indicate that no
hashing was done.Hash
*crypto/ed25519.Options
*crypto/rsa.PSSOptions
func Signer.Sign(rand io.Reader, digest []byte, opts SignerOpts) (signature []byte, err error)
func crypto/ecdsa.(*PrivateKey).Sign(rand io.Reader, digest []byte, opts SignerOpts) ([]byte, error)
func crypto/ed25519.PrivateKey.Sign(rand io.Reader, message []byte, opts SignerOpts) (signature []byte, err error)
func crypto/rsa.(*PrivateKey).Sign(rand io.Reader, digest []byte, opts SignerOpts) ([]byte, error)
Package-Level Functions (only one)
RegisterHash registers a function that returns a new instance of the given
hash function. This is intended to be called from the init function in
packages that implement hash functions.
The pages are generated with Goldsv0.7.0-preview. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.