initial commit

Signed-off-by: Kamal Tufekcic <kamal@lo.sh>
This commit is contained in:
Kamal Tufekcic 2026-04-02 23:48:10 +03:00
commit d73755a275
No known key found for this signature in database
165830 changed files with 568244 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use soliton::identity::{hybrid_verify, HybridSignature, IdentityPublicKey};
fuzz_target!(|data: &[u8]| {
// pk (3200) + sig (3373) = 6573 minimum bytes.
if data.len() < 3200 + 3373 {
return;
}
let Ok(pk) = IdentityPublicKey::from_bytes(data[..3200].to_vec()) else {
return;
};
let Ok(sig) = HybridSignature::from_bytes(data[3200..3200 + 3373].to_vec()) else {
return;
};
let msg = &data[3200 + 3373..];
// hybrid_verify must never panic regardless of input.
// Exercises: Ed25519 verify + ML-DSA verify (pure-Rust ml-dsa crate).
let _ = hybrid_verify(&pk, msg, &sig);
});