diff options
author | David Hook <david.hook@keyfactor.com> | 2022-11-07 17:30:00 +1100 |
---|---|---|
committer | David Hook <david.hook@keyfactor.com> | 2022-11-07 17:30:00 +1100 |
commit | 146be77300207031b6b9477b8e48428278e841b8 (patch) | |
tree | d7342aad04bca424b56229d1d5eba558bbb4afd3 /crypto/src/math/ec/ECFieldElement.cs | |
parent | resolve conflicts (diff) | |
parent | GOST 2012 private key reading (diff) | |
download | BouncyCastle.NET-ed25519-146be77300207031b6b9477b8e48428278e841b8.tar.xz |
Merge branch 'master' of gitlab.cryptoworkshop.com:root/bc-csharp
Diffstat (limited to 'crypto/src/math/ec/ECFieldElement.cs')
-rw-r--r-- | crypto/src/math/ec/ECFieldElement.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/math/ec/ECFieldElement.cs b/crypto/src/math/ec/ECFieldElement.cs index 330708088..3afc843cd 100644 --- a/crypto/src/math/ec/ECFieldElement.cs +++ b/crypto/src/math/ec/ECFieldElement.cs @@ -785,9 +785,9 @@ namespace Org.BouncyCastle.Math.EC LongArray ab = ax.Multiply(bx, m, ks); LongArray xy = xx.Multiply(yx, m, ks); - if (ab == ax || ab == bx) + if (LongArray.AreAliased(ref ab, ref ax) || LongArray.AreAliased(ref ab, ref bx)) { - ab = (LongArray)ab.Copy(); + ab = ab.Copy(); } ab.AddShiftedByWords(xy, 0); @@ -827,9 +827,9 @@ namespace Org.BouncyCastle.Math.EC LongArray aa = ax.Square(m, ks); LongArray xy = xx.Multiply(yx, m, ks); - if (aa == ax) + if (LongArray.AreAliased(ref aa, ref ax)) { - aa = (LongArray)aa.Copy(); + aa = aa.Copy(); } aa.AddShiftedByWords(xy, 0); |