diff options
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256R1Field.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP256R1Field.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256R1Field.cs b/crypto/src/math/ec/custom/sec/SecP256R1Field.cs index 0b4918820..eadc7ee58 100644 --- a/crypto/src/math/ec/custom/sec/SecP256R1Field.cs +++ b/crypto/src/math/ec/custom/sec/SecP256R1Field.cs @@ -10,8 +10,8 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec internal class SecP256R1Field { // 2^256 - 2^224 + 2^192 + 2^96 - 1 - private static readonly uint[] P = new uint[]{ 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, - 0x00000001, 0xFFFFFFFF }; + internal static readonly uint[] P = new uint[]{ 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0xFFFFFFFF }; private static readonly uint[] PExt = new uint[]{ 0x00000001, 0x00000000, 0x00000000, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0x00000001, 0xFFFFFFFE, 0x00000001, 0xFFFFFFFE, 0x00000001, 0x00000001, 0xFFFFFFFE, 0x00000002, 0xFFFFFFFE }; @@ -74,7 +74,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec * Raise this element to the exponent 2^256 - 2^224 + 2^192 + 2^96 - 3 * * Breaking up the exponent's binary representation into "repunits", we get: - * { 32 1s } { 31 0s } { 1 1s } { 96 0s } { 94 1s } { 1 0s} { 1 1s} + * { 32 1s } { 31 0s } { 1 1s } { 96 0s } { 94 1s } { 1 0s } { 1 1s } * * Therefore we need an addition chain containing 1, 32, 94 (the lengths of the repunits) * We use: [1], 2, 4, 8, 16, [32], 64, 80, 88, 92, [94] |