summary refs log tree commit diff
path: root/crypto/src/math/ec/rfc8032/ScalarUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/rfc8032/ScalarUtilities.cs')
-rw-r--r--crypto/src/math/ec/rfc8032/ScalarUtilities.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/src/math/ec/rfc8032/ScalarUtilities.cs b/crypto/src/math/ec/rfc8032/ScalarUtilities.cs
index fca4a0232..41d7f2696 100644
--- a/crypto/src/math/ec/rfc8032/ScalarUtilities.cs
+++ b/crypto/src/math/ec/rfc8032/ScalarUtilities.cs
@@ -71,11 +71,11 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032
             }
             else
             {
-                // Keep the original value of p in t
+                // Copy the low limbs of the original p
 #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
-                t[..(last + 1)].CopyFrom(p);
+                t[..last].CopyFrom(p);
 #else
-                Array.Copy(p, 0, t, 0, last + 1);
+                Array.Copy(p, 0, t, 0, last);
 #endif
 
                 int sWords = s >> 5, sBits = s & 31;
@@ -288,11 +288,11 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032
             }
             else
             {
-                // Keep the original value of p in t
+                // Copy the low limbs of the original p
 #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
-                t[..(last + 1)].CopyFrom(p);
+                t[..last].CopyFrom(p);
 #else
-                Array.Copy(p, 0, t, 0, last + 1);
+                Array.Copy(p, 0, t, 0, last);
 #endif
 
                 int sWords = s >> 5, sBits = s & 31;