diff options
author | royb <roy.basmacier@primekey.com> | 2023-08-25 13:57:27 -0400 |
---|---|---|
committer | royb <roy.basmacier@primekey.com> | 2023-08-25 13:57:27 -0400 |
commit | 9241fb66765ac2b0a92ff5d7a9231c3e424cbde3 (patch) | |
tree | 730c787b8f15361e0157b415a668c51965d6c8f2 /crypto/test | |
parent | fixed typos (diff) | |
download | BouncyCastle.NET-ed25519-9241fb66765ac2b0a92ff5d7a9231c3e424cbde3.tar.xz |
update Kyber and NTRU to always use 32 byte session keys
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/pqc/crypto/test/CrystalsKyberTest.cs | 4 | ||||
-rw-r--r-- | crypto/test/src/pqc/crypto/test/NtruVectorTest.cs | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/crypto/test/src/pqc/crypto/test/CrystalsKyberTest.cs b/crypto/test/src/pqc/crypto/test/CrystalsKyberTest.cs index ed2b5b79d..e9eb3660f 100644 --- a/crypto/test/src/pqc/crypto/test/CrystalsKyberTest.cs +++ b/crypto/test/src/pqc/crypto/test/CrystalsKyberTest.cs @@ -109,8 +109,8 @@ ss = C9786ED936508E178D55A1208C590A10F25CFBFEB50BE4207395A8B2F8AA192E [Test] public void TestParameters() { - Assert.AreEqual(128, KyberParameters.kyber512.SessionKeySize); - Assert.AreEqual(192, KyberParameters.kyber768.SessionKeySize); + Assert.AreEqual(256, KyberParameters.kyber512.SessionKeySize); + Assert.AreEqual(256, KyberParameters.kyber768.SessionKeySize); Assert.AreEqual(256, KyberParameters.kyber1024.SessionKeySize); } diff --git a/crypto/test/src/pqc/crypto/test/NtruVectorTest.cs b/crypto/test/src/pqc/crypto/test/NtruVectorTest.cs index 417cb5438..9000201c4 100644 --- a/crypto/test/src/pqc/crypto/test/NtruVectorTest.cs +++ b/crypto/test/src/pqc/crypto/test/NtruVectorTest.cs @@ -21,6 +21,15 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests { "PQCkemKAT_1590.rsp", NtruParameters.NtruHps4096821 }, { "PQCkemKAT_1450.rsp", NtruParameters.NtruHrss701 }, }; + + [Test] + public void TestParameters() + { + Assert.AreEqual(256, NtruParameters.NtruHps4096821.DefaultKeySize); + Assert.AreEqual(256, NtruParameters.NtruHps2048509.DefaultKeySize); + Assert.AreEqual(256, NtruParameters.NtruHps2048677.DefaultKeySize); + Assert.AreEqual(256, NtruParameters.NtruHrss701.DefaultKeySize); + } private static readonly IEnumerable<string> TestVectorFiles = Parameters.Keys; |