summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorDavid Hook <dgh@bouncycastle.org>2019-01-14 16:43:22 +1100
committerDavid Hook <dgh@bouncycastle.org>2019-01-14 16:43:22 +1100
commit839879ee7ad82df31adc2a12cf237760d3fdfda5 (patch)
tree84f82721ae3f9e2c45099668784f45dd514eaaa2 /crypto/src
parentAdded ECGOST3410_2012Signer (diff)
downloadBouncyCastle.NET-ed25519-839879ee7ad82df31adc2a12cf237760d3fdfda5.tar.xz
minor tweaks
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/signers/EcGost3410_2012Signer.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/src/crypto/signers/EcGost3410_2012Signer.cs b/crypto/src/crypto/signers/EcGost3410_2012Signer.cs
index cd50916dd..e7174ace6 100644
--- a/crypto/src/crypto/signers/EcGost3410_2012Signer.cs
+++ b/crypto/src/crypto/signers/EcGost3410_2012Signer.cs
@@ -1,7 +1,7 @@
 using Org.BouncyCastle.Math;
 using System;
 using System.IO;
-using NUnit.Core;
+
 using Org.BouncyCastle.Crypto.Parameters;
 using Org.BouncyCastle.Math.EC;
 using Org.BouncyCastle.Math.EC.Multiplier;
@@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto.Signers
         {
             if (!forSigning)
             {
-                throw new InvalidOperationException("not initialised for signing.");
+                throw new InvalidOperationException("not initialized for signing");
             }
 
             byte[] mRev = new byte[message.Length]; // conversion is little-endian
@@ -79,15 +79,18 @@ namespace Org.BouncyCastle.Crypto.Signers
                     do
                     {
                         k = BigIntegers.CreateRandomBigInteger(n.BitLength, secureRandom);
-                    } while (k.Equals(BigInteger.Zero)); //  ECConstants.ZERO));
+                    }
+                    while (k.Equals(BigInteger.Zero)); //  ECConstants.ZERO));
 
                     ECPoint p = basePointMultiplier.Multiply(ec.G, k).Normalize();
 
                     r = p.AffineXCoord.ToBigInteger().Mod(n);
-                } while (r.Equals(BigInteger.Zero)); //  ECConstants.ZERO));
+                }
+                while (r.Equals(BigInteger.Zero)); //  ECConstants.ZERO));
 
                 s = (k.Multiply(e)).Add(d.Multiply(r)).Mod(n);
-            } while (s.Equals(BigInteger.Zero)); //   ECConstants.ZERO));
+            }
+            while (s.Equals(BigInteger.Zero)); //   ECConstants.ZERO));
 
             return new BigInteger[] { r, s };
         }
@@ -97,7 +100,7 @@ namespace Org.BouncyCastle.Crypto.Signers
         {
             if (forSigning)
             {
-                throw new InvalidOperationException("not initialised for verification.");
+                throw new InvalidOperationException("not initialized for verification");
             }
 
 
@@ -146,6 +149,5 @@ namespace Org.BouncyCastle.Crypto.Signers
         {
             return new FixedPointCombMultiplier();
         }
-
     }
 }
\ No newline at end of file