diff options
author | David Hook <david.hook@keyfactor.com> | 2023-08-26 13:32:26 +1000 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2023-08-26 13:32:26 +1000 |
commit | 9eef03f8578736ff48c8d72ddbc40907a20a40f0 (patch) | |
tree | 1584edf4893e739c1e3cc5fc80282317e26e6595 | |
parent | marked AES mode as obsolete (diff) | |
download | BouncyCastle.NET-ed25519-9eef03f8578736ff48c8d72ddbc40907a20a40f0.tar.xz |
marked sphincs+ robust as obsolete
-rw-r--r-- | crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusParameters.cs | 21 | ||||
-rw-r--r-- | crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs | 40 |
2 files changed, 18 insertions, 43 deletions
diff --git a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusParameters.cs b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusParameters.cs index 57b1bcabd..4fbd62735 100644 --- a/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusParameters.cs +++ b/crypto/src/pqc/crypto/sphincsplus/SPHINCSPlusParameters.cs @@ -16,19 +16,24 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus public sealed class SphincsPlusParameters { // SHA-2 - + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_128f = new SphincsPlusParameters( 0x010101, "sha2-128f-robust", new Sha2EngineProvider(true, 16, 16, 22, 6, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_128s = new SphincsPlusParameters( 0x010102, "sha2-128s-robust", new Sha2EngineProvider(true, 16, 16, 7, 12, 14, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_192f = new SphincsPlusParameters( 0x010103, "sha2-192f-robust", new Sha2EngineProvider(true, 24, 16, 22, 8, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_192s = new SphincsPlusParameters( 0x010104, "sha2-192s-robust", new Sha2EngineProvider(true, 24, 16, 7, 14, 17, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_256f = new SphincsPlusParameters( 0x010105, "sha2-256f-robust", new Sha2EngineProvider(true, 32, 16, 17, 9, 35, 68)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters sha2_256s = new SphincsPlusParameters( 0x010106, "sha2-256s-robust", new Sha2EngineProvider(true, 32, 16, 8, 14, 22, 64)); @@ -48,19 +53,24 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus 0x010206, "sha2-256s-simple", new Sha2EngineProvider(false, 32, 16, 8, 14, 22, 64)); // SHAKE-256. - + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_128f = new SphincsPlusParameters( 0x020101, "shake-128f-robust", new Shake256EngineProvider(true, 16, 16, 22, 6, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_128s = new SphincsPlusParameters( 0x020102, "shake-128s-robust", new Shake256EngineProvider(true, 16, 16, 7, 12, 14, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_192f = new SphincsPlusParameters( 0x020103, "shake-192f-robust", new Shake256EngineProvider(true, 24, 16, 22, 8, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_192s = new SphincsPlusParameters( 0x020104, "shake-192s-robust", new Shake256EngineProvider(true, 24, 16, 7, 14, 17, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_256f = new SphincsPlusParameters( 0x020105, "shake-256f-robust", new Shake256EngineProvider(true, 32, 16, 17, 9, 35, 68)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters shake_256s = new SphincsPlusParameters( 0x020106, "shake-256s-robust", new Shake256EngineProvider(true, 32, 16, 8, 14, 22, 64)); @@ -80,19 +90,24 @@ namespace Org.BouncyCastle.Pqc.Crypto.SphincsPlus 0x020206, "shake-256s-simple", new Shake256EngineProvider(false, 32, 16, 8, 14, 22, 64)); // Haraka. - + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_128f = new SphincsPlusParameters( 0x030101, "haraka-128f-robust", new HarakaSEngineProvider(true, 16, 16, 22, 6, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_128s = new SphincsPlusParameters( 0x030102, "haraka-128s-robust", new HarakaSEngineProvider(true, 16, 16, 7, 12, 14, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_192f = new SphincsPlusParameters( 0x030103, "haraka-192f-robust", new HarakaSEngineProvider(true, 24, 16, 22, 8, 33, 66)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_192s = new SphincsPlusParameters( 0x030104, "haraka-192s-robust", new HarakaSEngineProvider(true, 24, 16, 7, 14, 17, 63)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_256f = new SphincsPlusParameters( 0x030105, "haraka-256f-robust", new HarakaSEngineProvider(true, 32, 16, 17, 9, 35, 68)); + [Obsolete("Parameter set to be removed")] public static readonly SphincsPlusParameters haraka_256s = new SphincsPlusParameters( 0x030106, "haraka-256s-robust", new HarakaSEngineProvider(true, 32, 16, 8, 14, 22, 64)); diff --git a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs index 5a8e0810d..960c5d762 100644 --- a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs +++ b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs @@ -21,32 +21,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests [TestFixture] public class SphincsPlusTest { - private static readonly string[] TestVectorFilesRobustFast = - { - "sha2-128f-robust.rsp", - "sha2-192f-robust.rsp", - "sha2-256f-robust.rsp", - "shake-128f-robust.rsp", - "shake-192f-robust.rsp", - "shake-256f-robust.rsp", - "haraka-128f-robust.rsp", - "haraka-192f-robust.rsp", - "haraka-256f-robust.rsp", - }; - - private static readonly string[] TestVectorFilesRobustSlow = - { - "sha2-128s-robust.rsp", - "sha2-192s-robust.rsp", - "sha2-256s-robust.rsp", - "shake-128s-robust.rsp", - "shake-192s-robust.rsp", - "shake-256s-robust.rsp", - "haraka-128s-robust.rsp", - "haraka-192s-robust.rsp", - "haraka-256s-robust.rsp", - }; - private static readonly string[] TestVectorFilesSimpleFast = { "sha2-128f-simple.rsp", @@ -73,20 +47,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests "haraka-256s-simple.rsp", }; - [TestCaseSource(nameof(TestVectorFilesRobustFast))] - [Parallelizable(ParallelScope.All)] - public void TVRobustFast(string testVectorFile) - { - RunTestVectorFile(testVectorFile); - } - - [Explicit, TestCaseSource(nameof(TestVectorFilesRobustSlow))] - [Parallelizable(ParallelScope.All)] - public void TVRobustSlow(string testVectorFile) - { - RunTestVectorFile(testVectorFile); - } - [TestCaseSource(nameof(TestVectorFilesSimpleFast))] [Parallelizable(ParallelScope.All)] public void TVSimpleFast(string testVectorFile) |