aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-24 17:24:55 +0000
committerlloyd <[email protected]>2015-01-24 17:24:55 +0000
commitcdd1033d64d77167338771630a0ea3dc8dfbc813 (patch)
tree6d6a468d4823e3d7a8ecdc97de479526758f816b /src
parent8ccf4874e39a9814aaaae50b0483d025f1494cc7 (diff)
Reference the EC point add and double algorithms used
Diffstat (limited to 'src')
-rw-r--r--src/lib/math/ec_gfp/point_gfp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/math/ec_gfp/point_gfp.cpp b/src/lib/math/ec_gfp/point_gfp.cpp
index 551407faf..103bb35b5 100644
--- a/src/lib/math/ec_gfp/point_gfp.cpp
+++ b/src/lib/math/ec_gfp/point_gfp.cpp
@@ -60,6 +60,10 @@ void PointGFp::add(const PointGFp& rhs, std::vector<BigInt>& ws_bn)
BigInt& H = ws_bn[6];
BigInt& r = ws_bn[7];
+ /*
+ http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-1998-cmo-2
+ */
+
curve_sqr(rhs_z2, rhs.coord_z);
curve_mult(U1, coord_x, rhs_z2);
curve_mult(S1, coord_y, curve_mult(rhs.coord_z, rhs_z2));
@@ -125,6 +129,10 @@ void PointGFp::mult2(std::vector<BigInt>& ws_bn)
return;
}
+ /*
+ http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-1986-cc
+ */
+
const BigInt& p = curve.get_p();
BigInt& y_2 = ws_bn[0];