diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-29 14:47:53 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-29 14:47:53 +0700 |
commit | beba3f6941c540af864926f8de9c3a5a8a703983 (patch) | |
tree | 23709b363b0e6a179bad32e6a313b530d954024d /crypto/src/math/ec/multiplier/WTauNafMultiplier.cs | |
parent | Tnaf perf. opts. (diff) | |
download | BouncyCastle.NET-ed25519-beba3f6941c540af864926f8de9c3a5a8a703983.tar.xz |
Koblitz curve perf. opts.
Diffstat (limited to '')
-rw-r--r-- | crypto/src/math/ec/multiplier/WTauNafMultiplier.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs index d986e7f01..6631657f4 100644 --- a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs +++ b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs @@ -24,8 +24,7 @@ namespace Org.BouncyCastle.Math.EC.Multiplier */ protected override ECPoint MultiplyPositive(ECPoint point, BigInteger k) { - AbstractF2mPoint p = point as AbstractF2mPoint; - if (p == null) + if (!(point is AbstractF2mPoint p)) throw new ArgumentException("Only AbstractF2mPoint can be used in WTauNafMultiplier"); AbstractF2mCurve curve = (AbstractF2mCurve)p.Curve; |