test: fuzz target for the signature API (mandatory test 6)

fuzz/fuzz_targets/signatures.rs: raw bytes into VerifyingKey, Signature,
SigningKey and AppContext; and the input XORed into a valid verifying key,
signature, message, raw ctx, key-binding id/window/time, X-Wing key and
binding signature. Beyond "never panics" it asserts that only the exact
signed bytes verify.

Run on 5a52854 plus this target, Windows 10, nightly 1.102.0
(739adecd4 2026-11-24), libFuzzer + ASan (MSVC 14.44 asan runtime),
corpus and artifacts on D:, 12 seed inputs: 605 s, 38,609 executions,
63 exec/s, 0 crashes, 0 artifacts, coverage 3,549, 122 corpus units.
This commit is contained in:
2026-11-25 13:33:53 +01:00
parent 5a52854ccc
commit ddda8415eb
3 changed files with 242 additions and 1 deletions
+10
View File
@@ -11,6 +11,9 @@ cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
arcanum = { path = "..", features = ["hazmat"] }
# A seeded RNG for the signing fixture (fuzz input never chooses randomness).
chacha20 = { version = "0.10", default-features = false, features = ["rng"] }
rand_core = { version = "0.10", default-features = false }
# Keep the fuzz crate out of the library's own dependency graph and checks.
[workspace]
@@ -22,3 +25,10 @@ path = "fuzz_targets/untrusted_input.rs"
test = false
doc = false
bench = false
[[bin]]
name = "signatures"
path = "fuzz_targets/signatures.rs"
test = false
doc = false
bench = false