From b45fe3a21efd7809daa1e377d63f6b1c8fed6f6f Mon Sep 17 00:00:00 2001 From: David Hook Date: Sat, 30 Dec 2023 11:04:36 +1100 Subject: moved to always generate 256 bit secret (see SSH ntruprime IETF draft) --- crypto/test/src/pqc/crypto/test/NtruPrimeVectorTest.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crypto/test') diff --git a/crypto/test/src/pqc/crypto/test/NtruPrimeVectorTest.cs b/crypto/test/src/pqc/crypto/test/NtruPrimeVectorTest.cs index 34a7a4cae..14c37cbbe 100644 --- a/crypto/test/src/pqc/crypto/test/NtruPrimeVectorTest.cs +++ b/crypto/test/src/pqc/crypto/test/NtruPrimeVectorTest.cs @@ -38,6 +38,24 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests private static readonly IEnumerable TestVectorFilesSNtruP = ParametersSNtruP.Keys; + [Test] + public void TestParameters() + { + Assert.AreEqual(256, SNtruPrimeParameters.sntrup653.DefaultKeySize); + Assert.AreEqual(256, SNtruPrimeParameters.sntrup761.DefaultKeySize); + Assert.AreEqual(256, SNtruPrimeParameters.sntrup857.DefaultKeySize); + Assert.AreEqual(256, SNtruPrimeParameters.sntrup953.DefaultKeySize); + Assert.AreEqual(256, SNtruPrimeParameters.sntrup1013.DefaultKeySize); + Assert.AreEqual(256, SNtruPrimeParameters.sntrup1277.DefaultKeySize); + + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr653.DefaultKeySize); + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr761.DefaultKeySize); + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr857.DefaultKeySize); + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr953.DefaultKeySize); + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr1013.DefaultKeySize); + Assert.AreEqual(256, NtruLPRimeParameters.ntrulpr1277.DefaultKeySize); + } + [TestCaseSource(nameof(TestVectorFilesNtruLP))] [Parallelizable(ParallelScope.All)] public void TVNtruLP(string testVectorFile) -- cgit 1.4.1