diff options
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs index 7d5beaed8..c933ffc8d 100644 --- a/crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs +++ b/crypto/src/math/ec/custom/sec/SecP192K1FieldElement.cs @@ -95,7 +95,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { //return Multiply(b.Invert()); uint[] z = Nat192.Create(); - Mod.Invert(SecP192K1Field.P, ((SecP192K1FieldElement)b).x, z); + SecP192K1Field.Inv(((SecP192K1FieldElement)b).x, z); SecP192K1Field.Multiply(z, x, z); return new SecP192K1FieldElement(z); } @@ -118,7 +118,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { //return new SecP192K1FieldElement(ToBigInteger().ModInverse(Q)); uint[] z = Nat192.Create(); - Mod.Invert(SecP192K1Field.P, x, z); + SecP192K1Field.Inv(x, z); return new SecP192K1FieldElement(z); } @@ -132,7 +132,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec * Raise this element to the exponent 2^190 - 2^30 - 2^10 - 2^6 - 2^5 - 2^4 - 2^1 * * Breaking up the exponent's binary representation into "repunits", we get: - * { 159 1s } { 1 0s } { 19 1s } { 1 0s } { 3 1s } { 3 0s} { 3 1s } { 1 0s } + * { 159 1s } { 1 0s } { 19 1s } { 1 0s } { 3 1s } { 3 0s } { 3 1s } { 1 0s } * * Therefore we need an addition chain containing 3, 19, 159 (the lengths of the repunits) * We use: 1, 2, [3], 6, 8, 16, [19], 35, 70, 140, [159] |