summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_invmod.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-08-29 19:52:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-08-29 19:52:35 (GMT)
commitff1658cbdd0982b1fe292259ef37bc9abb41a932 (patch)
tree915f0c4344c7f680ee86ba8cce24deb9b0b40bc2 /libtommath/bn_mp_invmod.c
parent2adcff3e5ba6e09366ef4208ab81768803ba15bd (diff)
downloadtcl-ff1658cbdd0982b1fe292259ef37bc9abb41a932.zip
tcl-ff1658cbdd0982b1fe292259ef37bc9abb41a932.tar.gz
tcl-ff1658cbdd0982b1fe292259ef37bc9abb41a932.tar.bz2
libtommath 1.0.1 rc 2
Diffstat (limited to 'libtommath/bn_mp_invmod.c')
-rw-r--r--libtommath/bn_mp_invmod.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtommath/bn_mp_invmod.c b/libtommath/bn_mp_invmod.c
index 44951e5..c374fd2 100644
--- a/libtommath/bn_mp_invmod.c
+++ b/libtommath/bn_mp_invmod.c
@@ -25,7 +25,7 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
#ifdef BN_FAST_MP_INVMOD_C
/* if the modulus is odd we can use a faster routine instead */
- if (mp_isodd (b) == MP_YES) {
+ if ((mp_isodd(b) == MP_YES) && (mp_cmp_d(b, 1) != MP_EQ)) {
return fast_mp_invmod (a, b, c);
}
#endif
@@ -38,6 +38,6 @@ int mp_invmod (mp_int * a, mp_int * b, mp_int * c)
}
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: HEAD -> release/1.0.1, tag: v1.0.1-rc2 */
+/* git commit: e8c27ba7df0efb90708029115c94d681dfa7812f */
+/* commit time: 2017-08-29 10:48:46 +0200 */