diff options
author | Oren Novotny <oren@novotny.org> | 2015-07-30 14:04:28 -0400 |
---|---|---|
committer | Oren Novotny <oren@novotny.org> | 2015-07-30 14:04:28 -0400 |
commit | bc097c3007e065591ffc3e3443d7503015d23d41 (patch) | |
tree | 108224d915e0d3adb37be016c4c9cd873a51dfb7 /crypto/src/math/ec/ECFieldElement.cs | |
parent | Merge branch 'master' into master-vs12 (diff) | |
parent | Move lazy initialization under lock (diff) | |
download | BouncyCastle.NET-ed25519-bc097c3007e065591ffc3e3443d7503015d23d41.tar.xz |
Merge branch 'master' into master-vs12
Diffstat (limited to 'crypto/src/math/ec/ECFieldElement.cs')
-rw-r--r-- | crypto/src/math/ec/ECFieldElement.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/src/math/ec/ECFieldElement.cs b/crypto/src/math/ec/ECFieldElement.cs index 844bed649..4d4fb3e4d 100644 --- a/crypto/src/math/ec/ECFieldElement.cs +++ b/crypto/src/math/ec/ECFieldElement.cs @@ -604,6 +604,9 @@ namespace Org.BouncyCastle.Math.EC int k3, BigInteger x) { + if (x == null || x.SignValue < 0 || x.BitLength > m) + throw new ArgumentException("value invalid in F2m field element", "x"); + if ((k2 == 0) && (k3 == 0)) { this.representation = Tpb; |