From c46def198cf697b5f3e1545cbbe28a8b7700f192 Mon Sep 17 00:00:00 2001 From: Benedikt Date: Thu, 26 Oct 2023 17:46:09 +0200 Subject: [PATCH] more work on fixing CI & actually include the new tests --- .github/workflows/ci.yml | 2 +- src/modules/schnorrsig_halfagg/tests_impl.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28e3155b4..0642c9943 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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'} diff --git a/src/modules/schnorrsig_halfagg/tests_impl.h b/src/modules/schnorrsig_halfagg/tests_impl.h index c16cc278d..0a7aa5bc7 100644 --- a/src/modules/schnorrsig_halfagg/tests_impl.h +++ b/src/modules/schnorrsig_halfagg/tests_impl.h @@ -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