mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 05:37:46 +00:00
unit_tests: a couple more bulletproof unit tests for gamma
This commit is contained in:
parent
c444b1b229
commit
3011178021
1 changed files with 19 additions and 0 deletions
|
@ -174,3 +174,22 @@ TEST(bulletproofs, invalid_31)
|
|||
rct::Bulletproof proof = bulletproof_PROVE(invalid_amount, rct::skGen());
|
||||
ASSERT_FALSE(rct::bulletproof_VERIFY(proof));
|
||||
}
|
||||
|
||||
TEST(bulletproofs, invalid_gamma_0)
|
||||
{
|
||||
rct::key invalid_amount = rct::zero();
|
||||
invalid_amount[8] = 1;
|
||||
rct::key gamma = rct::zero();
|
||||
rct::Bulletproof proof = bulletproof_PROVE(invalid_amount, gamma);
|
||||
ASSERT_FALSE(rct::bulletproof_VERIFY(proof));
|
||||
}
|
||||
|
||||
TEST(bulletproofs, invalid_gamma_ff)
|
||||
{
|
||||
rct::key invalid_amount = rct::zero();
|
||||
invalid_amount[8] = 1;
|
||||
rct::key gamma = rct::zero();
|
||||
memset(&gamma, 0xff, sizeof(gamma));
|
||||
rct::Bulletproof proof = bulletproof_PROVE(invalid_amount, gamma);
|
||||
ASSERT_FALSE(rct::bulletproof_VERIFY(proof));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue