aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/crypto-ops.c
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-21 22:55:57 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-07 19:23:10 +0000
commitada4291469156f76eb605b2110a068df58a4e142 (patch)
tree6400f6cdff24a12d0d30fe0daec53caf92545490 /src/crypto/crypto-ops.c
parentringct: add a version of addKeys which returns the result (diff)
downloadmonero-ada4291469156f76eb605b2110a068df58a4e142.tar.xz
add a version of ge_double_scalarmult_precomp_vartime with A precomp
Diffstat (limited to '')
-rw-r--r--src/crypto/crypto-ops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/crypto/crypto-ops.c b/src/crypto/crypto-ops.c
index 1e4969558..b5c62bce4 100644
--- a/src/crypto/crypto-ops.c
+++ b/src/crypto/crypto-ops.c
@@ -2000,17 +2000,15 @@ void ge_scalarmult(ge_p2 *r, const unsigned char *a, const ge_p3 *A) {
}
}
-void ge_double_scalarmult_precomp_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b, const ge_dsmp Bi) {
+void ge_double_scalarmult_precomp_vartime2(ge_p2 *r, const unsigned char *a, const ge_dsmp Ai, const unsigned char *b, const ge_dsmp Bi) {
signed char aslide[256];
signed char bslide[256];
- ge_dsmp Ai; /* A, 3A, 5A, 7A, 9A, 11A, 13A, 15A */
ge_p1p1 t;
ge_p3 u;
int i;
slide(aslide, a);
slide(bslide, b);
- ge_dsm_precomp(Ai, A);
ge_p2_0(r);
@@ -2041,6 +2039,13 @@ void ge_double_scalarmult_precomp_vartime(ge_p2 *r, const unsigned char *a, cons
}
}
+void ge_double_scalarmult_precomp_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b, const ge_dsmp Bi) {
+ ge_dsmp Ai; /* A, 3A, 5A, 7A, 9A, 11A, 13A, 15A */
+
+ ge_dsm_precomp(Ai, A);
+ ge_double_scalarmult_precomp_vartime2(r, a, Ai, b, Bi);
+}
+
void ge_mul8(ge_p1p1 *r, const ge_p2 *t) {
ge_p2 u;
ge_p2_dbl(r, t);