summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-05-24 13:27:13 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-05-24 13:27:13 +0700
commitc1f58f8a44dd67edf45954d76aa59e3f26e31f99 (patch)
tree59f365c914caa8bab40d8b0d942d91a27238967d /crypto/src
parentEmbed Sike data in source to make it trim-friendly (diff)
downloadBouncyCastle.NET-ed25519-c1f58f8a44dd67edf45954d76aa59e3f26e31f99.tar.xz
Sike followup changes
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/pqc/crypto/sike/Internal.cs8
-rw-r--r--crypto/src/pqc/crypto/sike/P434.cs4
-rw-r--r--crypto/src/pqc/crypto/sike/P503.cs4
-rw-r--r--crypto/src/pqc/crypto/sike/P610.cs4
-rw-r--r--crypto/src/pqc/crypto/sike/P751.cs4
5 files changed, 8 insertions, 16 deletions
diff --git a/crypto/src/pqc/crypto/sike/Internal.cs b/crypto/src/pqc/crypto/sike/Internal.cs
index b771c5c46..d86986e26 100644
--- a/crypto/src/pqc/crypto/sike/Internal.cs
+++ b/crypto/src/pqc/crypto/sike/Internal.cs
@@ -132,14 +132,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Sike
         protected internal ulong[] ph3_T1;
         protected internal ulong[] ph3_T2;
 
-
-        internal static uint[] ReadIntsFromProperty(uint[] data, uint intSize)
-        {
-            uint[] ints = new uint[intSize];
-            Array.Copy(data, ints, data.Length);
-            return ints;
-        }
-
         internal static ulong[] ReadFromProperty(ulong[] data, uint ulongSize)
         {
             ulong[] ulongs = new ulong[ulongSize];
diff --git a/crypto/src/pqc/crypto/sike/P434.cs b/crypto/src/pqc/crypto/sike/P434.cs
index 4e4382b44..05dd9604a 100644
--- a/crypto/src/pqc/crypto/sike/P434.cs
+++ b/crypto/src/pqc/crypto/sike/P434.cs
@@ -106,8 +106,8 @@ internal class P434
             this.PLEN_2 = 55;
             this.PLEN_3 = 47;
 
-            ph2_path = ReadIntsFromProperty(s_ph2_path, PLEN_2);
-            ph3_path = ReadIntsFromProperty(s_ph3_path, PLEN_3);
+            ph2_path = s_ph2_path;
+            ph3_path = s_ph3_path;
             A_gen = ReadFromProperty(s_A_gen, 6 * NWORDS64_FIELD);
             B_gen = ReadFromProperty(s_B_gen, 6 * NWORDS64_FIELD);
             XQB3 = ReadFromProperty(s_XQB3, 2 * NWORDS64_FIELD);
diff --git a/crypto/src/pqc/crypto/sike/P503.cs b/crypto/src/pqc/crypto/sike/P503.cs
index d8f45ae2c..a01807ad4 100644
--- a/crypto/src/pqc/crypto/sike/P503.cs
+++ b/crypto/src/pqc/crypto/sike/P503.cs
@@ -142,8 +142,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Sike
             this.PLEN_2 = 51;
             this.PLEN_3 = 54;
 
-            ph2_path = ReadIntsFromProperty(s_ph2_path, PLEN_2);
-            ph3_path = ReadIntsFromProperty(s_ph3_path, PLEN_3);
+            ph2_path = s_ph2_path;
+            ph3_path = s_ph3_path;
             A_gen = ReadFromProperty(s_A_gen, 6 * NWORDS64_FIELD);
             B_gen = ReadFromProperty(s_B_gen, 6 * NWORDS64_FIELD);
             XQB3 = ReadFromProperty(s_XQB3, 2 * NWORDS64_FIELD);
diff --git a/crypto/src/pqc/crypto/sike/P610.cs b/crypto/src/pqc/crypto/sike/P610.cs
index 056dc339e..12134f4ba 100644
--- a/crypto/src/pqc/crypto/sike/P610.cs
+++ b/crypto/src/pqc/crypto/sike/P610.cs
@@ -142,8 +142,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Sike
             this.PLEN_2 = 62;
             this.PLEN_3 = 65;
 
-            ph2_path = ReadIntsFromProperty(s_ph2_path, PLEN_2);
-            ph3_path = ReadIntsFromProperty(s_ph3_path, PLEN_3);
+            ph2_path = s_ph2_path;
+            ph3_path = s_ph3_path;
             A_gen = ReadFromProperty(s_A_gen, 6 * NWORDS64_FIELD);
             B_gen = ReadFromProperty(s_B_gen, 6 * NWORDS64_FIELD);
             XQB3 = ReadFromProperty(s_XQB3, 2 * NWORDS64_FIELD);
diff --git a/crypto/src/pqc/crypto/sike/P751.cs b/crypto/src/pqc/crypto/sike/P751.cs
index 5a181ddf1..188c578ab 100644
--- a/crypto/src/pqc/crypto/sike/P751.cs
+++ b/crypto/src/pqc/crypto/sike/P751.cs
@@ -155,8 +155,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Sike
             PLEN_2 = 94;
             PLEN_3 = 81;
 
-            ph2_path = ReadIntsFromProperty(s_ph2_path, PLEN_2);
-            ph3_path = ReadIntsFromProperty(s_ph3_path, PLEN_3);
+            ph2_path = s_ph2_path;
+            ph3_path = s_ph3_path;
             A_gen = ReadFromProperty(s_A_gen, 6 * NWORDS64_FIELD);
             B_gen = ReadFromProperty(s_B_gen, 6 * NWORDS64_FIELD);
             XQB3 = ReadFromProperty(s_XQB3, 2 * NWORDS64_FIELD);