aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/numbertheory/numthry.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-03-06 06:57:46 -0500
committerJack Lloyd <[email protected]>2020-03-06 08:23:29 -0500
commitd2ada9892be75459f3080fe8f88ea9f6ef10ea1b (patch)
treec2e8e9804b54ad8412c7b8bd3ebda139dd2ba0ad /src/lib/math/numbertheory/numthry.h
parent06a55af16fbee536cf3aa53370195b22327ca54f (diff)
Optimize inverse_mod
About 25% faster
Diffstat (limited to 'src/lib/math/numbertheory/numthry.h')
-rw-r--r--src/lib/math/numbertheory/numthry.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/math/numbertheory/numthry.h b/src/lib/math/numbertheory/numthry.h
index b476db600..e818aa0bb 100644
--- a/src/lib/math/numbertheory/numthry.h
+++ b/src/lib/math/numbertheory/numthry.h
@@ -81,7 +81,8 @@ BigInt BOTAN_PUBLIC_API(2,0) square(const BigInt& x);
* as long as x is less than modulus. It also avoids leaking
* information about the modulus, except that it does leak which of 3
* categories the modulus is in: an odd integer, a power of 2, or some
-* other even number.
+* other even number, and if the modulus is even, leaks the power of 2
+* which divides the modulus.
*
* @param x a positive integer
* @param modulus a positive integer