summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT283FieldElement.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-06-09 19:45:30 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-06-09 19:45:30 +0700
commitd1381ec53357d72a200d9dfc74923761f1846cf6 (patch)
treecb217ca31f03d23364fb35425fa12a35845797e3 /crypto/src/math/ec/custom/sec/SecT283FieldElement.cs
parentMerge branch 'bartland-pkcs5v2sha2' (diff)
downloadBouncyCastle.NET-ed25519-d1381ec53357d72a200d9dfc74923761f1846cf6.tar.xz
Add range checks to F2m field elements
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT283FieldElement.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT283FieldElement.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT283FieldElement.cs b/crypto/src/math/ec/custom/sec/SecT283FieldElement.cs
index 09243e859..9181b8685 100644
--- a/crypto/src/math/ec/custom/sec/SecT283FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecT283FieldElement.cs
@@ -12,7 +12,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
 
         public SecT283FieldElement(BigInteger x)
         {
-            if (x == null || x.SignValue < 0)
+            if (x == null || x.SignValue < 0 || x.BitLength > 283)
                 throw new ArgumentException("value invalid for SecT283FieldElement", "x");
 
             this.x = SecT283Field.FromBigInteger(x);