summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crypto/src/pqc/crypto/cmce/CmceEngine.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crypto/src/pqc/crypto/cmce/CmceEngine.cs b/crypto/src/pqc/crypto/cmce/CmceEngine.cs
index 0d62b57ca..605770c3c 100644
--- a/crypto/src/pqc/crypto/cmce/CmceEngine.cs
+++ b/crypto/src/pqc/crypto/cmce/CmceEngine.cs
@@ -1475,6 +1475,19 @@ namespace Org.BouncyCastle.Pqc.Crypto.Cmce
                             c += 8;
                         }
                     }
+#else
+                    {
+                        byte maskByte = (byte)-mask;
+                        int limit = (SYS_N / 8) - 4;
+                        while (c <= limit)
+                        {
+                            mat_row[c + 0] ^= (byte)(mat_k[c + 0] & maskByte);
+                            mat_row[c + 1] ^= (byte)(mat_k[c + 1] & maskByte);
+                            mat_row[c + 2] ^= (byte)(mat_k[c + 2] & maskByte);
+                            mat_row[c + 3] ^= (byte)(mat_k[c + 3] & maskByte);
+                            c += 4;
+                        }
+                    }
 #endif
                     {
                         byte maskByte = (byte)-mask;
@@ -1529,6 +1542,19 @@ namespace Org.BouncyCastle.Pqc.Crypto.Cmce
                                 c += 8;
                             }
                         }
+#else
+                        {
+                            byte maskByte = (byte)-mask;
+                            int limit = (SYS_N / 8) - 4;
+                            while (c <= limit)
+                            {
+                                mat_k[c + 0] ^= (byte)(mat_row[c + 0] & maskByte);
+                                mat_k[c + 1] ^= (byte)(mat_row[c + 1] & maskByte);
+                                mat_k[c + 2] ^= (byte)(mat_row[c + 2] & maskByte);
+                                mat_k[c + 3] ^= (byte)(mat_row[c + 3] & maskByte);
+                                c += 4;
+                            }
+                        }
 #endif
                         {
                             byte maskByte = (byte)-mask;