summary refs log tree commit diff
path: root/crypto/src/math/ec/rfc8032
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-09-04 23:57:27 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-09-04 23:57:27 +0700
commit86a4479929bd5f3fa5ce2cabfe6a4ebb53944df4 (patch)
tree2610425aacd90c6153402495afa3ea84077c741c /crypto/src/math/ec/rfc8032
parentRemove unnecessary locking (diff)
downloadBouncyCastle.NET-ed25519-86a4479929bd5f3fa5ce2cabfe6a4ebb53944df4.tar.xz
'safegcd' modular inversion
Diffstat (limited to 'crypto/src/math/ec/rfc8032')
-rw-r--r--crypto/src/math/ec/rfc8032/Ed25519.cs2
-rw-r--r--crypto/src/math/ec/rfc8032/Ed448.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/rfc8032/Ed25519.cs b/crypto/src/math/ec/rfc8032/Ed25519.cs

index 95ba43472..3a39ae53d 100644 --- a/crypto/src/math/ec/rfc8032/Ed25519.cs +++ b/crypto/src/math/ec/rfc8032/Ed25519.cs
@@ -754,7 +754,7 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 X25519Field.Add(q.z, q.z, x); // TODO[ed25519] Batch inversion - X25519Field.Inv(x, y); + X25519Field.InvVar(x, y); X25519Field.Mul(q.x, y, x); X25519Field.Mul(q.y, y, y); diff --git a/crypto/src/math/ec/rfc8032/Ed448.cs b/crypto/src/math/ec/rfc8032/Ed448.cs
index 12f24c1ff..c1202dc02 100644 --- a/crypto/src/math/ec/rfc8032/Ed448.cs +++ b/crypto/src/math/ec/rfc8032/Ed448.cs
@@ -702,7 +702,7 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 { PointExt q = points[i]; // TODO[ed448] Batch inversion - X448Field.Inv(q.z, q.z); + X448Field.InvVar(q.z, q.z); X448Field.Mul(q.x, q.z, q.x); X448Field.Mul(q.y, q.z, q.y);