diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-07-04 16:42:57 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-07-04 16:42:57 +0700 |
commit | b27bcfb49d403d9c0d4f4924de5f869db1c041cc (patch) | |
tree | 72c3a1bae971caa7575c1bb54fb9baa30d51ca36 /crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs | |
parent | Blind the inversion when normalizing (diff) | |
download | BouncyCastle.NET-ed25519-b27bcfb49d403d9c0d4f4924de5f869db1c041cc.tar.xz |
EC updates from bc-java
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs index 5d1fea8b5..d2ff05cb7 100644 --- a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs +++ b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using Org.BouncyCastle.Math.Raw; using Org.BouncyCastle.Utilities; @@ -95,7 +94,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { //return Multiply(b.Invert()); uint[] z = Nat256.Create(); - Mod.Invert(SecP256K1Field.P, ((SecP256K1FieldElement)b).x, z); + SecP256K1Field.Inv(((SecP256K1FieldElement)b).x, z); SecP256K1Field.Multiply(z, x, z); return new SecP256K1FieldElement(z); } @@ -118,7 +117,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { //return new SecP256K1FieldElement(ToBigInteger().ModInverse(Q)); uint[] z = Nat256.Create(); - Mod.Invert(SecP256K1Field.P, x, z); + SecP256K1Field.Inv(x, z); return new SecP256K1FieldElement(z); } |