Documentation
¶
Overview ¶
Package rsa provides utilities for signing and verifying messages using RSA.
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrHashUnavailable is returned when the hash function is not linked into the binary.
Functions ¶
This section is empty.
Types ¶
type PKCSSigner ¶
type PKCSSigner struct { PKCSVerifier Rand io.Reader // Defaults to crypto/rand.Reader if not set. // contains filtered or unexported fields }
PKCSSigner signs messages using RSA-PKCS #1 v1.5. It is safe for concurrent use by multiple goroutines.
func NewPKCSSigner ¶
func NewPKCSSigner(priv *rsa.PrivateKey, hash crypto.Hash) (*PKCSSigner, error)
NewPKCSSigner returns a new PKCSSigner for the provided private key and hash algorithm.
type PKCSVerifier ¶
type PKCSVerifier struct {
// contains filtered or unexported fields
}
PKCSVerifier verifies RSA-PKCS #1 v1.5 message signatures. It is safe for concurrent use by multiple goroutines.
func NewPKCSVerifier ¶
NewPKCSVerifier returns a new PKCSVerifier for the provided public key and hash algorithm.
type PSSSigner ¶
type PSSSigner struct { PSSVerifier Rand io.Reader // Defaults to crypto/rand.Reader if not set. // contains filtered or unexported fields }
PSSSigner signs messages using RSA-PSS. It is safe for concurrent use by multiple goroutines.
func NewPSSSigner ¶
func NewPSSSigner(priv *rsa.PrivateKey, opts *rsa.PSSOptions) (*PSSSigner, error)
NewPSSSigner returns a new PSSSigner for the provided private key.
type PSSVerifier ¶
type PSSVerifier struct {
// contains filtered or unexported fields
}
PSSVerifier verifies RSA-PSS message signatures. It is safe for concurrent use by multiple goroutines.
func NewPSSVerifier ¶
func NewPSSVerifier(pub *rsa.PublicKey, opts *rsa.PSSOptions) (*PSSVerifier, error)
NewPSSVerifier returns a new PSSVerifier for the provided public key.