Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2013-11-08 05:26:04 +0400
committerDavid Hook <dgh@cryptoworkshop.com>2013-11-08 05:26:04 +0400
commit454c5168a3107fdad665a32261e9eeee7bd5525d (patch)
treee8bc39bf5a72c1a3b02865381259fc661ca93bb5 /core/src/main/java/org/bouncycastle/crypto/signers
parentaf343d1ae8d119fbf7710cb819cb3798c1ed583a (diff)
fixed truncation of long hashes to prevent too many bits from being removed.
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/signers')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/signers/DSTU4145Signer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/signers/DSTU4145Signer.java b/core/src/main/java/org/bouncycastle/crypto/signers/DSTU4145Signer.java
index 2979a5db..0e769509 100644
--- a/core/src/main/java/org/bouncycastle/crypto/signers/DSTU4145Signer.java
+++ b/core/src/main/java/org/bouncycastle/crypto/signers/DSTU4145Signer.java
@@ -154,7 +154,7 @@ public class DSTU4145Signer
byte[] data = Arrays.clone(hash);
reverseBytes(data);
BigInteger num = new BigInteger(1, data);
- while (num.bitLength() >= curve.getFieldSize())
+ while (num.bitLength() > curve.getFieldSize())
{
num = num.clearBit(num.bitLength() - 1);
}