summary refs log tree commit diff
path: root/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/multiplier/WTauNafMultiplier.cs')
-rw-r--r--crypto/src/math/ec/multiplier/WTauNafMultiplier.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
index 8e50a161d..d986e7f01 100644
--- a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
+++ b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
@@ -29,12 +29,10 @@ namespace Org.BouncyCastle.Math.EC.Multiplier
                 throw new ArgumentException("Only AbstractF2mPoint can be used in WTauNafMultiplier");
 
             AbstractF2mCurve curve = (AbstractF2mCurve)p.Curve;
-            int m = curve.FieldSize;
             sbyte a = (sbyte)curve.A.ToBigInteger().IntValue;
             sbyte mu = Tnaf.GetMu(a);
-            BigInteger[] s = curve.GetSi();
 
-            ZTauElement rho = Tnaf.PartModReduction(k, m, a, s, mu, (sbyte)10);
+            ZTauElement rho = Tnaf.PartModReduction(curve, k, a, mu, (sbyte)10);
 
             return MultiplyWTnaf(p, rho, a, mu);
         }
@@ -49,15 +47,13 @@ namespace Org.BouncyCastle.Math.EC.Multiplier
         * <code>[&#964;]</code>-adic NAF.
         * @return <code>p</code> multiplied by <code>&#955;</code>.
         */
-        private AbstractF2mPoint MultiplyWTnaf(AbstractF2mPoint p, ZTauElement lambda,
-            sbyte a, sbyte mu)
+        private AbstractF2mPoint MultiplyWTnaf(AbstractF2mPoint p, ZTauElement lambda, sbyte a, sbyte mu)
         {
             ZTauElement[] alpha = (a == 0) ? Tnaf.Alpha0 : Tnaf.Alpha1;
 
             BigInteger tw = Tnaf.GetTw(mu, Tnaf.Width);
 
-            sbyte[]u = Tnaf.TauAdicWNaf(mu, lambda, Tnaf.Width,
-                BigInteger.ValueOf(Tnaf.Pow2Width), tw, alpha);
+            sbyte[] u = Tnaf.TauAdicWNaf(mu, lambda, Tnaf.Width, tw.IntValue, alpha);
 
             return MultiplyFromWTnaf(p, u);
         }