Files
wolfssl/tests/api
Daniele Lacamera 75b7b1b366 Falcon: add tests/api/test_falcon.c API unit tests
Falcon had crypto-level coverage (KAT + native round-trip in
wolfcrypt/test/test.c) but, unlike ML-DSA and SLH-DSA, no dedicated
tests/api/ unit test exercising the public wc_falcon_* / wc_Falcon_* API
surface. This adds one, wired into the unit test runner as the "falcon"
group.

Coverage (both Falcon-512 / L1 and Falcon-1024 / L5, which are always
compiled together):
- sizes:        size/priv_size/pub_size/sig_size vs the spec constants,
                get_level round-trip, and NULL / unset-level rejection.
- make_key:     NULL and unset-level rejection; real keygen -> check_key.
- sign_vfy:     sign -> verify; wrong-message and one-byte tamper rejected;
                too-small buffer -> BUFFER_E with the required length set;
                verify with no public key -> BAD_FUNC_ARG.
- import_export: public / private-only (raw) / private (concat) / export_key
                round-trips, each re-signed or verified, plus too-small
                (BUFFER_E) and wrong-size (BAD_FUNC_ARG) paths.
- check_key:    valid pass; corrupted public copy, public-only and
                private-only keys all fail (PUBLIC_KEY_E); NULL rejected.
- der:          KeyToDer / PrivateKeyToDer / PublicKeyToDer round-trips via
                PrivateKeyDecode / PublicKeyDecode, size-query (NULL output),
                and the SetAsymKeyDer too-small contract (BAD_FUNC_ARG).
- error_paths:  exhaustive NULL / bad-level / wrong-size / no-key-set
                argument sanitising for every public entry point.

Tests requiring key generation or signing are gated on
WC_FALCON_HAVE_NATIVE_SIGN so the file also builds in
WOLFSSL_FALCON_VERIFY_ONLY and WOLF_CRYPTO_CB_ONLY_FALCON configurations;
size and argument-sanitising tests run in every HAVE_FALCON build.

Verified: 7/7 pass under both --enable-falcon-avx2 and the default
constant-time build; compiles clean with WOLFSSL_FALCON_VERIFY_ONLY.
2026-07-22 09:52:26 +02:00
..
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-04-15 17:05:32 +10:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-03-05 08:51:52 -06:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-05-13 11:36:36 -06:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-06-04 18:29:24 +10:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-05-07 02:33:58 +00:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-07-08 09:33:47 +10:00
2026-07-08 09:33:47 +10:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-07-07 16:02:27 +02:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-02-18 09:52:21 -07:00
2026-07-08 09:33:47 +10:00
2026-07-08 09:33:47 +10:00
2026-06-04 18:29:24 +10:00