File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,13 @@ static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
249249}
250250
251251static void secp256k1_gej_double_var (secp256k1_gej * r , const secp256k1_gej * a , secp256k1_fe * rzr ) {
252- /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate */
252+ /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate.
253+ *
254+ * Note that there is an implementation described at
255+ * https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l
256+ * which trades a multiply for a square, but in practice this is actually slower,
257+ * mainly because it requires more normalizations.
258+ */
253259 secp256k1_fe t1 ,t2 ,t3 ,t4 ;
254260 /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity,
255261 * Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have
You can’t perform that action at this time.
0 commit comments