"errors"
"io"
"math/big"
+
+ "crypto/internal/randutil"
)
// This file implements encryption and decryption using PKCS#1 v1.5 padding.
// WARNING: use of this function to encrypt plaintexts other than
// session keys is dangerous. Use RSA OAEP in new protocols.
func EncryptPKCS1v15(random io.Reader, pub *PublicKey, msg []byte) ([]byte, error) {
+ randutil.MaybeReadByte(random)
+
if err := checkPub(pub); err != nil {
return nil, err
}