diff options
Diffstat (limited to 'crypto/src/math/ec/rfc8032')
-rw-r--r-- | crypto/src/math/ec/rfc8032/Ed25519.cs | 6 | ||||
-rw-r--r-- | crypto/src/math/ec/rfc8032/Ed448.cs | 2 | ||||
-rw-r--r-- | crypto/src/math/ec/rfc8032/Wnaf.cs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crypto/src/math/ec/rfc8032/Ed25519.cs b/crypto/src/math/ec/rfc8032/Ed25519.cs index fd2d5fe93..09cc9d433 100644 --- a/crypto/src/math/ec/rfc8032/Ed25519.cs +++ b/crypto/src/math/ec/rfc8032/Ed25519.cs @@ -55,9 +55,9 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 public static readonly int SignatureSize = PointBytes + ScalarBytes; // "SigEd25519 no Ed25519 collisions" - private static readonly byte[] Dom2Prefix = new byte[]{ 0x53, 0x69, 0x67, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x20, 0x6e, 0x6f, 0x20, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73 }; + private static readonly byte[] Dom2Prefix = { 0x53, 0x69, 0x67, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x20, + 0x6e, 0x6f, 0x20, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x73 }; private static readonly uint[] P = { 0xFFFFFFEDU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU }; diff --git a/crypto/src/math/ec/rfc8032/Ed448.cs b/crypto/src/math/ec/rfc8032/Ed448.cs index 08b64ddf2..bde1461e6 100644 --- a/crypto/src/math/ec/rfc8032/Ed448.cs +++ b/crypto/src/math/ec/rfc8032/Ed448.cs @@ -52,7 +52,7 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 public static readonly int SignatureSize = PointBytes + ScalarBytes; // "SigEd448" - private static readonly byte[] Dom4Prefix = new byte[]{ 0x53, 0x69, 0x67, 0x45, 0x64, 0x34, 0x34, 0x38 }; + private static readonly byte[] Dom4Prefix = { 0x53, 0x69, 0x67, 0x45, 0x64, 0x34, 0x34, 0x38 }; private static readonly uint[] P = { 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, diff --git a/crypto/src/math/ec/rfc8032/Wnaf.cs b/crypto/src/math/ec/rfc8032/Wnaf.cs index 88319f405..209934031 100644 --- a/crypto/src/math/ec/rfc8032/Wnaf.cs +++ b/crypto/src/math/ec/rfc8032/Wnaf.cs @@ -42,7 +42,7 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 { int word16 = (int)(word >> j); - int skip = Integers.NumberOfTrailingZeros((sign ^ word16) | 0x00010000); + int skip = Integers.NumberOfTrailingZeros((sign ^ word16) | (1 << 16)); if (skip > 0) { j += skip; |