diff options
-rw-r--r-- | crypto/src/math/ec/LongArray.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/src/math/ec/LongArray.cs b/crypto/src/math/ec/LongArray.cs index d694f0cf0..a863c0a61 100644 --- a/crypto/src/math/ec/LongArray.cs +++ b/crypto/src/math/ec/LongArray.cs @@ -1879,6 +1879,10 @@ namespace Org.BouncyCastle.Math.EC * Output: a(z)^(-1) mod f(z) */ int uzDegree = Degree(); + if (uzDegree == 0) + { + throw new InvalidOperationException(); + } if (uzDegree == 1) { return this; |