diff options
author | Bodo Möller <bodo@openssl.org> | 2000-09-20 01:25:00 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-09-20 01:25:00 +0200 |
commit | fe03519704d5f533722e061009ca079e7217cfd2 (patch) | |
tree | f5b344f73719a46269834d13a2c06e2c544563c8 /crypto/bn/bn_sqr.c | |
parent | BSDI only supports ftime() through libcompat, which means it's (diff) | |
download | openssl-fe03519704d5f533722e061009ca079e7217cfd2.tar.xz openssl-fe03519704d5f533722e061009ca079e7217cfd2.zip |
Totally remove the supposedly 'faster' variant in
BN_mod_mul_montgomery, which calls bn_sqr_recursive
without much preparation.
bn_sqr_recursive requires the length of its argument to be
a power of 2, which is not always the case here.
There's no reason for not using BN_sqr -- if a simpler
approach to squaring made sense, then why not change
BN_sqr? (Using BN_sqr should also speed up DH where g is chosen
such that it becomes small [e.g., 2] when converted
to Montgomery representation.)
Case closed :-)
Diffstat (limited to 'crypto/bn/bn_sqr.c')
-rw-r--r-- | crypto/bn/bn_sqr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index fe00c5f69a..75f4f38392 100644 --- a/crypto/bn/bn_sqr.c +++ b/crypto/bn/bn_sqr.c @@ -188,7 +188,7 @@ void bn_sqr_normal(BN_ULONG *r, BN_ULONG *a, int n, BN_ULONG *tmp) #ifdef BN_RECURSION /* r is 2*n words in size, - * a and b are both n words in size. + * a and b are both n words in size. (There's not actually a 'b' here ...) * n must be a power of 2. * We multiply and return the result. * t must be 2*n words in size |