diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-12-08 23:43:40 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-12-08 23:43:41 +0200 |
commit | 22e16e88e3d2d4475761f9c2c0c59a7b20247f9f (patch) | |
tree | ffa7dae44cca09099708d6386cb0b0b4c802f10a /src/ringct/rctOps.cpp | |
parent | Merge pull request #1405 (diff) | |
parent | blockchain: bring the v4 fork height one block forward (diff) | |
download | monero-22e16e88e3d2d4475761f9c2c0c59a7b20247f9f.tar.xz |
Merge pull request #1413
648ea6be blockchain: bring the v4 fork height one block forward (luigi1111)
46a0dcc1 ringct: luigi1111's changes to fix and speedup Borromean sigs (luigi1111)
76958fc7 ringct: switch to Borromean signatures (Shen Noether)
Diffstat (limited to 'src/ringct/rctOps.cpp')
-rw-r--r-- | src/ringct/rctOps.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp index cf55897a7..21f29ccf5 100644 --- a/src/ringct/rctOps.cpp +++ b/src/ringct/rctOps.cpp @@ -267,7 +267,7 @@ namespace rct { ge_p3_tobytes(AB.bytes, &A2); } - //checks if A, B are equal as curve points + //checks if A, B are equal in terms of bytes (may say no if one is a non-reduced scalar) //without doing curve operations bool equalKeys(const key & a, const key & b) { bool rv = true; @@ -359,6 +359,19 @@ namespace rct { return rv; } + key cn_fast_hash(const key64 keys) { + key rv; + cn_fast_hash(rv, &keys[0], 64 * sizeof(keys[0])); + //dp(rv); + return rv; + } + + key hash_to_scalar(const key64 keys) { + key rv = cn_fast_hash(keys); + sc_reduce32(rv.bytes); + return rv; + } + key hashToPointSimple(const key & hh) { key pointk; ge_p1p1 point2; |