diff --git a/crypto/fipsmodule/bn/montgomery.c b/crypto/fipsmodule/bn/montgomery.c index 5219187d..caa25137 100644 --- a/crypto/fipsmodule/bn/montgomery.c +++ b/crypto/fipsmodule/bn/montgomery.c @@ -207,14 +207,13 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) { mont->n0[1] = 0; #endif - // Save RR = R**2 (mod N). R is the smallest power of 2**BN_BITS such that R + // Save RR = R**2 (mod N). R is the smallest power of 2**BN_BITS2 such that R // > mod. Even though the assembly on some 32-bit platforms works with 64-bit // values, using |BN_BITS2| here, rather than |BN_MONT_CTX_N0_LIMBS * // BN_BITS2|, is correct because R**2 will still be a multiple of the latter // as |BN_MONT_CTX_N0_LIMBS| is either one or two. // - // XXX: This is not constant time with respect to |mont->N|, but it should - // be. + // XXX: This is not constant time with respect to |mont->N|, but it should be. unsigned lgBigR = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2; if (!bn_mod_exp_base_2_vartime(&mont->RR, lgBigR * 2, &mont->N)) { return 0;