Mercurial > dropbear
diff libtommath/bn_mp_invmod.c @ 1470:8bba51a55704
Update to libtommath v1.0.1
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 08 Feb 2018 23:11:40 +0800 |
parents | 60fc6476e044 |
children | f52919ffd3b1 |
line wrap: on
line diff
--- a/libtommath/bn_mp_invmod.c Thu Feb 08 22:21:47 2018 +0800 +++ b/libtommath/bn_mp_invmod.c Thu Feb 08 23:11:40 2018 +0800 @@ -25,7 +25,7 @@ #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 @@ } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */