aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/rctSigs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-06-12 21:13:12 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:28:21 +0100
commit66f96260b23c07802b54c02715c7fdd577ab12f9 (patch)
tree989457be7ce596649d36ccd1e71a361565814bd8 /src/ringct/rctSigs.h
parentringct: add more convenience functions (diff)
downloadmonero-66f96260b23c07802b54c02715c7fdd577ab12f9.tar.xz
ringct: new {gen,decode}Rct APIs for convenience
A new version of genRct takes the mixRing as parameter, instead of the inPk. inPk are part of the mixRing, and it is cleaner to pass the mixRing data than to fetch it from the RingCT code. A new version of decodeRct also returns the mask. Also, failure to decode throws, so errors are properly detected.
Diffstat (limited to 'src/ringct/rctSigs.h')
-rw-r--r--src/ringct/rctSigs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ringct/rctSigs.h b/src/ringct/rctSigs.h
index 3d5f09942..a7306bc31 100644
--- a/src/ringct/rctSigs.h
+++ b/src/ringct/rctSigs.h
@@ -133,9 +133,11 @@ namespace rct {
//decodeRct: (c.f. http://eprint.iacr.org/2015/1098 section 5.1.1)
// uses the attached ecdh info to find the amounts represented by each output commitment
// must know the destination private key to find the correct amount, else will return a random number
+ rctSig genRct(const ctkeyV & inSk, const keyV & destinations, const vector<xmr_amount> amounts, const ctkeyM &mixRing, unsigned int index);
rctSig genRct(const ctkeyV & inSk, const ctkeyV & inPk, const keyV & destinations, const vector<xmr_amount> amounts, const int mixin);
bool verRct(const rctSig & rv);
- xmr_amount decodeRct(rctSig & rv, const key & sk, unsigned int i);
+ xmr_amount decodeRct(const rctSig & rv, const key & sk, unsigned int i, key & mask);
+ xmr_amount decodeRct(const rctSig & rv, const key & sk, unsigned int i);