Skip to content

Commit e0c243f

Browse files
committed
Add simple breaking test case
1 parent 954881e commit e0c243f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/bppp/tests_impl.h

+4
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ void rangeproof_test(size_t digit_base, size_t num_bits, uint64_t value, uint64_
600600

601601
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);
602602
CHECK(res == 1);
603+
604+
proof[plen - 1] ^= 1;
605+
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);
606+
CHECK(res == 0);
603607
}
604608

605609
void run_bppp_tests(void) {

0 commit comments

Comments
 (0)