aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDusan Klinec <dusan.klinec@gmail.com>2018-02-21 16:35:06 +0100
committerDusan Klinec <dusan.klinec@gmail.com>2018-02-21 16:35:06 +0100
commit34a2a08530bcbffa145088a26dbf7c33e8b2daa5 (patch)
tree1daaff6c0a0b3911c3649fd086fced610fc1596c
parentMerge pull request #3245 (diff)
downloadmonero-34a2a08530bcbffa145088a26dbf7c33e8b2daa5.tar.xz
rctSigs - loop invariant code removed from the loop
-rw-r--r--src/ringct/rctSigs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp
index 0c2be5add..e98794c07 100644
--- a/src/ringct/rctSigs.cpp
+++ b/src/ringct/rctSigs.cpp
@@ -505,11 +505,12 @@ namespace rct {
keyV sk(rows + 1);
size_t i;
keyM M(cols, tmp);
+
+ sk[0] = copy(inSk.dest);
+ sc_sub(sk[1].bytes, inSk.mask.bytes, a.bytes);
for (i = 0; i < cols; i++) {
M[i][0] = pubs[i].dest;
subKeys(M[i][1], pubs[i].mask, Cout);
- sk[0] = copy(inSk.dest);
- sc_sub(sk[1].bytes, inSk.mask.bytes, a.bytes);
}
return MLSAG_Gen(message, M, sk, kLRki, mscout, index, rows);
}