mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 12:46:06 -04:00
rct: add the tx prefix hash into the MLSAG
to protect the non-signatures parts of the tx from tampering.
This commit is contained in:
parent
35dce5c70c
commit
6d0e47148b
6 changed files with 43 additions and 9 deletions
|
@ -467,3 +467,21 @@ bool gen_rct_tx_rct_add_vout::generate(std::vector<test_event_entry>& events) co
|
|||
NULL, [](transaction &tx) {tx.vout.push_back(tx.vout.back());});
|
||||
}
|
||||
|
||||
bool gen_rct_tx_pre_rct_altered_extra::generate(std::vector<test_event_entry>& events) const
|
||||
{
|
||||
const int mixin = 2;
|
||||
const int out_idx[] = {0, -1};
|
||||
const uint64_t amount_paid = 10000;
|
||||
return generate_with(events, out_idx, mixin, amount_paid, false,
|
||||
NULL, [](transaction &tx) {std::string extra_nonce; crypto::hash pid = cryptonote::null_hash; set_payment_id_to_tx_extra_nonce(extra_nonce, pid); add_extra_nonce_to_tx_extra(tx.extra, extra_nonce);});
|
||||
}
|
||||
|
||||
bool gen_rct_tx_rct_altered_extra::generate(std::vector<test_event_entry>& events) const
|
||||
{
|
||||
const int mixin = 2;
|
||||
const int out_idx[] = {1, -1};
|
||||
const uint64_t amount_paid = 10000;
|
||||
return generate_with(events, out_idx, mixin, amount_paid, false,
|
||||
NULL, [](transaction &tx) {std::string extra_nonce; crypto::hash pid = cryptonote::null_hash; set_payment_id_to_tx_extra_nonce(extra_nonce, pid); add_extra_nonce_to_tx_extra(tx.extra, extra_nonce);});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue