Change memo field size and relocate `ciphertexts` field of JoinSplit description.
This commit is contained in:
parent
d7da4ecc33
commit
f5e5707d4c
|
@ -29,8 +29,8 @@ TEST(noteencryption, api)
|
||||||
ASSERT_TRUE(b.get_epk() != c.get_epk());
|
ASSERT_TRUE(b.get_epk() != c.get_epk());
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::array<unsigned char, 201> message;
|
boost::array<unsigned char, ZC_NOTEPLAINTEXT_SIZE> message;
|
||||||
for (unsigned char i = 0; i < 201; i++) {
|
for (size_t i = 0; i < ZC_NOTEPLAINTEXT_SIZE; i++) {
|
||||||
// Fill the message with dummy data
|
// Fill the message with dummy data
|
||||||
message[i] = (unsigned char) i;
|
message[i] = (unsigned char) i;
|
||||||
}
|
}
|
||||||
|
@ -195,4 +195,4 @@ TEST(noteencryption, prf_rho)
|
||||||
TEST(noteencryption, uint252)
|
TEST(noteencryption, uint252)
|
||||||
{
|
{
|
||||||
ASSERT_THROW(uint252(uint256S("f6da8716682d600f74fc16bd0187faad6a26b4aa4c24d5c055b216d94516847e")), std::domain_error);
|
ASSERT_THROW(uint252(uint256S("f6da8716682d600f74fc16bd0187faad6a26b4aa4c24d5c055b216d94516847e")), std::domain_error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,10 +92,10 @@ public:
|
||||||
READWRITE(nullifiers);
|
READWRITE(nullifiers);
|
||||||
READWRITE(commitments);
|
READWRITE(commitments);
|
||||||
READWRITE(ephemeralKey);
|
READWRITE(ephemeralKey);
|
||||||
READWRITE(ciphertexts);
|
|
||||||
READWRITE(randomSeed);
|
READWRITE(randomSeed);
|
||||||
READWRITE(macs);
|
READWRITE(macs);
|
||||||
READWRITE(proof);
|
READWRITE(proof);
|
||||||
|
READWRITE(ciphertexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend bool operator==(const JSDescription& a, const JSDescription& b)
|
friend bool operator==(const JSDescription& a, const JSDescription& b)
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -173,7 +173,7 @@ uint252 random_uint252()
|
||||||
return uint252(rand);
|
return uint252(rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
template class NoteEncryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE>;
|
template class NoteEncryption<ZC_NOTEPLAINTEXT_SIZE>;
|
||||||
template class NoteDecryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE>;
|
template class NoteDecryption<ZC_NOTEPLAINTEXT_SIZE>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ uint252 random_uint252();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef libzcash::NoteEncryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteEncryption;
|
typedef libzcash::NoteEncryption<ZC_NOTEPLAINTEXT_SIZE> ZCNoteEncryption;
|
||||||
typedef libzcash::NoteDecryption<ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE> ZCNoteDecryption;
|
typedef libzcash::NoteDecryption<ZC_NOTEPLAINTEXT_SIZE> ZCNoteDecryption;
|
||||||
|
|
||||||
#endif /* ZC_NOTE_ENCRYPTION_H_ */
|
#endif /* ZC_NOTE_ENCRYPTION_H_ */
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
#define ZC_V_SIZE 8
|
#define ZC_V_SIZE 8
|
||||||
#define ZC_RHO_SIZE 32
|
#define ZC_RHO_SIZE 32
|
||||||
#define ZC_R_SIZE 32
|
#define ZC_R_SIZE 32
|
||||||
#define ZC_MEMO_SIZE 128
|
#define ZC_MEMO_SIZE 512
|
||||||
|
|
||||||
|
#define ZC_NOTEPLAINTEXT_SIZE ZC_NOTEPLAINTEXT_LEADING + ZC_V_SIZE + ZC_RHO_SIZE + ZC_R_SIZE + ZC_MEMO_SIZE
|
||||||
|
|
||||||
#define ZKSNARK_PROOF_SIZE 584
|
#define ZKSNARK_PROOF_SIZE 584
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue