Skip to main content

rsa_decrypt_and_check

Function rsa_decrypt_and_check 

Source
pub fn rsa_decrypt_and_check<R: CryptoRngCore + ?Sized>(
    priv_key: &impl PrivateKeyParts,
    rng: Option<&mut R>,
    c: &BigUint,
) -> Result<BigUint>
Expand description

⚠️ Performs raw RSA decryption with no padding.

Returns a plaintext BigUint. Performs RSA blinding if an Rng is passed. This will also check for errors in the CRT computation.

§☢️️ WARNING: HAZARDOUS API ☢️

Use this function with great care! Raw RSA should never be used without an appropriate padding or signature scheme. See the module-level documentation for more information.