summaryrefslogtreecommitdiff
path: root/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java
diff options
context:
space:
mode:
authorAdam Vartanian <flooey@google.com>2017-06-26 15:45:05 +0100
committerAdam Vartanian <flooey@google.com>2017-06-26 15:46:34 +0100
commit823ad5bac1616941ae772fe6b69560b49c89d7b3 (patch)
tree24b263c8c242eb3ef86f60429c056402df23faa9 /bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java
parenteaf604a467ff401cd0e0f74051ff5afa9e07359d (diff)
downloadbouncycastle-823ad5bac1616941ae772fe6b69560b49c89d7b3.tar.gz
bouncycastle: Android tree with upstream code for version 1.57
Test: no tests needed, this branch is only for diffing against upstream Change-Id: I0bfc36b8c07bf4698383ee28ab771907fc1fa7fc
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java b/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java
index 7a95a734..0718239c 100644
--- a/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java
+++ b/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT283R1Point.java
@@ -147,7 +147,6 @@ public class SecT283R1Point extends AbstractF2m
ECFieldElement Y2 = L2;
ECFieldElement L = Y1.add(Y2).divide(X1);
-// X3 = L.square().add(L).add(X1).add(curve.getA());
X3 = L.square().add(L).add(X1).addOne();
if (X3.isZero())
{
@@ -259,10 +258,7 @@ public class SecT283R1Point extends AbstractF2m
ECFieldElement Z1Sq = Z1.square();
ECFieldElement L1Z1 = L1.multiply(Z1);
-// ECFieldElement T = curve.getA().multiply(Z1Sq).add(L1Sq).add(L1Z1);
ECFieldElement T = Z1Sq.add(L1Sq).add(L1Z1);
- ECFieldElement L2plus1 = L2.addOne();
-// ECFieldElement A = curve.getA().add(L2plus1).multiply(Z1Sq).add(L1Sq).multiplyPlusProduct(T, X1Sq, Z1Sq);
ECFieldElement A = L2.multiply(Z1Sq).add(L1Sq).multiplyPlusProduct(T, X1Sq, Z1Sq);
ECFieldElement X2Z1Sq = X2.multiply(Z1Sq);
ECFieldElement B = X2Z1Sq.add(T).square();
@@ -284,7 +280,7 @@ public class SecT283R1Point extends AbstractF2m
ECFieldElement X3 = A.square().multiply(X2Z1Sq);
ECFieldElement Z3 = A.multiply(B).multiply(Z1Sq);
- ECFieldElement L3 = A.add(B).square().multiplyPlusProduct(T, L2plus1, Z3);
+ ECFieldElement L3 = A.add(B).square().multiplyPlusProduct(T, L2.addOne(), Z3);
return new SecT283R1Point(curve, X3, L3, new ECFieldElement[]{ Z3 }, this.withCompression);
}