Skip to content

Commit

Permalink
more work on fixing CI & actually include the new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b-wagn committed Oct 26, 2023
1 parent 351af83 commit c46def1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', SCHNORRSIG: 'yes', SCHNORRSIG_HALFAGG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', MUSIG: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes' }
- env_vars: { WIDEMUL: 'int128' }
- env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes', SCHNORRSIG_HALFAGG: 'yes', ELLSWIFT: 'yes' }
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes', SCHNORRSIG_HALFAGG: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', MUSIG: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes'}
- env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
- env_vars: { RECOVERY: 'yes', SCHNORRSIG: 'yes', SCHNORRSIG_HALFAGG: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', MUSIG: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes'}
Expand Down
19 changes: 19 additions & 0 deletions src/modules/schnorrsig_halfagg/tests_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,30 @@ static void test_schnorrsig_aggregate_unforge(void) {
}
}

/*
In this test, we make sure that the algorithms properly reject
for overflowing and non parseable values.
*/
static void test_schnorrsig_aggregate_overflow(void) {
/* In general: algorithms can reject if */
/* (1) some pk can not be serialized */
/* (2) the s in signatures overflows */
/* (3) R can not be decoded */
/* TODO */
/* Test 1: We check that aggregation */
/* returns 0 if inputs violate (1) or (2) */
/* TODO */
/* Test 2: We check that verification returns 0 */
/* if inputs violate (1), (2), or (3) */
}

static void run_schnorrsig_halfagg_tests(void) {
test_schnorrsig_sha256_tagged_aggregate();
test_schnorrsig_aggregate_spec_vectors();
test_schnorrsig_aggregate();
test_schnorrsig_aggregate_api();
test_schnorrsig_aggregate_unforge();
test_schnorrsig_aggregate_overflow();
}

#endif

0 comments on commit c46def1

Please sign in to comment.