rsaDpBlinded

fnBigInt rsaDpBlinded(RSAPrivateKey key, BigInt c, Random random)

RSA decryption primitive with blinding for side-channel resistance.

This function applies multiplicative blinding before the private key operation to prevent timing attacks. The blinding factor randomizes the input, making timing measurements useless to an attacker.

Blinding Process:

  1. Generate random blinding factor r, where 1 < r < n and gcd(r, n) = 1
  2. Compute blinded ciphertext: c' = c * r^e mod n
  3. Compute blinded message: m' = (c')^d mod n
  4. Remove blinding: m = m' * r^(-1) mod n

Parameters

keyRSA private key. Must carry a valid public exponent (odd, at least 3); keys built without one default to e = 0, which silently disables blinding.
cCiphertext representative (0 <= c < n).
randomRandom number generator for blinding factor.

Returns

Message representative m = c^d mod n.

Throws

CryptoException if c is out of range, the public exponent is

not a usable odd integer of at least 3, or random generation fails.