fn decrypt<R: CryptoRngCore + ?Sized>(
rng: Option<&mut R>,
priv_key: &RsaPrivateKey,
ciphertext: &[u8],
) -> Result<Vec<u8>>Expand description
Decrypts a plaintext using RSA and the padding scheme from PKCS#1 v1.5.
If an rng is passed, it uses RSA blinding to avoid timing side-channel attacks.
Note that whether this function returns an error or not discloses secret
information. If an attacker can cause this function to run repeatedly and
learn whether each instance returned an error then they can decrypt and
forge signatures as if they had the private key. See
decrypt_session_key for a way of solving this problem.