diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-27 11:40:00 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-27 11:40:00 +0700 |
commit | b27039585917e3c0651de353faef68fe6bbc68d9 (patch) | |
tree | 0cdad9b0772f6e7ae061ba24ed0514b71b8e358b /crypto/src/math/ec/ECPoint.cs | |
parent | Use custom curve if available (diff) | |
download | BouncyCastle.NET-ed25519-b27039585917e3c0651de353faef68fe6bbc68d9.tar.xz |
Port of latest EC multipliers from Java
Diffstat (limited to 'crypto/src/math/ec/ECPoint.cs')
-rw-r--r-- | crypto/src/math/ec/ECPoint.cs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/crypto/src/math/ec/ECPoint.cs b/crypto/src/math/ec/ECPoint.cs index eb7128e1d..8f0168e27 100644 --- a/crypto/src/math/ec/ECPoint.cs +++ b/crypto/src/math/ec/ECPoint.cs @@ -469,19 +469,9 @@ namespace Org.BouncyCastle.Math.EC * @param k The multiplicator. * @return <code>k * this</code>. */ - public override ECPoint Multiply( - BigInteger k) + public override ECPoint Multiply(BigInteger k) { - if (k.SignValue < 0) - throw new ArgumentException("The multiplicator cannot be negative", "k"); - - if (this.IsInfinity) - return this; - - if (k.SignValue == 0) - return Curve.Infinity; - - return Curve.GetMultiplier().Multiply(this, k); + return this.Curve.GetMultiplier().Multiply(this, k); } } |