Add payment disclosure as experimental feature.

This commit is contained in:
Simon
2017-11-14 13:29:05 -08:00
parent 086c6bed58
commit 45232b1961
27 changed files with 1324 additions and 14 deletions

View File

@@ -198,7 +198,8 @@ public:
uint64_t vpub_old,
uint64_t vpub_new,
const uint256& rt,
bool computeProof
bool computeProof,
uint256 *out_esk // Payment disclosure
) {
if (computeProof && !pk) {
throw std::runtime_error("JoinSplit proving key not loaded");
@@ -303,6 +304,12 @@ public:
}
out_ephemeralKey = encryptor.get_epk();
// !!! Payment disclosure START
if (out_esk != nullptr) {
*out_esk = encryptor.get_esk();
}
// !!! Payment disclosure END
}
// Authenticate h_sig with each of the input