diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-11-16 11:15:56 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-11-16 11:15:56 +0200 |
commit | cec336ecbc5c05ad0acf0195d7b62a8a4b9e1499 (patch) | |
tree | 05fa91edced3b9b95da03eba8b86af54d65422d8 /src | |
parent | Merge pull request #4803 (diff) | |
parent | rct: speedup commit a little (diff) | |
download | monero-cec336ecbc5c05ad0acf0195d7b62a8a4b9e1499.tar.xz |
Merge pull request #4804
00907c39 rct: speedup commit a little (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/ringct/rctOps.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp index c64ee4daf..4db543f64 100644 --- a/src/ringct/rctOps.cpp +++ b/src/ringct/rctOps.cpp @@ -295,8 +295,7 @@ namespace rct { //generates C =aG + bH from b, a is given.. void genC(key & C, const key & a, xmr_amount amount) { - key bH = scalarmultH(d2h(amount)); - addKeys1(C, a, bH); + addKeys2(C, a, d2h(amount), rct::H); } //generates a <secret , public> / Pedersen commitment to the amount @@ -335,10 +334,8 @@ namespace rct { } key commit(xmr_amount amount, const key &mask) { - key c = scalarmultBase(mask); - key am = d2h(amount); - key bH = scalarmultH(am); - addKeys(c, c, bH); + key c; + genC(c, mask, amount); return c; } |