Lines Matching full:ciphertext
90 // Decrypt decrypts ciphertext with priv. If opts is nil or of type
93 func (priv *PrivateKey) Decrypt(rand io.Reader, ciphertext []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
95 return DecryptPKCS1v15(rand, priv, ciphertext)
100 return DecryptOAEP(opts.Hash.New(), rand, priv, ciphertext, opts.Label)
108 if err := DecryptPKCS1v15SessionKey(rand, priv, ciphertext, plaintext); err != nil {
113 return DecryptPKCS1v15(rand, priv, ciphertext)
509 // DecryptOAEP decrypts ciphertext using RSA-OAEP.
511 func DecryptOAEP(hash hash.Hash, random io.Reader, priv *PrivateKey, ciphertext []byte, label []byte) (msg []byte, err error) {
516 if len(ciphertext) > k ||
522 c := new(big.Int).SetBytes(ciphertext)
551 // attacks like: J. Manger. A Chosen Ciphertext Attack on RSA Optimal