diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-12-28 15:32:02 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-12-28 15:32:02 +0700 |
commit | 0684c4783deae5cf4862e78302844058e5433bce (patch) | |
tree | d7296980260e2f15460840c5b355a1b890916b1c | |
parent | Optimized Sqrt and Trace for custom binary curves (diff) | |
download | BouncyCastle.NET-ed25519-0684c4783deae5cf4862e78302844058e5433bce.tar.xz |
Clean up a few warnings
Diffstat (limited to '')
-rw-r--r-- | crypto/src/AssemblyInfo.cs | 3 | ||||
-rw-r--r-- | crypto/src/crypto/engines/SerpentEngineBase.cs | 9 | ||||
-rw-r--r-- | crypto/test/src/crypto/test/NaccacheSternTest.cs | 5 | ||||
-rw-r--r-- | crypto/test/src/crypto/test/PaddingTest.cs | 6 | ||||
-rw-r--r-- | crypto/test/src/test/ECEncodingTest.cs | 11 |
5 files changed, 13 insertions, 21 deletions
diff --git a/crypto/src/AssemblyInfo.cs b/crypto/src/AssemblyInfo.cs index 05f1d8f63..6d6de3218 100644 --- a/crypto/src/AssemblyInfo.cs +++ b/crypto/src/AssemblyInfo.cs @@ -65,10 +65,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyDelaySign(false)] #if STRONG_NAME [assembly: AssemblyKeyFile(@"../BouncyCastle.snk")] -#else -[assembly: AssemblyKeyFile("")] #endif -[assembly: AssemblyKeyName("")] [assembly: CLSCompliant(true)] #if !PORTABLE diff --git a/crypto/src/crypto/engines/SerpentEngineBase.cs b/crypto/src/crypto/engines/SerpentEngineBase.cs index a5d91b3be..9de552233 100644 --- a/crypto/src/crypto/engines/SerpentEngineBase.cs +++ b/crypto/src/crypto/engines/SerpentEngineBase.cs @@ -101,12 +101,13 @@ namespace Org.BouncyCastle.Crypto.Engines return ( (int)((uint)x >> bits) | (x << (32 - bits))); } - /** + /* * The sboxes below are based on the work of Brian Gladman and * Sam Simpson, whose original notice appears below. * <p> * For further details see: * http://fp.gladman.plus.com/cryptography_technology/serpent/ + * </p> */ /* Partially optimised Serpent S Box boolean functions derived */ @@ -124,9 +125,9 @@ namespace Org.BouncyCastle.Crypto.Engines /* We hereby give permission for information in this file to be */ /* used freely subject only to acknowledgement of its origin. */ - /** - * S0 - { 3, 8,15, 1,10, 6, 5,11,14,13, 4, 2, 7, 0, 9,12 } - 15 terms. - */ + /* + * S0 - { 3, 8,15, 1,10, 6, 5,11,14,13, 4, 2, 7, 0, 9,12 } - 15 terms. + */ protected void Sb0(int a, int b, int c, int d) { int t1 = a ^ d; diff --git a/crypto/test/src/crypto/test/NaccacheSternTest.cs b/crypto/test/src/crypto/test/NaccacheSternTest.cs index 4fa256f12..9168adced 100644 --- a/crypto/test/src/crypto/test/NaccacheSternTest.cs +++ b/crypto/test/src/crypto/test/NaccacheSternTest.cs @@ -78,9 +78,6 @@ namespace Org.BouncyCastle.Crypto.Tests static NaccacheSternTest() { - cryptEng.Debug = debug; - decryptEng.Debug = debug; - // First the Parameters from the NaccacheStern Paper // (see http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf ) @@ -145,7 +142,7 @@ namespace Org.BouncyCastle.Crypto.Tests // specify key generation parameters NaccacheSternKeyGenerationParameters genParam - = new NaccacheSternKeyGenerationParameters(new SecureRandom(), 768, 8, 30, debug); + = new NaccacheSternKeyGenerationParameters(new SecureRandom(), 768, 8, 30); // Initialize Key generator and generate key pair NaccacheSternKeyPairGenerator pGen = new NaccacheSternKeyPairGenerator(); diff --git a/crypto/test/src/crypto/test/PaddingTest.cs b/crypto/test/src/crypto/test/PaddingTest.cs index 6f41d754c..ed53d9228 100644 --- a/crypto/test/src/crypto/test/PaddingTest.cs +++ b/crypto/test/src/crypto/test/PaddingTest.cs @@ -105,11 +105,9 @@ namespace Org.BouncyCastle.Crypto.Tests public override void PerformTest() { - SecureRandom rand = new SecureRandom(new byte[20]); + SecureRandom rand = SecureRandom.GetInstance("SHA1PRNG"); - rand.SetSeed(DateTime.Now.Ticks); - - doTestPadding(new Pkcs7Padding(), rand, + doTestPadding(new Pkcs7Padding(), rand, Hex.Decode("ffffff0505050505"), Hex.Decode("0000000004040404")); diff --git a/crypto/test/src/test/ECEncodingTest.cs b/crypto/test/src/test/ECEncodingTest.cs index f1a4d5e3a..8d993c15e 100644 --- a/crypto/test/src/test/ECEncodingTest.cs +++ b/crypto/test/src/test/ECEncodingTest.cs @@ -109,7 +109,7 @@ namespace Org.BouncyCastle.Tests if (!compress) { //pubKey.setPointFormat("UNCOMPRESSED"); - pubKey = SetPublicUncompressed(pubKey, false); + pubKey = SetPublicUncompressed(pubKey); } byte[] x = pubKey.Q.AffineXCoord.ToBigInteger().ToByteArrayUnsigned(); @@ -154,7 +154,7 @@ namespace Org.BouncyCastle.Tests // TODO Private key compression? //newKey.setPointFormat("UNCOMPRESSED"); //newPubKey.setPointFormat("UNCOMPRESSED"); - newPubKey = SetPublicUncompressed(newPubKey, false); + newPubKey = SetPublicUncompressed(newPubKey); } // string newPrivateKey = new string(Hex.encode(newKey.getEncoded())); @@ -201,7 +201,7 @@ namespace Org.BouncyCastle.Tests // TODO Private key compression? //privECKey.setPointFormat("UNCOMPRESSED"); //pubECKey.setPointFormat("UNCOMPRESSED"); - pubECKey = SetPublicUncompressed(pubECKey, false); + pubECKey = SetPublicUncompressed(pubECKey); } certGen.SetSignatureAlgorithm("ECDSAwithSHA1"); @@ -216,13 +216,12 @@ namespace Org.BouncyCastle.Tests } private ECPublicKeyParameters SetPublicUncompressed( - ECPublicKeyParameters key, - bool withCompression) + ECPublicKeyParameters key) { ECPoint p = key.Q.Normalize(); return new ECPublicKeyParameters( key.AlgorithmName, - p.Curve.CreatePoint(p.XCoord.ToBigInteger(), p.YCoord.ToBigInteger(), withCompression), + p.Curve.CreatePoint(p.XCoord.ToBigInteger(), p.YCoord.ToBigInteger()), key.Parameters); } |