Skip to main content

pow_mod_blinded

Function pow_mod_blinded 

Source
pub(crate) fn pow_mod_blinded<R: TryCryptoRng + ?Sized>(
    rng: &mut R,
    base: &BoxedUint,
    exponent: &BoxedUint,
    p: &BoxedMontyParams,
) -> Result<BoxedMontyForm>
Expand description

Exponentiate modulo a fresh multiple of p, then return the residue modulo p.

exponent may already be blinded using a multiple of p - 1. Reduce back to p before CRT recombination, whose precomputed coefficient uses the original primes.