aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:35 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-05 19:11:35 +0200
commit5950d356b6982b92113e11fb5a7ac49b1db86fc8 (patch)
tree08e43e6d5ce7ad95adf1698d2a8411b15b2d572d
parentMerge pull request #3277 (diff)
parentrctSigs - loop invariant code removed from the loop (diff)
downloadmonero-5950d356b6982b92113e11fb5a7ac49b1db86fc8.tar.xz
Merge pull request #3301
34a2a085 rctSigs - loop invariant code removed from the loop (Dusan Klinec)
-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 d3437eb36..3a30e6320 100644
--- a/src/ringct/rctSigs.cpp
+++ b/src/ringct/rctSigs.cpp
@@ -506,11 +506,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, hwdev);
}