Fix comment typo.
Change-Id: I482093000ee2e4ba371c78b4f7f8e8b121e71640 Reviewed-on: https://boringssl-review.googlesource.com/22886 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
238c274054
commit
0a9222b824
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user