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
path: root/core
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-06-21 06:29:40 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-06-21 06:29:40 +0400
commitcf51d06516f7c70dcb60ad0b28fc02763c89d83b (patch)
treea96e85739a064d65bb790731907bb8fdc0b05a38 /core
parent7c3590c7dc479350787f2f46a0bbdc7fbac261df (diff)
Use addTo/subFrom methods
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/Mod.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/Mod.java b/core/src/main/java/org/bouncycastle/math/ec/Mod.java
index 73a8237b..c225655d 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/Mod.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/Mod.java
@@ -49,9 +49,9 @@ public abstract class Mod
if (Nat.gte(uvLen, u, v))
{
- Nat.sub(uvLen, u, v, u);
+ Nat.subFrom(uvLen, v, u);
// assert (u[0] & 1) == 0;
- ac += Nat.sub(len, a, b, a) - bc;
+ ac += Nat.subFrom(len, b, a) - bc;
ac = inversionStep(p, u, uvLen, a, ac);
if (Nat.isOne(uvLen, u))
{
@@ -61,9 +61,9 @@ public abstract class Mod
}
else
{
- Nat.sub(uvLen, v, u, v);
+ Nat.subFrom(uvLen, u, v);
// assert (v[0] & 1) == 0;
- bc += Nat.sub(len, b, a, b) - ac;
+ bc += Nat.subFrom(len, a, b) - ac;
bc = inversionStep(p, v, uvLen, b, bc);
if (Nat.isOne(uvLen, v))
{
@@ -146,11 +146,11 @@ public abstract class Mod
{
if (xc < 0)
{
- xc += Nat.add(len, x, p, x);
+ xc += Nat.addTo(len, p, x);
}
else
{
- xc += Nat.sub(len, x, p, x);
+ xc += Nat.subFrom(len, p, x);
}
}