From 242df465e8e9e723ae636a96ecdf6624cc28c643 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 7 Aug 2019 23:30:48 -0400 Subject: [PATCH] Update comments --- ecp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecp.cpp b/ecp.cpp index a77d555f..036296a7 100644 --- a/ecp.cpp +++ b/ecp.cpp @@ -896,6 +896,7 @@ ECP::Point ECP::AdditionFunction::operator()(const Point& P, const Point& Q) con bool double_P = field.Equal(P.x, Q.x) && field.Equal(P.y, Q.y); bool identity = field.Equal(P.x, Q.x) && !field.Equal(P.y, Q.y); + // This code taken from Double(P) for below identity = static_cast((double_P * (P.identity + (P.y == field.Identity()))) + identity); if (double_P) @@ -910,7 +911,7 @@ ECP::Point ECP::AdditionFunction::operator()(const Point& P, const Point& Q) con } else { - // Original Double (P,Q) code + // Original Add(P,Q) code FieldElement t = field.Subtract(Q.y, P.y); t = field.Divide(t, field.Subtract(Q.x, P.x)); FieldElement x = field.Subtract(field.Subtract(field.Square(t), P.x), Q.x);