[][src]Function nettle::rsa::decrypt_pkcs1

pub fn decrypt_pkcs1<R: Random>(
    public: &PublicKey,
    private: &PrivateKey,
    random: &mut R,
    ciphertext: &[u8],
    plaintext: &mut [u8]
) -> Result<()>

Decrypts ciphertext using public/private. Returns the resulting plaintext.

The ciphertext expected to be padded using RSAES-PKCS1-v1_5.

Errors

Returns InvalidArgument if plaintext's size is greater or equal than public's modulo.