Skip to content

Commit

Permalink
Add simple breaking test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sanket1729 committed Feb 8, 2023
1 parent da6288c commit c0da897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/bppp/tests_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,10 @@ void rangeproof_test(size_t digit_base, size_t num_bits, uint64_t value, uint64_

res = secp256k1_bppp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
CHECK(res == 1);

proof[plen - 1] ^= 1;
res = secp256k1_bppp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
CHECK(res == 0);
}

void run_bppp_tests(void) {
Expand Down

0 comments on commit c0da897

Please sign in to comment.