From: Loup Vaillant Date: Sun, 5 Aug 2018 00:14:50 +0000 (+0200) Subject: Inlined ge_from_xy() (called only once) X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=f1799cea1e0181cbe274e471890e1f52c9d88996;p=Monocypher.git Inlined ge_from_xy() (called only once) --- diff --git a/src/monocypher.c b/src/monocypher.c index 0c0694a..bdc16ce 100644 --- a/src/monocypher.c +++ b/src/monocypher.c @@ -1367,16 +1367,6 @@ static void ge_zero(ge *p) fe_0(p->T); } -static void ge_from_xy(ge *p, const fe x, const fe y) -{ - FOR (i, 0, 10) { - p->X[i] = x[i]; - p->Y[i] = y[i]; - } - fe_1 (p->Z); - fe_mul(p->T, x, y); -} - static void ge_tobytes(u8 s[32], const ge *h) { fe recip, x, y; @@ -1557,7 +1547,10 @@ static void ge_double_scalarmult_vartime(ge *sum, const ge *P, static const fe Y = { -26843541, -6710886, 13421773, -13421773, 26843546, 6710886, -13421773, 13421773, -26843546, -6710886 }; ge B; - ge_from_xy(&B, X, Y); + fe_copy(B.X, X); + fe_copy(B.Y, Y); + fe_1 (B.Z); + fe_mul (B.T, X, Y); // cached points for addition ge_cached cP[8]; ge_precompute(cP, P);