summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT571R1Point.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-12-03 17:25:25 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-12-03 17:25:25 +0700
commite576a376b11268ca954b95e1d7e451e283c2ba15 (patch)
tree60ca57e1458c1b6c37a8ffdda3b0d42c551a4984 /crypto/src/math/ec/custom/sec/SecT571R1Point.cs
parentMissing file from commit (diff)
downloadBouncyCastle.NET-ed25519-e576a376b11268ca954b95e1d7e451e283c2ba15.tar.xz
Binary curve perf. opts.
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT571R1Point.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT571R1Point.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT571R1Point.cs b/crypto/src/math/ec/custom/sec/SecT571R1Point.cs
index 986885db6..1b519d819 100644
--- a/crypto/src/math/ec/custom/sec/SecT571R1Point.cs
+++ b/crypto/src/math/ec/custom/sec/SecT571R1Point.cs
@@ -176,7 +176,11 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                     SecT571Field.MultiplyPrecomp(Z3.x, Z2Precomp, Z3.x);
                 }
 
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+                Span<ulong> tt = stackalloc ulong[18];
+#else
                 ulong[] tt = Nat576.CreateExt64();
+#endif
 
                 SecT571Field.Add(AU2, B, t4);
                 SecT571Field.SquareExt(t4, tt);
@@ -237,7 +241,11 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
                 return new SecT571R1Point(curve, new SecT571FieldElement(T), SecT571R1Curve.SecT571R1_B_SQRT);
             }
 
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+            Span<ulong> tt = stackalloc ulong[18];
+#else
             ulong[] tt = Nat576.CreateExt64();
+#endif
             SecT571Field.MultiplyAddToExt(T, L1Z1, tt);
 
             SecT571FieldElement X3 = new SecT571FieldElement(t1);