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:
moneromooo-monero 2016-06-28 16:03:28 +01:00
parent 35dce5c70c
commit 6d0e47148b
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 43 additions and 9 deletions

View file

@ -187,7 +187,7 @@ TEST(ringct, range_proofs)
destinations.push_back(Pk);
//compute rct data with mixin 500
rctSig s = genRct(sc, pc, destinations, amounts, 3);
rctSig s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_TRUE(verRct(s));
@ -204,7 +204,7 @@ TEST(ringct, range_proofs)
//compute rct data with mixin 500
s = genRct(sc, pc, destinations, amounts, 3);
s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_FALSE(verRct(s));
@ -248,7 +248,7 @@ TEST(ringct, range_proofs_with_fee)
destinations.push_back(Pk);
//compute rct data with mixin 500
rctSig s = genRct(sc, pc, destinations, amounts, 3);
rctSig s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_TRUE(verRct(s));
@ -265,7 +265,7 @@ TEST(ringct, range_proofs_with_fee)
//compute rct data with mixin 500
s = genRct(sc, pc, destinations, amounts, 3);
s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_FALSE(verRct(s));
@ -295,7 +295,7 @@ static rct::rctSig make_sample_rct_sig(int n_inputs, const uint64_t input_amount
destinations.push_back(Pk);
}
return genRct(sc, pc, destinations, amounts, 3);;
return genRct(sc, pc, destinations, amounts, rct::zero(), 3);;
}
static bool range_proof_test(bool expected_valid,