diff options
-rw-r--r-- | crypto/crypto.csproj | 75 | ||||
-rw-r--r-- | crypto/src/crypto/digests/SM3Digest.cs (renamed from crypto/src/crypto/digests/Sm3Digest.cs) | 16 | ||||
-rw-r--r-- | crypto/test/src/crypto/test/RegressionTest.cs | 8 | ||||
-rw-r--r-- | crypto/test/src/crypto/test/SM3DigestTest.cs (renamed from crypto/test/src/crypto/test/Sm3DigestTest.cs) | 10 |
4 files changed, 92 insertions, 17 deletions
diff --git a/crypto/crypto.csproj b/crypto/crypto.csproj index 2a326e384..73a06afeb 100644 --- a/crypto/crypto.csproj +++ b/crypto/crypto.csproj @@ -3254,6 +3254,21 @@ BuildAction = "Compile" /> <File + RelPath = "src\crypto\digests\SkeinDigest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "src\crypto\digests\SkeinEngine.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "src\crypto\digests\SM3Digest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\crypto\digests\TigerDigest.cs" SubType = "Code" BuildAction = "Compile" @@ -3499,6 +3514,11 @@ BuildAction = "Compile" /> <File + RelPath = "src\crypto\engines\ThreefishEngine.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\crypto\engines\TwofishEngine.cs" SubType = "Code" BuildAction = "Compile" @@ -3719,6 +3739,11 @@ BuildAction = "Compile" /> <File + RelPath = "src\crypto\macs\SkeinMac.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\crypto\macs\ISO9797Alg3Mac.cs" SubType = "Code" BuildAction = "Compile" @@ -4139,6 +4164,16 @@ BuildAction = "Compile" /> <File + RelPath = "src\crypto\parameters\SkeinParameters.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "src\crypto\parameters\TweakableBlockCipherParameters.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\crypto\prng\CryptoApiRandomGenerator.cs" SubType = "Code" BuildAction = "Compile" @@ -5419,11 +5454,21 @@ BuildAction = "Compile" /> <File + RelPath = "src\util\IMemoable.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\util\Integers.cs" SubType = "Code" BuildAction = "Compile" /> <File + RelPath = "src\util\MemoableResetException.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\util\Platform.cs" SubType = "Code" BuildAction = "Compile" @@ -10107,11 +10152,26 @@ BuildAction = "Compile" /> <File + RelPath = "test\src\crypto\test\SkeinDigestTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "test\src\crypto\test\SkeinMacTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "test\src\crypto\test\SkipjackTest.cs" SubType = "Code" BuildAction = "Compile" /> <File + RelPath = "test\src\crypto\test\SM3DigestTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "test\src\crypto\test\SRP6Test.cs" SubType = "Code" BuildAction = "Compile" @@ -10132,6 +10192,21 @@ BuildAction = "Compile" /> <File + RelPath = "test\src\crypto\test\Threefish1024Test.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "test\src\crypto\test\Threefish256Test.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "test\src\crypto\test\Threefish512Test.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "test\src\crypto\test\TwofishTest.cs" SubType = "Code" BuildAction = "Compile" diff --git a/crypto/src/crypto/digests/Sm3Digest.cs b/crypto/src/crypto/digests/SM3Digest.cs index 7a9e6db36..d81b2ddbf 100644 --- a/crypto/src/crypto/digests/Sm3Digest.cs +++ b/crypto/src/crypto/digests/SM3Digest.cs @@ -19,7 +19,7 @@ namespace Org.BouncyCastle.Crypto.Digests /// including the SHA-256 which was a origin for /// this specification. /// </remarks> - public class Sm3Digest + public class SM3Digest : GeneralDigest { private const int DIGEST_LENGTH = 32; // bytes @@ -36,7 +36,7 @@ namespace Org.BouncyCastle.Crypto.Digests // Round constant T for processBlock() which is 32 bit integer rolled left up to (63 MOD 32) bit positions. private static readonly uint[] T = new uint[64]; - static Sm3Digest() + static SM3Digest() { for (int i = 0; i < 16; ++i) { @@ -55,7 +55,7 @@ namespace Org.BouncyCastle.Crypto.Digests /// <summary> /// Standard constructor /// </summary> - public Sm3Digest() + public SM3Digest() { Reset(); } @@ -64,13 +64,13 @@ namespace Org.BouncyCastle.Crypto.Digests /// Copy constructor. This will copy the state of the provided /// message digest. /// </summary> - public Sm3Digest(Sm3Digest t) + public SM3Digest(SM3Digest t) : base(t) { CopyIn(t); } - private void CopyIn(Sm3Digest t) + private void CopyIn(SM3Digest t) { Array.Copy(t.V, 0, this.V, 0, this.V.Length); Array.Copy(t.inwords, 0, this.inwords, 0, this.inwords.Length); @@ -89,12 +89,12 @@ namespace Org.BouncyCastle.Crypto.Digests public override IMemoable Copy() { - return new Sm3Digest(this); + return new SM3Digest(this); } public override void Reset(IMemoable other) { - Sm3Digest d = (Sm3Digest)other; + SM3Digest d = (SM3Digest)other; base.CopyIn(d); CopyIn(d); @@ -325,4 +325,4 @@ namespace Org.BouncyCastle.Crypto.Digests this.xOff = 0; } } -} \ No newline at end of file +} diff --git a/crypto/test/src/crypto/test/RegressionTest.cs b/crypto/test/src/crypto/test/RegressionTest.cs index 4b639005e..8bc8e8339 100644 --- a/crypto/test/src/crypto/test/RegressionTest.cs +++ b/crypto/test/src/crypto/test/RegressionTest.cs @@ -97,9 +97,9 @@ namespace Org.BouncyCastle.Crypto.Tests new Rfc3211WrapTest(), new SeedTest(), new NaccacheSternTest(), - new Salsa20Test(), - new XSalsa20Test(), - new ChaChaTest(), + new Salsa20Test(), + new XSalsa20Test(), + new ChaChaTest(), new CMacTest(), new EaxTest(), new GcmTest(), @@ -117,7 +117,7 @@ namespace Org.BouncyCastle.Crypto.Tests new SipHashTest(), new Poly1305Test(), new OcbTest(), - new Sm3DigestTest() + new SM3DigestTest() }; public static void Main( diff --git a/crypto/test/src/crypto/test/Sm3DigestTest.cs b/crypto/test/src/crypto/test/SM3DigestTest.cs index 3d004deaa..b1e93059e 100644 --- a/crypto/test/src/crypto/test/Sm3DigestTest.cs +++ b/crypto/test/src/crypto/test/SM3DigestTest.cs @@ -13,7 +13,7 @@ namespace Org.BouncyCastle.Crypto.Tests * standard vector test for SM3 digest from chinese specification */ [TestFixture] - public class Sm3DigestTest + public class SM3DigestTest : DigestTest { private static string[] messages = { @@ -39,8 +39,8 @@ namespace Org.BouncyCastle.Crypto.Tests private static string sixtyFourKdigest = "97049bdc8f0736bc7300eafa9980aeb9cf00f24f7ec3a8f1f8884954d7655c1d"; private static string million_a_digest = "c8aaf89429554029e231941a2acc0ad61ff2a5acd8fadd25847a3a732b3b02c3"; - internal Sm3DigestTest() - : base(new Sm3Digest(), messages, digests) + internal SM3DigestTest() + : base(new SM3Digest(), messages, digests) { } @@ -54,13 +54,13 @@ namespace Org.BouncyCastle.Crypto.Tests protected override IDigest CloneDigest(IDigest digest) { - return new Sm3Digest((Sm3Digest)digest); + return new SM3Digest((SM3Digest)digest); } public static void Main( string[] args) { - RunTest(new Sm3DigestTest()); + RunTest(new SM3DigestTest()); } [Test] |