Versions in this module Expand all Collapse all v1 v1.0.1 Nov 8, 2022 v1.0.0 Nov 5, 2022 Changes in this version + const PSSSaltLengthAuto + const PSSSaltLengthEqualsHash + var ErrDecryption = errors.New("crypto/rsa: decryption error") + var ErrMessageTooLong = errors.New("crypto/rsa: message too long for RSA public key size") + var ErrVerification = errors.New("crypto/rsa: verification error") + func DecryptOAEP(hash hash.Hash, random io.Reader, priv *PrivateKey, ciphertext []byte, ...) ([]byte, error) + func DecryptPKCS1v15(random io.Reader, priv *PrivateKey, ciphertext []byte) ([]byte, error) + func DecryptPKCS1v15SessionKey(random io.Reader, priv *PrivateKey, ciphertext []byte, key []byte) error + func EncryptOAEP(hash hash.Hash, random io.Reader, pub *PublicKey, msg []byte, label []byte) ([]byte, error) + func EncryptPKCS1v15(random io.Reader, pub *PublicKey, msg []byte) ([]byte, error) + func SignPKCS1v15(random io.Reader, priv *PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error) + func SignPSS(rand io.Reader, priv *PrivateKey, hash crypto.Hash, digest []byte, ...) ([]byte, error) + func VerifyPKCS1v15(pub *PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error + func VerifyPSS(pub *PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *PSSOptions) error + type CRTValue struct + Coeff *big.Int + Exp *big.Int + R *big.Int + type OAEPOptions struct + Hash crypto.Hash + Label []byte + type PKCS1v15DecryptOptions struct + SessionKeyLen int + type PSSOptions struct + Hash crypto.Hash + SaltLength int + func (opts *PSSOptions) HashFunc() crypto.Hash + type PrecomputedValues struct + CRTValues []CRTValue + Dp *big.Int + Dq *big.Int + Qinv *big.Int + type PrivateKey struct + D *big.Int + Precomputed PrecomputedValues + Primes []*big.Int + func GenerateKey(random io.Reader, bits int) (*PrivateKey, error) + func GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*PrivateKey, error) + func (priv *PrivateKey) Decrypt(rand io.Reader, ciphertext []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) + func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool + func (priv *PrivateKey) Precompute() + func (priv *PrivateKey) Public() crypto.PublicKey + func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) + func (priv *PrivateKey) Validate() error + type PublicKey struct + E int + N *big.Int + func (pub *PublicKey) Equal(x crypto.PublicKey) bool + func (pub *PublicKey) Size() int