aboutsummaryrefslogtreecommitdiff
path: root/src/ringct
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-24 21:59:24 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-12 12:48:10 +0000
commitaaafa8a946211f5d5dc0e6e26f636f12a9700e70 (patch)
tree9bc85e7bbd5f873f8c1bea84636aeac82d2290ea /src/ringct
parentMerge pull request #4927 (diff)
downloadmonero-aaafa8a946211f5d5dc0e6e26f636f12a9700e70.tar.xz
ringct: avoid repeated point conversion
Diffstat (limited to 'src/ringct')
-rw-r--r--src/ringct/rctSigs.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp
index baa649f82..316f0e5e8 100644
--- a/src/ringct/rctSigs.cpp
+++ b/src/ringct/rctSigs.cpp
@@ -605,10 +605,19 @@ namespace rct {
keyV tmp(rows + 1);
size_t i;
keyM M(cols, tmp);
+ ge_p3 Cp3;
+ CHECK_AND_ASSERT_MES_L1(ge_frombytes_vartime(&Cp3, C.bytes) == 0, false, "point conv failed");
+ ge_cached Ccached;
+ ge_p3_to_cached(&Ccached, &Cp3);
+ ge_p1p1 p1;
//create the matrix to mg sig
for (i = 0; i < cols; i++) {
M[i][0] = pubs[i].dest;
- subKeys(M[i][1], pubs[i].mask, C);
+ ge_p3 p3;
+ CHECK_AND_ASSERT_MES_L1(ge_frombytes_vartime(&p3, pubs[i].mask.bytes) == 0, false, "point conv failed");
+ ge_sub(&p1, &p3, &Ccached);
+ ge_p1p1_to_p3(&p3, &p1);
+ ge_p3_tobytes(M[i][1].bytes, &p3);
}
//DP(C);
return MLSAG_Ver(message, M, mg, rows);