diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-11-10 14:42:27 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2016-11-10 14:42:27 +0700 |
commit | 5f3830451fa08884b751b8de4f2ee8109ac3527f (patch) | |
tree | c6c63f1b2cdd8c7e1f2b16f015c7151ad0ee1d21 /crypto/src/math/ec | |
parent | Throw excepton on unknown tag (diff) | |
download | BouncyCastle.NET-ed25519-5f3830451fa08884b751b8de4f2ee8109ac3527f.tar.xz |
Fix possible NPE when cofactor != 1 (from bc-java)
Diffstat (limited to 'crypto/src/math/ec')
-rw-r--r-- | crypto/src/math/ec/multiplier/WNafUtilities.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/math/ec/multiplier/WNafUtilities.cs b/crypto/src/math/ec/multiplier/WNafUtilities.cs index 5491297d7..7d565dfbd 100644 --- a/crypto/src/math/ec/multiplier/WNafUtilities.cs +++ b/crypto/src/math/ec/multiplier/WNafUtilities.cs @@ -423,7 +423,7 @@ namespace Org.BouncyCastle.Math.EC.Multiplier * 1) additions do not use the curve's A, B coefficients. * 2) no special cases (i.e. Q +/- Q) when calculating 1P, 3P, 5P, ... */ - if (ECAlgorithms.IsFpCurve(c) && c.FieldSize >= 64) + if (!twiceP.IsInfinity && ECAlgorithms.IsFpCurve(c) && c.FieldSize >= 64) { switch (c.CoordinateSystem) { |