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.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
index 4dce54440..8e50a161d 100644
--- a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
+++ b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs
@@ -24,10 +24,10 @@ namespace Org.BouncyCastle.Math.EC.Multiplier
         */
         protected override ECPoint MultiplyPositive(ECPoint point, BigInteger k)
         {
-            if (!(point is AbstractF2mPoint))
+            AbstractF2mPoint p = point as AbstractF2mPoint;
+            if (p == null)
                 throw new ArgumentException("Only AbstractF2mPoint can be used in WTauNafMultiplier");
 
-            AbstractF2mPoint p = (AbstractF2mPoint)point;
             AbstractF2mCurve curve = (AbstractF2mCurve)p.Curve;
             int m = curve.FieldSize;
             sbyte a = (sbyte)curve.A.ToBigInteger().IntValue;