summary refs log tree commit diff
path: root/crypto/src/pqc
diff options
context:
space:
mode:
authorroyb <roy.basmacier@primekey.com>2023-08-25 13:57:27 -0400
committerroyb <roy.basmacier@primekey.com>2023-08-25 13:57:27 -0400
commit9241fb66765ac2b0a92ff5d7a9231c3e424cbde3 (patch)
tree730c787b8f15361e0157b415a668c51965d6c8f2 /crypto/src/pqc
parentfixed typos (diff)
downloadBouncyCastle.NET-ed25519-9241fb66765ac2b0a92ff5d7a9231c3e424cbde3.tar.xz
update Kyber and NTRU to always use 32 byte session keys
Diffstat (limited to 'crypto/src/pqc')
-rw-r--r--crypto/src/pqc/crypto/crystals/kyber/KyberParameters.cs8
-rw-r--r--crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048509.cs2
-rw-r--r--crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048677.cs2
-rw-r--r--crypto/src/pqc/crypto/ntru/parametersets/NtruHrss701.cs2
4 files changed, 7 insertions, 7 deletions
diff --git a/crypto/src/pqc/crypto/crystals/kyber/KyberParameters.cs b/crypto/src/pqc/crypto/crystals/kyber/KyberParameters.cs
index 195831433..e71333855 100644
--- a/crypto/src/pqc/crypto/crystals/kyber/KyberParameters.cs
+++ b/crypto/src/pqc/crypto/crystals/kyber/KyberParameters.cs
@@ -5,11 +5,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Kyber
     public sealed class KyberParameters
         : IKemParameters
     {
-        public static KyberParameters kyber512 = new KyberParameters("kyber512", 2, 128, false);
-        public static KyberParameters kyber768 = new KyberParameters("kyber768", 3, 192, false);
+        public static KyberParameters kyber512 = new KyberParameters("kyber512", 2, 256, false);
+        public static KyberParameters kyber768 = new KyberParameters("kyber768", 3, 256, false);
         public static KyberParameters kyber1024 = new KyberParameters("kyber1024", 4, 256, false);
-        public static KyberParameters kyber512_aes = new KyberParameters("kyber512-aes", 2, 128, true);
-        public static KyberParameters kyber768_aes = new KyberParameters("kyber768-aes", 3, 192, true);
+        public static KyberParameters kyber512_aes = new KyberParameters("kyber512-aes", 2, 256, true);
+        public static KyberParameters kyber768_aes = new KyberParameters("kyber768-aes", 3, 256, true);
         public static KyberParameters kyber1024_aes = new KyberParameters("kyber1024-aes", 4, 256, true);
 
         private string m_name;
diff --git a/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048509.cs b/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048509.cs
index dcbf47636..134882380 100644
--- a/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048509.cs
+++ b/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048509.cs
@@ -2,7 +2,7 @@
 {
     internal class NtruHps2048509 : NtruHpsParameterSet
     {
-        internal NtruHps2048509() : base(509, 11, 32, 32, 16)
+        internal NtruHps2048509() : base(509, 11, 32, 32, 32)
         {
         }
     }
diff --git a/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048677.cs b/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048677.cs
index 2076f160d..0c2b2c85b 100644
--- a/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048677.cs
+++ b/crypto/src/pqc/crypto/ntru/parametersets/NtruHps2048677.cs
@@ -2,7 +2,7 @@
 {
     internal class NtruHps2048677 : NtruHpsParameterSet
     {
-        internal NtruHps2048677() : base(677, 11, 32, 32, 24)
+        internal NtruHps2048677() : base(677, 11, 32, 32, 32)
         {
         }
     }
diff --git a/crypto/src/pqc/crypto/ntru/parametersets/NtruHrss701.cs b/crypto/src/pqc/crypto/ntru/parametersets/NtruHrss701.cs
index 9e795265e..55ceac3b5 100644
--- a/crypto/src/pqc/crypto/ntru/parametersets/NtruHrss701.cs
+++ b/crypto/src/pqc/crypto/ntru/parametersets/NtruHrss701.cs
@@ -2,7 +2,7 @@
 {
     internal class NtruHrss701 : NtruHrssParameterSet
     {
-        internal NtruHrss701() : base(701, 13, 32, 32, 24)
+        internal NtruHrss701() : base(701, 13, 32, 32, 32)
         {
         }
     }