mirror of
https://github.com/monero-project/monero.git
synced 2025-05-02 17:34:53 -04:00
ringct: the commitment mask is now deterministic
saves space in the tx and is safe Found by knaccc
This commit is contained in:
parent
99d946e619
commit
7d37598158
7 changed files with 55 additions and 63 deletions
|
@ -249,15 +249,18 @@ namespace boost
|
|||
template <class Archive>
|
||||
inline void serialize(Archive &a, rct::ecdhTuple &x, const boost::serialization::version_type ver)
|
||||
{
|
||||
a & x.mask;
|
||||
if (ver < 1)
|
||||
{
|
||||
a & x.mask;
|
||||
a & x.amount;
|
||||
return;
|
||||
}
|
||||
crypto::hash8 &amount = (crypto::hash8&)x.amount;
|
||||
if (!Archive::is_saving::value)
|
||||
{
|
||||
memset(&x.mask, 0, sizeof(x.mask));
|
||||
memset(&x.amount, 0, sizeof(x.amount));
|
||||
}
|
||||
a & amount;
|
||||
// a & x.senderPk; // not serialized, as we do not use it in monero currently
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue