diff options
Diffstat (limited to 'crypto/src/math/ec/abc/Tnaf.cs')
-rw-r--r-- | crypto/src/math/ec/abc/Tnaf.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/src/math/ec/abc/Tnaf.cs b/crypto/src/math/ec/abc/Tnaf.cs index d8e9b6ae0..3707a974a 100644 --- a/crypto/src/math/ec/abc/Tnaf.cs +++ b/crypto/src/math/ec/abc/Tnaf.cs @@ -512,9 +512,7 @@ namespace Org.BouncyCastle.Math.EC.Abc { // For w <> 4, the values must be computed BigInteger[] us = GetLucas(mu, w, false); - BigInteger twoToW = BigInteger.Zero.SetBit(w); - BigInteger u1invert = us[1].ModInverse(twoToW); - return us[0].ShiftLeft(1).Multiply(u1invert).Mod(twoToW); + return us[0].ShiftLeft(1).ModDivide(us[1], BigInteger.One.ShiftLeft(w)); } } |