Skip to main content

blind_exponent

Function blind_exponent 

Source
pub(crate) fn blind_exponent<R: TryCryptoRng + ?Sized>(
    rng: &mut R,
    exponent: &BoxedUint,
    totient: &BoxedUint,
) -> Result<Zeroizing<BoxedUint>>
Expand description

Return exponent + b * totient for a fresh, uniformly random 128-bit b.

This meets the minimum of 64 bits or two machine words in CFRG RSA guidance ยง6.4 on both 32-bit and 64-bit targets. All arithmetic uses public storage precisions. https://www.ietf.org/archive/id/draft-irtf-cfrg-rsa-guidance-10.html#section-6.4