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:
authorPeter Dettman <peter.dettman@bouncycastle.org>2013-09-26 15:01:16 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-09-26 15:01:16 +0400
commita0ff80132b0b3ec892985dcbe658da49dd45f5dc (patch)
tree1a495f21447a251f91d3f91fafc4db83391fadf8 /core/src/main/java/org/bouncycastle/math
parent72516700f1bb08105913cc87bdddb8093dcce210 (diff)
Some renaming
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/ECAlgorithms.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/ECAlgorithms.java b/core/src/main/java/org/bouncycastle/math/ec/ECAlgorithms.java
index 730dd56f..0e205b1f 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/ECAlgorithms.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/ECAlgorithms.java
@@ -61,7 +61,7 @@ public class ECAlgorithms
return c.importPoint(Q);
}
- static void implMontgomeryTrick(ECFieldElement[] a, int offset, int length)
+ static void implMontgomeryTrick(ECFieldElement[] zs, int off, int len)
{
/*
* Uses the "Montgomery Trick" to invert many field elements, with only a single actual
@@ -70,26 +70,26 @@ public class ECAlgorithms
* by Katsuyuki Okeya, Kouichi Sakurai.
*/
- ECFieldElement[] c = new ECFieldElement[length];
- c[0] = a[offset];
+ ECFieldElement[] c = new ECFieldElement[len];
+ c[0] = zs[off];
int i = 0;
- while (++i < length)
+ while (++i < len)
{
- c[i] = c[i - 1].multiply(a[offset + i]);
+ c[i] = c[i - 1].multiply(zs[off + i]);
}
ECFieldElement u = c[--i].invert();
while (i > 0)
{
- int j = offset + i--;
- ECFieldElement tmp = a[j];
- a[j] = c[i].multiply(u);
+ int j = off + i--;
+ ECFieldElement tmp = zs[j];
+ zs[j] = c[i].multiply(u);
u = u.multiply(tmp);
}
- a[offset] = u;
+ zs[off] = u;
}
static ECPoint implShamirsTrick(ECPoint P, BigInteger k,