From fe03519704d5f533722e061009ca079e7217cfd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Tue, 19 Sep 2000 23:25:00 +0000 Subject: 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 :-) --- crypto/bn/bn_sqr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/bn/bn_sqr.c') 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 -- cgit v1.2.3