rct: rework the verification preparation process

The whole rct data apart from the MLSAGs is now included in
the signed message, to avoid malleability issues.

Instead of passing the data that's not serialized as extra
parameters to the verification API, the transaction is modified
to fill all that information. This means the transaction can
not be const anymore, but it cleaner in other ways.
This commit is contained in:
moneromooo-monero 2016-08-09 11:38:54 +01:00
parent 3ab2ab3e76
commit d93746b6d3
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 195 additions and 200 deletions

View file

@ -130,8 +130,8 @@ TEST(ringct, MG_sigs)
sk[j] = xm[ind][j];
}
key message = identity();
mgSig IIccss = MLSAG_Gen(message, P, sk, ind);
ASSERT_TRUE(MLSAG_Ver(message, P, IIccss, IIccss.II));
mgSig IIccss = MLSAG_Gen(message, P, sk, ind, R);
ASSERT_TRUE(MLSAG_Ver(message, P, IIccss, R));
//#MG sig: false one
N = 3;// #cols
@ -151,8 +151,8 @@ TEST(ringct, MG_sigs)
sk[j] = xx[ind][j];
}
sk[2] = skGen();//asume we don't know one of the private keys..
IIccss = MLSAG_Gen(message, P, sk, ind);
ASSERT_FALSE(MLSAG_Ver(message, P, IIccss, IIccss.II));
IIccss = MLSAG_Gen(message, P, sk, ind, R);
ASSERT_FALSE(MLSAG_Ver(message, P, IIccss, R));
}
TEST(ringct, range_proofs)