From 1c29f2eb497b09767f6cdc1260eaa551bf105aa1 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sat, 6 Dec 2014 05:07:26 -0800 Subject: [PATCH] Remove redundant secp256k1_fe_normalize from secp256k1_gej_add_ge_var. This was a missed optimization in the extraction of gej+ge from gej+gej. --- src/group_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/group_impl.h b/src/group_impl.h index cbd0d8c..23678bc 100644 --- a/src/group_impl.h +++ b/src/group_impl.h @@ -294,7 +294,7 @@ static void secp256k1_gej_add_ge_var(secp256k1_gej_t *r, const secp256k1_gej_t * } r->infinity = 0; secp256k1_fe_t z12; secp256k1_fe_sqr(&z12, &a->z); - secp256k1_fe_t u1 = a->x; secp256k1_fe_normalize(&u1); + secp256k1_fe_t u1 = a->x; secp256k1_fe_t u2; secp256k1_fe_mul(&u2, &b->x, &z12); secp256k1_fe_t s1 = a->y; secp256k1_fe_normalize(&s1); secp256k1_fe_t s2; secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);