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:
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/IntArray.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/IntArray.java b/core/src/main/java/org/bouncycastle/math/ec/IntArray.java
index cc725d69..11af2cfd 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/IntArray.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/IntArray.java
@@ -373,6 +373,15 @@ class IntArray
}
}
+ private void addShiftedByWordsQuick(IntArray other, int words)
+ {
+ int otherLen = other.m_ints.length;
+ for (int i = 0; i < otherLen; ++i)
+ {
+ m_ints[words + i] ^= other.m_ints[i];
+ }
+ }
+
public int getLength()
{
return m_ints.length;
@@ -522,7 +531,7 @@ class IntArray
if ((m_ints[j] & testBit) != 0)
{
// The kth bit of m_ints[j] is set
- c.addShiftedByWords(b, j);
+ c.addShiftedByWordsQuick(b, j);
}
}
if ((testBit <<= 1) == 0)